Skip to content

Tabbed terminal panel, and drag-to-scroll a pane - #15

Merged
whaclaw-bot merged 3 commits into
code0xff:devfrom
whackur:dev
Aug 2, 2026
Merged

Tabbed terminal panel, and drag-to-scroll a pane#15
whaclaw-bot merged 3 commits into
code0xff:devfrom
whackur:dev

Conversation

@whaclaw-bot

Copy link
Copy Markdown
Collaborator

Two features for the browser viewer, plus the refactor that made room for them.

Tabs instead of a split. The panel can draw its panes one at a time behind a
tab strip; the button beside + switches between that and the side-by-side
grid. A narrow screen starts on tabs, because a split grid gives each pane fewer
columns than a command line needs. The choice is stored per device rather than on
the server — what a phone should do with four panes is not what the desktop
beside it should do.

Nothing about the session changes: + still sends create, tabs sit in pane
order, and a tab you are not looking at is a running program whose output keeps
arriving. Every pane is held at the panel's full size while tabbed, so switching
costs no resize — a zero-size cell would defer opening the terminal and skip its
sizing, making each switch a fit plus a SIGWINCH plus a full repaint.

A tabbed panel shows no zoom button (it already shows one pane), and a zoom
another client set does not move the keyboard there.

Drag a pane to scroll it. A finger dragged up or down turns the same wheel a
mouse would and lets xterm route it, so where it goes is up to the program in the
pane — a mouse-reporting agent gets its SGR report, less under alternate scroll
gets arrow keys, a plain shell scrolls the scrollback. defaultPrevented is the
seam; what xterm did not claim is scrolled with term.scrollLines, since a
synthetic wheel cannot drive the browser scrolling xterm's scrollback relies on.
A short drag is still a tap, so placing the cursor and pinching to zoom survive.

Verified in a browser at a phone viewport against a live daemon: SGR reports
reaching the PTY on a mouse-reporting pane, and a bash pane's scrollback moving
symmetrically both ways; + adding a tab rather than splitting, with the hidden
pane holding the same box as the visible one.

Gates: cargo build, cargo test (1498), cargo clippy -D warnings, tsc -b,
vitest run (205), and a viewer-ui/dist rebuilt from this source.

@whaclaw-bot
whaclaw-bot merged commit 553094b into code0xff:dev Aug 2, 2026
6 checks passed
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