Skip to content

fix(ui): surface command-palette chat search failures - #124648

Merged
steipete merged 1 commit into
mainfrom
codex/autoqa-palette-search-failure
Aug 16, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/autoqa-palette-search-failure

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Found by live Control UI QA: opening the command palette and typing any chat query rendered "No results" even when every visible session title matched. The gateway was actually rejecting sessions.list (store pending a doctor canonical-key migration), but the palette's searchSessions catch swallowed the error and the empty state rendered as if the search succeeded with zero matches — a silent failure on a default path, the worst bug class per the repo doctrine.

Why This Change Was Made

A failed search and an empty search are different facts and must render differently. The palette now records the failure (sessionSearchFailed, scoped to the current request id while open, cleared on every new query) and the empty state says "Chat search failed — check the gateway logs and retry" instead of "No results". Navigation commands stay usable throughout — the search remains best-effort.

User Impact

Operators with a broken session store (or any gateway-side search failure) now see that search is failing instead of concluding their chats are gone.

Evidence

  • Live repro on the QA gateway: sessions.list rejected with SessionCanonicalKeyMigrationRequiredError while the palette showed plain "No results" (gateway log confirms 6 consecutive rejections).
  • New regression "shows a search failure instead of a false empty result" fails pre-fix (stash-verified), passes post-fix; also covers failure-state clearing + clean retry on the next keystroke.
  • node scripts/run-vitest.mjs run ui/src/components/command-palette.test.ts — 8/8 pass.
  • pnpm ui:i18n:baseline + pnpm ui:i18n:verify clean (new palette.searchFailed key, English source only per ui/AGENTS.md).
  • tsgo ui lane green.
  • LOC: prod +18/−2, test +26.
  • Codex autoreview (gpt-5.6-sol, high): clean, 0.99.

The palette's session search swallowed every gateway error and rendered
the plain "No results" empty state — a failed search (e.g. sessions.list
rejecting with a store-needs-doctor migration error) was
indistinguishable from a successful search with zero matches. Silent
failure on a default path is the worst bug class in this repo.

Track a sessionSearchFailed flag (set only for the current request id
while the palette is open, cleared on every new query/clear), and render
"Chat search failed — check the gateway logs and retry" in the empty
state instead. Navigation commands stay usable throughout.
@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Aug 16, 2026
@steipete
steipete marked this pull request as ready for review August 16, 2026 14:48
@steipete
steipete merged commit b90d7ef into main Aug 16, 2026
191 checks passed
@steipete
steipete deleted the codex/autoqa-palette-search-failure branch August 16, 2026 15:00
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 17, 2026
The palette's session search swallowed every gateway error and rendered
the plain "No results" empty state — a failed search (e.g. sessions.list
rejecting with a store-needs-doctor migration error) was
indistinguishable from a successful search with zero matches. Silent
failure on a default path is the worst bug class in this repo.

Track a sessionSearchFailed flag (set only for the current request id
while the palette is open, cleared on every new query/clear), and render
"Chat search failed — check the gateway logs and retry" in the empty
state instead. Navigation commands stay usable throughout.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant