Skip to content

fix(webviews): dismiss Sources menu without closing Summary - #27584

Merged
teamleaderleo merged 9 commits into
feat-cmux-nextfrom
lane/aiforui-nested-overflow
Nov 1, 2026
Merged

teamleaderleo merged 9 commits into
feat-cmux-nextfrom
lane/aiforui-nested-overflow

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

An outside click with the floating Summary card's Sources menu open dismissed both layers. Summary now detects its open menu trigger before handling an outside press, so the first press dismisses Sources and the next dismisses Summary.

Course item 12: a menu opened inside another layer must dismiss only the innermost layer. The gallery fixture and browser regression exercise the real Summary/Sources pair for outside click, Escape, and selection.

Leo (2026-10-29):

"I think you guys should just keep going indefinitely. Like just, there's so much random nonsense that you can probably associate every single one of his pointers to one of our situations."

Earlier:

"https://aiforui.dev/learn ... you guys should be taking this course and then reading into how it goes."

Audit: webviews/src/agent-session/acpmux/summary/SummaryCard.tsx:156 | course 12 | outside pointerdown closes Summary with Sources open | preserve Summary while its menu handles dismissal.

Validation

  • Full web lint/type checks and prepush gate pass.
  • Regression: Chromium and WebKit, Catppuccin Mocha and Latte; outside click, Escape, and selection. Original source: 4 pass, 2 expected failures, both named Sources outside keeps Summary open (one per theme). Fixed source: 6 pass, 0 fail. Each passing case runs in both browsers. Tests also verify the next outside click closes Summary.
  • Remote red/green proof at 2758e470da72f3bc97392eccb773d1d5aed1f2ff: baseline 4 pass / 2 expected failures, fixed 6 pass / 0 fail. The command then failed a screenshot-transfer size assertion. Current head crops screenshots; product code is unchanged.
  • Final-head capture/regression and existing Summary/Sources suite requests both ended with lane-gh: the broker sent no answer before returning run IDs. Their execution status is unknown; no final-head green receipt is claimed.
  • Before opening, pr-overlap was invoked but its GraphQL call was refused by the broker; a broker search for SummaryCard dismissal found no existing PR.

Risk: the guard relies on Base UI's existing open-trigger marker, with an ARIA fallback. The browser regression exercises that marker through the real Sources component. No new listeners, timers, or observers.

Screenshots

Gallery fixture: agent-pane.summary-card/nested-sources-menu. Synthetic empty Summary and Documentation tool only. Images show the settled state after the same outside click.

Before/after captures pending recovery of the remote broker route.

UI review

Verdict: blocked

Blockers

  • Final-head remote verification and settled screenshots are unavailable after the broker failed to answer. Existing screenshots caught the closing animation and are not used as evidence.

Should fix

  • None identified in the scoped behavior diff.

Nits

  • None identified.

Needs a human / needs a device

  • Independent exact-head review is pending. No native behavior is changed.

Changelog

Fixed: closing the Sources menu with an outside click keeps its Summary card open.

Agent session: agent session

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

blacksmith-sh Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Found 9 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmpjjgfb27y/summary-fail.json (live):/summary-fail.json (live): View Logs
/tmp/tmpwedievxe/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
convention violations found (ERROR lines above)./
convention violations found (ERROR lines above).
View Logs
test_cmux_next_follows_the_committed_target_graph (main.FocusedTestMap.test_cmux_ne
xt_follows_the_committed_target_graph)/
test_cmux_next_follows_the_committed_target_graph (main.FocusedTestMap.test_cmux_ne
xt_follows_the_committed_target_graph)
View Logs
test_every_part_of_bun_run_check_runs_in_the_warn_branch (main.WebviewsWarnSplitCov
ersCheck.test_every_part_of_bun_run_check_runs_in_the_warn_branch)/
test_every_part_of_bun_run_check_runs_in_the_warn_branch (main.WebviewsWarnSplitCov
ersCheck.test_every_part_of_bun_run_check_runs_in_the_warn_branch)
View Logs

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

@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)

Review fde099d: 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=pr27584 -f ref=lane/aiforui-nested-overflow -f platform=macos -f backend_mode=local

Gallery before/after for 65b10e4: 16 states rendered, 8 images differ, 331 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 41276255067 -R manaflow-ai/cmux -n gallery-advisory-27584-65b10e47339b308fcc1d76673e56bdaf13c8cb5f (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.subagents/agents-pill Apple System Colors Light changed 0.0016% own SummaryCard.tsx
agent-pane.subagents/agents-pill Apple System Colors unchanged 0% own SummaryCard.tsx
agent-pane.subagents/running Apple System Colors changed 0.0205% own SummaryCard.tsx
agent-pane.subagents/running Apple System Colors Light unchanged 0% own SummaryCard.tsx
agent-pane.subagents/mixed Apple System Colors Light changed 0.0489% own SummaryCard.tsx
agent-pane.subagents/mixed Apple System Colors unchanged 0% own SummaryCard.tsx
agent-pane.subagents/codex Apple System Colors Light unchanged 0% own SummaryCard.tsx
agent-pane.subagents/codex Apple System Colors unchanged 0% own SummaryCard.tsx
agent-pane.subagents/codex-child Apple System Colors Light unchanged 0% own SummaryCard.tsx
agent-pane.subagents/codex-child Apple System Colors unchanged 0% own SummaryCard.tsx
agent-pane.subagents/codex-two-turns Apple System Colors changed 0.0464% own SummaryCard.tsx
agent-pane.subagents/codex-two-turns Apple System Colors Light unchanged 0% own SummaryCard.tsx
agent-pane.subagents/claude-kinds Apple System Colors changed 0.0302% own SummaryCard.tsx
agent-pane.subagents/claude-kinds Apple System Colors Light unchanged 0% own SummaryCard.tsx
agent-pane.subagents/single Apple System Colors changed 0.0556% own SummaryCard.tsx
agent-pane.subagents/single Apple System Colors Light unchanged 0% own SummaryCard.tsx
agent-pane.summary-card/nested-sources-menu Apple System Colors Light new 0% own SummaryCard.gallery.tsx
agent-pane.summary-card/nested-sources-menu Apple System Colors new 0% own SummaryCard.gallery.tsx
agent-pane.summary-card/popover-environment Apple System Colors Light unchanged 0% own SummaryCard.gallery.tsx
agent-pane.summary-card/popover-environment Apple System Colors unchanged 0% own SummaryCard.gallery.tsx
agent-pane.summary-card/popover-legacy-subagents Apple System Colors Light unchanged 0% own SummaryCard.gallery.tsx
agent-pane.summary-card/popover-legacy-subagents Apple System Colors unchanged 0% own SummaryCard.gallery.tsx
agent-pane.summary-card/popover-subagents Apple System Colors Light unchanged 0% own SummaryCard.gallery.tsx
agent-pane.summary-card/popover-subagents Apple System Colors unchanged 0% own SummaryCard.gallery.tsx
agent-pane.summary-card/inline-subagents Apple System Colors Light unchanged 0% own SummaryCard.gallery.tsx
agent-pane.summary-card/inline-subagents Apple System Colors unchanged 0% own SummaryCard.gallery.tsx
agent-pane.summary-card/preview-tab-row Apple System Colors Light unchanged 0% own SummaryCard.gallery.tsx
agent-pane.summary-card/preview-tab-row Apple System Colors unchanged 0% own SummaryCard.gallery.tsx
agent-pane.summary-card/preview-pushed-inspector-tab-row Apple System Colors Light unchanged 0% own SummaryCard.gallery.tsx
agent-pane.summary-card/preview-pushed-inspector-tab-row Apple System Colors unchanged 0% own SummaryCard.gallery.tsx
agent-pane.summary-card/inspector-pushed-tab-row Apple System Colors Light unchanged 0% own SummaryCard.gallery.tsx
agent-pane.summary-card/inspector-pushed-tab-row Apple System Colors unchanged 0% own SummaryCard.gallery.tsx

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

red: cmux-next checks (god files, concurrency, crash safety, l10n); base red: the same failure on the base bf085b4; does not block

Shipped in:

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent claude-opus-5-5 medium): SHIP at 16ec42f

Independent read of the PR's own diff against feat-cmux-next plus the merge resolution in SummaryCard.gallery.tsx (both sides kept: base's environment prop and popover variants, this PR's nested-sources-menu variant and tools prop). The card's capture-phase outside-click handler now returns early while a menu trigger inside the card is open (data-popup-open), so an outside click closes only the Sources menu and the next one closes Summary; Escape and picks were already excluded. No blocking findings.

Follow-ups:

  • Only the "outside" case of summary-nested-dismiss.test.ts fails without the fix; Escape and pick were already guarded.
  • The open-menu check covers any menu inside the card; a future menu there that does not close on an outside press would keep the card open until it closes.

@teamleaderleo
teamleaderleo marked this pull request as ready for review November 1, 2026 03:11

@cubic-dev-ai cubic-dev-ai 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.

1 issue found across 3 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="webviews/test/summary-nested-dismiss.test.ts">

<violation number="1" location="webviews/test/summary-nested-dismiss.test.ts:31">
P2: When both Playwright engines are unavailable, `probeEngineOrSkip` is supposed to skip this lane, but this assertion fails the file instead. Skip setup when the browser map is empty and warm only an available browser.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

if (await probeEngineOrSkip("summary nested dismissal", engine.name(), engine))
browsers.set(engine.name(), await engine.launch({ headless: true }));
}
expect(browsers.size).toBeGreaterThan(0);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: When both Playwright engines are unavailable, probeEngineOrSkip is supposed to skip this lane, but this assertion fails the file instead. Skip setup when the browser map is empty and warm only an available browser.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At webviews/test/summary-nested-dismiss.test.ts, line 31:

<comment>When both Playwright engines are unavailable, `probeEngineOrSkip` is supposed to skip this lane, but this assertion fails the file instead. Skip setup when the browser map is empty and warm only an available browser.</comment>

<file context>
@@ -0,0 +1,101 @@
+      if (await probeEngineOrSkip("summary nested dismissal", engine.name(), engine))
+        browsers.set(engine.name(), await engine.launch({ headless: true }));
+    }
+    expect(browsers.size).toBeGreaterThan(0);
+    await warmGalleryFrame(vite, entry, { browser: browsers.values().next().value, params: { variant } });
+  });
</file context>

Resolve SummaryCard.gallery.tsx against the Inspector -> Session Info rename (#29921).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

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

Head is a base merge resolving SummaryCard.gallery.tsx against the Session Info rename (#29921); the diff against base is unchanged apart from the renamed props.

Follow-ups:

  • nested-sources-menu is now the entry's first (default) variant; moving it lower keeps popover-environment as the default for gallery-control-surfaces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (carry): SHIP at 65b10e4 (base merge only since fde099d; patch-id unchanged)

@teamleaderleo
teamleaderleo merged commit c40f40d into feat-cmux-next Nov 1, 2026
175 of 180 checks passed
@teamleaderleo
teamleaderleo deleted the lane/aiforui-nested-overflow branch November 1, 2026 09:46

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 65b10e47 Deployed Nov 1, 2026 by teamleaderleo via wait for same-key tree publisher #93853
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