Repository navigation
Description
Summary
While a web UI tab holds a herdr terminal attach on a pane, herdr 0.9.3 keeps the pane at that attach's size and herdr's own TUI cannot resize it. In the real terminal the pane is then drawn at the wrong size, so typing and mouse clicks land in the wrong place. The input bytes themselves are not changed.
Seen on herdr-web-ui 0.4.4 with herdr 0.9.3. Reproduced in an isolated herdr session with a real TUI client.
What is not broken
With and without an attach, the program in the pane receives the same bytes from the TUI:
- plain keys, arrows, function keys, mouse click, drag and wheel, focus events, bracketed paste
- kitty keyboard protocol keys (Shift+Enter, Ctrl chords); the modes the TUI sets on its outer terminal do not change when an attach connects or ends
- with the installed 0.4.4 server and a real browser, an idle web tab writes nothing into the pane on its own
What is broken
The pane's pty follows the attach's size, not the TUI's. Measured with the TUI's pane area at 73x29:
| Case | Result in the TUI |
|---|---|
| Attach is larger (145x39) | The TUI shows only the top-left 73x29. A prompt on row 39 is off screen, typed text is not visible, and the cursor is drawn in the wrong cell. |
| Attach is smaller (50x15) | The pane is drawn in the top-left corner. A click outside it loses its press, and its release arrives clamped to (50,15). |
| Attach has the same size, then the TUI window grows to 130x40 | The pane stays 73x29 until the attach ends, then becomes 103x39. A click in the new area is clamped the same way. |
On 0.4.4 the terminal lens takes the pane at its own size on every focus and lets go one second after blur (#660). So each switch between the browser and the terminal resizes the pane twice, and the TUI is wrong for about a second after switching back. A tab that stays in use, for example on another device, keeps the pane locked for as long as it is open.
Steps to reproduce
- Start herdr's TUI in a terminal and run a full-screen program in a pane.
- Run
herdr terminal attach <terminal_id>from a pty of a different size (this is what the bridge'spty-hostdoes), or open the pane in a focused web UI tab. - In the TUI, type and click in the pane.
A second way: attach at the pane's current size, then resize the TUI's window. The pane does not follow.
Unreleased changes on main
- fix(terminal): keep a tab out of use updating; pausing it is a setting #699 makes a tab out of use keep its attach again by default. For someone who also uses the TUI this holds the pane longer.
- feat(terminal): a tab out of use watches its pane read-only instead of pausing #700 adds "Use alongside herdr's own window" (off by default): a tab out of use watches the pane read-only and leaves the TUI's size alone.
- Neither covers a tab that is in use while the same pane is shown in the TUI.
Notes
- The size hold is herdr 0.9.3 behaviour (terminal session control: resize/frame geometry diverges from pane API, and release does not restore desktop geometry herdrdev/herdr#5006, Terminal-attach client re-attaching to another terminal leaks
direct_attach_resize_locks— previous terminal stays stuck at the old client size for all other clients herdrdev/herdr#985,direct_attach_resize_lock). Versions before 0.4.3 were not compared, so whether this got worse in 0.4.3 is not established. - While the pointer moves over the web terminal, a program that asked for any-motion mouse reports receives those motion events. Whether that is wanted when the TUI user is the one working in the pane is a separate question.
Activity
devswha commentedon Oct 10, 2026
Reproduced on main 5d18c53 with herdr 0.9.3. The size hold is herdr's attach contract (herdrdev/herdr#5036 was closed as intended behaviour), and herdr reports no pane width, so the bridge cannot join at the pane's own size. Waiting on herdrdev/herdr#4682; measurements added there.
fix(terminal-input): float the growing input line over the grid (#966)
fix(terminal): take the pty back from the phone's input line and key …
fix(terminal): let go of an idle tab's pane beside herdr's own window (…