From 3f082c5e011c175cb0acf0684106e0ac6b70afa4 Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 24 Jan 2026 19:21:04 +0100 Subject: [PATCH] fix: prevent mouse wheel from cycling plan mode options instead of scrolling Claude's Ink UI enables terminal mouse reporting, causing xterm.js to forward wheel events to the application. This made scrolling up to read the plan impossible. Intercept wheel events to always scroll the terminal viewport directly. Co-Authored-By: Claude Opus 4.5 --- src/web/public/app.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/web/public/app.js b/src/web/public/app.js index 1b289adf..447ac630 100644 --- a/src/web/public/app.js +++ b/src/web/public/app.js @@ -466,6 +466,14 @@ class ClaudemanApp { this.terminal.open(container); this.fitAddon.fit(); + // Always use mouse wheel for terminal scrollback, never forward to application. + // Prevents Claude's Ink UI (plan mode selector) from capturing scroll as option navigation. + this.terminal.attachCustomWheelEventHandler((ev) => { + const lines = Math.round(ev.deltaY / 25) || (ev.deltaY > 0 ? 1 : -1); + this.terminal.scrollLines(lines); + return false; + }); + // Welcome message this.showWelcome();