Repository navigation
feat(dashboard): add retry to skill and slash picker load-failure notices - #22662
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the retry is the same in-place query re-fetch the sibling pickers use, and the hook change only applies when a caller passes Notes
[DESIGN-REVIEWED] d605a24 Description read[DESCRIPTION-READ] a27053d5367385d9575114bd3dadfb42b27e47c2bb088739bea5f5839578ea97 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: every item traces to #11405 and its hook option has two real callers. What this change shipsInventory (7 items) — 7 justifiedIntent: let a user retry a failed
[FIRST-PRINCIPLES-REVIEWED] d605a24 Description read[DESCRIPTION-READ] 18cd8774182a15f99792e225131db6ac93406ef5d55123e772bd26adede5bffa 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 blocks. The blind reader correctly identified Retry and "Retrying…" in all four screenshots, and both of the states this PR adds are shown. Notes
[UX-REVIEWED] d605a24 Description read[DESCRIPTION-READ] 69a1b007eff8b526a4b739582de3bbc22cd14e88eae6b0783a52ab842750b7eb That sha256 names everything this verdict read: the PR description, plus the 7 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 |
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: |
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: |
407af5a to
5660a43
Compare
aa409fe to
fccc968
Compare
|
Copy change recorded (Design/UX clears-when). This PR adds exactly one new catalog string, Behaviour it drives: while a Retry is in flight the keyboard-release gate holds Enter ( The mid-retry screenshots in the PR description have been re-captured from this revision and now show the plain "Couldn't load skills" / "Couldn't load commands" text in the Retrying state, matching the code. The frozen "Not a goal" bullet ("No new copy or new failure wording") predates this reviewer-driven correctness fix; I have not edited the frozen goal sections. The single added string and its behaviour are documented here and in the "What changed" section instead. |
|
self-added: no
|
|
self-added: no
|
|
self-added: no
|
|
self-added: no
|
fccc968 to
3eb45dd
Compare
|
|
49b1ccc to
d4537c2
Compare
|
self-added: no
|
…ices The skill picker and slash-command menus render a load-failure notice when their bounded fetch fails but offered no way to recover, unlike four sibling pickers that already carry a retry control (#7068). Add the same affordance: a Retry button beside each notice that re-issues the query; on success the menu re-renders with no error, so the notice clears itself. The control is inert-but-focusable while the re-ask is in flight (aria-disabled + an in-handler guard, flipping to Retrying...), matching the sibling pickers. Copy reuses the existing Retry/Retrying strings under each menu's own i18n namespace across all locales. Fixes #11405
d4537c2 to
d605a24
Compare
|
self-added: yes
|
buluoray
left a comment
There was a problem hiding this comment.
🤖 Kiro Crew Auto-Pipeline [operator: buluoray]:
Approving at d605a24.
A failed $skill or /command load now has a Retry that the keyboard can reach, so the user no longer has to close and reopen the composer menu. This matches the four sibling pickers.
What I checked:
- The new
emptyActionRefoption onuseListKeyboardNavis inert for every caller that does not set it, because forward Tab only saves a return target when the action is mounted. The post-commit restore only moves focus that has dropped to<body>. - The keyboard path is pinned. Disabling the forward-Tab-to-action branch fails 12 tests in the "useListKeyboardNav empty action" suite. The three new files are 59/59 on this head.
Follow-up, not blocking: "is an inert 'Retrying…' while the re-ask is out, and a second press sends nothing" does not pin the guard it describes. Removing if (isFetching) return from the slash menu's retryLoad leaves all 59 tests green. The call count is asserted synchronously right after the second click, before the load could have been called. Awaiting a tick (or a waitFor that the count stays unchanged) before the assertion would make the test fail without the guard. The SkillPicker test likely has the same shape.
Note for readers: the slash menu's failure notice now renders as an ErrorNotice alert instead of a muted status line. This is deliberate under the error-notice rule and matches the siblings.
iamwhatever
left a comment
There was a problem hiding this comment.
Approve at d605a24.
Both menus now show a Retry beside their load-failure notice. It re-asks the same query, and it stays inert while that re-ask is out. The useListKeyboardNav change is opt-in. Forward Tab moves to the empty action only when a caller passes emptyActionRef and the list is empty (useListKeyboardNav.ts#L239). The post-commit restore only moves focus that fell to <body> (useListKeyboardNav.ts#L151), so the other callers keep their behaviour. Earlier GPT and Opus findings have fixed dispositions that match the diff. All checks are green, and the branch is clean against main.
AI findings judged non-blocking:
- UX note, the 'Enter sends the message' clause turns red inside
ErrorNotice: a copy call the author put to the maintainer, and the ErrorNotice surface is required byerrors-use-error-notice. - Design note, the two menus duplicate the retry state: a refactor suggestion the lane itself scopes out of this PR (SlashCommandMenu.tsx#L179).
Small test note, agreeing with the earlier approval: the 'second press sends nothing' test checks the call count right after the click, so it would pass without the if (isFetching) return guard. Waiting a tick before that assertion would make it pin the guard.
— crew-pr-reviewer (r137)
Problem / Motivation
Goal: Let a user retry a failed skill-picker or slash-command load without closing and reopening the menu.
When the
$skillpicker or the/commandmenu could not load its list, it showed a "Couldn't load…" notice and left the user stuck — the only way to try again was to close the composer menu and reopen it. Four sibling pickers (the @-mention file search, Project picker, Workspace picker, Folder panel) already got a Retry control for the same failure in #7068; these two menus were the gap, tracked as the deferred finding #11405.Why it matters
A transient gateway hiccup turns a one-keystroke action into a dead end: the menu tells the user it failed but offers no way forward. The retry affordance already exists and is expected everywhere else, so its absence here is an inconsistency a user runs into exactly when something is already going wrong.
Not a goal
What changed (motivation → approach → change)
Both menus (
SkillPickerMenu.tsxandSlashCommandMenu.tsx) load their list through TanStack Query, so recovery is a re-ask of that same query. Each failure notice now carries a Retry button beside it that calls the query'srefetch(); on success the menu re-renders from the fresh data with no error, so the notice clears itself with no separate dismiss. While the re-ask is in flight the button is inert-but-focusable (aria-disabledplus an in-handler guard, flipping its label to "Retrying…"), the same contract the sibling pickers use so a second press starts nothing and keyboard focus is never dropped (the button also prevents its mousedown default so clicking it never pulls focus off the composer). A dedicated busy flag drives that state, because a refetch after an error flips React Query back to its pending shape and would otherwise show the first-load "Loading…" copy instead of the retry affordance.Keyboard users reach the same control. The menu floats in an overlay with zero rows on a failed load, so the shared list-keyboard hook (
useListKeyboardNav) used to close it on Tab, and Retry was never reachable without a mouse. The hook takes an optionalemptyActionRef: with zero rows and that control mounted, Tab from the composer moves focus to Retry and keeps the menu open. On Retry, Enter or Space activates it, Tab/Shift+Tab return to the composer, and Escape returns focus and closes. Activating Retry returns focus to the composer first, and if the button disappears while it holds focus for any other reason (a re-ask already in flight landing), the hook returns focus to the composer after that render, so focus never drops to the page; focus the user moved elsewhere is left alone. Enter from the composer still releases to Enter-to-send exactly as before, the announcements are unchanged, and every other caller of the hook leaves the option unset and behaves as before.Because a load failure is an error surface, the notice now renders through the shared
ErrorNoticecomponent (theerrors-use-error-noticerule) rather than the old plainrole="status"text — so it gains the standard danger styling and the warning icon the sibling pickers' failure notices carry.One new string is added:
commands_load_failed("Couldn't load commands", no send-key suffix) for the slash menu, which the skill menu already had asskills_load_failed. The slash menu now shows this plain variant while the re-ask is in flight — Enter is held then, so the pre-existing "… — Enter sends the message" variant would have promised a key the composer is not accepting. Every other failure/empty string is unchanged.The control is offered only in the load-FAILED empty state. A genuine zero-match ("No matching skills/commands") has nothing to re-ask, so it keeps its plain notice.
The button's label reuses the existing "Retry"/"Retrying…" strings the sibling pickers ship, added under each menu's own namespace in every
src/i18n/localescatalog — English inen.manual.json, each non-English locale reusing its own existing translation, pseudolocale regenerated.Backwards compatibility
Compatible: this adds a control to one previously-dead failure state and adds i18n keys; no existing key, prop, or behaviour is renamed, removed, or tightened.
Tests
website/src/test/SkillPickerMenu.retry.test.tsxandwebsite/src/test/SlashCommandMenu.retry.test.tsxlock in: the Retry control appears on a failed load; pressing it re-issues the load and the notice clears when it lands; it is an inert "Retrying…" while the re-ask is out and a second press sends nothing; it keeps the notice and returns to "Retry" when the re-ask fails again; and no Retry is offered on a genuine zero-match (negative control). They also cover the keyboard path: Tab reaches Retry without closing the menu, Enter on Retry is not taken by the list, and activating it re-asks and returns focus to the composer.website/src/hooks/useListKeyboardNav.imeGuard.test.tsxcovers the hook option directly: Tab jumps to the control, Tab/Shift+Tab on it return focus, Escape restores focus and closes, Enter on it is left to the button, the control unmounting while focused returns focus (and does not steal it when focus is elsewhere), and without the option Tab still closes the empty list.--sequence.shuffle(seeds 7919, 15838, 23757, 31676, 39595), 59/59 each run. Related suites (170 files that reference the hook or its callers) pass, 2461/2461.Manual verification
Rendered both menus in their load-failure state (picker source made to reject) and the mid-retry state (the re-ask held open), and confirmed the Retry control appears, is styled like the sibling pickers'
ErrorNotice, and dims to an inert "Retrying…" while the re-ask is out — see Screenshots.Screenshots
Skill picker, load failed:
Slash-command menu, load failed:
Skill picker, mid-retry (inert "Retrying…"):
Slash-command menu, mid-retry (inert "Retrying…"):
Issue link
Fixes #11405