Repository navigation
fix(a11y): keep focus on memory retry and show more buttons while busy - #33201
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: this reuses the Notes
[DESIGN-REVIEWED] 1d9ec84 Description read[DESCRIPTION-READ] 19b758a7d618d388896c6adec7671ec60d235741a927a7aa17cf6f6f5c6a3fcd 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 Nothing blocks. Each memory-surface button change removes a reported focus loss (#32164), and the new tests fail on base. The only gap is siblings outside the memory surfaces. Notes
What this change shipsInventory (7 items) — 6 justifiedIntent: a keyboard user who presses Retry, Show more or Load more on a memory surface keeps focus while the read runs. FIX.
[FIRST-PRINCIPLES-REVIEWED] 1d9ec84 Description read[DESCRIPTION-READ] fa97177526a68e266074857f843e3052ea9876605c76b53e76cc9e7caec764a8 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 the busy Show more / Load more buttons and the semantic, episodic, audit and inspector Retry mid-retry. The screenshots show only the memory graph and the vector summary Retry. Evidence gaps
Notes
[UX-REVIEWED] 1d9ec84 Description read[DESCRIPTION-READ] 88a266fac57fc285ff39e40e450fa01bcbebcdd954269b92545bd2e9ec4c5374 That sha256 names everything this verdict read: the PR description, plus the 9 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: |
A memory read's Retry, Show more or Load more button lost keyboard focus the moment it was pressed. Each was natively disabled while its read ran, which takes it out of the tab order, and each Retry rendered only while its query held an error, which React Query clears when a query with nothing cached refetches. So the pressed Retry was swapped for a loading card or unmounted with its card, and focus fell to the page. Keep each failure surface up through its retry with queryReadFailed, and mark the busy buttons with aria-disabled plus a click guard, as the memory cards fixed in #32186 do. Covers the memory graph Retry, the vector memory card's Retry and Load more buttons, and the Show more buttons on record history, replaced experiences and seed memory.
dd5af80 to
1d9ec84
Compare
|
Rebased onto main to pick up the fix for main's red |
#33201) A memory read's Retry, Show more or Load more button lost keyboard focus the moment it was pressed. Each was natively disabled while its read ran, which takes it out of the tab order, and each Retry rendered only while its query held an error, which React Query clears when a query with nothing cached refetches. So the pressed Retry was swapped for a loading card or unmounted with its card, and focus fell to the page. Keep each failure surface up through its retry with queryReadFailed, and mark the busy buttons with aria-disabled plus a click guard, as the memory cards fixed in #32186 do. Covers the memory graph Retry, the vector memory card's Retry and Load more buttons, and the Show more buttons on record history, replaced experiences and seed memory. Original author: Bolin Chen (cherry picked from commit d60b8c9)
Problem / Motivation
Goal: A keyboard user who presses Retry, Show more or Load more on a memory surface keeps focus on that button while its read runs.
On the memory graph (Developer > Memory), the vector memory card (Overview > Memory) and the memory record, replaced-experience and seed-memory lists, pressing one of these buttons from the keyboard sends focus to the page body until the read finishes. Each button is natively
disabledwhile busy, which takes it out of the tab order. The Retry buttons are worse: they render only while their query holds an error, and React Query clears that error when a query with nothing cached refetches, so the pressed Retry is replaced by a loading card or unmounts with its card.Why it matters
A keyboard or screen-reader user who retries a failed memory read, or pages through a memory list, loses their place on every press and has to tab back from the top of the page. The same fix already landed for the other memory cards in #32186 and for the Prompts, Workflows and Usage tabs; these are the sites #32164 still tracks.
Not a goal
What changed (motivation → approach → change)
Pressing Retry, Show more or Load more from the keyboard now leaves focus on that button until its read finishes, so a keyboard user no longer lands on the page body and has to tab back.
Before, a native
disabledtook the busy button out of the tab order, and a failed-read Retry unmounted mid-retry because it was keyed on the query'serror, which React Query clears while a query with nothing cached refetches. Each busy button is nowaria-disabledwith a click guard, and each Retry's surface is keyed onqueryReadFailed(still failed, or re-reading after a failure). When nothing is cached, the error text gives way to the surface's existing loading text while the retry reads, and returns if the retry fails again.Backwards compatibility
Compatible: only how a busy button is marked and when a failed read's Retry unmounts change; no API, data or prop changes.
Removes nothing: the error notices, Retry buttons and loading states all still render; each Retry only stays up longer, through its own retry.
Tests
memoryRetryKeepsFocus.test.tsscans every overview card's read Retry, Show more and Load more button and fails on a nativedisabled, a missingaria-disabledor a missing click guard. The two writes that share the vector card's Retry label are left out.MemoryGraphTab.loadError.test.tsxand the newVectorMemoryCard.retryFocus.test.tsxpress a failed read's Retry and check, while the retry is still in flight, that the same button is mounted, focused andaria-disabled, and that a second press starts no second read. The vector card covers the summary Retry, and the semantic and audit cards that render only because their read failed.Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
Built the SPA from this head and drove each surface in Chromium with the memory read answering 500 once and the retry's read left in flight: focus Retry, press Enter, confirm focus stays on the dimmed Retry (frames below).
Screenshots / video
Memory graph, retry in flight (Retry focused and dimmed):
Vector memory card, summary retry in flight:
The failed read before Retry is pressed
Related Issues
Closes #32164
Sibling sweep
Swept: git grep -nE "disabled={[^}]*(isFetching|isFetchingNextPage|loadingMore)" -- website/src/pages/overview website/src/pages/knowledge website/src/pages/WebhooksPage.tsx
Sibling: website/src/pages/overview/MemoryGraphTab.tsx -- changed here
Sibling: website/src/pages/overview/VectorMemoryCard.tsx -- changed here
Sibling: website/src/pages/overview/MemoryRecordsEditor.tsx -- changed here
Sibling: website/src/pages/overview/MemoryRetiredCard.tsx -- changed here
Sibling: website/src/pages/overview/MemberMemoryPanel.tsx -- changed here
Sibling: website/src/pages/overview/AgentTemplatesTab.tsx:826 -- tracked in #33087
Sibling: website/src/pages/knowledge/KnowledgeGraph.tsx:773 -- tracked in #33087
Sibling: website/src/pages/WebhooksPage.tsx:1413 -- tracked in #33087
Pattern harvest
Rule candidate: semgrep
Pattern: a
<Btn>whosedisabledis bound to a React QueryisFetching/isFetchingNextPage, or a Retry gated onquery.errorinstead ofqueryReadFailed(query)Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)