Skip to content

Scroll the IDE with the mouse wheel / trackpad (v1.67.0) - #146

Merged
gmpassos merged 2 commits into
masterfrom
feat/ide-mouse-wheel
Nov 10, 2026
Merged

gmpassos merged 2 commits into
masterfrom
feat/ide-mouse-wheel

Conversation

@gmpassos

Copy link
Copy Markdown
Contributor

Summary

  • The IDE enables mouse reporting (?1000h + ?1006h SGR) and decodes wheel steps into KeyType.wheelUp/wheelDown carrying the pointer cell.
  • Wheel steps scroll the pane under the pointer: editor and file tree act as Up/Down; terminal and AI panels scroll their output (Up/Down there is history). Ignored while a dialog is open; doesn't clear messages or disarm Ctrl-Q/Ctrl-W.
  • Decoder handles SGR and legacy X10 reports; clicks/horizontal wheel decode to unknown so payload bytes never become typed text.
  • TerminalDriver.enter({bool mouseWheel = false}) — opt-in; the dashboard keeps it off so native selection works there. In the IDE, Shift-drag (Option/Fn on macOS) selects text.
  • Dock panels clamp their stored scroll on render (fixes overscroll past the top swallowing scroll-down, also for Home/PgUp).
  • Version 1.67.0 (CHANGELOG, README).

Test plan

  • dart analyze clean
  • New decoder, driver and IdeApp wheel tests; IDE, dashboard, ide_command tests pass

🤖 Generated with Claude Code

The IDE now asks the terminal for mouse reports (modes 1000 + 1006) and
routes each wheel step to the pane under the pointer: the editor and the
file tree take it as Up/Down, the terminal and AI panels scroll their
output. The decoder understands SGR and legacy X10 reports and ignores
clicks, so their bytes are never typed into a document.

TerminalDriver.enter gains {bool mouseWheel = false}; the dashboard keeps
mouse reporting off. The dock panels now clamp their stored scroll on
render, so overscrolling past the top no longer swallows scroll-downs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

- Drop non-wheel mouse reports in the decoder instead of emitting
  KeyType.unknown, so a click no longer clears the status message or
  disarms a pending Ctrl-Q/Ctrl-W.
- Decode the legacy `ESC [ M b x y` report only when mouse mode is on
  (KeyDecoder(mouseReports: true)); otherwise `ESC [ M` stays one key.
- Always restore the terminal on IDE exit, even if teardown throws.
- enter() without mouseWheel turns off a mouse mode left on by an
  earlier enter(mouseWheel: true).
- Wheel over the tab bar no longer moves the editor caret.
- Extract the shared dock-panel scroll offset into ScrollbackOffset.
- Document Shift+middle-click paste; drop a duplicated comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gmpassos
gmpassos merged commit fc3635f into master Nov 10, 2026
5 checks passed
@gmpassos
gmpassos deleted the feat/ide-mouse-wheel branch November 10, 2026 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant