Skip to content

fix(ui): keep composer accessory clicks from taking focus - #122243

Merged
vyctorbrzezowski merged 1 commit into
mainfrom
brzezowski/control-ui-composer-accessory-focus
Aug 11, 2026
Merged

vyctorbrzezowski merged 1 commit into
mainfrom
brzezowski/control-ui-composer-accessory-focus

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Aug 11, 2026 •

Copy link
Copy Markdown
Member

Closes #122239

What Problem This Solves

Fixes an issue where clicking a passive Control UI composer accessory, such as the context-window details, gave the whole composer its focused chrome as if the input itself had been clicked while the browser also focused the trigger. The shared composer chrome handler now cancels both effects for primary pointer activation; the + menu previously had only a narrower, textarea-only workaround.

Why This Change Was Made

In this PR, the composer chrome owns pointer-focus policy for its accessory triggers. Primary pointer presses on summary, dropdown triggers, and the session-overrides shortcut cancel only the browser's default trigger focus; click activation, keyboard activation, and each popover's existing focus management still run normally. This replaces the + button's local exception with one canonical path.

Audited composer accessories:

  • Context window and effort: the pointer-opened popover preserves the previous outside or textarea focus.
  • Model, +, and microphone: their existing menus may move focus into their own interactive content; the trigger itself no longer becomes an incidental focus stop.
  • Session overrides: the conditional shortcut uses the same shared trigger policy.
  • Send/stop: unchanged; primary-action focus preservation remains independently owned.

User Impact

Pointer users can inspect or open composer accessories without unexpectedly activating the composer focus chrome or losing their previous typing position. Keyboard behavior remains unchanged.

Evidence

Focused behavior proof (light theme):

Before Proposed in this PR
Context trigger takes focus after click.
Before: the context popover is open and the 21 percent trigger has a visible focus outline
Context popover opens while focus remains outside the composer.
After: the context popover is open without focus moving to the context trigger
  • Regression proof: node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-composer-accessory-focus.e2e.test.ts
  • Blacksmith Testbox: focused UI E2E, core-test typecheck, UI typecheck, lint, formatting, dead-code, and UI catalog checks passed.

@vyctorbrzezowski vyctorbrzezowski self-assigned this Aug 11, 2026
@clawsweeper

clawsweeper Bot commented Aug 11, 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 the app: web-ui App: web-ui label Aug 11, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 11, 2026
@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/control-ui-composer-accessory-focus branch from deb2460 to ffa841a Compare August 11, 2026 20:18
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Pre-merge record: the latest ClawSweeper comments contain no findings or Rank-up moves; its exact-item review is queued and the publisher is currently rate-limited. All known findings are addressed. Two sequential exact-head review passes are clean, the focused behavior proof passes, and openclaw/ci-gate is green for ffa841a389ba79bcc38ff11bd88f5af5d37462ea.

@vyctorbrzezowski
vyctorbrzezowski merged commit 776c19e into main Aug 11, 2026
173 of 176 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/control-ui-composer-accessory-focus branch August 11, 2026 20:50
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit to tangtaizong666/openclaw that referenced this pull request Aug 11, 2026
…-prep

* commit 'edb7a1692e58d78ff7e196db39ea8eff297b2e19': (1351 commits)
  fix(telegram): expose live location updates to hooks (openclaw#122185)
  fix(ui): remove the pre-creation session row (openclaw#122259)
  fix(openai): surface failed realtime response outcomes (openclaw#121177)
  fix(logging): publish diagnostics ZIP through staged atomic overwrite (openclaw#122130)
  test(cli): trim duplicate MCP probe process cases (openclaw#122260)
  feat(agents): replay persisted native video (openclaw#122257)
  fix(test): serialize default e2e runner (openclaw#122203)
  fix(ui): always show full assistant responses (openclaw#122207)
  feat(mcp): per-requester OAuth for MCP servers (openclaw#122166)
  fix(ui): preserve focus on composer accessory clicks (openclaw#122243)
  fix(backup): exclude state temp files (openclaw#122250)
  fix(browser): let attached workers exit after CDP use (openclaw#122103)
  test(cli): trim duplicate Claw authoring process cases (openclaw#122248)
  refactor(outbound): inline delivery diagnostics (openclaw#122219)
  refactor: eliminate final wrapper-shadowing hazards (openclaw#122157)
  fix(ui): keep new-session identity anchored (openclaw#122242)
  test(cli): trim duplicate gateway process cases (openclaw#122240)
  fix(media): decode local file URLs safely (openclaw#122192)
  refactor(agents): centralize typed activity event emission (openclaw#122188)
  fix(ui): effort slider matches selected level after model switches (openclaw#122125)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 12, 2026
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: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Control UI composer accessory clicks move focus to their triggers

1 participant