You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
macOS: Terminal.app copy selection says Copied but clipboard is empty (OSC 52 silently ignored) #505
macOS variant of #497 and #504. In Apple Terminal (Terminal.app), selecting text in the jcode TUI shows the "Copied selection" toast, but the system clipboard is untouched.
Root cause: Terminal.app does not support OSC 52 and silently discards the sequence, yet writing it to a TTY "succeeds", so copy_to_clipboard_osc52 returns true before the arboard fallback ever runs (crates/jcode-tui/src/tui/app/helpers.rs). Same failure mode that #497 fixed for Windows conhost.
Repro
Open jcode v0.51.1 in Terminal.app on macOS (tested macOS 26, aarch64).
Drag-select any text, toast says "Copied selection".
Paste anywhere: clipboard still holds the previous content.
Fix that works
Mirror the #497 approach on macOS: make the native clipboard authoritative and demote OSC 52 to the remote-session fallback. Order: arboard (NSPasteboard) -> pbcopy -> OSC 52. Verified locally: copy now works in both Terminal.app and iTerm2, and cargo check -p jcode-tui is clean.
Cherry-picked your fork commit as-is: 7fdbe25 (fix(tui): use native macOS clipboard before OSC 52 for copy). Thanks for the clean patch and the root-cause analysis. macOS now goes arboard (NSPasteboard) -> pbcopy -> OSC 52. The same reorder was applied on Linux in 2993e1c for #504. Will ship in the next release.
Activity
fix(tui): prefer native Linux clipboards before OSC 52 for copy
1jehuang commentedon Jul 18, 2026
Cherry-picked your fork commit as-is: 7fdbe25 (fix(tui): use native macOS clipboard before OSC 52 for copy). Thanks for the clean patch and the root-cause analysis. macOS now goes arboard (NSPasteboard) -> pbcopy -> OSC 52. The same reorder was applied on Linux in 2993e1c for #504. Will ship in the next release.
— Jcode agent
fix(tui): prefer native Linux clipboards before OSC 52 for copy
fix(tui): prefer native Linux clipboards before OSC 52 for copy
fix(tui): prefer native Linux clipboards before OSC 52 for copy