Add wmux-client-terminal: TUI client for wmux#25
Merged
shmuelhizmi merged 6 commits intomasterfrom Mar 25, 2026
Merged
Conversation
New `@playfast/wmux-client-terminal` package that renders wmux in the terminal via OpenTUI's React reconciler, connecting to the same wmux server as the browser client through echoform's WebSocket transport. Features: - Sidebar with categories, tabs, and status indicators - VT100 terminal buffer with ANSI color/cursor/erase support - File viewer with line numbers - Tmux-style Ctrl+B prefix for TUI commands, all other keys pass to PTY - Auto-scroll to bottom on terminal output - Web client link in header bar - Proper lifecycle cleanup via onDestroy and error handlers Also exposes `token` and `wsUrl` on WmuxHandle so consumers can pass credentials to `renderWmuxTUI()`, and adds a TUI demo entry point. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The `done` promise resolves when the TUI is closed (user quit via Ctrl+B q, or programmatic destroy()). This lets consumers await it and shut down the dev server cleanly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move jsxImportSource from tsconfig.json to per-file `@jsxImportSource` pragmas so tsgo doesn't apply it to echoform's tsx files resolved through workspace dependencies. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New export `@playfast/wmux/preset/tui` that starts the wmux server, prints the web URL, opens the TUI client, and returns a handle with `url`, `stop()`, and `done` promise. Server auto-stops when TUI closes. Uses dynamic import for @playfast/wmux-client-terminal (devDependency for types only) — no circular deps. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
It's used at runtime via dynamic import in the preset, not just for types. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@playfast/wmux-client-terminalpackage — renders wmux in the terminal using OpenTUI's React reconciler, connecting via echoform WebSocket transporttokenandwsUrlonWmuxHandleso consumers can pass credentials torenderWmuxTUI()bun run tuiin demo/dev-server)Features
Ctrl+Bprefix for TUI commands — all other keys pass directly to the active PTYstickyScroll)onDestroycallback and uncaught error handlersUsage
Test plan
bun run tuiindemo/dev-server/— verify sidebar, terminal output, keyboard inputCtrl+Bprefix:j/kto navigate,1-9for categories,rrestart,sstop,qquit🤖 Generated with Claude Code