Repository navigation
fix(terminal): speed up an application's wheel only with Alt, as before xterm.js 6 (#2336) - #2357
Conversation
…re xterm.js 6 (#2336) xterm.js 6 dropped fastScrollModifier and multiplies the wheel by fastScrollSensitivity under Alt, Ctrl or Shift. Shift already sends no report, but a Ctrl-held trackpad wheel reported up to five times as often in a mouse-reporting application. The patch accelerates only on Alt, as 5.5's default did, and the wheel regression sends 12 Ctrl-held 0.55-row steps and expects 6 or 7 reports (12 before).
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Modifier behavior and regression check patches/@xterm%[email protected], scripts/omo-question-wheel-regression.ts, changelog.d/ctrl-wheel-speed.md |
Fast-scroll sensitivity now applies only for Alt, not Ctrl or Shift. The regression script checks that 12 Ctrl-held upward wheel events produce 6 or 7 reports. The changelog records the normal-speed behavior. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Possibly related PRs
- devswha/ovis#2335: This PR edits the xterm.js 6 patch introduced by that upgrade.
Merge Risk: 
Minimal · up to 19194
-
The requested Ctrl-wheel behavior is implemented and covered by the focused regression check, with no established merge-blocking risk.
Pre-merge checks: 
5
-
Full details: Title check
-
Explanation
The title names the main change: Ctrl-held wheel input in mouse-reporting applications should no longer speed up, so only Alt accelerates it, as in xterm.js 5.5. The title matches the objectives and the patch change. It uses the "fix(terminal)" prefix and includes the issue number.
Full details: Description check
-
Explanation
The description follows the template. It has a Change section that describes the problem (Ctrl+wheel speed-up since xterm.js 6.0.0), the cause, and the fix. It has a Validation section that lists the regression test, the results on main and on this branch, the xterm 6 audit, and the checks run. It links issue
#2336as the agreed scope.
Full details: Linked Issues check
-
Explanation
Issue [
#2336] requires fast-scroll acceleration only for Alt and a Ctrl-wheel regression test. The patch changesCoreMouseService._applyScrollModifierfrom Alt/Ctrl/Shift to Alt only.scripts/omo-question-wheel-regression.tssends 12 Ctrl-held 0.55-row steps and asserts 6–7 SGR wheel reports, matching the normal-speed behavior. The changelog records the fix.
Full details: Out of Scope Changes check
-
Explanation
The whole-PR diff contains the targeted
CoreMouseServicecondition and its explanatory comment, the linked regression coverage, and a related changelog entry. These changes support issue [#2336]. No unrelated PR-introduced code change appears in the reviewed diff.
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (2 skipped: 2 unsupported.)
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
|
Merging 191944c (closes #2336; a 0.4.20 regression from xterm.js 6). The xterm patch again speeds up the wheel only while Alt is held, as xterm.js 5.5's default fastScrollModifier did; 6.0 also sped it up for Ctrl (Shift is already excluded earlier in consumeWheelEvent), so Ctrl+wheel in a mouse-reporting application sent twice the reports. The merge pass read the patch hunk (one condition, |
…n again, tap to dictate (#2371) ## Change Docs only: `docs/guide.md` now matches what 0.4.20 and current main do. I checked each claim against the code that decides it (file:line in the table below) and changed only `docs/guide.md`. - **Letta Code.** The Supported agents cell is short now: it says what Letta needs (`herdr integration install letta`) and that a turn shows once it ends, with **Working…** in the meantime. The binding rules moved to a new **Letta Code** subsection at the end of the section, which also says what a running turn looks like and lists the three known wrong-conversation cases of #2314. - **Subscription usage.** Expired Claude and Codex accounts get **Sign in again**. Hub accounts do not. - **Chat.** The faded bubble a sent message shows until its turn is written: the clock after 5 s, the bubble gone after a minute, no bubble for `/…` and `!…` commands. Also the Claude Code bash-mode (`!`) card, with stderr in red. - **Terminal.** xterm.js 6 draws only whole frames, and Alt speeds the wheel in a program that reads the mouse. - **Voice input.** On a touch screen with the browser's own recognition, you tap to start and tap to finish. An iPhone home-screen app asks for the mic on the first tap, not when Voice input is turned on. When Siri & Dictation is off, the mic says so. A mouse, or an API key, still allows hold-to-talk. - **Quick start.** On a slow link, the boot spinner shows while the app downloads. - **Manage sessions.** The Ultracode switch in New workspace and New tab, linked to agent-commands.md. The OpenCode drag text (#2368) was already accurate, so it is unchanged. The agent install flow (`changelog.d/agent-install-run.md`) is left out: `AgentSetupCard` is not mounted anywhere yet, so users have no surface for it. | Claim | Code | | --- | --- | | Letta writes a turn only at its end; cancelled turns are never written | `server/letta.ts:1-12` | | Letta binding: herdr report + project record + start folder | `server/letta-store.ts:1-19`, `lettaRecordOwned` `:247-258` | | Working… while a turn runs, no live terminal box | `src/components/ChatView.tsx:2265-2277`; #2338 | | Sign in again: expired, Claude/Codex, not hub | `src/lib/usage.ts:83`; `UsageMeters.tsx:55-66`; `UsageSettings.tsx:40` | | Faded bubble 5 s clock / 60 s / no bubble for commands | `src/lib/sentWaiting.ts` (`WAITING_HINT_MS`, `WAITING_SEND_MS`, `becomesTurn`) | | xterm.js 6; Alt-only fast wheel | `package.json` `@xterm/xterm` 6.0.0; patch per #2357 | | Touch + browser engine = tap; hold otherwise | `src/components/VoiceInput.tsx:258-300` | | Siri & Dictation off is named | `src/lib/voice.ts:302-303`; `VoiceInput.tsx:22` | | Boot spinner | `index.html:40` | | `!` card, stderr in red | `server/claude-transcript.ts:94-95`; `ChatView.tsx:1079-1088` | | Ultracode switch, Claude Code 2.1.284+ | `src/components/NewSessionDialog.tsx:398-402` | No changelog fragment: each behaviour described here already has its own changelog entry, in 0.4.20 or in `changelog.d/`, and this PR only brings the guide up to date with them. ## Verification - `bun run check fast`: green on b16eabc (typecheck, build, generated files, 8666 unit tests pass, 0 fail). Also green on 0d8db7e and d2527fe. - No test: this is a prose-only change (repo rule: doc text is never pinned by a test). ## Reviews - **omo-native-code-reviewer** on 0d8db7e: APPROVE, no CRITICAL/HIGH/MEDIUM. Its 5 LOW points were checked against the code and applied in d2527fe: Alt speeds a trackpad wheel; Ultracode's prerequisites; the faded bubble only in a native-session chat; the first #2314 case needs Ovis not to have looked first; the iPhone home-screen mic rule is its own bullet. - **Codex Sol 6.1 fast xhigh**, round 1 on 0d8db7e: REQUEST CHANGES with 5 MEDIUM. All five were checked against the code and fixed in d2527fe: - Letta: a second pane, or a turn not yet written, clears by itself, without restarting `letta` (`letta-store.ts:195,288`). - The bubble's clock means the turn is not written yet, not that the agent has not taken it (`sentWaiting.ts`). - xterm.js 6 waits for a synchronized frame for up to a second. - The Ultracode switch only asks Claude Code, which ignores it without xhigh and dynamic workflows (`agentLaunchMode.ts`). - Silence is trimmed only where the recorder can pause; otherwise the whole recording is sent (`voice.ts:613-620`). This was a stale sentence next to the touched text. LOWs applied: start `letta` once before `herdr integration install letta` (`agent-catalog.ts:875`); the 2 s record margin; 401/403 also read as expired (`usage.ts:1052`); the voice level shows only when the server transcribes (`voice.ts:491`). - **Codex round 2** on d2527fe only: one MEDIUM. A Letta pane in the home folder never binds (`letta-store.ts:255`), so "until letta starts again" was wrong there. Fixed in b16eabc with Codex's own wording. Under the review cap, there is no further round. - Left as written (LOW): Codex noted that "rare" for the #2314 cases is a judgment, not something the code shows. Each case needs a Letta folder move plus a conversation switch Ovis did not see, which is why the guide calls them rare. Docs only, so no CodeRabbit review is requested (AGENTS.md: a docs commit gets none).
Change
Closes #2336. Since xterm.js 6.0.0 (#2335), a trackpad wheel held with Ctrl scrolls a mouse-reporting application faster than before. xterm 6 dropped the
fastScrollModifieroption (5.5's default was Alt), andCoreMouseService._applyScrollModifiernow multiplies the wheel byfastScrollSensitivity(5) whenever Alt, Ctrl or Shift is held.xterm sends at most one report per wheel event, once the travel it has added up reaches a row. So the multiplier matters only for steps under a row: a trackpad's small steps reported up to five times as often, while a mouse wheel's full notch sent one report either way. Shift was already unaffected, because 6.0's
consumeWheelEventreturns 0 for it.The fix is the same Ovis xterm patch (
patches/@xterm%[email protected]), with one more condition in theCoreMouseServicehunk that is already there: only Alt speeds the wheel up, as in 5.5. Nothing else relied on Ctrl speeding it up:Viewport.tsalready speeds up on Alt only, and it scrolls xterm's own history, which stays atscrollback: 0.terminalWheel.tsalready leaves a Ctrl wheel (a trackpad pinch) out of the speed repeat.Test (fails first)
scripts/omo-question-wheel-regression.tssends 12 Ctrl-held steps of 0.55 rows to a real mouse-capturing program in a herdr pane. The steps travel 6.6 rows, plus under one row left over from earlier steps. It then sends a wheel down (button 65) to mark the end, and counts the Ctrl wheel-up reports (SGR button 80).8a3bc90e)AssertionError: 12 Ctrl-held steps of 0.55 rows report one wheel per row, 6 or 7, not 12PASS Ctrl-held wheels report at the normal speedxterm 6 audit (lane xterm6-audit)
Before this fix, I compared xterm 6 against the release before it:
ae3f080e, which separates xterm 6 from the rest of 0.4.20) and main.#000frame in every theme. It is plain in 21 entries and near-invisible on the near-black dark ones.opacity: 0,pointer-events: none) and lets clicks through at the right edgeEvery difference against v0.4.19 outside those two rows comes from 0.4.20's own font and line-height work, not from xterm 6, and is intended.
Checks
bun run check fast: green on this head.patches/, so the hold on mergingpatches/changes applies while a release that raisesREMOTE_BUNDLE_VERSIONis in progress.