Repository navigation
fix(console): refusals for readers are alerts, in view, and diagnostics needs operate - #2923
Conversation
…cs needs operate A refused Configuration save that Reload cannot fix (a reader's 403) is now an alert status block that takes focus and comes into view; it was a status line under the editor, cut by the fold at 1440 (finding 1991). Run diagnostics is disabled with an info notice when the caller's permission answer denies Agent operate, read the same way Stop does. A 403 that still happens scrolls its alert into view below the button, which keeps focus (finding 1992). The API's checks are unchanged.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
…l only for a reader still in the editor
|
Codex review: needs maintainer review before merge. What this changesThis PR brings refused Configuration saves and diagnostics into view and disables diagnostics when Agent operate permission is explicitly denied. Example: A read-only user saves Configuration JSON at a 1440×900 viewport.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR addresses concrete console accessibility and permission-feedback bugs, with no introduced correctness or security defect found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Agent detail console consumes existing permission summaries and API responses, then renders controls, accessible feedback, and focus changes; server authorization remains unchanged. flowchart LR
User[Console user] --> Detail[Agent detail]
Detail --> Permissions[Permission summary API]
Permissions --> Controls[Enabled or disabled controls]
Detail --> Operations[Configuration and diagnostics APIs]
Operations --> IAM[Exact resource authorization]
Operations --> Feedback[Visible accessible feedback]
Technical reviewBest possible solution: Keep the focused alert and permission-aware diagnostics changes within the existing Agent detail and shared status owners. Do we have a high-confidence way to reproduce the issue? Current-main source establishes both faulty paths, and supplied before/after screenshots support the Configuration focus change; no target code or tests were run during this read-only review. Is this the best way to solve the issue? The patch is a focused repair using existing permission and feedback owners, preserving server authorization, conflict recovery, and the diagnostics waiting delay. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cf2cc2ec3c77. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 19, 2026, 5:52 AM ET / 09:52 UTC. |
Problem
Two lows from the live walk on oce-dogfood-b (nora, a reader without update or operate, at 1440x900):
role="status", not an alert. It was not focused (focus stayed on Save Configuration) and at 1440 it started at y=851, cut off by the fold.Change
role="alert"before its text is written, takes focus and scrolls into view (revealStatus). Before, these focused Save, described by the line. A conflict or unknown outcome still focuses Reload draft (finding 1481); its refusal now also scrolls into view while the reader is still in the editor. The line goes back torole="status"for the next save's progress, after an edit or Cancel, and for the navigation note.permissions.operate), read the same way as for Stop Agent. When it isfalse, the button is disabled and an info status block says "Your access does not include running diagnostics for this Agent.". An unknown answer keeps the button. A 403 that still happens scrolls its alert into view below the button, which keeps focus (since fix(console): keep focus while diagnostics run #2779).Pages / Agent detail / Edit Configuration refused,Current observations for a reader without operateandCurrent observations refused;status-block-workflow.mdsteps 11-13.Presentation only: the API's checks are unchanged, and "can operate" comes from the existing
GET …/permissionsanswer that Stop uses.Verification
tests/browser/console-status-block.test.mjs(headless Chromium, real API fixture, real policy for the reader):console-status-block.test.mjsran 20/20 at 2 CPUs (13 tests each run) on the final code, and the save-refusal, drafts-kept, JSON-feedback and saves files passed again with it (86/86).merge-treeof this head against the 16 open PRs that touch console, Storybook or browser-test files (fix(console): match Chromium's break points for long Agent names #2916, fix(console): let the create preflight carry any configuration both creates accept #2833, feat: add per-agent sandbox network policies and denial review #2599, feat(console): show the authorized native Gateway people roster #2596, feat(console): stop and delete Agents from the Agents list #2524, RFC and implementation: managed outbound HTTPS for dedicated Gateways #2518, fix(console): distinguish stale runtime status from loss of access #2505, fix(console): keep followed logs steady and report the first output #2502, Add OCE policy simulation and tester for network and plugin actions #2445, fix: preserve native plugin permissions across Harness selection and admission #2258, fix(console): grant Agent access to accepted Configuration Secrets #2255, Support custom Installation profiles and readable Preset starters #2253, feat(auth): sign people in to occ with a device code (rfc-0019) #1619, feat: assign configured OpenClaw roles to Agent users #906, docs(specs): propose rfc-0019 for repository options without a repository driver #878, feat: add Agent workload tags #115) shows the same conflict count as main for each: zero new conflict hunks (including feat: add per-agent sandbox network policies and denial review #2599, feat(console): show the authorized native Gateway people roster #2596, RFC and implementation: managed outbound HTTPS for dedicated Gateways #2518, Add OCE policy simulation and tester for network and plugin actions #2445 and feat: assign configured OpenClaw roles to Agent users #906 indetail.mjs).Media (Storybook, committed in 4d56b3b and removed before squash)
Edit Configuration refused (403): before, a status line under Save with focus left on Save; after, a focused alert in view
Reader without operate: before, Run diagnostics enabled; after, disabled with its reason
Run diagnostics refused (403), button at the bottom of the screen and pressed by pointer: before, the alert stays below the fold; after, it comes into view and the button keeps focus
Stories:
Pages / Agent detail / Edit Configuration refused,Current observations for a reader without operate,Current observations refused. Before shots are the same stories on main'sdetail.mjs.Recording: walkthrough (1280x800, webm): the refused Configuration save as a focused alert, Run diagnostics disabled for a reader, and a refused Run diagnostics coming into view. Committed in 1bd5b00 and removed before squash.
Risks
Low. A reader whose permission answer denies operate can no longer press Run diagnostics; the API would have refused it anyway. Findings 1991, 1992; UX plan P3 (danger is an alert) and C1.