Skip to content

fix(console): refusals for readers are alerts, in view, and diagnostics needs operate - #2923

Merged
freeqaz merged 6 commits into
mainfrom
ux-fixes-128-readers
Oct 19, 2026
Merged

freeqaz merged 6 commits into
mainfrom
ux-fixes-128-readers

Conversation

@freeqaz

@freeqaz freeqaz commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Two lows from the live walk on oce-dogfood-b (nora, a reader without update or operate, at 1440x900):

  • 1991 (D650): a refused Configuration save (real PATCH 403) showed its danger block with 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.
  • 1992 (D651): Run diagnostics stayed enabled for a reader without operate, while Stop and Delete on the same page were disabled with "Your access does not include…". Its 403 alert landed about 160 px below the button; at 1440, after a pointer click, it was off screen (top 1006), so nothing visibly changed.

Change

  • Configuration save refusal (1991): when the save ends in a refusal that Reload cannot fix (a 403, 400, 404 or 429, or a failed read before the PATCH; no Reload shown), the feedback line becomes 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 to role="status" for the next save's progress, after an edit or Cancel, and for the navigation note.
  • Run diagnostics (1992): the version diagnostics panel takes the caller's permission answer (permissions.operate), read the same way as for Stop Agent. When it is false, 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).
  • Storybook: new Pages / Agent detail / Edit Configuration refused, Current observations for a reader without operate and Current observations refused; status-block-workflow.md steps 11-13.

Presentation only: the API's checks are unchanged, and "can operate" comes from the existing GET …/permissions answer that Stop uses.

Verification

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

1440 390
before configurationSaveRefused before 1440 configurationSaveRefused before 390
after configurationSaveRefused after 1440 configurationSaveRefused after 390

Reader without operate: before, Run diagnostics enabled; after, disabled with its reason

1440 390
before diagnosticsReader before 1440 diagnosticsReader before 390
after diagnosticsReader after 1440 diagnosticsReader after 390

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

1440 390
before diagnosticsRefused before 1440 diagnosticsRefused before 390
after diagnosticsRefused after 1440 diagnosticsRefused after 390

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's detail.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.

…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.
@freeqaz
freeqaz requested a review from a team as a code owner October 19, 2026 09:24
@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@freeqaz
freeqaz temporarily deployed to integration-qa-pr October 19, 2026 09:24 — with GitHub Actions Inactive
@freeqaz
freeqaz temporarily deployed to integration-qa-pr October 19, 2026 09:24 — with GitHub Actions Inactive
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: The refusal remained a status message with focus on Save Configuration and could appear below the fold.
  • After: The refusal becomes a focused alert and scrolls into view.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A useful, focused repair supported by direct visual evidence and meaningful browser regression cases, with proof scoped to console behavior.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected desktop and mobile Storybook screenshots exercise the changed console rendering and show focused Configuration refusals, disabled diagnostics with a permission reason, and visible diagnostics refusals; this establishes simulated UI behavior, while recording inspection was limited by reviewer infrastructure.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Readers can miss refused saves and diagnostics responses, and can activate diagnostics despite an explicit permission denial.
Reason: The change addresses observed console failures using established accessibility and permission patterns; maintainer authorship supplies direction approval.

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
Reviewed head: 9667c3cc883f47140ece0f4dd6a01c6c50fbb551

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Configuration save completion focus changes intended behavior with a stated reason (e8df024: Save failures focus Reload draft or Save so keyboard users retain a useful next action.)
  • Diagnostics focus and waiting behavior keeps the original intent (4ff0803: Delay transient waiting feedback and preserve focus unless the reader remains on the operation.)
  • Configuration progress and refusal presentation changes intended behavior with a stated reason (7474d8b: Use shared tone-based status blocks while keeping progress feedback distinct from errors.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Free Wortley: Raw commit 4ff0803 adds apps/controller/src/console/agents/detail.mjs:847 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4ff080301bd2; files: apps/controller/src/console/agents/detail.mjs)
  • stevenlee-oai: Raw commit 7c3ecbf adds apps/controller/src/console/agents/detail.mjs:333 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7c3ecbfce4fa; files: apps/controller/src/console/agents/detail.mjs)
  • Kevin: Raw commit 370570d adds apps/controller/src/console/agents/detail.mjs:907 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 370570d78872; files: apps/controller/src/console/agents/detail.mjs)

Review metrics

Metric Value Why it matters
Production and regression scope Production +52/−5 lines; browser tests +147/−1 lines; five new regression cases The test growth protects distinct permission, focus, and viewport behavior without adding production test seams.

Labels

Label changes:

  • add P2: Incorrect refusal presentation and an enabled operation that will be denied create limited console usability and accessibility friction.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Incorrect refusal presentation and an enabled operation that will be denied create limited console usability and accessibility friction.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 19, 2026, 5:52 AM ET / 09:52 UTC.

@freeqaz
freeqaz merged commit b10157c into main Oct 19, 2026
84 of 85 checks passed
@freeqaz
freeqaz deleted the ux-fixes-128-readers branch October 19, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant