- 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]>