Skip to content

fix(webviews): preserve model trigger while opening columns - #34749

Merged
teamleaderleo merged 18 commits into
feat-cmux-nextfrom
lane/model-menu-dismiss
Nov 4, 2026
Merged

teamleaderleo merged 18 commits into
feat-cmux-nextfrom
lane/model-menu-dismiss

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

With Folder open, pressing Model could leave both popovers open. The first press replaced the lazy list-menu trigger with the columns-menu trigger before click, so Folder missed its outside dismissal. The lazy families path (#26867) combined with the columns picker (#32980) caused the regression.

Keep the columns trigger mounted from the initial render by providing an empty families list until the rows are needed. Model opens and Folder closes in one press. Catalog rows stay lazy. Design: design/model-picker.md.

Observed / Not run

  • Browser experiment 41793423121 reproduced the old failure and verified trigger identity and model-search focus after the fix.
  • cmux-ci test --at 4ac197e6887382445560055e9d4eee1ed32cae1d --setup playwright --timeout 1800 -- bash -c 'cd webviews && CMUX_BROWSER_TESTS=1 bun test test/composer-menu-dismiss.test.ts': 64 pass, 0 fail, including the 760 px chat and New Tab switches in Chromium and WebKit.
  • Static pre-push checks passed. The per-test webview verdict is running in CI 41793918170.
  • Native app launch and visual captures were not run; advisory capture is tracked in Capture composer Folder-to-Model switching after the dismissal fix #35011.

Risk: first-open trigger lifecycle. Existing browser coverage exercises chip switching, toggling, Escape, outside presses and selection. Root-cause evidence is in #35010.

Changelog

Fixed composer Folder-to-Model switching leaving two popovers open.

🤖 Generated with Codex

Agent session: agent session

Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-c05f94d269ac08017254
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 79267cf: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr34749 -f ref=lane/model-menu-dismiss -f platform=macos -f backend_mode=local

Gallery before/after for 79267cf: 16 states rendered, 0 images differ, 1494 more touched states not rendered. Images are in the run's artifact, not on this public PR; the independent review of this head reads them on its own, so the PR needs no hand-made screenshots of these states.

gh run download 41799360935 -R manaflow-ai/cmux -n gallery-advisory-34749-79267cf425255dac16041e7d626cea0d0fdbefcc (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.model-picker/idle Apple System Colors Light unchanged 0% own ModelPicker.tsx
agent-pane.model-picker/idle Apple System Colors unchanged 0% own ModelPicker.tsx
agent-pane.model-picker/fetching Apple System Colors Light unchanged 0% own ModelPicker.tsx
agent-pane.model-picker/fetching Apple System Colors unchanged 0% own ModelPicker.tsx
agent-pane.model-picker/updated Apple System Colors Light unchanged 0% own ModelPicker.tsx
agent-pane.model-picker/updated Apple System Colors unchanged 0% own ModelPicker.tsx
agent-pane.model-picker/error Apple System Colors Light unchanged 0% own ModelPicker.tsx
agent-pane.model-picker/error Apple System Colors unchanged 0% own ModelPicker.tsx
agent-pane.model-picker/empty Apple System Colors Light unchanged 0% own ModelPicker.tsx
agent-pane.model-picker/empty Apple System Colors unchanged 0% own ModelPicker.tsx
agent-pane.model-picker/curated Apple System Colors Light unchanged 0% own ModelPicker.tsx
agent-pane.model-picker/curated Apple System Colors unchanged 0% own ModelPicker.tsx
agent-pane.model-picker/family-recommendations-claude Apple System Colors Light unchanged 0% own ModelPicker.tsx
agent-pane.model-picker/family-recommendations-claude Apple System Colors unchanged 0% own ModelPicker.tsx
agent-pane.model-picker/family-recommendations-codex Apple System Colors Light unchanged 0% own ModelPicker.tsx
agent-pane.model-picker/family-recommendations-codex Apple System Colors unchanged 0% own ModelPicker.tsx
agent-pane.current-family-menus/claude-composer Apple System Colors Light unchanged 0% names ModelPicker.tsx
agent-pane.current-family-menus/claude-composer Apple System Colors unchanged 0% names ModelPicker.tsx
agent-pane.current-family-menus/claude-retry Apple System Colors Light unchanged 0% names ModelPicker.tsx
agent-pane.current-family-menus/claude-retry Apple System Colors unchanged 0% names ModelPicker.tsx
agent-pane.current-family-menus/codex-composer Apple System Colors Light unchanged 0% names ModelPicker.tsx
agent-pane.current-family-menus/codex-composer Apple System Colors unchanged 0% names ModelPicker.tsx
agent-pane.current-family-menus/codex-retry Apple System Colors Light unchanged 0% names ModelPicker.tsx
agent-pane.current-family-menus/codex-retry Apple System Colors unchanged 0% names ModelPicker.tsx
agent-pane.model-menu-density/native Apple System Colors Light unchanged 0% names ModelPicker.tsx
agent-pane.model-menu-density/native Apple System Colors unchanged 0% names ModelPicker.tsx
agent-pane.model-menu-density/native-effort Apple System Colors Light unchanged 0% names ModelPicker.tsx
agent-pane.model-menu-density/native-effort Apple System Colors unchanged 0% names ModelPicker.tsx
agent-pane.model-menu-density/tight Apple System Colors Light unchanged 0% names ModelPicker.tsx
agent-pane.model-menu-density/tight Apple System Colors unchanged 0% names ModelPicker.tsx
agent-pane.model-menu-density/tight-effort Apple System Colors Light unchanged 0% names ModelPicker.tsx
agent-pane.model-menu-density/tight-effort Apple System Colors unchanged 0% names ModelPicker.tsx

Pick other states with a Gallery: entry.id, entry.id/variant line in the PR body.

Passes: CI passes on 79267cf425.

CI passes on 79267cf425 (run 41799361446 attempt 1).

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); NEW: red check: Base-red classifier (per test) (+1 more) is not red on the base 83c6b99; do not merge until green; see lane-rules

Shipped in:

@github-actions github-actions Bot added the risk:low Risk tier (docs/ci/risk-tiers.md) label Nov 4, 2026
@blacksmith-sh

blacksmith-sh Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Found 6 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmpa7d16erw/summary-fail.json (live):/summary-fail.json (live): View Logs
/tmp/tmpx92w10ve/summary-missing.json (live):/summary-missing.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

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

teamleaderleo and others added 2 commits November 4, 2026 03:59
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-c05f94d269ac08017254

@teamleaderleo teamleaderleo left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review (codex gpt-6-astra high, next-review, since=20261104T044117Z): SHIP at 4b2d4c3

SHIP at 4b2d4c3

Visual verdict: no images; Leo tries the build

Static review found no blocking correctness or test-flow issue.

  • [P2] [follow-up] [category:ux] [finding:F1] [outcome:pending] No usable after screenshots were supplied (review/images/gallery/README.txt), so visual comparison remains unverified.

Follow-ups:

  • [P2] [follow-up] [category:ux] [finding:F1] [outcome:pending] Provide an after capture for visual comparison.

@github-actions github-actions Bot added risk:normal Risk tier (docs/ci/risk-tiers.md) and removed risk:low Risk tier (docs/ci/risk-tiers.md) labels Nov 4, 2026
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-c05f94d269ac08017254
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-c05f94d269ac08017254
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-c05f94d269ac08017254
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-c05f94d269ac08017254
teamleaderleo and others added 2 commits November 4, 2026 05:51
This reverts commit 0c3a43c.

Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-c05f94d269ac08017254
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-c05f94d269ac08017254
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-c05f94d269ac08017254
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (router-review gpt-6.1-sol xhigh): SHIP at b85cc63

Visual verdict: no images supplied (range review); the visual verdict must come separately.

No actionable correctness findings. The focused browser test could not run in the review box because Bun is unavailable.

Follow-ups: none

Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-c05f94d269ac08017254
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

The first browser verification of b85cc63 failed: https://github.com/manaflow-ai/cmux/actions/runs/41785768878. Diagnostic run https://github.com/manaflow-ai/cmux/actions/runs/41787800989 identified the failing Folder popup as ComposerContext's LocationPicker, so the FolderPopover-only listener did not run.

200851c shares the scoped listener between both location-picker implementations and uses a latest-close ref to avoid re-subscribing on render. Fresh exact-head review and browser verification are in progress.

Finding outcome: comment-6624250457/F3 filed-follow-up #35010
Finding outcome: comment-6624250457/F4 fixed 200851c

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent claude-opus-5-5 medium): SHIP at 200851c

Read merge-base..200851c and b85cc63..200851c. LocationPicker now closes through useComposerPopoverSwitch(open, trigger, () => changeOpen(false)), which is the right setter (it clears popoverOpen, addingExtra and the query). The hook is called before the disabled early return. The scope check needs a non-null composer root on both sides. The latestClose ref follows the pattern Composer.tsx already uses, and the effect subscribes only on [open, trigger]. Keyboard opening, Escape and the other popovers are untouched, and the test file matches base.

Follow-ups:

  • [follow-up] F5 test-coverage outcome:pending: this head has not been proven in a browser. The webview verdict must show "columns 760px chip switch" green, since the last browser run at b85cc63 failed.
  • [follow-up] F6 focus outcome:pending: closing the location menu from code may return focus to the Folder chip (Base UI finalFocus) and race the model menu's initial focus. If the browser run shows that, pass finalFocus={false} on this close path.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at 200851c

Reviewer: codex gpt-6-astra high, fast tier.

Follow-ups: 1. Each lands as an issue in this repo that links this receipt; the lane that opened the PR fixes it forward.

SHIP at 200851c
Visual verdict: no images; Leo tries the build

No correctness regressions found by inspection. Browser tests could not run because Bun and dependencies are absent.

  1. [P2] [follow-up] [category:ux] [finding:F1] [outcome:pending] webviews/src/agent-session/acpmux/QuickModelColumns.tsx:979: No after images were supplied. Capture Folder-to-Model switching to verify the rendered dismissal.

Follow-ups:

  • Capture the changed popover transition for visual verification.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Finding outcome: comment-6624794812/F1 filed-follow-up #35011

@cmux-bot cmux-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmux-bot approves 200851c: an independent review passed this exact head (router-review receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-c05f94d269ac08017254
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-c05f94d269ac08017254
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent claude-opus-5-5 medium): SHIP at 4ac197e

I diffed merge-base 0cdb3ce..4ac197e. The net change is 5+/1- in ModelPicker.tsx. The earlier event and listener code is gone, and composer-menu-dismiss.test.ts matches base. The root cause holds up. An unopened, columns-eligible chip used to render QuickModelMenu's Base UI MenuButton, and the press that set quickOpen remounted it as Columns' own button. The old trigger went away mid-press, so Folder never got its outside-click close. Now Columns' trigger is mounted from the first render.

Nothing visible changes:

  • Eligibility: the checks are the same (!quick, harnessFixed && !fork, current?.folder), and ownModel still routes to QuickModelMenu.
  • No empty flash: modelsNeeded includes quickOpen, so the full list is built in the render that opens the menu.
  • No early loading: useAccountList fetches only when the menu is open.
  • Chip semantics: before the first open, the chip now has aria-haspopup="dialog", the same as every later open.

Follow-ups: none

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high, router-review): SHIP at 4ac197e

Visual verdict: no images; Leo tries the build

No correctness findings. Runtime tests were unavailable in the review box because Bun and dependencies are absent.

Follow-ups:

  • [P2] [follow-up] [category:ux] [finding:F1] [outcome:pending] webviews/src/agent-session/acpmux/ModelPicker.tsx:938: Provide an exact-head visual capture of Folder-to-Model switching; no images were supplied for review.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Finding outcome: comment-6625531436/F1 filed-follow-up #35011

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

The complete browser discriminator passes at 4ac197e: cmux-ci test --at 4ac197e6887382445560055e9d4eee1ed32cae1d --setup playwright --timeout 1800 -- bash -c 'cd webviews && CMUX_BROWSER_TESTS=1 bun test test/composer-menu-dismiss.test.ts' — 64 pass, 0 fail, including both columns 760 px chip switches in Chromium and WebKit. Run: https://github.com/manaflow-ai/cmux/actions/runs/41794003485.

Finding outcome: comment-6624792986/F5 fixed 4ac197e
Finding outcome: comment-6624792986/F6 dismissed the final fix removes the programmatic sibling close; normal outside dismissal applies, and the browser experiment confirms model search focus.

@teamleaderleo teamleaderleo changed the title fix(webviews): dismiss composer popovers when opening model columns fix(webviews): preserve model trigger while opening columns Nov 4, 2026
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 4, 2026 08:25 Inactive
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 4, 2026 08:28 Inactive
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at 79267cf

Reviewer: codex gpt-6.1-sol xhigh, fast tier.

SHIP at 79267cf
Visual verdict: all 16 supplied before/after pairs are byte-identical; no visual regressions found.

Checked trigger lifecycle, lazy catalog loading, focus, and dismissal paths; no actionable findings. Tests weren’t rerun because Bun and dependencies are unavailable.

Follow-ups: none

@cmux-bot cmux-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmux-bot approves 79267cf: an independent review passed this exact head (router-review receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at 79267cf

Reviewer: codex gpt-6.1-sol xhigh, fast tier.

SHIP at 79267cf

Visual verdict: no regression observed; all 16 supplied before/after pairs are identical.

Reviewed trigger lifecycle, dismissal, focus, lazy catalog access, and existing regression coverage. Tests could not run locally because Bun and dependencies are unavailable.

Follow-ups: none

@teamleaderleo
teamleaderleo merged commit de75f26 into feat-cmux-next Nov 4, 2026
183 of 188 checks passed
@teamleaderleo
teamleaderleo deleted the lane/model-menu-dismiss branch November 4, 2026 09:20

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 79267cf4 Deployed Nov 4, 2026 by cmux-bot[bot] via wait for same-key tree publisher #110664
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