Skip to content

fix: Use pbcopy for clipboard in tmux terminals (fixes #42)#54

Merged
waleedkadous merged 1 commit into
mainfrom
fix/clipboard-pbcopy
Dec 6, 2025
Merged

fix: Use pbcopy for clipboard in tmux terminals (fixes #42)#54
waleedkadous merged 1 commit into
mainfrom
fix/clipboard-pbcopy

Conversation

@waleedkadous
Copy link
Copy Markdown
Contributor

Summary

  • Fixed clipboard copy not working in dashboard terminals
  • Root cause: OSC 52 clipboard sequences don't work reliably through ttyd -> xterm.js -> browser chain
  • Solution: Use copy-pipe-and-cancel pbcopy instead of copy-selection-and-cancel in tmux bindings

Changes

  • dashboard-server.ts: Use pbcopy in MouseDragEnd bindings
  • start.ts: Add clipboard settings and pbcopy bindings
  • spawn.ts: Add clipboard settings and pbcopy bindings (3 locations)

Also includes worktree builder improvements:

  • Simplified builder spawn from dashboard (no dialog, random ID)
  • Added spawnWorktreeBuilder function to dashboard-server

Test plan

  • Verified selecting text in tmux terminal now copies to system clipboard
  • Plain ttyd (without tmux) still works
  • TypeScript builds without errors

Resolves #42

OSC 52 clipboard sequences don't work reliably through the
ttyd -> xterm.js -> browser chain. Changed tmux copy-mode
bindings to use copy-pipe-and-cancel with pbcopy instead,
which directly copies to macOS system clipboard.

Changes:
- dashboard-server.ts: Use pbcopy in MouseDragEnd bindings
- start.ts: Add clipboard settings and pbcopy bindings
- spawn.ts: Add clipboard settings and pbcopy bindings (3 locations)

Also includes worktree builder improvements:
- Simplified builder spawn from dashboard (no dialog, random ID)
- Added spawnWorktreeBuilder function to dashboard-server
@waleedkadous waleedkadous merged commit 4bf469c into main Dec 6, 2025
@waleedkadous waleedkadous deleted the fix/clipboard-pbcopy branch December 6, 2025 21:49
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.

Cannot cut and paste from terminals

1 participant