Repository navigation
feat(shell): give analysts their own sidebar and command palette - #2550
Confidence 10/10 · No issues found
🟢 Confidence 10/10 · safe to merge. Audience is read from the shared Policy.isAnalyst on every surface, and the lab fixture is the only thing that lags.
1 note · tests covered · risk medium
Gives analysts their own sidebar, palette and top bar: navGroups takes an audience, the palette filters and retitles to the analyst's pages, and Sources, Settings and Connect are dropped for them. Scoped and safe to merge.
navGroups(flags, audience)returnsanalystNavGroupsfor analystsentriesFordrops setup, explorer and service entries and retitles IncidentsshellAudiencereads the Clerk role throughPolicy.isAnalyst- Sidebar footer rows and the top bar Connect hide for analysts
Findings
🔵 Note · F3 · The lab's clerk fixture reaches frameView but not the sheet or menu layers
correctness · apps/web/src/lab/shell-frame.ts:34
The new input is only handed to frameView; the sheet and menu layers below still get { currentPath } alone, so at a phone width /lab/shell with Viewer on Analyst opens the mobile nav through shellNavGroups(null) and draws the operator sidebar with Sources and Settings.
Pass `clerk: frame.clerk` in both the sheet's and the menu layer's `viewInputs`, so every part of the lab shell draws the viewer the toggle sets.
What was checked
- Every analyst nav href has a palette entry, so no page is sidebar-only (entries.ts:92-114)
Policy.isAnalysthandlesorg:analystviahighestRole(policy.test.ts:135)- The root passes
clerkto all four overlay layers (apps/web/src/view.ts:189-210)
2cc964e · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
Annotations
Check notice on line 34 in apps/web/src/lab/shell-frame.ts
maple-review-bot / Maple / review
correctness: The lab's `clerk` fixture reaches `frameView` but not the sheet or menu layers
The new input is only handed to `frameView`; the sheet and menu layers below still get `{ currentPath }` alone, so at a phone width `/lab/shell` with Viewer on Analyst opens the mobile nav through `shellNavGroups(null)` and draws the operator sidebar with Sources and Settings.