Repository navigation
Preserve image attachments when dropping or pasting into terminals - #12752
Conversation
Exercise the shared local image transfer path for both image drops and Cmd+V paste. The materialized file must remain available after the path is sent so Claude Code and Codex can read it asynchronously.
Do not delete cmux-owned image files when the local terminal path is delivered. Claude Code and Codex read that path asynchronously after sendText returns; retain the file for the existing process-lifetime cleanup instead.
…-12684-image-drop-attachment
|
All contributors have signed the CLA ✍️ ✅ |
|
Warning Review limit reachedNext included review available in 16 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: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (23)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (19)
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughImage transfer planning now prioritizes image payloads and preserves materialized files through terminal insertion. Drop handlers forward pasteboards to prepared transfers. Tests replace timing sleeps with explicit synchronization. Release and validation fixtures also receive targeted updates. ChangesImage transfer handling
Asynchronous test synchronization
Release and validation updates
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Change: Bug fix · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant DragSource
participant FileDropTextDropController
participant GhosttyNSView
participant TerminalImageTransferPlanner
participant Terminal
DragSource->>FileDropTextDropController: Pass URLs and dragging pasteboard
FileDropTextDropController->>GhosttyNSView: Forward dropped URLs and pasteboard
GhosttyNSView->>TerminalImageTransferPlanner: Prepare drop transfer
TerminalImageTransferPlanner-->>GhosttyNSView: Return prepared file or image transfer
GhosttyNSView->>Terminal: Insert prepared transfer
Merge Risk: ⚪ Minimal · up to No actionable current-head risk remains from the reviewed changes. Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (2 errors, 2 warnings)
✅ Passed checks (21 passed)
Full details: Out of Scope Changes checkExplanation The pull request includes changes with no demonstrated connection to issue Full details: Docstring CoverageExplanation Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 35 functions across 19 files. (1 skipped: 1 too large.) Full details: Cmux Swift Package BoundariesExplanation The PR materially expands independent transfer-planning logic in the app target. Resolution Extract the smallest changed boundary into a package target such as Full details: Cmux No Test Or Debug Seam In Production SourceExplanation The PR adds Resolution Remove ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
|
Love cmux and would like to help where I can. I hit this one myself and put up Either way works - just flagging it in case it's useful. |
Bugbot is paused — on-demand spend limit reachedBugbot 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. |
…-12684-image-drop-attachment
be7d9fa iOS: make the keyboard button Liquid Glass by default 9a916eb Add the cmux RC release channel (com.cmuxterm.app.rc) (manaflow-ai#12777) ec4cbd4 Use PlanetScale for Cloud VM migrations and operator guidance (manaflow-ai#12821) 68df8ee fix: apply TUI rustfmt before release (manaflow-ai#12823) 9fe20d7 Merge pull request manaflow-ai#12752 from manaflow-ai/issue-12684-image-drop-attachment 5373b4a fix: preserve backing files before decoding Finder paste previews c08bcd3 test: preserve Finder originals when the pasteboard includes a TIFF preview b1ee541 refactor: keep pasteboard context limited to file insertion 4ca686d Merge branch 'main' of https://github.com/manaflow-ai/cmux into issue-12684-image-drop-attachment 9b3b242 test: allow main-actor terminal startup during image delivery capture ddf32d3 test: type mock implementations in Bun test declarations 1b332f7 fix: preserve complete image payloads through terminal drop routing c082946 test: cover drag payload priority and bracketed image delivery cdb73a1 test: synchronize client config concurrency through request admission a5ab2bf test: await causal transport and dashboard events fe8e7af test: use a generic flag in cache round-trip fixtures 7713752 test: recognize mapped pane resize actions in Dock routing audit 872f46e test: isolate App Store lane versions from release bumps e57f6de ci: route the release delivery guard through the configured runner 5395d85 fix: prefer copied image payloads over auxiliary URLs fd5d49d test: preserve image paste payloads with auxiliary URLs aed23e6 Merge branch 'main' of https://github.com/manaflow-ai/cmux into issue-12684-image-drop-attachment 5d3616c Merge branch 'main' of https://github.com/manaflow-ai/cmux into issue-12684-image-drop-attachment d7ac49c Revert "Fix duplicate Xcode build file IDs after main merge" b3daf57 Revert "Restore auth observer required by merged mobile runtime" 38dcda7 Restore auth observer required by merged mobile runtime 42631af Fix duplicate Xcode build file IDs after main merge a5b91d2 Merge branch 'main' of https://github.com/manaflow-ai/cmux into issue-12684-image-drop-attachment 68edbe2 fix: keep local image transfer files alive d815ff6 test: retain local image files through terminal delivery # Conflicts: # .github/workflows/cloud-vm-migrate.yml # .github/workflows/cmux-tui-release-delivery.yml # .github/workflows/nightly.yml
Summary
Dropped or pasted image files must remain available while Claude Code or Codex reads them asynchronously. Keep cmux-owned local image files until the existing app-exit cleanup instead of deleting them when terminal text delivery finishes.
A copied image can also advertise a source URL on the clipboard. Resolve its image/rich-text payload before that auxiliary URL so image bytes accompanied by a folder URL, web URL, or missing file path become an image attachment. Ordinary Finder file/folder pastes retain their file-URL identity and remote-upload routing; visible rich text keeps its existing priority. Terminal drag routes now carry the original pasteboard through the pane/overlay adapters, so those paths cannot discard the image bytes before shared preparation. Existing backing files still take priority over drag thumbnails.
Validation
5395d8562bcdf8a5644ab23257e457297c20abe6succeeded, installed, launched, and responded through its tag-bound CLI. The subsequent commit changes only CI runner selection. Full CI validation is still in progress.Fixes #12684. Related: #12680.
Summary by CodeRabbit
Bug Fixes
Tests
Chores