Skip to content

fix(ui): palette selections open the wrong agent and skip result rows - #130344

Merged
steipete merged 1 commit into
mainfrom
codex/qa-palette-agent-route-20260826
Aug 26, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa-palette-agent-route-20260826

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where selecting a named agent from the Control UI command palette opened the default agent's settings instead. Keyboard navigation also skipped visible rows when matches spanned categories, and session keys differing only in punctuation could give two options the same accessibility ID.

Related: #128356, which introduced catalog search (798c21af7b96, authored by @clawsweeper and merged by @VACInc on August 24).

Why This Change Was Made

Keep the agent identity attached to its catalog result and carry the existing navigation options through the palette and shell to the canonical agent route. Agent settings remain URL-owned and do not change the selected chat agent. Keyboard selection and rendering now use the same grouped result order; accessibility IDs use that displayed position instead of lossy session-key conversion.

The repair removes the positional filter wrapper duplication. Production: +33/-42, net -9 lines. No new dependencies, configuration, storage, protocol, or Gateway behavior. AI-assisted; independently reviewed.

User Impact

Clicking or pressing Enter on an agent result opens that agent, including under a mounted URL prefix. Arrow keys follow the visible rows and screen-reader focus identifies the selected result. Reload and browser Back preserve the expected route and chat-agent scope.

Evidence

The named-agent regression failed in real Chromium before the fix: clicking Reviewer opened /settings/agents with Main selected. The same flow now opens /settings/agents/reviewer with Reviewer selected, survives reload, and leaves the chat agent unchanged after Back.

Before:

Selecting Reviewer opened Main

After:

Selecting Reviewer opens Reviewer

Both images were inspected and contain only synthetic fixture data. Browser tests run the actual Control UI with a deterministic mocked Gateway; they are not authenticated provider/channel proof.

  • 152 focused tests across palette, agent routing, application host, native shell, and lazy actions passed. New click/keyboard, grouped-order, and punctuation-collision regressions demonstrably failed before repair; accepted UTF-16 session keys also remain renderable.
  • All six real Chromium multi-agent E2E scenarios passed, including named-agent click, mixed-category keyboard Enter, reload, browser Back, and existing agent-scope scenarios.
  • Independent interactive browser proof exercised named-agent click and keyboard navigation, plus 120 ArrowUp/ArrowDown transitions with selected-row and accessibility-target assertions.
  • pnpm ui:build passed, including 768 compressed-asset sidecars and the startup performance budget.
  • Fresh structured Codex review passed with no actionable findings. The repository changed-file gates passed, including core-test and UI typechecks, formatting, lint, i18n, dead-export scans, and policy guards. Hosted CI is required before landing.

Focused browser command: OPENCLAW_CAPTURE_UI_PROOF=1 node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/agent-page-scope.e2e.test.ts.

@clawsweeper

clawsweeper Bot commented Aug 26, 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: M maintainer Maintainer-authored PR labels Aug 26, 2026
@steipete
steipete marked this pull request as ready for review August 26, 2026 20:02
@steipete

Copy link
Copy Markdown
Contributor Author

The command-palette repair is verified at 0717fb3c194cfb3cedb73d53cde3d1746b365ad6.

The original Chromium reproduction selected Reviewer but opened Main. The fixed flow opens Reviewer's canonical settings URL, preserves the global chat agent, survives reload/Back, and routes keyboard Enter to the highlighted agent. Mixed groups now share one display/keyboard order; option IDs use displayed positions so punctuation and accepted UTF-16 session keys cannot alias or throw. Production is net -9 lines (+33/-42); tests are +231/-20.

Local verification passed: 152 focused tests across eight owner/sibling files; final 25-test palette rerun; all six Chromium agent-page scenarios; production UI build/performance; the full changed-file policy, format, type, lint, i18n and Knip gates. A separate rendered-browser pass checked click/Enter plus 120 keyboard transitions with selected-row/ARIA identity. These browser flows use deterministic mocked Gateway traffic, not authenticated provider/channel execution. The PR body contains inspected, sanitized before/after captures.

Fresh structured Codex autoreview and independent source review found no actionable issues. Exact-head hosted CI and Workflow Sanity passed. Proceeding through the native prepare/merge gates.

CI note: the first run's unrelated mobile terminal-menu pointer click timed out with an SVG intercepting the target (350 other tests in that shard passed). The original two-test file passed twice unchanged locally, including its normal pointer click. One failed-job retry used the same commit; no timeout increase, forced click, assertion change, or production workaround was added. Follow-up: investigate this intermittent mobile menu hit-target failure if it recurs; its underlying cause is not yet proven.

@steipete
steipete merged commit 70c87cc into main Aug 26, 2026
244 of 246 checks passed
@steipete
steipete deleted the codex/qa-palette-agent-route-20260826 branch August 26, 2026 20:41
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant