@phenx-inc/ctlsurf 0.13.4 → 0.13.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phenx-inc/ctlsurf",
3
- "version": "0.13.4",
3
+ "version": "0.13.5",
4
4
  "description": "Agent-agnostic terminal and desktop app for ctlsurf — run Claude Code, Codex, or any coding agent with live session logging and remote control",
5
5
  "main": "out/main/index.js",
6
6
  "bin": {
@@ -184,13 +184,15 @@ async function main() {
184
184
  }, 1000)
185
185
  }
186
186
 
187
- // Pipe stdin to PTY, with Ctrl+\ as the exit key
188
- // SGR mouse wheel: \x1b[<64;col;rowM = scroll up, \x1b[<65;col;rowM = scroll down
189
- const SCROLL_UP_RE = /\x1b\[<64;\d+;\d+M/
190
- const SCROLL_DOWN_RE = /\x1b\[<65;\d+;\d+M/
191
- // Use mouse wheel events directly — forward as SGR mouse to the PTY
192
- // so the inner app can handle them natively
193
-
187
+ // Pipe stdin to PTY, with Ctrl+\ as the exit key.
188
+ // The inner agent enables mouse tracking on startup, and that enable
189
+ // sequence is passed through to the host terminal — so the terminal forwards
190
+ // every wheel tick to us as an SGR mouse event (\x1b[<64;col;rowM up,
191
+ // \x1b[<65;col;rowM down) instead of scrolling its own scrollback. Forward
192
+ // those (and all other mouse input) to the PTY so the agent that asked for
193
+ // them can scroll its transcript natively. Dropping them severed scrolling
194
+ // entirely: the terminal won't scroll (it thinks the app owns the mouse) and
195
+ // the app never received the events.
194
196
  if (process.stdin.isTTY) {
195
197
  process.stdin.setRawMode(true)
196
198
  process.stdin.resume()
@@ -201,12 +203,6 @@ async function main() {
201
203
  shutdown()
202
204
  return
203
205
  }
204
- // Drop mouse wheel events — Claude Code doesn't support mouse scrolling.
205
- // Scrolling is handled by the terminal emulator natively when not in
206
- // alternate screen, or not at all in alternate screen (Claude Code's TUI).
207
- if (SCROLL_UP_RE.test(str) || SCROLL_DOWN_RE.test(str)) {
208
- return
209
- }
210
206
  orchestrator.writePty(HEADLESS_TAB, str)
211
207
  })
212
208
  }