Let someone try Iris without owning a controller (#63) #137
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!137
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/63-demo"
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 #63 for the three checkboxes I could do properly. README screenshots and the optional public instance are split to #136 — see the last section.
DEMO_MODE=trueswaps the HTTP controller for an in-process simulator, so the whole workflow runs on a laptop: the year generates, the review queue fills, schemes preview as an animated virtual strip (#14), and pushes and preset sync succeed instead of failing at the first request.Seeding
An empty database also gets three segments and a handful of approved schemes spread across the year, so the calendar has colour in it rather than being a blank grid someone has to imagine the rest of.
It seeds only an empty install. Existing segments and approvals are never touched — this is a flag someone can set on a database that already has their work in it, and overwriting a real segment layout because a flag was on would be unforgivable for a feature whose whole purpose is a first look. It also refuses to top up a partial layout: adding "Path" to someone's two-segment setup would be stranger than doing nothing, and would mark their approved schemes stale for the privilege.
It deliberately leaves the rest as candidates. The review queue with things actually in it is the feature being demonstrated; pre-approving the year would hide it.
Subclassing was the right call, and proved it immediately
The simulator subclasses
WLEDControllerrather than reimplementing the interface, so every consumer works unchanged and mypy checks the substitution is total.A test comparing the two surfaces found
get_infoun-overridden — it fell through to an HTTP call against hostdemo, producing a DNS error that would have read like a network problem rather than a missing method. Nothing in the class called it (probe_statuswas overridden too), so the hole was invisible until something compared them.It reports a real device's answers
The effect catalogue is the one captured verbatim from a 16.0.0 controller in #62, not invented names — the browser simulator maps effect IDs to animations, so a fabricated catalogue would make every demo preview show the wrong effect.
That capture moved from
tests/fixtures/toapp/data/so there's one copy, shipped, rather than a test fixture duplicated into the image. The compat suite now reads it from there.Three of my event keys didn't exist
thanksgiving_us,christmasandnew_years_eveare actuallythanksgiving_week,christmas_seasonand nothing at all. A typo there is invisible — the seed approves nothing for that key and the calendar is a little greyer than intended. There's now a test asserting every showcase key is a real event.Verified by booting it, not just unit tests
Ran the app in demo mode and drove the real endpoints:
Two things it is not
.env.examplerather than left as a discovery.What I split out (#136)
The README screenshots. I can generate them but I can't verify them — Playwright is already set up, so capturing PNGs is mechanical, but I can't look at the result and tell whether the layout held, whether the crop shows the right thing, or whether it looks like software someone would want to run. Committing images I can't see to a README whose job is first impressions is the one place where "it produced output" is furthest from "it works".
Demo mode makes that job easy for whoever does it, which is the useful half.
Verification
29 new tests. Backend
ruff/mypyclean, 790 tests passing.🤖 Generated with Claude Code