Clinical and Work structure: Mental Health Act door, one Work list, Open shifts inside Roster
Merged
BI
23d ago+387+387+012345678901234567890123456789-50-50-01234567890123456789
Requested by Josh · project thread
Summary
- Each mode now declares its side (
side: "clinical" | "work"insrc/lib/app-modes.ts), and a newWorkModeIdtype ties the Work area lists to it: notifications, reminders, My Day sources, AI Search, alert colours and the work frame.tests/app-mode-sides.test.tschecks them. - Clinical menu: the Mental Health Act is its own door, led by Forms (forms register, Act and standards, MHA clock). Forms is no longer listed under Psychiatry. Every address is unchanged.
- Work menu: one list in one order, My Day, On Call, Roster, Teaching, CPD, Admin. Open shifts is a tab inside Roster, so the menu no longer draws it. It stays a registered mode, so
/open-shiftsaddresses keep working. - Cross-link: On Call's Now shift tools gain an MHA clock row linking to
/forms/clock. - Fix: the Work profile's Admin dot used
"admin", which isn't a mode. It now usesmy-work, and its types are tied toWorkModeId. - Owner decisions of 21 Oct 2026 are recorded in
docs/product/clinical-and-work-direction.md, plus fourdocs/decisions/entries.
Areas touched: Personal practice, App experience, Knowledge and records
Verification
- Checks run:
npm run verify:cheap: lint and typecheck pass. Unit tests:Tests 2 failed | 33256 passed | 15 skipped (33273). The 2 failures are intests/test-runner-safety.test.ts(heavyweight lock). They fail identically on the merge-base commit, so they are not caused by this change.- Focused:
tests/on-call-now.dom.test.tsxand the related On Call suites, 191 passed. Menu and mode suites updated and passing. npm run check:decisions: 0 errors, 0 warnings.npm run check:instructions: pass.docs:check-links: pass.- Local browser check (phone 390 px and desktop): the Clinical menu shows the Mental Health Act door, the Work menu shows six areas, and the On Call MHA clock row is present.
Risk and rollout
- Risk: low. Navigation grouping and types only. No routes removed, no database, no RAG ranking surfaces.
- Rollback: revert this PR.
- Provider or production effects: None.
Notes
- Clinical sidebar clean-up is deferred by the owner.
- Section 5 mockup clean-up waits for this to merge.
Generated by Claude Code
Summary by cubic
Restructures Clinical and Work navigation so every mode declares its side and the Work area is one list in one order.
- Clinical menu: the Mental Health Act is now its own door led by Forms; Forms leaves the Psychiatry group.
- Work menu: one list (My Day, On Call, Roster, Teaching, CPD, Admin); Open shifts moves inside Roster as a tab,
/open-shiftsaddresses keep working, and the menu highlights Roster instead of defaulting to My Day when opened from an Open shifts page. - Every mode names its side in
src/lib/app-modes.ts, and the Work lists (notifications, reminders, My Day sources, Work search, alert colours, work frame, Work profile) are typed to that side. - On Call's shift tools gain a link to the MHA clock at
/forms/clock. - Fixes the Work profile Admin dot, which used a non-existent
"admin"mode; it now usesmy-work. - Records the 21 Oct 2026 owner decisions in
docs/product/clinical-and-work-direction.mdand fourdocs/decisions/entries, and updates the repo awareness snapshot.
Summary by CodeRabbit
-
New Features
- Added Clinical and Work sides to organize the app.
- Added an MHA clock shortcut to On Call tools.
- Moved Mental Health Act forms into a dedicated Clinical area.
- Grouped Open shifts within Roster instead of displaying it as a separate Work area.
- Work navigation now presents six primary areas.
-
Documentation
- Added product direction and decision records documenting the updated navigation and app structure.