overengineeringstudio / overengineeringstudio/effect-utils

Evaluate ghostty-web as xterm.js replacement for TUI web rendering

Open
#189 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:tui type:feature
Dominant language
TypeScript
Stars
82
Forks
2
Avg merge
1d 8h
Merged PRs (30d)
121

Description

Context

We currently use @xterm/xterm (v6.0.0), @xterm/addon-fit, and @xterm/headless in @overeng/tui-react for Storybook terminal previews and testing.

ghostty-web is a WASM-compiled terminal emulator built from Ghostty's native engine with xterm.js API compatibility. It's designed as a drop-in replacement (import { Terminal } from 'ghostty-web' instead of @xterm/xterm).

Why consider this

  • Uses Ghostty's battle-tested native terminal parser (compiled to WASM) rather than a JS reimplementation
  • Better handling of complex scripts, unicode, and advanced terminal features (e.g. XTPUSHSGR/XTPOPSGR)
  • Zero external dependencies
  • API-compatible with xterm.js — should be a minimal migration

Scope

Affected code:

  • packages/@overeng/tui-react/src/storybook/TuiStoryPreview.tsx (xterm.js Terminal + FitAddon)
  • packages/@overeng/tui-react/src/storybook/theme.ts (xterm theme)
  • packages/@overeng/tui-react/test/helpers/virtual-terminal.ts (@xterm/headless)

Open questions

  • Does ghostty-web support all the xterm.js APIs we use (Terminal, FitAddon, headless mode)?
  • Performance characteristics for our use case (Storybook timeline playback with frequent writes)?
  • Maturity — currently at v0.4.0, actively maintained by Coder

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the three affected files: TuiStoryPreview.tsx, theme.ts, and test/helpers/virtual-terminal.ts. Compare their Terminal, FitAddon, and headless usage with ghostty-web, then exercise Storybook timeline playback and virtual-terminal tests with frequent writes. Done means the API compatibility, performance, and maturity findings support a clear migration recommendation.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, testing-qa, web-dev
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.