Repository navigation
fix(console): keep refusals and focus through a refocus and word the repeated stop - #4183
Merged
Merged
Conversation
A stopped Agent's Request Stop again opened the running-stop confirmation, which says it interrupts the runtime gateway. It now says the Agent is already requested to stop and that this sends the request again (finding D815).
… reread agent page access A non-grant row refusal on the Agents list now has a row note that points to the alert above the table, keeps both icons reachable and described by it, and a refocus that rebuilds the list shows it again until Refresh (D812). A refocus that rebuilds the list returns focus to the same row's name or icon (D814). The Agent page rereads its permission answer after a refocus recheck, so a re-grant lifts a refused Stop or Delete without Refresh (r54 row 11).
Rendering the Stop row replaced its controls even when they were the same, which detached the focused Stop and dropped keyboard focus to the page when a newer permission answer lifted a refusal.
…e flow The platform console flow is at the 2,500-word limit; the refocus behavior is described in the Agent stop and deletion flow instead.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Dogfood round 59 on a member/administrator walk found four console gaps after recent refusal work:
Change
agents/collection.mts: a non-grant row refusal keeps the alert as the row's refusal. The row note reads "Not deleted: see above" or "Not stopped: see above", with the alert's sentence as its tooltip and hidden reason. Both icons stay in the Tab order,aria-disabled, described by the alert (refused icon) or the note (the other), and focus stays on the refused icon. A refocus that rebuilds the list shows the same refusal again until Refresh; any other load drops it. Other unsettled outcomes (404, 409, unknown) are unchanged.console.mjs: a refocus that rebuilds the Agents list returns focus to the control with the samedata-refocus-key(row name link, Stop and Delete icons). Reused views keep the existing restore.console.mjs+agents/detail.mts: after the in-place refocus recheck of a mounted Agent page succeeds, the page rereads its Agent permission answer (the same path the administration-ended recheck uses), so Stop, Delete and the draft follow a grant or revocation without Refresh.agents/stop.mts: the Stop row no longer replaces its controls when they are unchanged; doing so detached the focused Stop when a re-grant lifted its refusal.agents/lifecycle-confirmation.mts: Request Stop again on a stopped Agent says "This Agent is already requested to stop. This sends the stop request again; use it if an earlier stop did not finish." plus the usual retained-resources sentence.No server, API, IAM or authorization change.
Verification
Tested head
7179e45e12(code unchanged sincebcb17ae0d8; the last commit moves two doc sentences).console-lifecycle-refusals(non-grant row note, reachable icons and refocus; Agent page re-grant lifted by refocus for Stop and Delete),console-refocus-focus(rebuilt list keeps focus on the row icon),console-agent-detailandconsole-agent-detail-2(repeat Stop copy, with and without a selected version).console-lifecycle-refusals,console-refocus-focus,console-agent-detail,console-agent-detail-2.7179e45e12), Console Browser and Console Browser 2 (onbcb17ae0d8) pass;pnpm run typecheckpasses; Prettier and ESLint clean on touched files.Storybook fixture frames (simulated UI proof; no backend or real refusal), before = main's console source, after = this head:
Pages / Agents / Delete from the list refused for another reason, 1440 before / after:


390 (full page) before / after, then after coming back to the window (alert, note and focus kept):



Video at 390: refused Delete, window refocus, then Refresh makes the icons available
Components / Stop Agent / Repeat confirmation, before / after at 1440 and 390:




The two refocus behaviors (D814 focus, Agent page re-grant) have no Storybook state of their own; the browser tests above cover them against the real controller and Native IAM with in-memory storage.
Risks
GET .../permissions. It is not an audited read and is skipped while the Agent is deleting.collection.mts/stop.mts; a later merge may need a small rebase of these hunks.