-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
[Bug]: Control UI chat-session-picker buttons unresponsive due to blur/click race condition #87554
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crashclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crashclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
All interactive buttons inside the chat-session-picker dropdown (switch session, load more, search submit, clear search) silently fail because the search input's
@blurhandler destroys the DOM between theblurandclickevents via a Lit microtask re-render.Steps to reproduce
cA().Expected behavior
Clicking a session option switches to that session. Clicking "Load more" loads additional sessions. Clicking search/clear performs the respective action.
Actual behavior
All buttons inside the picker are unresponsive. The picker options flash briefly but no action is performed. No error is shown in the console. The session key remains unchanged.
Root cause analysis:
The search input in
OA()has@blur=${()=>void _A(e)}. When the search query is empty,_A()callsvA()which synchronously setschatSessionPickerResult = nulland callsrequestUpdate().Modern browsers execute microtasks between individual DOM event dispatches (per the HTML spec's "clean up after running script" algorithm). The event sequence is:
mousedownon option buttonbluron search input →vA()setschatSessionPickerResult = null→requestUpdate()schedules Lit updateCA()returnsnull→wA()produces[]→ all option buttons removed from DOMclickdispatched → target element no longer exists → handler never firesThe
uA()(close picker) andn(e, r.key)(switch session) calls inside the@clickhandler are never reached.Affected handlers:
@click=${()=>{uA(e),r.key!==e.sessionKey&&n(e,r.key)}}@click=${()=>void xA(e)}@click=${()=>void _A(e)}@click=${()=>vA(e)}OpenClaw version
2026.5.26
Operating system
Ubuntu 22.04.5, browser: Chrome
Install method
npm global
Model
N/A — this is a frontend-only UI bug, not model-dependent
Provider / routing chain
N/A — this is a frontend-only UI bug, not provider-dependent
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
Affected: All Control UI users of the chat tab session picker
Severity: High — session switching via the picker is completely broken; the primary UI affordance for changing sessions does not work
Frequency: 100% reproducible on every click when the search input has focus (which is always, since the picker auto-focuses it on open)
Consequence: Users cannot switch sessions, load more sessions, or use search/clear in the session picker dropdown
Additional information
The suggested fix (using
@mousedown+preventDefault()) is minimal and preserves existing behavior for keyboard users (Enter/Space on a focused button still works). An alternative fix would be to not nullchatSessionPickerResultinvA()whenchatSessionPickerOpenis true, instead keeping the stale result as a visual placeholder untilgA()resolves.