Carousel: cycle upcoming schemes instead of one day's (#48) #103
No reviewers
Labels
No labels
area/ai
area/backend
area/frontend
area/infra
area/scheduler
area/wled
good-first-issue
priority/high
priority/low
priority/medium
type/bug
type/chore
type/ci-cd
type/docs
type/feature
type/qa
v1.0.0
v1.1.0
v1.2.0
v2.0.0
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/Iris-WLED!103
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/carousel-upcoming"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The last item on #48.
The problem
The carousel ran over
allSchemeIds = scheme ? [scheme.id] : []— the selected day's single scheme. A one-element carousel isn't a carousel, and it duplicated the Preview button sitting directly beside it. The stop control (the harder half) was already done.Where it moved, and why
Starting a carousel moved to the toolbar. "Upcoming" isn't a property of whichever day happens to be selected, so a day-scoped panel is the wrong home for it. In the toolbar it can offer a real window — next 7 / 30 / 90 days — and report how many schemes that covers before you commit to cycling them.
The side panel keeps the stop control (it's where you look after starting one), and the header keeps the global one.
Reads the resolved day map, not the scheme list
upcomingSchemeIds(dayMap, from, days)walks the resolved days, so the carousel previews what will actually run:buildDayMap)It's a pure function in
calendar/utils.tswith 6 tests covering date ordering, multi-day collapsing, skipped days, the window edge, a month boundary, and the empty case.Permissions
The control sits outside the
isAdminblock: both carousel endpoints arerequire_viewer, and the spec says "bounded WLED preview endpoints, whichviewermay call because Iris automatically restores the prior controller state."useStartCarouselnow takes an interval — the API already acceptedinterval_secsbut the hook never passed it, so the 3-second default was the only reachable value.Verification
Frontend in a
node:22container:tsc -b,eslint,vitest(76 passed, 6 new) andnpm run buildall clean.🤖 Generated with Claude Code