Add a page for grabbing the lights right now (#24) #135
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/Iris-WLED!135
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/24-remote"
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?
Closes #24. All four acceptance criteria met.
A remote at
/remote: colour swatches, a custom picker, brightness, effect, speed and intensity — all pushing immediately — plus a one-tap Back to schedule. Laid out for a phone first, because the plausible use is standing in the garden looking at the tree, not sitting at a desk.It drives the existing quick-push endpoint
Not a second push path. That's what makes it safe to hand to someone at a party: quick push saves the controller's state, applies the new one, and hands the night back at the next scheduler event, so nothing the page does can leave the lights somewhere the schedule won't recover from.
A second path would have had to reimplement that, and the version that forgot to would be indistinguishable from the working one until the evening it mattered.
Admin-gated, matching the endpoint — viewers are limited to bounded previews everywhere else, and this would be an unbounded one.
What changed on the backend
Quick push gained
brightness_pct,effect_id,effect_speed,effect_intensity. They're meaningful only alongside a colour: a scheme carries its own effect and brightness, and letting the request override those would mean two sources of truth for one push.All four default to the previous behaviour, so the toolbar's existing quick push produces a byte-identical payload. There are tests pinning that specifically, because
solid_color_stateis shared with the no-event ambient state and the scheduler's fallbacks — a "harmless" default change here would quietly alter both.They're bounded at the API rather than clamped. A slider that sends 300 is a bug in the caller, and swallowing it hides that.
Interaction details that took a decision
A real bug found while reading the push path
POST /wled/push— the "Push now" button — built its scheme id directly instead of going through the resolver #74 added. On an interpolated event the button sent the phase anchor while the scheduler sent the blended day.That's the same drift #93 fixed once already, and #74 added a third asker of the question without my noticing. It now goes through
resolve_scheme_for_dateand has a test that fails with the old lookup restored:Verification
21 new backend tests. Backend
ruff/mypyclean, 780 tests passing. Frontend innode:22:tsc -bclean,eslintclean, vitest passing,npm run buildsucceeds.🤖 Generated with Claude Code
cb0a18d1dcc9a29b027f