Skip to content

Route native browser close shortcuts to the renderer - #7831

Open
bb-slop-cop[bot] wants to merge 1 commit into
mainfrom
slopcop/issue-7830
Open

bb-slop-cop[bot] wants to merge 1 commit into
mainfrom
slopcop/issue-7830

Conversation

@bb-slop-cop

@bb-slop-cop bb-slop-cop Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · new-issue-autopilot

Human comments

What was wrong

The native browser shortcut resolver skips the existing panel.close command because its main-surface binding does not require browserFocus. With native page focus, Command+W consequently returns no command and is not consumed or dispatched to the host renderer. The routing failure reproduces on trusted main in two clean checkouts. Reproduction and root-cause report.

What changed

Admit panel.close alongside the existing panel-navigation exceptions. Reuse the existing renderer command path without changing native menu policy. Add the default Command+W regression and extend the existing rebound-command table. Other panel commands remain out of scope.

Changed-line count against origin/main: 26 total text lines (26 additions, 0 deletions) across 2 files. No dependency, generated file, data, protocol, schema, packaging, permission, CLI, or public SDK changes.

How you verified

  • Before the production fix, the two new cases fail with expected null to be 'panel.close'; the other 10 resolver cases pass.
  • After the one-line fix, all 12 resolver cases pass.
  • pnpm exec turbo run test --filter=@bb/desktop -- --run test/desktop-browser-shortcuts.test.ts test/desktop-browser-view-manager.test.ts test/desktop-menu-shortcuts.test.ts test/menu.test.ts: 155 passed.
  • pnpm exec turbo run typecheck --filter=@bb/desktop: passed.
  • Formatting and git diff --check: passed; no binary changes.
  • Full desktop run: 646 passed, 2 skipped, 1 unrelated packaging failure. The same packaging test also fails on unchanged main because Electron cannot load libglib-2.0.so.0 on this host.
  • Native macOS window/tab closure was not exercised on this Linux host. The report distinguishes the reproduced production routing failure from that unverified UI outcome. The broad build also encounters pre-existing SDK runtime-output ordering; no unrelated repair is included.

Fixes #7830

AGENT GENERATED

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cmd+W with the native Browser tab focused closes the bb window instead of the tab

1 participant