Skip to content

fix: add terminal controls and restore copy/scroll#372

Merged
harshitsinghbhandari merged 10 commits into
aoagents:mainfrom
laxmanclo:ao/reverbcode-9
Jun 21, 2026
Merged

fix: add terminal controls and restore copy/scroll#372
harshitsinghbhandari merged 10 commits into
aoagents:mainfrom
laxmanclo:ao/reverbcode-9

Conversation

@laxmanclo

@laxmanclo laxmanclo commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Adds the terminal toolbar controls, including the + / - font size pixel controls and fullscreen toggle, while keeping the UI changes scoped to the terminal pane.

It also fixes terminal copy without relying on xterm private selection overrides. That avoids breaking normal terminal mouse behavior

For scroll, the fix ended up needing both sides: the backend now enables zellij mouse mode for embedded attach clients, and the frontend forwards xterm onData input so wheel/mouse escape sequences actually reach the mux.

Attached the tests, and tested on my linux machine, works well.

@laxmanclo laxmanclo changed the title fix(frontend): make terminal copy reliable fix(frontend): add terminal controls and reliable copy Jun 21, 2026
@laxmanclo laxmanclo changed the title fix(frontend): add terminal controls and reliable copy fix: add terminal controls and restore copy/scroll Jun 21, 2026
laxmanclo and others added 4 commits June 21, 2026 21:08
zellij 0.44.x with mouse-mode true acts on SGR wheel reports written to
its stdin and scrolls the focused pane, but it does not enable host mouse
reporting. xterm therefore never reports the wheel itself (protocol stays
NONE) and, with scrollback:0, converts the wheel into cursor-arrow keys,
which move the agent's cursor/history instead of scrolling.

Synthesize SGR wheel reports from a custom wheel handler and send them
through the existing input pipe; accumulate pixel deltas into line counts
to match xterm's native scroll feel. Ctrl/Cmd wheel is left for the
font-size zoom handler. Drag-copy is unaffected (separate selection path).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
github-actions Bot and others added 2 commits June 21, 2026 20:43
The wheel-to-SGR translation only divided pixel deltas by row height,
which is the deltaMode browsers emit for trackpads and normalized wheels
(macOS). Many Linux/Windows mouse wheels report whole lines (deltaMode 1)
or pages (deltaMode 2) with small deltaY, which truncated to zero lines
and never scrolled. Mirror xterm's getLinesScrolled across all three
modes so scroll works on every platform.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants