Repository navigation
fix(system): keep focus on the sessions stale-rows Retry while it runs - #32879
Conversation
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The fix is at the mechanism level and has a regression test that fails on main. The What this change shipsInventory (3 items) — 3 justifiedIntent: let a keyboard or screen-reader user retry a failed sessions refresh without losing focus — FIX (#32878).
[FIRST-PRINCIPLES-REVIEWED] fa7668d Description read[DESCRIPTION-READ] 43bd93cf046cf0b4d7c86c19bc18f955523edf305385fe7dcfc937a04cffc72f That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing screenshots of the changed stale-rows banner. The PR description's images show as "[image removed]", nothing is committed under temp-screenshots/ or .github/screenshots/, and so the blind read was not performed. Evidence gaps
[UX-REVIEWED] fa7668d Description read[DESCRIPTION-READ] a4d4c756bf35238e32867e373969047b3647c69e91d74fbba759348262cec5c9 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 |
Design Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)Design-level review of Design-Verdict: PASS cannot evaluate: missing a screenshot of the restyled BlockersReshaped banner has no rendered evidence of this revision [DESIGN-REVIEWED] fa7668d Description read[DESCRIPTION-READ] de469ca428ad92fb066e346aa3ad82916134ed73bc9d5f6a8116224218068918 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 |
Opus 5.5 Review — ✅ no blocking findingsReviewed Review detailsNo findings. Notes:
[OPUS-REVIEWED] fa7668d 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: |
a287579 to
9d274d3
Compare
9d274d3 to
fa7668d
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Approving. The change is small and does what the title says: the stale-rows Retry in SessionsTab.tsx now uses aria-disabled plus a guard in onClick instead of the native disabled, so a keyboard user keeps focus on the button while the retry runs. A second press during the retry is ignored.
What I checked:
- Gate: 101 ok, 0 pending. Six checks show red (GPT 6.1 Review, Inclusive Language, SAST (Semgrep), Automated Rule Check, PR Policy, PR Hygiene). Each is an older cancelled duplicate, and I listed the check runs on this head: every one has a newer run of the same name that passed.
- The banner now goes through
ErrorNoticewith the agent hand-off, which is how the rest of the dashboard shows a failed read. The Retry text and thecould_not_refreshstring are unchanged. - The new test
SessionsTab.staleRetry.test.tsxcovers focus staying on the button, thearia-disabledstate, the ignored second click, and the old rows staying visible. It uses no timers. - No regex in the added code.
Not checked: I did not run the tests or the page in a browser, and I did not read the ErrorNotice inline layout line by line.
I did not set auto-merge, because it is already set on this PR.
Problem / Motivation
Goal: On System > Sessions, the "can't refresh" banner's Retry keeps keyboard focus while it runs, and the failure reads through
ErrorNotice.In
website/src/pages/system/SessionsTab.tsx, when a background read fails after rows loaded, thesessions-stalebanner shows over the old rows with a Retry button that sets nativedisabledwhileisFetching. The banner stays mounted during the retry (react-query keepsisErrorwith the old data), so the focused button leaves the tab order and focus drops to the page. The banner text was a hand-written warning span, so this failed read had no agent hand-off.Why it matters
A keyboard or screen-reader user watching the sessions table loses their place each time they retry a failed refresh, and the failure offers no way to hand it to the agent.
Not a goal
What changed (motivation → approach → change)
aria-disabled={isFetching || undefined}witharia-disabled:dimming, andif (!isFetching)in the click handler, so a press while busy still does nothing, as the nativedisableddid. Same shape as fix(chat): keep focus on the PR and issue Refresh buttons while they refresh #31360 and fix(issue-radar): keep focus on the remaining refresh and retry buttons while busy #31687.ErrorNotice(variant="inline",askAgent): a failed read with nothing to lose (the rows are server data, the filter is a view setting). This is a visible change: the warn-tinted band becomes the standard inline error line with its "Ask the agent" hand-off. Retry stays its sibling at the row's end.Backwards compatibility
Compatible: same banner text, same Retry; a press while busy is still ignored.
Removes nothing: no route or key is taken away; the
sessions-staletest id stays on the banner.Tests
website/src/test/SessionsTab.staleRetry.test.tsx(new): seeds the cache with rows, lets the mounted read fail so the banner shows (no timers, no sleeps), then checks the failure text sits in the banner, Retry keeps focus while busy, a second press sends no second read, and focus is still there after it settles. It fails on main (run in a separate worktree) and passes here.Proof: not provable -- frontend test (prove.py runs Python only)
vitest run src/test/SessionsTab src/test/System: 65 passed.tsc -p tsconfig.app.jsonand eslint: clean. Local GPT 5.6 Sol: one finding (this banner bypassedErrorNotice), fixed here. Local Opus 5.5: no findings.Manual verification
Captured in Chromium against the real
SessionsTabwith a stubbed/api/sessions/memory(read 1 rows, read 2 fails, read 3 held), Retry focused and pressed with Enter. Focus while retrying: mainBODY; this branchBUTTON "Retrying…".Screenshots / video
Before (main), dark: the banner, then after a keyboard Retry (focus has left the button):
After, dark: the banner through
ErrorNoticewith its hand-off, then Retrying… still holding focus (focus ring on the button):After, light
Images were committed once at 9d274d3 and are not in the final commit.
Related Issues
Fixes #32878
Sibling sweep
Swept: git grep -nE "disabled={[^}]*(isFetching|refreshing)" -- website/src/pages/system website/src/pages/SystemPage.tsx (run on origin/main)
Sibling: website/src/pages/system/SessionsTab.tsx -- changed here
Siblings: none other -- the second hit in SessionsTab.tsx is the no-rows panel Retry, which unmounts during the retry
Pattern harvest
Rule candidate: none
Pattern: a busy button that sets native
disabledon itself while it stays mounted and focused.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)