feat(dashboard): needs-attention widget for overdue hutch cleaning/playtime #33
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/dashboard-needs-attention"
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 #21
Summary
/, the app's default page) now leads with a Needs Attention widget listing hutch compartments overdue for cleaning (>7d) or playtime (>14d), reusing the existingSTALE_DAYS/PLAY_STALE_DAYSthresholds and staleness logic from the hutches list view so both stay consistent.date_cleaned/last_playtimeofnull(never logged) surface distinctly as "Never cleaned"/"Never played" and sort first, ahead of any dated-but-stale row — nothing logged at all is the most urgent case./hutches?search=<letter>for quick action (staff/admin see a Manage link)./route — no routing changes needed, it was already the root).Verification
No local Postgres available in the sandbox to boot the full app (main.py runs Postgres-only migration DDL on startup), so verified via a throwaway SQLite-backed smoke script exercising
_needs_attention()directly against seeded Hutch/Rabbit rows (never-cleaned, overdue-clean, overdue-play, both-overdue, empty-hutch-never-played cases) and renderingdashboard.htmlthrough the real Jinja environment:Open questions from the issue
STALE_DAYS=7/PLAY_STALE_DAYS=14module constants (shared with hutches.py), not yet admin-configurable — left as a follow-up per the issue's open questions.Screenshots
Captured from a local run of this branch against a throwaway seeded Postgres DB (never available in prod, purely for review).
Dashboard — Needs Attention widget (new default landing page,
/)Hutches list (unchanged, shown for reference / consistency check)