Warn before an unapproved night goes dark (#149) #162
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
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 milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/Iris-WLED!162
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/149-review-nudges"
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 #149.
Why
On a night whose event has no approved scheme, the on job pushes "off" with reason
no_approved_scheme, and nothing tells anyone. The only existing nudge,review_queue_ready, carries no counts or dates.What
1. One shared day-plan resolver (
services/day_plan.py).plan_for_date/plan_for_rangereturn a frozenDayPlansaying what the on job will push on night D and why: the event, phase, scheme, the anchors a human must approve,will_push, the reason, and the exactwled_state._push_today_schemenow only carries the plan out (push, ramp, webhook).main'sschedule_service.py. Everyunapproved_policy="off"case passed, so behaviour is unchanged.2.
GET /api/v1/schemes/review-summary?days=N. Upcoming nights that won't show their own scheme, grouped by the scheme that needs approving, withdays_remainingandwill_go_dark. Stale-but-approved schemes still light, so they aren't counted. A user event with no generated scheme is reported asmissing.3. Two webhook events, both on by default.
WEBHOOK_EVENTSis now derived from theWebhookEventLiteral, so the two lists can't drift.review_reminder: weekly (configurable weekday and time), only when something needs review.unapproved_tonight: daily at a configurable time, for a night that won't show its scheme, on the day and 3 days before.reload_scheduled_jobspath.OIDC_REDIRECT_URI, and are omitted when it isn't set.4.
unapproved_policy:off(the default, and today's behaviour) ordefault_scheme, which shows the no-event default instead of going dark. Recorded in spec §3.5. UI:
Fixed along the way: bulk approve fell back to every candidate in the year when a filter matched nothing. The new window made that reachable.
Verification
python:3.14-slimcontainer, because it is blocked on the Windows host).tsc, lint (max-warnings 0), vitest (147 passed, 15 new) and build, all innode:22-slim.Not verified
The ntfy examples in
docs/setup.md§4 use ntfy's message templating and were not tested against a real ntfy server.Existing bugs found, filed separately
/404, because there is no SPA fallback.🤖 Generated with Claude Code