Skip to content

fix(composer): ignore secondary picker selection - #27351

Draft
teamleaderleo wants to merge 4 commits into
feat-cmux-nextfrom
lane/composer-picker-primary-guard
Draft

teamleaderleo wants to merge 4 commits into
feat-cmux-nextfrom
lane/composer-picker-primary-guard

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Right- and middle-clicking a generic composer Picker option selected it and closed the menu. The row now ignores non-primary mouse buttons while preserving preventDefault() first, so browser focus stays on the combobox and keyboard selection continues to work.

The production change is a primary-button guard. Focused unit tests and the synthetic agent-pane.picker-pointer gallery/browser harness cover ignored presses, primary selection, keep-open behavior, and keyboard selection.

i also want all those ui fixes/improvements in and stuff too along with more think tanks to improve stuff too after learning all those ui dev things

HOLD: Keep this PR draft. Do not ready or merge.

Validation

Final-head fleet checks at 7b6d8ea5f8c9815e49f02a0568b81a5f755865fe: run 40853680320 passed (exit 0): full webview check, 6/6 unit tests (18 assertions), and 6/6 Chromium/WebKit tests (38 assertions). Formatting passed, lint reported 0 warnings/errors, and typechecking reported no errors. The system-blue guard emitted non-failing warnings.

Red/green fleet run:

  • Unit tests: before 4 pass / 2 fail; after 6 pass / 0 fail.
  • Chromium and WebKit: before 2 pass / 4 fail; after 6 pass / 0 fail (38 assertions).
  • Trusted right/middle presses retain trigger focus; Home → ArrowDown → Enter selects without refocusing. Reopening and pressing Space selects once without reopening.
  • That run stopped on formatting in the new files; subsequent commits only format the gallery/tests.

Commands: cd webviews && bun run check; bun test test/composer-picker-primary.test.tsx; CMUX_BROWSER_TESTS=1 bun test test/composer-picker-pointer.test.ts.

Before / after

Synthetic gallery at 520×400; capture receipt. Before 217eefdbfc75d203f2686670533f2a16cdfc8830; after 3965af956fdb939fa9ed6ad687b9867cbd0888e4. Later commits only format the gallery/tests.

Right/middle previously selected Mention file and closed the menu. After the fix, the menu remains open with no selection. Primary selection remains unchanged.

Press Before After
Chromium right Right before Right after
Chromium middle Middle before Middle after
Chromium left Left before Left after
WebKit right WebKit before WebKit after

Scope and limits

Observed in synthetic Linux Chromium/WebKit; native macOS control-click and production-app captures were not run. Risk is limited to generic Picker row mouse selection; keyboard handlers and menu styling are unchanged. The browser harness closes pages, browsers, and its Vite server.

Open/merged duplicate searches found related changes in #21158, #25316, #26843, and #26616, but no duplicate of this generic Picker guard. The automated file-overlap command was unavailable through the broker.

Changelog

Fixed: Composer picker options ignore secondary and middle mouse presses.

Agent session: agent session

@teamleaderleo
teamleaderleo force-pushed the lane/composer-picker-primary-guard branch from 7dad3ae to 3965af9 Compare October 29, 2026 09:19
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 29, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-jkakc7 created for this PR by the cmux coordinator.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Unclear: web / react-apps-check failed: no known signature; failed step: Check webview test shards.

CI failed on 7b6d8ea5f8 (run 40853359426 attempt 1): 1 code, 1 unknown.

Job Verdict Why
web / react-apps-base-check (2) code a web test failed
web / react-apps-check unknown no known signature; failed step: Check webview test shards

Failures:

  • seen on other PRs chiefLook.test.tsx search renders Bubble Style in the Look card: failed (job)
  • seen on other PRs rowSummary.test.tsx no description line on any Settings page is over 60 characters, in any language: failed (job)
  • seen on other PRs rowSummary.test.tsx every schema summary fits 60 characters in every language: failed (job)
  • seen on other PRs gallery-control-surfaces.test.ts every web gallery entry keeps trailing surfaces clear and hover inside its control: failed (job)
Matched log lines
web / react-apps-base-check (2): (fail) search renders Bubble Style in the Look card [3770.14ms]

Not re-run automatically: web / react-apps-base-check (2), web / react-apps-check are not machine failures.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on 90a5c3a to compare; do not merge until green; see lane-rules
red: web / Web status; base red: the same failure on the base 90a5c3a; does not block
red: web / react-apps-base-check (2); no finished base run on 90a5c3a to compare; do not merge until green; see lane-rules
red: web / react-apps-check; base red: the same failure on the base 90a5c3a; does not block

teamleaderleo added a commit that referenced this pull request Oct 29, 2026
teamleaderleo added a commit that referenced this pull request Oct 29, 2026
teamleaderleo added a commit that referenced this pull request Oct 29, 2026
teamleaderleo added a commit that referenced this pull request Oct 29, 2026
teamleaderleo added a commit that referenced this pull request Oct 29, 2026
teamleaderleo added a commit that referenced this pull request Oct 29, 2026
teamleaderleo added a commit that referenced this pull request Oct 29, 2026
teamleaderleo added a commit that referenced this pull request Oct 29, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Gallery before/after: agent-pane.picker-pointer (520x400)

  • Before 217eefdbfc75d203f2686670533f2a16cdfc8830 (regression test only)
  • After 3965af956fdb939fa9ed6ad687b9867cbd0888e4 (guarded fix: preventDefault() stays first, then non-primary buttons return before pick)

Command: CMUX_BROWSER_TESTS=1 CMUX_PICKER_CAPTURE_DIR=<dir> bun test test/composer-picker-pointer.test.ts (Chromium + WebKit). Screenshots are taken after the press on "Mention file" and before the assertions.

Press Before After
Chromium right
Chromium middle
Chromium left
WebKit right

What differs: before, a right or middle press on "Mention file" selects it: the menu closes and the receipt reads "Selected: mention". After, right and middle presses leave the menu open with no selection ("No action selected" under the menu). Left press selects "mention" and closes the menu in both builds, identical screenshots. WebKit middle/left look the same as Chromium.

Results

  • Before: 2 pass, 4 fail (14 expect calls). Chromium right, Chromium middle, WebKit right and WebKit middle fail with expect(received).toBe(expected), Expected "No action selected", Received "Selected: mention" (intentional, regression test only). Left passes on both engines.
  • After: 6 pass, 0 fail (38 expect calls).

@blacksmith-sh

blacksmith-sh Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Found 12 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmpq8v4ute9/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpu0l3i1b0/summary-fail.json (live):/summary-fail.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs
src/pages/settings/chiefLook.test.tsx/chiefLook.test.tsx View Logs
src/pages/settings/chiefLook.test.tsx/chiefLook.test.tsx View Logs
src/pages/settings/rowSummary.test.tsx/rowSummary.test.tsx View Logs
src/pages/settings/rowSummary.test.tsx/rowSummary.test.tsx View Logs

...and 2 more test failures. View all on Blacksmith

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 7b6d8ea5 Deployed Oct 29, 2026 by teamleaderleo via cmux-tui tree preflight #76218
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant