[Story-1065] Support on-duty session: On-duty banner + capability-gated nav

Story 1065Epic None15 files · +545/−13

PR #250 · pramaan-io/pramaan-app · merged 2026-06-07

Why this matters

Support logs in. The firm's data shouldn't follow them home.

The on-duty badge is not a banner — it's an access shape.

A banner alone is wallpaper. The nav still invites clicks the support role cannot honour.

The fix — One badge, one strip, one filtered menu — support walks in, sees only the doors they were assigned, and starts at reception.

How it flows

sequenceDiagram
  autonumber
  participant role as session role
  participant chrome as workspace chrome
  participant rail as nav rail
  role->>chrome: role = support
  chrome->>chrome: render OnDutyBanner across the workspace
  role->>rail: pass session
  rail->>rail: hide items lacking requiredPermission
  rail->>chrome: Settings, Help only
  chrome->>chrome: redirect /dashboard → /settings
  chrome->>chrome: suppress demo-mode banner

Files changed (15)

File±
docs/walkthroughs/assets/global-rail-support.png+0
docs/walkthroughs/assets/support-duty-banner.png+0
docs/walkthroughs/story-1065-walkthrough.html+241
messages/en.json+6
messages/hi.json+6
src/app/[locale]/(workspace)/layout.tsx+33 −5
src/components/app-chrome.tsx+29 −4
src/components/shared/global-rail-item.tsx+6
src/components/shared/global-rail.stories.tsx+11
src/components/shared/global-rail.test.tsx ★+64
src/components/shared/global-rail.tsx ★+51 −4
src/components/support-duty-banner.stories.tsx ★+43
src/components/support-duty-banner.tsx+33
src/lib/app-me.test.ts+9
src/lib/app-me.ts+13