fix(ui): preserve session picker on empty search blur#87659
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Codex review: needs maintainer review before merge. Reviewed May 28, 2026, 10:34 AM ET / 14:34 UTC. Summary PR surface: Source +4, Tests +86. Total +90 across 2 files. Reproducibility: yes. Source inspection shows the current empty-query blur path clears picker results while the picker stays open, and the linked issue plus before-proof recording show the session switch failing in the shipped UI; I did not run a live browser in this read-only review. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land a focused Control UI fix like this after the normal CI and maintainer gates, then close the linked bug and let the older alternative PRs be superseded by the proof-backed path. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows the current empty-query blur path clears picker results while the picker stays open, and the linked issue plus before-proof recording show the session switch failing in the shipped UI; I did not run a live browser in this read-only review. Is this the best way to solve the issue? Yes. Guarding only the empty blur path is narrower than moving all picker actions to mousedown or deferring blur with requestAnimationFrame, and it preserves existing explicit search/clear and non-empty blur behavior with focused tests. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 3fea2196923b. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +4, Tests +86. Total +90 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
|
@clawsweeper re-review The previous review did not complete because the internal Codex invocation timed out ( |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper automerge |
|
🦞🔧
Draft PRs stay fix-only until GitHub marks them ready for review. Pause with Automerge progress:
|
|
ClawSweeper 🐠 reef update Thanks for the work here. ClawSweeper could not write to the source branch, so it opened a replacement PR rather than letting the fix drift. attribution still points back here. Why replacement: ClawSweeper could not update the source PR branch directly; GitHub did not grant sufficient push rights to the bot for that branch.
fish notes: model gpt-5.5, reasoning high; reviewed against 35de287. |
Summary
What problem does this PR solve?
Why does this matter now?
What is the intended outcome?
What is intentionally out of scope?
<select>, which uses a separate@changepath and does not share this blur/search behavior.What does success look like?
What should reviewers focus on?
AI-assisted: I used ChatGPT , Claude Code and Codex CLI to investigate the issue, prepare the source change and regression tests, and review validation steps. I manually verified the root cause, reviewed the final diff, ran the listed validation commands, and recorded before/after browser behavior using an isolated source-built test environment. I understand the change: the blur handler now skips
applyChatSessionPickerSearch(state)only when the current query normalizes to empty, preventing the initial empty-picker result from being cleared while retaining explicit search and non-empty blur behavior.Linked context
Which issue does this close?
Closes #87554
Was this requested by a maintainer or owner?
Real behavior proof (required for external PRs)
Behavior or issue addressed: The Control UI chat session picker fails to switch sessions when its initially empty focused search input blurs before a session option click completes. The same empty-blur path also prevents normal Tab navigation into the picker controls.
Real environment tested: Chromium on macOS, connected through VS Code port forwarding to an isolated
picker-proofOpenClaw Gateway profile running from this source checkout inside a Dev Container on port19789.Exact steps or command run after this patch:
In the Control UI, I then:
Evidence after fix:
Patch commit:
6c55ff0535(6c55ff0shown by the running source checkout)after-fix-session-picker-empty-blur-guard.mp4
Observed result after fix:
What was not tested:
Proof limitations or environment constraints:
Before evidence:
Base commit:
e5a687f115Using the same isolated
picker-proofprofile and interaction flow on the direct parent commit, I reproduced:before-fix-session-picker-blur-race.mp4
Tests and validation
Which commands did you run?
git diff --check upstream/main...HEAD pnpm test ui/src/ui/views/chat.test.ts pnpm check:changed pnpm ui:build pnpm buildResults:
git diff --check upstream/main...HEAD: passed.pnpm test ui/src/ui/views/chat.test.ts: passed, 60/60 tests.pnpm ui:build: passed and was used for the browser proof.pnpm check:changed: fails only in the zero-diagnostictypecheck alllane; the identical failure reproduces on clean updatedupstream/mainwithout this patch.pnpm build: attempted in the Dev Container, buttsdownwas terminated withSIGKILLand emitted no source diagnostic. The focused Control UI build and focused test suite completed successfully.What regression coverage was added or updated?
What failed before this fix, if known?
Red validation was performed by retaining the new regression tests while temporarily restoring the unpatched source behavior:
The failures confirmed that:
chatSessionPickerResult;With the source fix restored:
If no test was added, why not?
Local AI review:
codex review --base upstream/main.No discrete correctness issues were identified in the reviewed changes.Risk checklist
Did user-visible behavior change? (
Yes/No)Did config, environment, or migration behavior change? (
Yes/No)Did security, auth, secrets, network, or tool execution behavior change? (
Yes/No)What is the highest-risk area?
How is that risk mitigated?
chatSessionPickerQuerynormalizes to empty.Current review state
What is the next action?
What is still waiting on author, maintainer, CI, or external proof?
Which bot or reviewer comments were addressed?
spawnSync codex ETIMEDOUT); no code finding or inline review thread was produced..value-bound session select path. In current source, desktop and mobile use the same session picker implementation covered by this fix; the.value-bound native select is the agent filter and does not call the picker search or clear functions.