Skip to content

feat(web): show observers no control that changes shared work - #2552

Open
Makisuo wants to merge 5 commits into
observer/shellfrom
observer/read-only-pages
Open

Makisuo wants to merge 5 commits into
observer/shellfrom
observer/read-only-pages

chore(ui): regenerate the kit index for the new grant helpers

8888c59
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Nov 13, 2026 in 9m 2s

Confidence 10/10 · No issues found

🟢 Confidence 10/10 · safe to merge. Every write control is gated view-side on the same grant the update re-reads, and 10 new scene tests cover both roles per page; no state, API or schema changes.
no findings · tests covered · risk medium

Adds member-only permissions (dashboards:edit, error_issues:triage, incidents:respond, investigations:run, status_page_incidents:post) and makes dashboards, errors, incidents and status pages read the viewer's grants, so an observer sees readouts instead of controls that would 403. Safe to merge.

  • permissions.ts names the seven changes an observer cannot make
  • Each page fetches CompletedFetchSession and gates controls on Policy.has
  • isEditing now requires dashboards:edit, so ?mode=edit opens read-only
  • Labs take ?role= and feed CompletedFetchSession so observer pages render

Fixed since the last review

  • ✅ F1 · Dashboard labs never feed grants, so they render read-only in Clerk builds

Production impact

Production traffic of the changed files (last 7 days)
File Calls/day Busiest operations
apps/web/src/page/errors/hub/command.ts 19 FetchErrorsSummary 19/day, 0.0% err
What was checked
  • mode.ts:13 gates isEditing on grants, and view/update both read it (grep: no control reads search.mode directly)
  • Errors hub triage keys blocked at selection.ts:59; menu indexes recompute from the same filtered entry list (row-menu.ts:151)
  • New labs feed real grants through CompletedFetchSession (entries/dashboards.ts:165, entries/error-issue.ts:140, entries/status-pages.ts:75)

8888c59 · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.