/simplify pass over this session's diff (4 cleanup agents → applied the high-value
findings):
- reuse: extract the duplicated truncRight/truncLeft (statusBar/agentsDashboard/
backgroundPanel) to logic/truncate.ts; export DONE_STATUSES/procIsRunning from
backgroundActivity and drop backgroundPanel's re-declared copy.
- simplification: remove dead/speculative exports (upsertNotification,
clearNotificationsByKey, BackgroundRun) — the campaign models notifications as
Message rows, not a notifications array — and drop runningCount's always-empty
`runs` param; collapse notificationDispatcher's always-true `card` field into a
plain notificationOsc(): TermNotification | undefined.
- efficiency: the bg-process poll now idles at 30s (was a flat 8s) and tightens to
8s only when something is running — most sessions have zero background processes.
- altitude: the `⚡ agents` chip joins the statusSegments width-ladder (was an inline
width gate) so all bar segments share one drop policy; refreshed the stale
statusBar header (bg: is wired now, not "reserved").
Net −95 LOC. Gate green. Skipped (noted): statusColor merge (divergent domains),
the pushNotification double-clone (necessary — guards the Solid aliasing footgun),
moving the notification-card dispatch out of messageLine, and the Message-row model
(deliberate "inline in transcript" design).
|
||
|---|---|---|
| .. | ||
| parsers | ||
| scripts | ||
| src | ||
| .gitignore | ||
| .node-version | ||
| .prettierrc | ||
| eslint.config.mjs | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| vitest.config.ts | ||
ui-opentui — native OpenTUI engine for Hermes
Solid + @opentui/core over Node FFI. Ink (ui-tui/) is the shipping default;
this is the experimental engine (draft PR #42922).
Node 26 setup (required; will not touch your other projects)
This package needs Node ≥ 26.3 (--experimental-ffi floor). Everything
else on this machine/repo can keep whatever Node it already uses — pin 26 to
this directory only:
# 1. install fnm (skip if you have it; nvm/mise work too — see below)
curl -fsSL https://fnm.vercel.app/install | bash
# add to ~/.zshrc (or bashrc): eval "$(fnm env --use-on-cd --shell zsh)"
# 2. install Node 26 SIDE BY SIDE (does NOT change your default)
fnm install 26
# 3. done — this directory has a .node-version (26.3), so `cd ui-opentui`
# auto-switches to 26 and leaving switches back. Do NOT run `fnm default 26`.
node -v # v26.x here; your old version everywhere else
No shell integration wanted (CI, scripts, one-off): fnm exec --using 26 -- node ...
or invoke the absolute binary (~/.local/share/fnm/node-versions/v26.*/installation/bin/node).
mise users: mise use node@26 in this directory. nvm users: nvm install 26,
plus an .nvmrc shim (echo 26 > .nvmrc) if you rely on auto-switching.
Gotchas
- Native modules are ABI-locked. A
node_modulesinstalled under Node 20/22 will not load under 26 (and vice versa) — runnpm ci(ornpm rebuild) after switching versions. Same applies tobench/'s node-pty. - Global npm packages don't follow between versions (per-version prefix); reinstall the few you need, or don't use globals.
- Editor terminals (Zed/VS Code) need the
fnm envline in your shell rc; the.node-versionauto-switch then covers any shell that cd's here. - Never run this package with bun — the FFI seam and the Solid/JSX build are Node-path only here.
package.jsondeclaresengines.node >= 26.3, so a wrong-Nodenpm ciwarns immediately.
Build & run
node scripts/build.mjs
HERMES_TUI_MOUSE=1 node --experimental-ffi --no-warnings dist/main.js
Gates: npm run check (typecheck + lint + tests). Memory/perf benchmarks live
in ../bench/ (see its README). Transcript windowing (memory architecture) is
documented in ../docs/plans/opentui-transcript-windowing.md.