Season preview: play the next 60 days on the virtual strip in a minute #151
Labels
No labels
area/ai
area/backend
area/frontend
area/infra
area/scheduler
area/wled
good-first-issue
priority/high
priority/low
priority/medium
security
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 project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/Iris-WLED#151
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Problem
Reviewing a season means opening schemes one at a time. Nothing answers "what will the house look like over the next two months?" at a glance. That is the question someone asks in November when deciding whether the schedule is right, and the one a household member asks when they didn't set it up.
What exists to build on
Verified against
main:colorAt(segment, scheme, led, time)infrontend/src/components/panel/effectSim.ts. It covers twelve effect families (#14) and has tests.SchemeAnimationPreviewdraws it on a canvas.GET /api/v1/events/resolved?year=returns primary, secondaries, conflicts and pins for every day, but not schemes.GET /api/v1/schemes/for-date/{date}resolves the scheme for one day through the same path as the scheduler (get_events_for_date→resolve_scheme_for_date), including interpolated days (#74).Design
Backend:
GET /api/v1/schemes/for-range?start=&end=returns the resolved scheme for each day in one call, capped at around 120 days. Sixty calls tofor-datewould work but would be slow and chatty.for-dateresolver per day; it must not re-implement it.{date, event, phase, scheme, approved, will_push: "scheme"|"off"|"no_event_default"}. So an unapproved night that will go dark appears dark in the preview, which is the truth, not the colours it would have had.Frontend: a "Season preview" view.
colorAt.Export: "Save as video" (WebM via
MediaRecorderon the canvas), so the season can be shared with the household. It's cheap once the canvas exists.Acceptance
for-rangeagrees withfor-datefor every day in the range. Test it against interpolated, pinned, conflicting, unapproved and no-event days.prefers-reduced-motion(static per-day swatches instead of animation), and the photosensitivity guard's (#150) effective values once that lands.Picking this up.
for-rangeis built on #149'sday_plan.plan_for_range, so the preview shows exactly what the on job will push, including dark nights, not a second reading of the calendar. When #150 lands, the preview also shows the guarded effect and speed. It's an additive endpoint plus a new frontend view.Done in #172 (squash-merged, CI green).
Delivered:
GET /schemes/for-range, built onplan_for_range, so the preview shows exactly what the on job pushes: dark nights, no-event defaults, and #150's slowed or replaced effects, with a caption note./seasonpage: play, scrub and step controls, a day-coloured timeline with #149's markers linking to the review queue, an optional "show the night" sketch, WebM export, and a reduced-motion mode.Verification: every night is checked against
plan_for_dateacross 5 settings combinations, and every serialised scheme against/schemes/for-date. The E2E suite passed 13/13.Found: #171. The demo seed approves the showcase schemes before they have segments, so those nights preview unlit. The preview is reporting that accurately.