Repository navigation
fix(web): terminal OSC 52 copies reach the client clipboard - #1790
Merged
Merged
Conversation
Fork-Domain: zmux-estate Fork-Tier: bugfix Fork-Upstreamable: yes
donjor
force-pushed
the
t3/terminal-osc52-clipboard
branch
from
October 20, 2026 00:22
e3d4d83 to
0c3fb15
Compare
donjor
added a commit
that referenced
this pull request
Oct 20, 2026
## Problem Copying out of a tmux or zmux terminal in T3 never reaches the client clipboard: drag-select and copy-mode `y` both fail. tmux copies by writing OSC 52 to each client, but libghostty-vt has no clipboard callback, so the web terminal drops it. Closes #1789 - [ ] Live OSC 52 writes from a terminal land in the focused client's clipboard - [ ] Replayed history never rewrites the clipboard, and OSC 52 read queries get no reply ## Change `osc52Clipboard.fork.ts` scans live terminal output for OSC 52 and calls `navigator.clipboard.writeText`. - **Terminators:** BEL and ST - **Split chunks:** buffered, 1 MiB cap - **Reset replay:** clears state, never copies - **`?` read query:** ignored, never answered - **Shared sessions:** focused viewer only `ThreadTerminalDrawer.tsx` gains two `zmux-estate/osc52-clipboard` fork-hook lines. Retire when upstream `pingdotgg#8361` lands. ## Scope and approval Fork bugfix for #1789. Desktop inherits it through the web app; the native mobile terminal is untouched. ## Verification Dev app in the T3 Browser panel, a throwaway tmux server with `set-clipboard on`, and a spy on `navigator.clipboard.writeText`. **Before** (hook reverted): copy-mode selection, then `y`: no clipboard write.  **After:** copy-mode selection, then `y`: `writeText("yanked-from-tmux-copy-mode")` resolves.  The clipboard is not visible on screen; the spy output is the proof. - [x] Direct `printf` OSC 52: copied - [x] tmux copy-mode `y`: copied - [x] tmux mouse drag-select: copied - [x] Drag without focus: write refused, swallowed - [x] Hook reverted, same `y`: no write - [x] `vp test run` osc52 test → exit 0 - [x] `vp run typecheck` (apps/web) → exit 0 - [x] `vp run fork:ci` → exit 0 - [ ] Not checked: desktop clipboard readback The Browser panel has its own clipboard, so the desktop clipboard was not read back. Claude Opus 5.5 via Claude Code in T3 Code. ## Fork trailers Fork-Domain: zmux-estate Fork-Tier: bugfix Fork-Upstreamable: yes Co-authored-by: donjor <38745786+donjor@users.noreply.github.com>
donjor
added a commit
that referenced
this pull request
Oct 20, 2026
## Problem Copying out of a tmux or zmux terminal in T3 never reaches the client clipboard: drag-select and copy-mode `y` both fail. tmux copies by writing OSC 52 to each client, but libghostty-vt has no clipboard callback, so the web terminal drops it. Closes #1789 - [ ] Live OSC 52 writes from a terminal land in the focused client's clipboard - [ ] Replayed history never rewrites the clipboard, and OSC 52 read queries get no reply ## Change `osc52Clipboard.fork.ts` scans live terminal output for OSC 52 and calls `navigator.clipboard.writeText`. - **Terminators:** BEL and ST - **Split chunks:** buffered, 1 MiB cap - **Reset replay:** clears state, never copies - **`?` read query:** ignored, never answered - **Shared sessions:** focused viewer only `ThreadTerminalDrawer.tsx` gains two `zmux-estate/osc52-clipboard` fork-hook lines. Retire when upstream `pingdotgg#8361` lands. ## Scope and approval Fork bugfix for #1789. Desktop inherits it through the web app; the native mobile terminal is untouched. ## Verification Dev app in the T3 Browser panel, a throwaway tmux server with `set-clipboard on`, and a spy on `navigator.clipboard.writeText`. **Before** (hook reverted): copy-mode selection, then `y`: no clipboard write.  **After:** copy-mode selection, then `y`: `writeText("yanked-from-tmux-copy-mode")` resolves.  The clipboard is not visible on screen; the spy output is the proof. - [x] Direct `printf` OSC 52: copied - [x] tmux copy-mode `y`: copied - [x] tmux mouse drag-select: copied - [x] Drag without focus: write refused, swallowed - [x] Hook reverted, same `y`: no write - [x] `vp test run` osc52 test → exit 0 - [x] `vp run typecheck` (apps/web) → exit 0 - [x] `vp run fork:ci` → exit 0 - [ ] Not checked: desktop clipboard readback The Browser panel has its own clipboard, so the desktop clipboard was not read back. Claude Opus 5.5 via Claude Code in T3 Code. ## Fork trailers Fork-Domain: zmux-estate Fork-Tier: bugfix Fork-Upstreamable: yes Co-authored-by: donjor <38745786+donjor@users.noreply.github.com>
donjor
added a commit
that referenced
this pull request
Oct 20, 2026
## Problem Copying out of a tmux or zmux terminal in T3 never reaches the client clipboard: drag-select and copy-mode `y` both fail. tmux copies by writing OSC 52 to each client, but libghostty-vt has no clipboard callback, so the web terminal drops it. Closes #1789 - [ ] Live OSC 52 writes from a terminal land in the focused client's clipboard - [ ] Replayed history never rewrites the clipboard, and OSC 52 read queries get no reply ## Change `osc52Clipboard.fork.ts` scans live terminal output for OSC 52 and calls `navigator.clipboard.writeText`. - **Terminators:** BEL and ST - **Split chunks:** buffered, 1 MiB cap - **Reset replay:** clears state, never copies - **`?` read query:** ignored, never answered - **Shared sessions:** focused viewer only `ThreadTerminalDrawer.tsx` gains two `zmux-estate/osc52-clipboard` fork-hook lines. Retire when upstream `pingdotgg#8361` lands. ## Scope and approval Fork bugfix for #1789. Desktop inherits it through the web app; the native mobile terminal is untouched. ## Verification Dev app in the T3 Browser panel, a throwaway tmux server with `set-clipboard on`, and a spy on `navigator.clipboard.writeText`. **Before** (hook reverted): copy-mode selection, then `y`: no clipboard write.  **After:** copy-mode selection, then `y`: `writeText("yanked-from-tmux-copy-mode")` resolves.  The clipboard is not visible on screen; the spy output is the proof. - [x] Direct `printf` OSC 52: copied - [x] tmux copy-mode `y`: copied - [x] tmux mouse drag-select: copied - [x] Drag without focus: write refused, swallowed - [x] Hook reverted, same `y`: no write - [x] `vp test run` osc52 test → exit 0 - [x] `vp run typecheck` (apps/web) → exit 0 - [x] `vp run fork:ci` → exit 0 - [ ] Not checked: desktop clipboard readback The Browser panel has its own clipboard, so the desktop clipboard was not read back. Claude Opus 5.5 via Claude Code in T3 Code. ## Fork trailers Fork-Domain: zmux-estate Fork-Tier: bugfix Fork-Upstreamable: yes Co-authored-by: donjor <38745786+donjor@users.noreply.github.com>
donjor
added a commit
that referenced
this pull request
Oct 20, 2026
## Problem Copying out of a tmux or zmux terminal in T3 never reaches the client clipboard: drag-select and copy-mode `y` both fail. tmux copies by writing OSC 52 to each client, but libghostty-vt has no clipboard callback, so the web terminal drops it. Closes #1789 - [ ] Live OSC 52 writes from a terminal land in the focused client's clipboard - [ ] Replayed history never rewrites the clipboard, and OSC 52 read queries get no reply ## Change `osc52Clipboard.fork.ts` scans live terminal output for OSC 52 and calls `navigator.clipboard.writeText`. - **Terminators:** BEL and ST - **Split chunks:** buffered, 1 MiB cap - **Reset replay:** clears state, never copies - **`?` read query:** ignored, never answered - **Shared sessions:** focused viewer only `ThreadTerminalDrawer.tsx` gains two `zmux-estate/osc52-clipboard` fork-hook lines. Retire when upstream `pingdotgg#8361` lands. ## Scope and approval Fork bugfix for #1789. Desktop inherits it through the web app; the native mobile terminal is untouched. ## Verification Dev app in the T3 Browser panel, a throwaway tmux server with `set-clipboard on`, and a spy on `navigator.clipboard.writeText`. **Before** (hook reverted): copy-mode selection, then `y`: no clipboard write.  **After:** copy-mode selection, then `y`: `writeText("yanked-from-tmux-copy-mode")` resolves.  The clipboard is not visible on screen; the spy output is the proof. - [x] Direct `printf` OSC 52: copied - [x] tmux copy-mode `y`: copied - [x] tmux mouse drag-select: copied - [x] Drag without focus: write refused, swallowed - [x] Hook reverted, same `y`: no write - [x] `vp test run` osc52 test → exit 0 - [x] `vp run typecheck` (apps/web) → exit 0 - [x] `vp run fork:ci` → exit 0 - [ ] Not checked: desktop clipboard readback The Browser panel has its own clipboard, so the desktop clipboard was not read back. Claude Opus 5.5 via Claude Code in T3 Code. ## Fork trailers Fork-Domain: zmux-estate Fork-Tier: bugfix Fork-Upstreamable: yes Co-authored-by: donjor <38745786+donjor@users.noreply.github.com>
donjor
added a commit
that referenced
this pull request
Oct 20, 2026
## Problem Copying out of a tmux or zmux terminal in T3 never reaches the client clipboard: drag-select and copy-mode `y` both fail. tmux copies by writing OSC 52 to each client, but libghostty-vt has no clipboard callback, so the web terminal drops it. Closes #1789 - [ ] Live OSC 52 writes from a terminal land in the focused client's clipboard - [ ] Replayed history never rewrites the clipboard, and OSC 52 read queries get no reply ## Change `osc52Clipboard.fork.ts` scans live terminal output for OSC 52 and calls `navigator.clipboard.writeText`. - **Terminators:** BEL and ST - **Split chunks:** buffered, 1 MiB cap - **Reset replay:** clears state, never copies - **`?` read query:** ignored, never answered - **Shared sessions:** focused viewer only `ThreadTerminalDrawer.tsx` gains two `zmux-estate/osc52-clipboard` fork-hook lines. Retire when upstream `pingdotgg#8361` lands. ## Scope and approval Fork bugfix for #1789. Desktop inherits it through the web app; the native mobile terminal is untouched. ## Verification Dev app in the T3 Browser panel, a throwaway tmux server with `set-clipboard on`, and a spy on `navigator.clipboard.writeText`. **Before** (hook reverted): copy-mode selection, then `y`: no clipboard write.  **After:** copy-mode selection, then `y`: `writeText("yanked-from-tmux-copy-mode")` resolves.  The clipboard is not visible on screen; the spy output is the proof. - [x] Direct `printf` OSC 52: copied - [x] tmux copy-mode `y`: copied - [x] tmux mouse drag-select: copied - [x] Drag without focus: write refused, swallowed - [x] Hook reverted, same `y`: no write - [x] `vp test run` osc52 test → exit 0 - [x] `vp run typecheck` (apps/web) → exit 0 - [x] `vp run fork:ci` → exit 0 - [ ] Not checked: desktop clipboard readback The Browser panel has its own clipboard, so the desktop clipboard was not read back. Claude Opus 5.5 via Claude Code in T3 Code. ## Fork trailers Fork-Domain: zmux-estate Fork-Tier: bugfix Fork-Upstreamable: yes Co-authored-by: donjor <38745786+donjor@users.noreply.github.com>
donjor
added a commit
that referenced
this pull request
Oct 21, 2026
## Problem Copying out of a tmux or zmux terminal in T3 never reaches the client clipboard: drag-select and copy-mode `y` both fail. tmux copies by writing OSC 52 to each client, but libghostty-vt has no clipboard callback, so the web terminal drops it. Closes #1789 - [ ] Live OSC 52 writes from a terminal land in the focused client's clipboard - [ ] Replayed history never rewrites the clipboard, and OSC 52 read queries get no reply ## Change `osc52Clipboard.fork.ts` scans live terminal output for OSC 52 and calls `navigator.clipboard.writeText`. - **Terminators:** BEL and ST - **Split chunks:** buffered, 1 MiB cap - **Reset replay:** clears state, never copies - **`?` read query:** ignored, never answered - **Shared sessions:** focused viewer only `ThreadTerminalDrawer.tsx` gains two `zmux-estate/osc52-clipboard` fork-hook lines. Retire when upstream `pingdotgg#8361` lands. ## Scope and approval Fork bugfix for #1789. Desktop inherits it through the web app; the native mobile terminal is untouched. ## Verification Dev app in the T3 Browser panel, a throwaway tmux server with `set-clipboard on`, and a spy on `navigator.clipboard.writeText`. **Before** (hook reverted): copy-mode selection, then `y`: no clipboard write.  **After:** copy-mode selection, then `y`: `writeText("yanked-from-tmux-copy-mode")` resolves.  The clipboard is not visible on screen; the spy output is the proof. - [x] Direct `printf` OSC 52: copied - [x] tmux copy-mode `y`: copied - [x] tmux mouse drag-select: copied - [x] Drag without focus: write refused, swallowed - [x] Hook reverted, same `y`: no write - [x] `vp test run` osc52 test → exit 0 - [x] `vp run typecheck` (apps/web) → exit 0 - [x] `vp run fork:ci` → exit 0 - [ ] Not checked: desktop clipboard readback The Browser panel has its own clipboard, so the desktop clipboard was not read back. Claude Opus 5.5 via Claude Code in T3 Code. ## Fork trailers Fork-Domain: zmux-estate Fork-Tier: bugfix Fork-Upstreamable: yes Co-authored-by: donjor <38745786+donjor@users.noreply.github.com>
donjor
added a commit
that referenced
this pull request
Oct 21, 2026
## Problem Copying out of a tmux or zmux terminal in T3 never reaches the client clipboard: drag-select and copy-mode `y` both fail. tmux copies by writing OSC 52 to each client, but libghostty-vt has no clipboard callback, so the web terminal drops it. Closes #1789 - [ ] Live OSC 52 writes from a terminal land in the focused client's clipboard - [ ] Replayed history never rewrites the clipboard, and OSC 52 read queries get no reply ## Change `osc52Clipboard.fork.ts` scans live terminal output for OSC 52 and calls `navigator.clipboard.writeText`. - **Terminators:** BEL and ST - **Split chunks:** buffered, 1 MiB cap - **Reset replay:** clears state, never copies - **`?` read query:** ignored, never answered - **Shared sessions:** focused viewer only `ThreadTerminalDrawer.tsx` gains two `zmux-estate/osc52-clipboard` fork-hook lines. Retire when upstream `pingdotgg#8361` lands. ## Scope and approval Fork bugfix for #1789. Desktop inherits it through the web app; the native mobile terminal is untouched. ## Verification Dev app in the T3 Browser panel, a throwaway tmux server with `set-clipboard on`, and a spy on `navigator.clipboard.writeText`. **Before** (hook reverted): copy-mode selection, then `y`: no clipboard write.  **After:** copy-mode selection, then `y`: `writeText("yanked-from-tmux-copy-mode")` resolves.  The clipboard is not visible on screen; the spy output is the proof. - [x] Direct `printf` OSC 52: copied - [x] tmux copy-mode `y`: copied - [x] tmux mouse drag-select: copied - [x] Drag without focus: write refused, swallowed - [x] Hook reverted, same `y`: no write - [x] `vp test run` osc52 test → exit 0 - [x] `vp run typecheck` (apps/web) → exit 0 - [x] `vp run fork:ci` → exit 0 - [ ] Not checked: desktop clipboard readback The Browser panel has its own clipboard, so the desktop clipboard was not read back. Claude Opus 5.5 via Claude Code in T3 Code. ## Fork trailers Fork-Domain: zmux-estate Fork-Tier: bugfix Fork-Upstreamable: yes Co-authored-by: donjor <38745786+donjor@users.noreply.github.com>
donjor
added a commit
that referenced
this pull request
Oct 21, 2026
## Problem Copying out of a tmux or zmux terminal in T3 never reaches the client clipboard: drag-select and copy-mode `y` both fail. tmux copies by writing OSC 52 to each client, but libghostty-vt has no clipboard callback, so the web terminal drops it. Closes #1789 - [ ] Live OSC 52 writes from a terminal land in the focused client's clipboard - [ ] Replayed history never rewrites the clipboard, and OSC 52 read queries get no reply ## Change `osc52Clipboard.fork.ts` scans live terminal output for OSC 52 and calls `navigator.clipboard.writeText`. - **Terminators:** BEL and ST - **Split chunks:** buffered, 1 MiB cap - **Reset replay:** clears state, never copies - **`?` read query:** ignored, never answered - **Shared sessions:** focused viewer only `ThreadTerminalDrawer.tsx` gains two `zmux-estate/osc52-clipboard` fork-hook lines. Retire when upstream `pingdotgg#8361` lands. ## Scope and approval Fork bugfix for #1789. Desktop inherits it through the web app; the native mobile terminal is untouched. ## Verification Dev app in the T3 Browser panel, a throwaway tmux server with `set-clipboard on`, and a spy on `navigator.clipboard.writeText`. **Before** (hook reverted): copy-mode selection, then `y`: no clipboard write.  **After:** copy-mode selection, then `y`: `writeText("yanked-from-tmux-copy-mode")` resolves.  The clipboard is not visible on screen; the spy output is the proof. - [x] Direct `printf` OSC 52: copied - [x] tmux copy-mode `y`: copied - [x] tmux mouse drag-select: copied - [x] Drag without focus: write refused, swallowed - [x] Hook reverted, same `y`: no write - [x] `vp test run` osc52 test → exit 0 - [x] `vp run typecheck` (apps/web) → exit 0 - [x] `vp run fork:ci` → exit 0 - [ ] Not checked: desktop clipboard readback The Browser panel has its own clipboard, so the desktop clipboard was not read back. Claude Opus 5.5 via Claude Code in T3 Code. ## Fork trailers Fork-Domain: zmux-estate Fork-Tier: bugfix Fork-Upstreamable: yes Co-authored-by: donjor <38745786+donjor@users.noreply.github.com>
donjor
added a commit
that referenced
this pull request
Oct 21, 2026
## Problem Copying out of a tmux or zmux terminal in T3 never reaches the client clipboard: drag-select and copy-mode `y` both fail. tmux copies by writing OSC 52 to each client, but libghostty-vt has no clipboard callback, so the web terminal drops it. Closes #1789 - [ ] Live OSC 52 writes from a terminal land in the focused client's clipboard - [ ] Replayed history never rewrites the clipboard, and OSC 52 read queries get no reply ## Change `osc52Clipboard.fork.ts` scans live terminal output for OSC 52 and calls `navigator.clipboard.writeText`. - **Terminators:** BEL and ST - **Split chunks:** buffered, 1 MiB cap - **Reset replay:** clears state, never copies - **`?` read query:** ignored, never answered - **Shared sessions:** focused viewer only `ThreadTerminalDrawer.tsx` gains two `zmux-estate/osc52-clipboard` fork-hook lines. Retire when upstream `pingdotgg#8361` lands. ## Scope and approval Fork bugfix for #1789. Desktop inherits it through the web app; the native mobile terminal is untouched. ## Verification Dev app in the T3 Browser panel, a throwaway tmux server with `set-clipboard on`, and a spy on `navigator.clipboard.writeText`. **Before** (hook reverted): copy-mode selection, then `y`: no clipboard write.  **After:** copy-mode selection, then `y`: `writeText("yanked-from-tmux-copy-mode")` resolves.  The clipboard is not visible on screen; the spy output is the proof. - [x] Direct `printf` OSC 52: copied - [x] tmux copy-mode `y`: copied - [x] tmux mouse drag-select: copied - [x] Drag without focus: write refused, swallowed - [x] Hook reverted, same `y`: no write - [x] `vp test run` osc52 test → exit 0 - [x] `vp run typecheck` (apps/web) → exit 0 - [x] `vp run fork:ci` → exit 0 - [ ] Not checked: desktop clipboard readback The Browser panel has its own clipboard, so the desktop clipboard was not read back. Claude Opus 5.5 via Claude Code in T3 Code. ## Fork trailers Fork-Domain: zmux-estate Fork-Tier: bugfix Fork-Upstreamable: yes Co-authored-by: donjor <38745786+donjor@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Copying out of a tmux or zmux terminal in T3 never reaches the client clipboard: drag-select and copy-mode
yboth fail.tmux copies by writing OSC 52 to each client, but libghostty-vt has no clipboard callback, so the web terminal drops it.
Closes #1789
Change
osc52Clipboard.fork.tsscans live terminal output for OSC 52 and callsnavigator.clipboard.writeText.?read query: ignored, never answeredThreadTerminalDrawer.tsxgains twozmux-estate/osc52-clipboardfork-hook lines.Retire when upstream
pingdotgg/t3code#8361lands.Scope and approval
Fork bugfix for #1789.
Desktop inherits it through the web app; the native mobile terminal is untouched.
Verification
Dev app in the T3 Browser panel, a throwaway tmux server with
set-clipboard on, and a spy onnavigator.clipboard.writeText.Before (hook reverted): copy-mode selection, then
y: no clipboard write.After: copy-mode selection, then
y:writeText("yanked-from-tmux-copy-mode")resolves.The clipboard is not visible on screen; the spy output is the proof.
printfOSC 52: copiedy: copiedy: no writevp test runosc52 test → exit 0vp run typecheck(apps/web) → exit 0vp run fork:ci→ exit 0The Browser panel has its own clipboard, so the desktop clipboard was not read back.
Claude Opus 5.5 via Claude Code in T3 Code.
Fork trailers
Fork-Domain: zmux-estate
Fork-Tier: bugfix
Fork-Upstreamable: yes