Skip to content

Accept file drops on remote tmux mirror panes - #14981

Merged
teamleaderleo merged 1 commit into
mainfrom
fix/14896-mirror-pane-file-drop
Sep 27, 2026
Merged

teamleaderleo merged 1 commit into
mainfrom
fix/14896-mirror-pane-file-drop

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #14896

Thanks @jeremywhelchel for the report and the precise trace through the drop path.

Root cause

Remote tmux mirror panes are rendered from the mirror's own nested BonsplitController, so a mirror pane's PaneDropContext carries a pane id the workspace tree has never seen. Since the pane-drop router landed, AppDelegate.paneDropContainer(for:) only accepted panes of the workspace or a Dock tree. It returned nil for mirror panes, and PaneDropTargetView refused the drag before any file-URL handling ran, so Finder and screenshot drops snapped back.

Fix

  • RemoteTmuxWindowMirror conforms to PaneDropContainer. It resolves its own panes, so file drops reach the pane's hosted terminal (the same upload path cmux ssh panes and paste already use) and focus the dropped pane afterwards.
  • The resolver falls back to the workspace's window mirror that owns the (panelId, paneId) pair.
  • A new acceptsPaneTransfers container property (default true) lets the mirror decline surface, Vault, Cloud row and sidebar tool transfers at drag time, since tmux owns the mirror layout. Open-as-split file drops are declined for the same reason.

Tests

RemoteTmuxMirrorSplitRoutingTests.mirrorPaneDropContextResolvesToTheWindowMirror checks that a mirror pane context resolves to the mirror, reports a terminal text destination, rejects surface transfers, and does not resolve a mismatched panel/pane pair.

Not verified by hand against a live cmux ssh-tmux host; CI is the verifier.

🤖 Generated with Claude Code


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 #14896: file drops on remote tmux mirror panes now reach the pane's hosted terminal instead of snapping back. The drop resolver previously returned nil for mirror panes—their contexts carry pane ids the workspace tree never sees—so PaneDropTargetView refused every Finder and screenshot drop before file-URL handling ran.

  • RemoteTmuxWindowMirror conforms to PaneDropContainer and resolves its own panes; the resolver falls back to the workspace's mirror that owns the (panelId, paneId) pair, and the dropped pane is focused afterwards.
  • New acceptsPaneTransfers (default true) lets the mirror decline surface, Vault, Cloud row, and sidebar tool transfers at drag time since tmux owns the mirror layout.
  • Adds mirrorPaneDropContextResolvesToTheWindowMirror covering resolution, terminal text destination, surface rejection, and mismatched pane pairs.

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

Review in cubic

A mirrored tmux window renders its panes from its own nested Bonsplit
controller, so a mirror pane's drop context names a pane the workspace
tree has never seen. The pane-drop resolver only accepted workspace or
Dock panes, returned nil, and the drop view refused every Finder or
screenshot drop before the file upload path ran.

The window mirror now conforms to PaneDropContainer and the resolver
falls back to the workspace's mirror that owns the pane. Dropped files
go to the pane's terminal as before; pane transfers and open-as-split
drops stay declined because tmux owns the layout.

Fixes #14896

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

coderabbitai Bot commented Sep 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 4 minutes.

Check out review usage here.

View limit details

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

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

Learn how review limits work.

Review configuration:

⚙️ Run configuration

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

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 691540f1-ff8c-4f49-b31e-d877f750a842

📥 Commits

Reviewing files that changed from the base of the PR and between 52dce98 and e5034bf.

📒 Files selected for processing (2)
  • Sources/PaneDropContainer.swift
  • cmuxTests/RemoteTmuxMirrorSplitRoutingTests.swift

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

Copy link
Copy Markdown
Contributor

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

@teamleaderleo
teamleaderleo enabled auto-merge (squash) September 27, 2026 11:56
@teamleaderleo
teamleaderleo merged commit c185deb into main Sep 27, 2026
61 of 62 checks passed
@teamleaderleo
teamleaderleo deleted the fix/14896-mirror-pane-file-drop branch September 27, 2026 11:57
@github-actions

Copy link
Copy Markdown
Contributor

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

rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 27, 2026
f5c179f iOS: fix the test failures that keep iOS CI red on main (manaflow-ai#14803)
8685bf5 Hold update relaunch while agents are mid-turn (manaflow-ai#14969)
dc90332 Keep CLI socket-discovery tests off the host's real cmux (manaflow-ai#14919)
dd3c91b docs: shorten root agent instructions and link existing procedures (manaflow-ai#14998)
8c744df Rename edits inline or in the palette, never in an alert (manaflow-ai#14986)
9ae4383 Calmer chrome motion: appear instantly, fade out only, no overshoot (manaflow-ai#14984)
6510f56 Write opencode config JSON without escaping slashes (cmux 7140) (manaflow-ai#14805)
ab5e7da ci: stop catch-up merges from failing the CLA check (manaflow-ai#14913)
52c8f41 Add cmux session move for Claude sessions (manaflow-ai#14959)
36785b1 Hide decorative Settings sidebar icons from VoiceOver (manaflow-ai#14989)
4c7158c Label the sound preview button and fix mistranslated action verbs (manaflow-ai#14983)
e704a77 Bound untracked paths stored in last-turn diff baselines (manaflow-ai#14980)
f073df1 Fix remote Files sidebar for names that change under NFD (manaflow-ai#14978)
5c68499 Bump bonsplit: mouse wheel scrolls the overflowed tab strip (manaflow-ai#14985)
9466dcb Keep agent resume bindings through the update-relaunch save (manaflow-ai#14971)
ef8b037 docs: take release notes from a Changelog section in each PR instead of CHANGELOG.md edits (manaflow-ai#14934)
6eddfd7 ci: skip the delta diff when main moved further than the pull request (manaflow-ai#14987)
fefcec7 ci: attribute red PR runs to the machine or the code, re-run machine failures once (manaflow-ai#14977)
c185deb Accept file drops on remote tmux mirror panes (manaflow-ai#14981)
90773c7 test: make CmuxSidebarGit probe waits event-driven (manaflow-ai#14973)
1f2dbfe ci: skip the scheduled Blacksmith cache warmers while owned pools serve PRs (manaflow-ai#14827)
2850651 docs: add a guide to customizing cmux's look (manaflow-ai#14850)
b66e365 Resolve a separate sidebar's content against its own backdrop (manaflow-ai#14841)
88a9360 UI tests: one labelled frame per action, built in CI; scripts/ui-test (manaflow-ai#14966)
20cfa78 fix(omo): resolve relative file refs in the shadow config without double-loading OpenCode config (manaflow-ai#14935)
f0e964c ci: make the aggregate app-host product the default, layers opt-in (manaflow-ai#14975)
52dce98 ci: run and register the machine-failure test (manaflow-ai#14972)
7bf48bc ci: route compile admission by kept-build distance across minis (manaflow-ai#14949)
44fa3f5 Offer cmux in Open With for Markdown, source, and text files (manaflow-ai#14968)
45c2d66 Replay the Claude session id of agents in cmux ssh (cmux-tui) panes (manaflow-ai#14906)
b4c1b31 Label icon-only chrome buttons and localize project panel text (manaflow-ai#14926)
14a6909 seed prefetch: keep the seed adopt would pick, of any seeded width (manaflow-ai#14944)
19e73d2 ci: self-calibrating warm-distance compile estimates (manaflow-ai#14932)
fa98d86 ci: redispatch focused runs the Mac failed before any test started (manaflow-ai#14963)
@austinywang austinywang mentioned this pull request Oct 5, 2026
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.

Remote tmux (ssh-tmux): Finder/screenshot file drops onto mirror panes are refused (snap back, no upload) since 0.64.23

1 participant