Skip to content

Mission Control TUI

OpenTUI/Solid terminal Mission Control launched by uh tui under Bun: dashboard, editor, keymap, state model, persistence, run orchestration and event streaming, screenshot pipeline and theme, plus the TUI spike entry.

Depends on: Runtime Adapters and In-Runtime Extensions (8), Mission Lifecycle and Artifact Store (3), Artifact Schemas (2), Runtime Execution and Supervision (1)

Used by: CLI Entry, Build and Project Tooling (1)

(Numbers are distinct file-to-file dependencies.)

File Summary Key symbols
bin/uh-tui-spike.tsx Throwaway OpenTUI/Solid spike that reads .harness/sandboxes/index.yaml and renders a keyboard-driven sandbox list with dirty/clean badges; not wired into the CLI. loadSandboxes, toOptions, App
src/tui/dashboard.tsx Solid/OpenTUI three-pane Mission Control dashboard (adapters, missions, sandboxes) with mission detail view, keyboard navigation, editor launch, live run events and help overlay. sandboxStatusBadge, adapterOptions, missionOptions, artifactOptions, sandboxOptions, Dashboard
src/tui/editor.ts Opens a mission manifest in $EDITOR from the TUI by suspending the OpenTUI renderer, spawning the editor with inherited stdio, then resuming and reloading. resolveEditor, openInEditor, runEditor
src/tui/index.tsx Bun entry point for uh tui: side-effect imports adapters to register runtime checkers, resolves the project root and renders the Dashboard with the resolved theme.
src/tui/keymap.ts Keymap registry that is the single source of truth for TUI keybindings shown in the help overlay and footer hint line. keymapForView, footerHint
src/tui/model.ts Renderer-free dashboard snapshot reader that loads harness info, adapters, missions, sandboxes and mission detail from the .harness/ tree, tolerating missing or malformed files. loadDashboardSnapshot, loadHarnessInfo, loadAdapters, loadMissions, loadSandboxes, runtimeStatusFromResult, loadMissionDetail
src/tui/opentui-components.d.ts Ambient module augmentation registering OpenTUI diff and line_number renderables as Solid JSX intrinsic elements.
src/tui/persistence.ts Per-project TUI state persistence under $XDG_CONFIG_HOME/uh/tui-state.json with atomic writes, plus an in-memory store for tests. resolveDefaultConfigDir, readFile_, createFilePersistenceStore, createMemoryPersistenceStore
src/tui/README.md Directory guide for the Bun-loaded OpenTUI/Solid terminal UI: describes each module (model, state, keymap, dashboard, run-events/orchestrator/session, persistence, index), how uh tui spawns Bun with the Solid preload, and points to architecture and lifecycle docs.
src/tui/run-events.ts Live tail reader for a run’s events.ndjson with injectable fs seams: parses lines, reads existing events and polls for appended ones. parseEventLine, readExistingEvents, tailRunEvents
src/tui/run-orchestrator.ts Spawns the uh mission run CLI as a child process from the TUI so adapter dispatch logic is never duplicated. buildRunArgs, resolveDefaultCliEntry, startRun
src/tui/run-session.ts Composes the run subprocess starter with the events.ndjson tailer into one run-session object the TUI state layer drives. createDefaultRunStarter
src/tui/screenshot-pipeline.ts Orchestration logic for uh tui screenshot: validates the view, maps it to navigation keys, obtains a deterministic ANSI frame from an injected renderer and writes it out. runScreenshotPipeline, navigationKeysForView
src/tui/screenshot.tsx Render side of the TUI screenshot pipeline: parses argv, mounts the Solid Dashboard under OpenTUI testRender, navigates to the view and captures a frame. parseArgs, render
src/tui/state.ts Reactive state layer for the OpenTUI Mission Control dashboard: wraps the model-layer snapshot loader in Solid signals, watches the .harness/ adapters, missions and sandboxes trees with a 200 ms debounced reload, and exposes selection, mission-detail, run-dialog, sandbox create/discard, adapter-check cache and persistence actions. defaultWatcher, createDashboardState
src/tui/suspend.ts Implements Ctrl+Z / fg suspend-resume for the OpenTUI dashboard by handling SIGTSTP and SIGCONT, suspending the renderer, re-raising SIGSTOP to hand job control to the shell, and offering snapshot capture/restore hooks. installSuspendHandlers
src/tui/theme.ts Defines Catppuccin Mocha/Latte terminal palettes for the TUI and resolves the active theme from UH_TUI_THEME, inferring light or dark from COLORFGBG when set to system. resolveTheme, detectSystemTheme