Skip to content

fix: command palette shows stale or wrong-agent model results - #139923

Merged
obviyus merged 3 commits into
mainfrom
codex/palette-catalog-refresh
Sep 6, 2026
Merged

obviyus merged 3 commits into
mainfrom
codex/palette-catalog-refresh

Conversation

@obviyus

@obviyus obviyus commented Sep 6, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #136257.

What Problem This Solves

Command Palette kept retired models after catalog updates and could search the wrong agent. Failed reads silently removed results without recovery guidance.

Why This Change Was Made

The palette follows the shared agent-selection and connection owners and refreshes on catalog publication. It retains useful same-agent results after failures, shows retry guidance, and rejects old-agent or late responses.

User Impact

Open searches update without reloading the app. Changing the search can recover from a failed read. Model entries still open Models rather than changing a selection.

Evidence

Real Gateway/browser checks reproduced stale results, then verified catalog replacement, failure recovery, sidebar agent switching, late-reply rejection, reconnect, and navigation. All 67 focused component and connection tests passed. The native companion was unavailable; focused tests covered native navigation.

AI-assisted.

@obviyus obviyus self-assigned this Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Sep 6, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 4:38 AM ET / 08:38 UTC.

ClawSweeper review

What this changes

The command palette refreshes catalogs after configuration changes, scopes searches to the selected agent, and retains model results with retry guidance during temporary read failures.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused repair: current main still lacks publication-driven refresh and selected-agent binding. No blocking introduced defect was found, and the related staging draft does not supersede this independently scoped PR.

Priority: P2
Reviewed head: 1893cbf76c46a7156ee026aa1c58f72816c2ebd3

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with appropriate lifecycle coverage and no blocking correctness findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The authoritative repository state identifies a MEMBER-authored PR, so the external-contributor proof gate does not apply. The captured body reports matching-build Gateway/browser publication and recovery runs, and the inspected test exercises that production boundary; generated runtime artifacts were not independently inspected.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The authoritative repository state identifies a MEMBER-authored PR, so the external-contributor proof gate does not apply. The captured body reports matching-build Gateway/browser publication and recovery runs, and the inspected test exercises that production boundary; generated runtime artifacts were not independently inspected.
Evidence reviewed 8 items Current main still needs the repair: The constructor subscribes only to Gateway snapshots, and catalog requests resolve the agent from the Gateway snapshot. There is no catalog-publication subscription or application agent-selection subscription.
Introduced lifecycle repair: The verified base-to-head diff binds catalog invalidation to the existing Gateway controller and selected-agent capability, refreshes on publication, and rejects superseded promises before publishing results.
Read and navigation boundary: Catalog reads retain configured-view and prepared-only parameters. Model rows still navigate to model-providers; the patch introduces no credential writes, model-selection mutation, plugin API, or Codex dependency contract.
Findings None None.
Security None None.

How this fits together

The Control UI command palette combines navigation destinations with catalogs and session search results from the Gateway. Its model results open model settings rather than changing the active model.

flowchart TD
  A[Search input] --> D[Command palette]
  B[Selected agent] --> D
  C[Gateway publication events] --> D
  D --> E[Configured catalog read]
  E --> F[Check current connection and request]
  F --> G[Fresh results or retained results with retry guidance]
  G --> H[Open model settings]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +33, Tests +326, Config +1. Total +360 across 10 files.

View PR surface stats
Area Files Added Removed Net
Source 3 79 46 +33
Tests 6 364 38 +326
Docs 0 0 0 0
Config 1 1 0 +1
Generated 0 0 0 0
Other 0 0 0 0
Total 10 444 84 +360

Review metrics

Metric Value Why it matters
Production versus regression coverage Production +33 net lines; tests/support +326; CI +1 Production growth supplies refresh, selection ownership, and failure feedback; most growth exercises lifecycle and real-Gateway behavior.

Technical review

Best possible solution:

Keep catalog freshness and result retention owned by the palette, using shared connection and agent-selection lifecycles while preserving existing navigation semantics.

Do we have a high-confidence way to reproduce the issue?

Yes, source establishes the path: keep a palette search open during catalog publication or switch the selected agent; current main neither subscribes to those publications nor reads the selected-agent owner. No runtime reproduction was executed during this review.

Is this the best way to solve the issue?

Yes. The patch repairs the component's existing lifecycle using shared owners, preserves prepared catalog reads, and adds meaningful failure and replacement coverage without introducing another catalog implementation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 8b37368a4e3f.

Labels

Label justifications:

  • P2: This repairs misleading command-palette results and recoverable search failures without changing model execution or stored settings.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The authoritative repository state identifies a MEMBER-authored PR, so the external-contributor proof gate does not apply. The captured body reports matching-build Gateway/browser publication and recovery runs, and the inspected test exercises that production boundary; generated runtime artifacts were not independently inspected.

Evidence

What I checked:

  • Current main still needs the repair: The constructor subscribes only to Gateway snapshots, and catalog requests resolve the agent from the Gateway snapshot. There is no catalog-publication subscription or application agent-selection subscription. (ui/src/components/command-palette.ts:319, 8b37368a4e3f)
  • Introduced lifecycle repair: The verified base-to-head diff binds catalog invalidation to the existing Gateway controller and selected-agent capability, refreshes on publication, and rejects superseded promises before publishing results. (ui/src/components/command-palette.ts:323, 1893cbf76c46)
  • Read and navigation boundary: Catalog reads retain configured-view and prepared-only parameters. Model rows still navigate to model-providers; the patch introduces no credential writes, model-selection mutation, plugin API, or Codex dependency contract. (ui/src/components/command-palette-catalog-search.ts:292, 1893cbf76c46)
  • Behavioral coverage and captured proof claims: The supplied complete PR body reports real Gateway/browser publication, failure recovery, selected-agent reads, and delayed-response rejection. The inspected E2E test connects to a real isolated Gateway, changes its catalog through the CLI, intercepts real replies to inject failure, and checks visible results and navigation. These are contributor-reported runs; this reviewer did not execute tests or inspect generated captures. (ui/src/e2e/command-palette-catalog.real-gateway.e2e.test.ts:61, 1893cbf76c46)
  • CI and security scope: The workflow change adds the new test to the existing real-Gateway command. Existing read-only job permissions, build ownership, action references, and execution routing remain unchanged; the test is registered in the serial private-server lane. (.github/workflows/ci.yml:2773, 1893cbf76c46)
  • Related work and review continuity: The supplied discussion identifies feat(models): direct model lists and provider login across surfaces #136257 as the still-open staging draft from which this independent repair was extracted. The prior completed review retained no findings or published rank-up moves. An attempted comparison with its earlier reviewed SHA could not load an unavailable historical blob, so no unchanged-code or late-finding claim is made.

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Patrick Erichsen: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-06T08:10:35.948Z sha 4c60602 :: needs maintainer review before merge. :: none

@obviyus obviyus changed the title fix: command palette keeps outdated models after catalog changes fix: command palette shows stale or wrong-agent model results Sep 6, 2026
@obviyus
obviyus merged commit 2729038 into main Sep 6, 2026
147 of 149 checks passed
@obviyus
obviyus deleted the codex/palette-catalog-refresh branch September 6, 2026 08:50
@obviyus

obviyus commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator Author

Landed after real Gateway/browser validation and a clean platinum local review.

Proof: the served palette follows actual CLI catalog publication and sidebar agent selection. Explicit read failure retains only same-agent results, and changing the search recovers without reloading. A held Main reply does not replace Reviewer results.

Before After
Published models remain absent from an open search New models appear and retired entries disappear
Sidebar Reviewer selection still reads Main Palette and transcript reads use the selected agent
Model-read errors silently remove results Same-agent choices remain with visible retry guidance

67 focused component/controller/navigation tests, nine CI registration guards, and the real Gateway/browser suite pass. Native settings, model navigation, shared stores, protocol and auth contracts remain intact.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
…aw#139923)

Related: openclaw#136257

## What Problem This Solves

Fixes an issue where users searching in Command Palette would keep seeing retired models after the configured catalog changed. Switching agents in the sidebar also left palette requests scoped to the Gateway default. A failed model read silently removed results without an explanation or an immediate retry path.

## Why This Change Was Made

The palette now follows the application agent-selection owner and reloads after catalog/config publication. It retains useful model results during a failure in the same connection and selected agent, shows a retry instruction, and discards old-agent and late responses. The existing Gateway page controller replaces the palette's duplicate connection tracking.

Prepared, configured, advertised-method reads and existing navigation stay intact. Native-device Settings, session search and other catalog categories retain their current contracts. This is an independent component-owned extraction; the source draft remains unmerged.

## User Impact

An open search shows the new catalog without reloading the app. Temporary failures keep useful choices visible, and the next search can recover. Model entries still open Models; they do not change a session or default model.

## Evidence

- Baseline `7e5219093f71586975ef09e861a4506b1041d4f6`: a successful real CLI catalog update emits `config.changed` and `chat.metadata.changed`, but the open palette sends no replacement read and the new model never appears.
- The same real Gateway/browser scenario passes with this change: replacement appears, retired entry disappears, an explicit read failure retains choices and shows feedback, changing the query recovers, and Enter opens the existing Models route.
- The failure stimulus replaces an observed real reply with an explicit transport error. Catalog data and publication events come from the real Gateway. Browser and Gateway use one matching combined build with isolated synthetic state.
- Independent browser validation confirms live publication, retained-error recovery, older-reply rejection, reconnect and model navigation. Native companion and arbitrary source replacement are unavailable in the browser fixture; focused lifecycle/native-navigation tests cover those contracts.
- 67 focused component, connection-owner and native-navigation tests pass. They use the actual selection capability and cover agent/source/reconnect/detach replacement, late replies, overlapping publications, closed-palette invalidation and bare-session transcript scope.
- The expanded real Gateway/browser test and independent sidebar replay confirm Reviewer-scoped reads, removal of retained Main choices during failure, user-input recovery, and rejection of a held Main reply after Reviewer results arrive. The Agents settings editor keeps its separate selection contract.
- Nine focused native test-inventory/command guards, workflow checks, keyless UI translation verification, focused lint and line/assertion checks pass. The new real test is registered in the existing CI command and remains serial. Full type checking is left to CI.
- Runtime/UI: +33 lines; CI routing: +1; tests/support: +326; docs/generated: 0. Remaining growth supplies publication/error handling, correct selection ownership and meaningful cross-boundary regression coverage.

AI-assisted.

Co-authored-by: Ayaan Zaidi <[email protected]>
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 P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant