Repository navigation
Commit e6eb930
fix(web): preserve terminal selection across output updates (#1679)
## Evidence
**Before: redraws erase selection.**
https://github.com/user-attachments/assets/43c8acc2-0cd6-41b3-ab2c-759f7daad20b

**After: Shift-drag, output arrives, copy/paste works.**
https://github.com/user-attachments/assets/14b847a6-3efb-48f4-b106-4d51a5cefbcb

## Problem
T3 clears Ghostty selection on every appended output update, so tmux redraws erase it before copying.
tmux also captures ordinary drag; native Shift-drag already bypasses mouse reporting.
## Change
Preserve selection on appended output; clear it on buffer rebuild.
Five lines added, three removed; no new controls or keyboard handlers.
## Scope and approval
The fork maintainer requested the smallest fix with zmux shortcuts preserved and approved the final patch.
This repairs existing selection behavior.
## Verification
### Checks
- **Head:** `da30220`
- **Fork CI:** `vp run fork:ci`, exit 0
- **Types:** server/web/contracts, exit 0
- **Builds:** server/web, exit 0
- **Web:** six suites, 50 tests passed
- **Aftercare:** no further copy changes
Regressions cover selection surviving output and clearing on rebuild.
React Doctor exited 0 with existing module-export warnings.
### Chrome
- **Passed:** plain drag and zmux Shift-drag
- **Passed:** Ctrl+Shift+C/V copy/paste
- **Passed:** native tab/dashboard/detach keys
- **Passed:** user's Ctrl+D T3 split binding
- **Untested:** Electron, mobile, relay/tunnel
### Recordings
- **After build:** `da30220`, trusted CDP input
- **After clip:** 11.77s, terminal crop
- **Cut:** raw 7–13s, after output arrived
- **Trim:** raw 17.7–17.8s
- **Wait:** full six-second output wait retained
- **Before:** historical 12.17s clip
Both clips reviewed by frames and full playback.
### Agent
- **Model:** GPT-6.1-Sol
- **Harness:** Codex through T3 Code
## Fork trailers
Fork-Domain: zmux-estate
Fork-Tier: bugfix
Fork-Upstreamable: yes
Co-authored-by: donjor <[email protected]>1 parent 7c996b4 commit e6eb930
2 files changed
Lines changed: 62 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| 240 | + | |
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
| |||
250 | 251 | | |
251 | 252 | | |
252 | 253 | | |
253 | | - | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| |||
1082 | 1082 | | |
1083 | 1083 | | |
1084 | 1084 | | |
| 1085 | + | |
1085 | 1086 | | |
1086 | 1087 | | |
1087 | 1088 | | |
| |||
1174 | 1175 | | |
1175 | 1176 | | |
1176 | 1177 | | |
| 1178 | + | |
1177 | 1179 | | |
1178 | 1180 | | |
1179 | 1181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
0 commit comments