Skip to content

fix(a11y): keep focus on memory retry and show more buttons while busy - #33201

Merged
bolichen97 merged 1 commit into
mainfrom
fix/32164-busy-retry-keeps-focus
Nov 8, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/32164-busy-retry-keeps-focus

Conversation

@bolichen97

Copy link
Copy Markdown
Contributor

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 disabled while 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

  • Other read buttons: the Capabilities Templates, Knowledge and Webhooks Retry, the vector card's Search, Clear, tag filter and Preview, and the record editor's Recall and preview-page Retry. They are tracked in Capabilities and Memory: more read buttons drop keyboard focus while they load #33087.
  • Changing what a retry reads, how often it retries, or any write button (starting embeddings, deleting a row).
  • A "Retrying" label or spinner on the busy button.

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 disabled took the busy button out of the tab order, and a failed-read Retry unmounted mid-retry because it was keyed on the query's error, which React Query clears while a query with nothing cached refetches. Each busy button is now aria-disabled with a click guard, and each Retry's surface is keyed on queryReadFailed (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.

Surface Buttons
Memory graph Retry, which no longer gives way to the loading card
Vector memory card summary, semantic, episodic, audit and inspector Retry; episodic and audit Load more
Record history, replaced experiences, seed memory Show more

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.ts scans every overview card's read Retry, Show more and Load more button and fails on a native disabled, a missing aria-disabled or a missing click guard. The two writes that share the vector card's Retry label are left out.
  • MemoryGraphTab.loadError.test.tsx and the new VectorMemoryCard.retryFocus.test.tsx press a failed read's Retry and check, while the retry is still in flight, that the same button is mounted, focused and aria-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.
  • With the production files reverted, the scan and all four render tests fail; with them, the 40 test files that render these components or scan them pass (664 tests).
  • Determinism: the three changed files pass 20 of 20 runs on one worker, 10 of 10 on four workers beside two sibling files, and two shuffled orders (seeds 23188 and 4711).

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):

Memory graph Retry keeps focus while retrying, dark

Memory graph Retry keeps focus while retrying, light

Vector memory card, summary retry in flight:

Vector memory Retry keeps focus while retrying, dark

Vector memory Retry keeps focus while retrying, light

The failed read before Retry is pressed

Memory graph failed read

Vector memory failed read

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> whose disabled is bound to a React Query isFetching / isFetchingNextPage, or a Retry gated on query.error instead of queryReadFailed(query)

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 8, 2026 13:54
@bolichen97
bolichen97 requested a review from Zedmor November 8, 2026 13:54
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 1d9ec8403e51b1fc801c101d11ce418afcee1082 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: this reuses the queryReadFailed helper and the aria-disabled button pattern that #32186 already uses. Screenshots of both changed surfaces are attached.

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 1d9ec8403e51b1fc801c101d11ce418afcee1082 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • Item 1 — symptom-level: the cause is a Btn that goes natively disabled while busy, which drops focus. The sweep only grepped pages/overview, pages/knowledge and WebhooksPage.tsx. Grepping disabled=\{[^}]*(isFetching|isFetchingNextPage|loadingMore) over website/src/pages finds about 20 more read buttons that Capabilities and Memory: more read buttons drop keyboard focus while they load #33087 does not track. Examples: SecurityPanelRedaction.tsx:170, SecurityPanelTrust.tsx:509, SecurityPanelConfigPending.tsx:383, DefaultMcpGrantsSection.tsx:138,164, CrewmatesSection.tsx:61, VoicePanel.tsx:202,230,241, SessionDashboardsPage.tsx:27, SessionStatusFrame.tsx:69, RemoteCrewPanel.tsx:1453. Subtraction: defer them to Capabilities and Memory: more read buttons drop keyboard focus while they load #33087 by widening its sweep path to all of website/src/pages, rather than patching memory-only spellings one PR at a time.

What this change ships

Inventory (7 items) — 6 justified

Intent: a keyboard user who presses Retry, Show more or Load more on a memory surface keeps focus while the read runs. FIX.

  1. Memory graph Retry stays mounted and focused through its retry instead of giving way to the loading card — justified
  2. Vector card summary/semantic/episodic/audit/inspector Retry stay mounted and focusable while busy — justified
  3. Episodic and audit Load more stay focusable while busy — justified
  4. Record history, replaced-experience and seed-memory Show more stay focusable while busy — justified
  5. While a retry reads with nothing cached, the surface's existing loading text replaces the error text — justified
  6. The focus-scan test now also covers Show more, Load more and the graph/vector Retry keys — justified
  7. Knowledge "Syncing" badge translated in 12 locales — undeclared; this comes from base commit d924344, not this PR's commit

[FIRST-PRINCIPLES-REVIEWED] 1d9ec84

Description read

[DESCRIPTION-READ] fa97177526a68e266074857f843e3052ea9876605c76b53e76cc9e7caec764a8

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)

UX-level review of 1d9ec8403e51b1fc801c101d11ce418afcee1082 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • Show more while busy. No screenshot shows it focused and dimmed on the seed memory, record history or replaced experiences lists. One frame of any of them would close this.
  • Load more while busy. No screenshot shows the episodic or audit Load more, focused and aria-disabled, while the next page loads.
  • Semantic and audit cards mid-retry. These cards now stay mounted only because queryReadFailed holds. No frame shows the card, its error and its dimmed Retry while the retry is in flight.
  • Episodic and inspector Retry mid-retry. No frame shows either one.

Notes

  • Retry and "Loading…" swap order between surfaces. In the vector card, Retry renders above "Loading…"; in the memory graph it renders below. The blind reader noticed: "It's the same button in a different order." Put the vector card's role="status" loading line before the Retry Btn, as the graph does.
  • The busy Retry reads as two states at once. The blind reader said it "looks both disabled and selected" and asked why they'd "retry something that is still loading". Only the focus ring marks it as busy. This is outside the PR's stated goal; track it with Capabilities and Memory: more read buttons drop keyboard focus while they load #33087.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 1d9ec8403e51b1fc801c101d11ce418afcee1082 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 1d9ec84

Verdict parsed from the review's SHA-scoped output markers for commit 1d9ec8403e51b1fc801c101d11ce418afcee1082.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 1d9ec8403e51b1fc801c101d11ce418afcee1082 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 1d9ec8403e51b1fc801c101d11ce418afcee1082 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 1d9ec84

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 1d9ec8403e51b1fc801c101d11ce418afcee1082 false-positive: <reason, 20 to 500 characters>

@bolichen97
bolichen97 enabled auto-merge (squash) November 8, 2026 14:14
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 8, 2026
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.
@bolichen97
bolichen97 force-pushed the fix/32164-busy-retry-keeps-focus branch from dd5af80 to 1d9ec84 Compare November 8, 2026 18:59
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 8, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased onto main to pick up the fix for main's red Backend Tests (3.12, 3) (#33221). The earlier red came from test/test_kas_skill_scope.py and related KAS tests failing on main at d1a9a81; this PR only touches frontend files. The patch is unchanged (same patch-id). Local frontend gate and local GPT and Opus reviews passed with no findings. Coverage Gate failed only because the backend shard failed (fail-closed).

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 8, 2026

@buluoray buluoray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed read-only at 1d9ec84: memory Retry / Show more / Load more stay mounted with aria-disabled while busy, so focus stays; Retry stays visible during a retry. All lanes pass. Approving.

@bolichen97
bolichen97 merged commit d60b8c9 into main Nov 8, 2026
99 checks passed
@bolichen97
bolichen97 deleted the fix/32164-busy-retry-keeps-focus branch November 8, 2026 19:49
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 8, 2026
buluoray added a commit that referenced this pull request Nov 8, 2026
#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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Capabilities and Memory tabs: Retry buttons drop keyboard focus while they reload

2 participants