Repository navigation
Accept file drops on remote tmux mirror panes - #14981
Conversation
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>
|
Warning Review limit reachedNext included review available in 4 minutes. View limit detailsLimit 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. Review configuration: ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
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. Comment |
|
All contributors have signed the CLA ✍️ ✅ |
|
Merge receipt for |
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)
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'sPaneDropContextcarries 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, andPaneDropTargetViewrefused the drag before any file-URL handling ran, so Finder and screenshot drops snapped back.Fix
RemoteTmuxWindowMirrorconforms toPaneDropContainer. It resolves its own panes, so file drops reach the pane's hosted terminal (the same upload pathcmux sshpanes and paste already use) and focus the dropped pane afterwards.(panelId, paneId)pair.acceptsPaneTransferscontainer property (defaulttrue) 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.mirrorPaneDropContextResolvesToTheWindowMirrorchecks 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-tmuxhost; CI is the verifier.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith 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
PaneDropTargetViewrefused every Finder and screenshot drop before file-URL handling ran.RemoteTmuxWindowMirrorconforms toPaneDropContainerand 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.acceptsPaneTransfers(defaulttrue) lets the mirror decline surface, Vault, Cloud row, and sidebar tool transfers at drag time since tmux owns the mirror layout.mirrorPaneDropContextResolvesToTheWindowMirrorcovering resolution, terminal text destination, surface rejection, and mismatched pane pairs.Written for commit e5034bf. Summary will update on new commits.