Repository navigation
fix(website): keep keyboard focus on artifact frame recovery buttons - #33706
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Applies the established aria-disabled busy pattern to the remaining artifact recovery buttons. The busy look is reproduced, so there is no visual change to show. Notes
[DESIGN-REVIEWED] 039c8cd Description read[DESCRIPTION-READ] 1ac84f34f05d103b37045114213f63366a96b4080997fc88f2aa475ecd095a02 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS This fixes the focus bug on the three buttons named in #33398. It is a point patch: the same busy-as-native- Notes
What this change shipsInventory (5 items) — 5 justifiedIntent: a keyboard user who presses Retry or Show artifact on a failed frame keeps focus while the frame re-renders. FIX.
[FIRST-PRINCIPLES-REVIEWED] 039c8cd Description read[DESCRIPTION-READ] 2c294731f5a9b0aa549d2755315b59d2411d63779f784171b7418a3aa138d7f4 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. The busy state looks the same as before: the [UX-REVIEWED] 039c8cd Description read[DESCRIPTION-READ] 1b6bcb9a2c527884d01274191fc83f3f238094779356a22b513adaf6a32a66ab That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
2a5b127 to
9b32e2c
Compare
The Retry and Show artifact buttons on an artifact frame took a native `disabled` while the re-mint ran. A disabled button leaves the tab order, so pressing one from the keyboard dropped focus to the page the moment the busy state turned on, and it stayed lost if the re-mint rejected. Each button now stays focusable with `aria-disabled` and `aria-busy` while the re-mint is in flight, and a guard ignores a second press until it settles, as the remote fork button already does. The busy look is unchanged: the `aria-disabled:` classes repeat the default disabled styling. Covers both Retry/Show artifact buttons in the remote artifact page frame and the one in the shared ArtifactBody frame.
9b32e2c to
039c8cd
Compare
|
F1 fixed in 039c8cd: added an explicit {timeout: 2000} to the iframe-mount waitFor with a comment naming the detail-query to document-mint chain, inside the test grace budget. |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
This review checked head 039c8cd. All three recovery buttons named in #33398 now stay mounted while pending is true. Each uses aria-disabled and aria-busy instead of native disabled, so keyboard focus stays on the node, and an inline guard ignores a second press. The busy look still matches the old disabled look. The useSandboxDoc contract of not clearing failed at retry start is unchanged. The frontend AUTOSDE rules and the test determinism rules are clean. Reverting the ArtifactBody hunk or the overlay hunk turns the updated tests red.
Done well: the tests pin the real failure mode. They hold the DOM node from before the click, assert it is not natively disabled, and check that a second press does not mint again.
Optional:
- Main now has a
busyprop on Btn (#33667) that sets aria-disabled and aria-busy and drops presses while busy. After a rebase,busy={pending}could replace the hand-written attributes, guards and class strings at all three sites. - WidgetFrame.tsx:392 and :423 still use
disabled={mintPending}on two recovery buttons. They have the same focus-loss bug and could go in a follow-up issue. - No test covers the in-flow Retry in the
failedbranch of RemoteArtifactDetailPage.tsx:518. Also, happy-dom keeps focus on a natively disabled button, so theactiveElementchecks cannot fail on main. The test comment could name the attribute assertions as the real pin.
…33706) The Retry and Show artifact buttons on an artifact frame took a native `disabled` while the re-mint ran. A disabled button leaves the tab order, so pressing one from the keyboard dropped focus to the page the moment the busy state turned on, and it stayed lost if the re-mint rejected. Each button now stays focusable with `aria-disabled` and `aria-busy` while the re-mint is in flight, and a guard ignores a second press until it settles, as the remote fork button already does. The busy look is unchanged: the `aria-disabled:` classes repeat the default disabled styling. Covers both Retry/Show artifact buttons in the remote artifact page frame and the one in the shared ArtifactBody frame. Co-authored-by: kirocrew-agent <agent@kirocrew.local> (cherry picked from commit 8ff591a)
…33706) The Retry and Show artifact buttons on an artifact frame took a native `disabled` while the re-mint ran. A disabled button leaves the tab order, so pressing one from the keyboard dropped focus to the page the moment the busy state turned on, and it stayed lost if the re-mint rejected. Each button now stays focusable with `aria-disabled` and `aria-busy` while the re-mint is in flight, and a guard ignores a second press until it settles, as the remote fork button already does. The busy look is unchanged: the `aria-disabled:` classes repeat the default disabled styling. Covers both Retry/Show artifact buttons in the remote artifact page frame and the one in the shared ArtifactBody frame. Co-authored-by: kirocrew-agent <agent@kirocrew.local> (cherry picked from commit 8ff591a)
Problem / Motivation
Goal: A keyboard user keeps focus on an artifact frame's recovery button while the frame re-renders, instead of being dropped to the page.
The Retry and Show artifact buttons on an artifact frame take a native
disabledwhile the re-mint runs. A disabled button leaves the tab order, so pressing one from the keyboard drops focus to the page the moment the busy state turns on, and focus stays lost if the re-mint rejects.Why it matters
A keyboard or screen-reader user who presses Retry to recover a frame that failed to render loses their place entirely: focus falls to the document body with no announcement, so recovering an artifact is the exact moment the page becomes hardest to navigate without a mouse.
Not a goal
What changed (motivation -> approach -> change)
Symptom: a keyboard press of Retry / Show artifact drops focus to the page while the frame re-renders. Root cause: the busy state is signalled with a native
disabled, which removes the button from the tab order, so the browser moves focus off it. Fix: signal busy witharia-disabledandaria-busyinstead, which keep the button focusable, and add aif (!pending) ...guard so a second press while busy is ignored. This mirrors the pattern the remote artifact Fork button already uses. The busy look is unchanged: thearia-disabled:utility classes repeat the defaultBtndisabled styling (opacity-30,cursor-not-allowed, no active scale).Sites changed:
website/src/pages/RemoteArtifactDetailPage.tsx- the in-flow Retry button in thefailedbranch, and the Retry / Show artifact button in the recovery overlay.website/src/components/ArtifactBody.tsx- the Retry / Show artifact button in the frame's recovery overlay.Backwards compatibility
Removes nothing: no field, validator, kind, key or public function changes; this only swaps how a button's busy state is expressed in the DOM.
Tests
Added a focus test to
website/src/test/RemoteArtifactDetailPage.silentLoad.test.tsx(overlay recovery button staysaria-disabled+aria-busy, not native-disabled, keepsdocument.activeElement, and ignores a second press while busy) and updated the twoArtifactBody.iframeBlob.test.tsxtests that pinned the old native-disabled acknowledgement to assert the newaria-disabled/aria-busybusy state. All touched vitest files pass (84/84), tsc clean, eslint --max-warnings 0 clean.Proof: PROVEN - reverting the production hunks reds the overlay focus test (the busy button has no
aria-disabled); re-applying greens it (head 2a5b127). prove.py not run: frontend test (prove.py runs Python only).Manual verification
N/A - unit coverage asserts the focus-retaining busy state and the duplicate-press guard directly through the component.
Screenshots / video
Why no screenshot: The busy state's appearance is unchanged - the
aria-disabled:utility classes reproduce the defaultBtndisabled styling exactly (opacity-30, cursor-not-allowed, no active scale); only the DOM attribute carrying that state changed (disabled->aria-disabled/aria-busy), which has no rendered delta.Related Issues
Closes #33398
Sibling sweep
Swept:
git grep -nE "disabled=\{pending\}" -- website/srcacross the artifact surfaces.Sibling:
website/src/pages/RemoteArtifactDetailPage.tsx(both recovery buttons) -- changed here.Sibling:
website/src/components/ArtifactBody.tsx-- changed here.Siblings: the remote artifact Fork button was already fixed on main with this same pattern; no other
disabled={pending}recovery button remains in the artifact frame surfaces.Pattern harvest
Rule candidate: review-prompt
Pattern: a button that stays mounted while busy must signal busy with
aria-disabled/aria-busy(plus a press guard), not nativedisabled, or it leaves the tab order and drops keyboard focus.Checklist