Quick push: accept an arbitrary colour, not just a scheme ID (#48) #97
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!97
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/quick-push-color"
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?
Batch C item 8 of #48 (frontend spec parity).
The gap
The spec has always described quick push as pushing "an arbitrary color or scheme" (
docs/iris-spec.md, Manual / quick push), but only the scheme half was implemented.POST /wled/quick-pushrequired ascheme_idand looked up aSchemerow, so there was no way to send a one-off colour to the lights without first creating a scheme for it.Backend
QuickPushRequestnow takes exactly one ofscheme_idorcolor(an RGB triple). Amodel_validatorrejects a body carrying both or neither, rather than letting one silently win, and range-checks the triple.A colour is applied solid to every themed segment with effect and palette forced to 0, via a new
scheme_translator.solid_color_state.dim_white_statenow delegates to it — warm-white ambient was already the same operation with a fixed colour, so this removes a near-duplicate rather than adding one. (Its existing end-to-end coverage intest_no_event_default.pyguards the refactor.)quick_push_managerkeeps one revert path for both kinds of push:start_quick_pushand the newstart_quick_push_colorboth funnel into_start, so saving the live state, superseding an active push, theduration_minstimer, scheduler revert and manual cancel behave identically whichever is active.QuickPushStateandget_status()gained acolorfield alongsidescheme_id.No
Schemerow is involved on the colour path, so an ad-hoc push leaves nothing behind in the library. The audit entry records it astarget_type="color",target_id="#rrggbb".Frontend
The toolbar's Quick push dialog gains a Scheme / Colour tab pair. The colour swatch always produces a valid hex; the text field beside it does not, and
hexToRgbturns a typo into black — so Push is disabled until the field holds a 6-digit hex, with the helper text saying so.Verification
ruff check,ruff format --check,mypyall clean.scheme_idstill 404s, and a body with both targets is rejected 422 without touching the controller.node:22container (no Node on this host):tsc -b,eslint,vitest(56 passed) andnpm run buildall clean.🤖 Generated with Claude Code