Skip to content

Fix browser paste routing with terminal text box beta (#6380) - #16560

Merged
teamleaderleo merged 2 commits into
mainfrom
fix/issue-6380-browser-paste
Oct 2, 2026
Merged

teamleaderleo merged 2 commits into
mainfrom
fix/issue-6380-browser-paste

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Focused browser paste routing currently omits Cmd+V from the browser-first document editing allowlist. With the text-box beta enabled, the terminal text box can claim paste before the focused browser pane.

This PR adds a regression test first, then adds Cmd+V to the browser-first routing policy so WebKit receives it before cmux's text-box fallback.

Validation: hosted app-host unit tests cover AppDelegateShortcutRoutingTests.

— Waffle g1 🍂
Run: run_worker_20261002_5ef2bc19


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


Summary by cubic

Fixes browser paste routing so Cmd+V reaches focused web content before the terminal text box can claim it when the text-box beta is enabled.

  • Adds a regression test asserting Cmd+V routes through web content first while a browser pane is focused.

Written for commit c321854. Summary will update on new commits.

Review in cubic

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

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 3 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: cd90532a-76b1-478d-91c8-d04ce2297e97

📥 Commits

Reviewing files that changed from the base of the PR and between 8b8762a and c321854.

📒 Files selected for processing (2)
  • Sources/App/ShortcutRoutingSupport.swift
  • cmuxTests/AppDelegateShortcutRoutingTests.swift
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

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

cursor Bot commented Oct 2, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@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 and verified against the latest diff

You’re at about 90% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

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="cmuxTests/AppDelegateShortcutRoutingTests.swift">

<violation number="1" location="cmuxTests/AppDelegateShortcutRoutingTests.swift:6062">
P1: This test asserts Cmd+V is routed browser-first, but the routing policy has no paste case. `BrowserDocumentEditingCommandEquivalent` (Sources/App/ShortcutRoutingSupport.swift) covers only copy, cut, selectAll, italic, and `git diff pr-base HEAD --stat` shows this PR changes only the test file — the PR description's claimed production change is absent. `shouldRouteBrowserDocumentEditingCommandEquivalentThroughWebContentFirst` returns false for Cmd+V (no matching case), so `XCTAssertTrue` fails and issue #6380 is unfixed. Add the production change (e.g., a `.paste` case with key "v", keyCode 9, mirroring `.copy`) in the same PR; if this is intended as a red-test-first commit, the follow-up fix is not part of this PR.</violation>
</file>

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

Re-trigger cubic

)

XCTAssertTrue(
shouldRouteBrowserDocumentEditingCommandEquivalentThroughWebContentFirst(event),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1: This test asserts Cmd+V is routed browser-first, but the routing policy has no paste case. BrowserDocumentEditingCommandEquivalent (Sources/App/ShortcutRoutingSupport.swift) covers only copy, cut, selectAll, italic, and git diff pr-base HEAD --stat shows this PR changes only the test file — the PR description's claimed production change is absent. shouldRouteBrowserDocumentEditingCommandEquivalentThroughWebContentFirst returns false for Cmd+V (no matching case), so XCTAssertTrue fails and issue #6380 is unfixed. Add the production change (e.g., a .paste case with key "v", keyCode 9, mirroring .copy) in the same PR; if this is intended as a red-test-first commit, the follow-up fix is not part of this PR.

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 cmuxTests/AppDelegateShortcutRoutingTests.swift, line 6062:

<comment>This test asserts Cmd+V is routed browser-first, but the routing policy has no paste case. `BrowserDocumentEditingCommandEquivalent` (Sources/App/ShortcutRoutingSupport.swift) covers only copy, cut, selectAll, italic, and `git diff pr-base HEAD --stat` shows this PR changes only the test file — the PR description's claimed production change is absent. `shouldRouteBrowserDocumentEditingCommandEquivalentThroughWebContentFirst` returns false for Cmd+V (no matching case), so `XCTAssertTrue` fails and issue #6380 is unfixed. Add the production change (e.g., a `.paste` case with key "v", keyCode 9, mirroring `.copy`) in the same PR; if this is intended as a red-test-first commit, the follow-up fix is not part of this PR.</comment>

<file context>
@@ -6048,6 +6048,22 @@ final class AppDelegateShortcutRoutingTests: XCTestCase {
+        )
+
+        XCTAssertTrue(
+            shouldRouteBrowserDocumentEditingCommandEquivalentThroughWebContentFirst(event),
+            "Cmd+V must be routed through web content first while a browser pane is focused"
+        )
</file context>

@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 existing issue remains and no new issues found across 2 files

You’re at about 90% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.

Re-trigger cubic

@teamleaderleo
teamleaderleo merged commit 2b895a5 into main Oct 2, 2026
65 checks passed
@teamleaderleo
teamleaderleo deleted the fix/issue-6380-browser-paste branch October 2, 2026 00:38
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Merge receipt for c321854a7e: every check was green at merge (15 verified; 18 skipped by policy). Full suite runs on main after merge.

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Dogfood tours of c321854a

sidebar-and-chrome-tour at c321854a: not run

skipped: CI built this head on a runner pool whose products the UI test Macs cannot load, and media never compiles one; gh workflow run pr-media.yml -f pr=&lt;n&gt; -f allow_compile=true does

Tours are picked by the paths globs in dogfood/scenarios/*.json; a Dogfood-tours: a, b line in the description picks them instead (none turns this off). Look at every frame before merging: a green tour only means no step failed.

rustybret pushed a commit to rustybret/bmux that referenced this pull request Oct 2, 2026
0bfd027 test(cloud): fix the Cloud header and moved-panel focus tests that never ran (manaflow-ai#16539)
c5c4345 localization: accept numbered placeholders in any order (manaflow-ai#16376)
456edeb fix(settings): replace custom sidebar mockups with real previews (manaflow-ai#16569)
98dc3ab Prototype: cmux Cloud as a remote MCP server (manaflow-ai#16568)
6c22525 test(remote): isolate tmux stale-surface fixture (manaflow-ai#16566)
3ec9918 Re-land "fix(coderouter): initialize Cloud VM account pools (manaflow-ai#16397)" (manaflow-ai#16572)
2b895a5 Fix browser paste routing with terminal text box beta (manaflow-ai#6380) (manaflow-ai#16560)
2bd3455 localization: check Swift defaultValue literals against their catalog en value (manaflow-ai#16396)
c43086e test(cli): expect --mark-read to mark every listed inbox message (manaflow-ai#16537)
fcda4f0 test(feed): wait for zero-wait Codex permission acceptance before checking attention (manaflow-ai#16536)
7d57a03 fix(remote): evict stale persistent SSH bridge leases (manaflow-ai#16558)
d630cb8 docs: add protected-folder diagnostics for tmux sessions (manaflow-ai#12219)
7dceaac test: create cwd fixtures that new terminals now resolve on disk (manaflow-ai#16538)
28cc575 docs: cover surface resume binding CLI contract (manaflow-ai#16473)
5c7dca1 Fix idle zsh PR probes triggering chpwd hooks (manaflow-ai#16553)

# Conflicts:
#	.github/workflows/ci-guards.yml
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.

1 participant