- Once scrollback is full its length stops growing while writes keep
evicting lines, so the preserved viewport drifted toward the tail;
fall back to counting written newlines at the cap
- Parse config.ghostty before config so config wins conflicts, matching
Ghostty's own load order
- Preserve a scrolled-back viewport when session output arrives:
ghostty-web snaps to the bottom on every write, so re-anchor the
viewport by the number of lines the write pushed into scrollback
- Read both config and config.ghostty when they coexist in a Ghostty
config directory instead of letting the first shadow the second
- Linkify mailto/ftp/ssh/git/tel/magnet/gemini/gopher/news URLs in the
terminal and open non-http schemes with the OS handler, keeping the
in-app preview flow for http(s)
- Bump a terminal epoch when the deferred WASM setup finishes so the
session sync effect re-runs against the live terminal even when no
session field changed during the load, completing the exited-at-mount
handling
- Read config.ghostty as an alternate config file name and merge the
XDG and macOS Application Support configs in Ghostty's load order
instead of stopping at the first existing file
- Attach a rejection handler to the terminal WASM init so a load
failure logs, shows a message in the viewport, and clears on retry
instead of leaving a blank pane and an unhandled rejection
- Treat an empty XDG_CONFIG_HOME as unset per the XDG spec instead of
resolving the Ghostty config relative to the server cwd
- Retry WASM init on a later mount instead of caching a rejected
promise until page reload
- Blur non-active terminals after open(): ghostty-web focuses
unconditionally, letting the last-mounted split steal focus
- Seed the session snapshot with version 0 and a closed status at mount
so an already-exited session still surfaces its exit and closes the
viewport
- Keep CSS generic font keywords (monospace, system-ui, ...) unquoted
when building the terminal font stack
- Resolve named Ghostty themes from the Linux system dirs
(/usr/share/ghostty/themes, /usr/local/share/ghostty/themes) too
The desktop protocol's Content-Security-Policy blocked the ghostty-web
terminal from initializing: script-src had no 'wasm-unsafe-eval', so
WebAssembly compilation was rejected, and connect-src had no data:, so
the library's embedded WASM payload fetch failed. Add both sources.
Swap the thread terminal drawer from @xterm/xterm to ghostty-web, the
libghostty-vt based drop-in. The server terminal protocol is unchanged;
the swap is contained to the client renderer:
- Gate terminal creation on the ghostty-web WASM init and replay the
session buffer that arrives before it resolves
- Invert custom key handler returns (ghostty-web treats true as
"consumed", the opposite of xterm.js)
- Convert link provider rows/ranges between the 1-based terminal-links
helpers and ghostty-web's 0-based coordinates, and drop the built-in
providers whose activate() bypasses the app's preview flow
- Guard zero-length writes: ghostty-web 0.4.0 alloc(0) returns an
out-of-bounds pointer and crashes on status-only session updates
- Adapt at-bottom checks to ghostty-web's inverted viewportY semantics
Also style the terminal from the user's local Ghostty config when one
exists: the server parses font-family/font-size/theme (resolving named
themes from the user themes dir or the Ghostty.app bundle) into an
optional ServerConfig.terminalStyle field, and the drawer applies it
over the app-derived defaults. Nerd Font fallbacks cover powerline and
devicon glyphs, and the mount is painted with the theme background so
partial-cell fringes match the canvas.
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Julius Marminge <[email protected]>
Co-authored-by: Julius Marminge <[email protected]>