Repository navigation
feat(terminal): libghostty alone parses every attached pane by default - #4761
Conversation
Step 8: the libghostty-only path is on by default on any device and either server (herdr-core and herdr), except a mirrored pane (a Windows PC's, repainted from pane.read), whose folded view stands the IME's preedit on xterm's rows. The choice is made before the first byte; a pane not yet known to be mirrored counts as attached.
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
…it ends a write; the scripts' probe counts output frames With libghostty parsing every pane by default, three browser scripts failed. Two waited on the outputProbe, which counted bytes reaching xterm; xterm now gets controls only, so the probe counts each output frame where it enters the terminal, whichever engine parses it. The third showed a real difference: an OSC 52 whose ST was split between ESC and the backslash was copied one frame late, because the picture writer held the trailing ESC and the control scanner waited for the backslash. xterm ends a string at its ESC: both now pass that ESC on with the write it ends, and send only the backslash after it. replay-clipboard reads xterm's own OSC parse state, so it runs with the libghostty-only path off (the path mirrored panes and every fallback take); the libghostty-only clipboard guard is covered by the unit tests.
|
Merged through
Reviews: step 8 flips the default of the step 5 path (reviewed there: gate reviewer, Codex adversarial, CodeRabbit with 16 threads fixed) to every attached pane; CodeRabbit on this PR. On the lane brief's word. |
Summary
Step 8 of moving the terminal from xterm to libghostty. It builds on step 7 (#4760), which turned the libghostty-only path on by default for phones and tablets.
This turns that path on by default on every device, on herdr-core and herdr alike. One exception keeps xterm's full parse: a mirrored pane. That is a Windows PC's pane, or one on a machine without a PTY host, which is repainted from
pane.read. Its folded view stands the IME's preedit on xterm's rows. The choice is made before the first byte, and a pane not yet known to be mirrored counts as attached.localStorage
ovis:ghostty-only(on/off) still decides over the default.Nothing on screen is meant to change. Rows, the cursor, selections, links, pictures and the scroll position are drawn by the same libghostty layer as before. Only xterm's second, hidden parse is dropped.
Speed
All runs used the same recording, a 1.56 MB Claude Code session, with 5 runs per arm. All 10 runs got identical bytes.
Desktop (1280x800, no CPU throttle):
Phone emulation (390x844, 4x CPU throttle), for reference from step 7:
Also in this PR
Default-on brought three browser scripts to fail on the first CI run:
useTerminalMountcounted bytes reaching xterm. xterm now gets controls only, so the probe counts each output frame where it enters the terminal, whichever engine parses it. This fixes sidebar-activity and terminal-release-no-watch.controls.test.tsanditermPictureWriter.test.tscover it; both fail without the fix.Tests
capture.test.ts: the default is on unless the pane is mirrored, and a stored choice decides over it.overlay-fallback.test.ts: the case without the flag now sets "off", since the default is on.Validation
bun run check fastat this head: pass.CI runner image, default as shipped:
All 9 pass, with no error lines in their logs.