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
### Indirect leaks (state-triggered output) closed by this change
38
+
39
+
| Mode | Reason | Symptom in #273|
40
+
|---|---|---|
41
+
|`CSI ? 1004 h` (focus reporting) | every DOM focus/blur pumps `CSI I` / `CSI O` into the PTY | cursor jumps, "asd" rendered one row below the plan banner, plan-approval menu mis-decodes input |
42
+
|`CSI ? 1000 h` / `1002 h` / `1003 h` / `1006 h` / `1015 h` / `1016 h` (mouse tracking) | every mouse event pumps coordinate bytes into the PTY | Ink frame buffer corruption, e.g. `─` divider bleeds through typing line |
43
+
44
+
### Defense-in-depth (no leak today, prevents regressions)
45
+
46
+
| Probe | Notes |
47
+
|---|---|
48
+
|`CSI > q` — XTVERSION | not in 5.3.0; xterm.js master always replies `DCS > \| xterm.js(version) ST`|
49
+
|`CSI Pm t` — window manipulation | gated by `windowOptions` (off by default in our build); explicit suppressor prevents accidental future enable |
50
+
|`DCS + q ... ST` — XTGETTCAP | not registered in 5.3.0; cheap to pre-empt |
51
+
52
+
## Modes intentionally left to fall through
53
+
54
+
These DEC private modes are useful and must continue to reach xterm's
55
+
built-in `h`/`l` setters:
56
+
57
+
-`25` — cursor visibility
58
+
-`1007` — alternate scroll (changes wheel semantics; no reply)
59
+
-`1049` — alternate screen buffer (Claude Code does not use it today but
60
+
other TUIs do)
61
+
-`2004` — bracketed paste (xterm.js wraps actual paste bytes; we want this)
62
+
-`2026` — synchronized output (Ink wraps every frame in BSU/ESU; xterm.js
63
+
≥5.3 batches the writes)
64
+
65
+
The selective `CSI ? h` / `CSI ? l` handler returns `true` (suppress) only
66
+
when one of the seven suppressed mouse/focus modes is in the parameter
67
+
list, and `false` (fall through) for every other parameter.
68
+
69
+
## Implementation
70
+
71
+
`packages/app/src/web/terminal-query-suppression.ts` registers handlers via
0 commit comments