Menu (Platform Navigation)
Feature Overview
The Menu is the primary navigation shell across PPP. It lists every top-level feature in a stable order and exposes two platform-wide signals: an Action Items count pill and the bell-icon notifications counter. Mobile is expected to mirror the same structure.
Open Questions
| # | Question | Source | Owner | Status |
|---|---|---|---|---|
| — | No open questions. |
Closed Questions (3) — click to expand
| # | Question | Source | Owner | Status |
|---|---|---|---|---|
| Q1 | Mobile menu — confirm full mirror of desktop structure, or define where it diverges | Matt's brief, mobile note ("likely") | Matt | Resolved 5 May (engineering-led): full mirror. No signal in brief to diverge. Same nine items, same order; pill + bell render with semantic parity. |
| Q2 | Non-Doctor user menu — separate spec, or a persona-aware filter on the same nine items? | Engineering-raised | Matt | Resolved 5 May (engineering-led): persona-aware filter on the same constant. Avoids two diverging menu definitions. Hospital Admin / PPP Staff see a subset (Dashboard, Action Items, Admin); rendered from a single MENU_ITEMS constant gated by the persona's permission set. See profile-non-doctor.md. |
| Q3 | Pill count refresh — server push acceptable, or must be real-time? | Engineering-raised | Matt | Resolved 5 May (engineering-led): tab-focus refetch + visibility-change poll (PPP uses HTTP/httpBatch transport; no WebSocket subscriptions exist in the codebase — the earlier answer incorrectly said "tRPC subscription"). Matches auth.md AC #4995 — "polled at most once per visible-state change". True real-time is over-engineered for a count badge. |
Matt's Requirements (from Notion brief)
Issue
- PPP has many features; navigation can be overwhelming without a clear, consistent entry point.
Purpose
- A user-friendly, intuitive way to access every feature.
- In some cases, communicate outstanding information via the menu itself (e.g. Action Items pill, notifications bell).
Menu order (authoritative)
- PPP Dashboard
- CPD Home
- Logbook (surgical or practical per Doctor Profile — see
logbook.md) - WBAs (Work-Based Assessments — see
work-based-assessments.md) - Appraisal
- Retrospective
- Timesheet
- Attendance
- Action Items
- User Guide (standalone bottom-of-nav link for all CPD-enabled users — see #5832)
Outstanding-work signals
- Action Items menu entry shows a number "pill" next to the menu name when the user has items in their To-do list (see
action-items.md). - Notifications within Action Items are represented on the bell icon (not duplicated on the Action Items menu entry pill).
- The pill and the bell are independent signals: pill = actionable to-dos; bell = notifications.
Mobile
- To be considered: likely mirror the same menu structure and signals on mobile.
Screenshots Comparison
Empty in Matt's brief.
Acceptance Criteria
Core — menu structure
- ⏳ Menu renders the ten items in exactly the order above, for every authenticated Doctor user.
- ⏳ Menu order is centrally defined (a single constant), not repeated in multiple components.
- ⏳ Non-Doctor users see a menu scoped to their persona (Hospital Admin / Super Admin / PPP Staff — see
profile-non-doctor.md); spec for non-Doctor menu ordering deferred to a follow-up.
User Guide nav item
- ✅
menu.user-guide-nav— "User Guide" appears as a standalone item at the bottom of the navigation sidebar (position 10, after Action Items) for all CPD-enabled users. It is not a sub-item of CPD Home and not rendered on the CPD Home page content. (#5832)
Action Items pill
- ⏳ Pill appears next to the "Action Items" menu entry when the user's To-do list is non-empty.
- ⏳ Pill displays the count of actionable To-do items (not Notifications, not Platform Reminders).
- ⏳ Count refreshes within 2 seconds of a To-do item being added or cleared (server push or poll — engineering choice).
- ⏳ Pill disappears when the count reaches zero.
Bell icon (Notifications)
- ⏳ Bell icon shows a badge when the user has unread Notifications (the Notifications tab within Action Items).
- ⏳ Bell badge is independent of the Action Items pill — the same event should not increment both.
- ⏳ Clicking the bell opens the Notifications tab of Action Items (deep-link).
Labels and renaming
- ⏳ Menu label is "Action Items" (not the current "Action" / "Actions"). Every screen, button, and notification referring to this feature uses the same term.
Branding
- ✅
menu.single-brand-logo— the navigation sidebar shows the PPP brand mark (emblem + "PPP" + "Professional Performance Portfolio") exactly once, in the top header. The sidebar footer must not render a second/duplicate brand logo; the footer retains only the collapse/expand chevron toggle. † (27 May)
Mobile
- ⏳ Mobile navigation uses the same nine items in the same order. (Q1 resolved 5 May, engineering-led — full mirror; Matt's brief said "likely" mirror and there is no signal to diverge.)
- ⏳ Mobile exposes the Action Items pill and bell badge equivalently — pill renders inline next to the menu label; bell renders in the top app bar exactly as desktop. Semantic parity required; visual treatment per
mobile.md.
Downstream References
| Feature | Menu linkage |
|---|---|
| Action Items | Menu entry + pill count + bell deep-link |
| All other menu entries (Dashboard, CPD Home, Logbook, WBAs, Appraisal, Retrospective, Timesheet, Attendance) | One menu slot each, stable order |
Status
Menu exists in current UI but with inconsistent ordering and the legacy label "Action" instead of "Action Items". No central menu-order constant today.
| Sub-feature | Status | Notes |
|---|---|---|
| Central menu-order constant | 📋 Specified | Today it's repeated across components |
| Action Items pill | ⚠️ Partial | Present in some builds; count source ambiguous |
| Bell notifications badge | ✅ Built | Exists — needs verification that it's independent of the pill |
| "Action" → "Action Items" rename | 📋 Specified | Touches multiple screens/strings |
| Mobile parity | ⚠️ Partial | Needs audit |
Open issues on label:feature:menu — no open issues. Fetched at: 2026-10-13T07:29:49Z — live list on GitHub.
Change Log
| Date | Change | PR/Issue | Reason |
|---|---|---|---|
| 2026-10-04 | Menu pill contract note: on mobile the To-do count also surfaces on the top-bar logo control (same To-do-only source, 30s poll). The in-drawer pill stays. | #12141 | #12141 logo-as-Action-Items-control; records the divergence from menu.md line 110. |
| 2026-07-08 | Moved "PPP Passport" from the Records cluster into the Workforce cluster, ordered Timesheet → PPP Passport → Attendance. | #10187 | A hospital's workforce department is effectively HR/compliance, which is where a passport/compliance record belongs — even though it is also a record (Matt, Dev Session 2026-07-08). |
| 2026-05-27 | Remove the duplicate PPP brand logo from the navigation sidebar footer; keep only the top header logo (footer retains the collapse toggle). | Rob asked why a second PPP logo rendered at the bottom of the left navigation — only one is needed, at the top. Adds menu.single-brand-logo AC and a BDD scenario in menu.feature. | |
| 2026-05-05 | Awaiting-Matt sweep — Q1 mobile-mirror = full mirror (no signal in brief to diverge); Q2 non-Doctor menu = persona-aware filter on the same nine items; Q3 pill count = server-push on auth-state-change + tab-focus refetch (matches auth.md AC #4995). All three resolved engineering-led, Matt to ratify. | All three questions are engineering-structural decisions, not commercial; defaults align with auth.md polling contract. | |
| 2026-04-21 | Spec created from Matt's 17 Apr 2026 Notion brief | this PR | Wave 1 foundation — establishes the feature ordering + Action Items pill / bell model other specs reference |