[codex] redesign TUI shell#24
Conversation
anandh8x
left a comment
There was a problem hiding this comment.
Review: TUI shell redesign
No blockers. This is a well-structured decomposition of the monolithic TUI into focused components with a shared theme system.
What's good
theme.tsandtypes.tsestablish a design system — colors, marks, message types, mode state — that all TUI components consume consistentlyTuiShellis a clean orchestration component: header > transcript > suggestions > debug panel > prompt box > status barTranscript.tsxcleanly handles all message types with consistent per-type renderingToolCallRenderer.tsxgets collapsible detail, syntax highlighting, smart per-tool summaries (bash command, file path, etc.) — major UX improvementApp.tsxis much slimmer: extractedrunAgentLoop,handleSlashCommand,handleModelCommand,appendAssistantText,toFriendlyError,logDebugErrorinto focused units- Error classification (
toFriendlyError) maps provider errors to user-facing messages — auth, rate limits, network, and catch-all - Scroll is now terminal-aware via
process.stdout.rows - Multi-step
AddProviderflow (OpenGateway / Custom) with per-step validation and success feedback TuiStatusBarshows scroll position and mode flags compactly
Important concern (follow-up, not blocking)
ToolCallRenderer.tsx — ANSI truncation — formatResult(highlightedResult || result!, isLongResult, showFullResult) applies .slice(0, 200) when collapsed. If highlightedResult has ANSI color codes from highlightCode, truncating at an arbitrary character offset can split an escape sequence and corrupt terminal rendering. Suggestion: truncate the plain text before highlighting, or strip ANSI before measuring length.
Minor nits
TuiShell.tsx:44—modeStatelocal is created but never usedApp.tsx—canScrollUp/canScrollDownnaming is backwards from natural orientation (scrollOffset=0 is oldest, soscrollOffset > 0means "scrolled down", not "can scroll down")ToolCallRenderer.tsx:70,87—onPresspassed viaas anycast; Ink'suseFocus/useInputwould be more robust for expansion togglingTuiPromptBoxshowsdebug/tools offlabels that duplicate the header badges — intentional UX, but possible redundancytheme.ts—subtleandmutedboth map to'gray', one is unused
|
@Vasanthdev2004 @anandh8x please review this PR. |
gnanam1990
left a comment
There was a problem hiding this comment.
Automated Hermes rereview
Verdict: Approve
Rereviewed after new commit 97a2b4c (fix: strengthen tui shell visual hierarchy). The update adds a more distinct launch/session/composer layout, themed panels, command suggestion rendering, improved transcript lanes, and tests/tui-shell-render.test.ts. I also rechecked the earlier ANSI-truncation follow-up area; this commit does not introduce a new blocker there.
Validation on origin/codex/tui-shell-redesign:
git diff --check origin/codex/m1-model-selector-ui..origin/codex/tui-shell-redesign✅npx --yes bun test ./tests/tui-shell-render.test.ts --timeout 15000✅ (2 passing)npx --yes tsc --noEmit✅npx --yes bun test ./tests --timeout 15000✅ (150 passing)npx --yes bun run build✅./zero --help✅
GitHub CI is green across ubuntu, macOS, and Windows smoke jobs. No requested changes or blocking issues found.
gnanam1990
left a comment
There was a problem hiding this comment.
Automated Hermes rereview
Verdict: Approve
Rereviewed after new commit feb2e8f (fix: redesign tui as agent console). The TUI shell remains cleanly decomposed into themed header/transcript/prompt/status components, with the provider add flow and tool-call rendering aligned to the new console styling. I did not find regressions in command suggestion rendering, chat lanes, provider/model status, or existing tool-call display behavior.
Validation on detached worktree origin/codex/tui-shell-redesign:
git diff --check origin/codex/m1-model-selector-ui..HEAD✅npx --yes bun install --frozen-lockfile✅npx --yes bun test ./tests/tui-shell-render.test.ts --timeout 15000✅ (2 passing)./node_modules/.bin/tsc --noEmit✅npx --yes bun test ./tests --timeout 15000✅ (150 passing)npx --yes bun run build✅./zero --help✅
GitHub CI is green across ubuntu, macOS, and Windows smoke jobs. No requested changes or blocking issues found.
gnanam1990
left a comment
There was a problem hiding this comment.
Automated Hermes Agent rereview
Verdict: Approve
Rereviewed PR #24 after latest push 83b61db (fix: align tui with compact agent stream), which landed after my previous approval on feb2e8f. I focused first on the delta from feb2e8f..HEAD, then sanity-checked the full current PR diff against origin/codex/m1-model-selector-ui.
What changed since my previous review:
- Simplified the TUI from the prior boxed/paneled agent-console treatment into a more compact terminal stream.
- Updated transcript rows, prompt/header styling, command suggestions, and compact tool-call labels.
- Adjusted the TUI render snapshot-style assertions to match the new compact surface.
Reviewer context considered:
- Existing approval by
anandh8xnoting the TUI decomposition and theme/component structure had no blockers. - My prior approvals on commits
97a2b4candfeb2e8f. - Existing PR comments requesting review; no open change-request review or unresolved reviewer blocker was present.
Validation performed locally in /tmp/zero-pr-watch:
git diff --check origin/codex/m1-model-selector-ui...HEAD✅npx --yes bun install --frozen-lockfile✅npx --yes bun test ./tests/tui-shell-render.test.ts --timeout 15000✅ (2 passing)./node_modules/.bin/tsc --noEmit✅npx --yes bun test ./tests --timeout 15000✅ (150 passing)npx --yes bun run build✅./zero --help✅- GitHub checks: ubuntu, macOS, and Windows smoke jobs ✅
I did not find blocking correctness, security, or regression issues in the latest TUI-only delta.
gnanam1990
left a comment
There was a problem hiding this comment.
Automated Hermes Agent rereview
Verdict: Approve
Rereviewed PR #24 after latest push 668ad0e (feat: add premium startup splash), which landed after my previous approval on 83b61db. I inspected the delta from 83b61db..HEAD first, then sanity-checked the full current PR diff against origin/codex/m1-model-selector-ui.
What changed since my previous review:
- Added
StartupScreen.tsx, a dedicated startup splash with centered logo, command chips, provider/model status, prompt box, and shortcut hints. - Wired
terminalHeightthroughAppandTuiShell, and renders the startup splash only while the session still contains only system messages. - Extended the render test to assert the startup splash replaces session clutter and hides the prior system welcome text.
Reviewer context considered:
- Existing approval by
anandh8xfor the overall TUI shell decomposition and shared theme/component structure. - My prior approvals on commits
97a2b4c,feb2e8f, and83b61db. - Existing PR comments requesting review; no open change-request review or unresolved reviewer blocker was present.
Validation performed locally in /tmp/zero-pr-watch:
git diff --check origin/codex/m1-model-selector-ui...HEAD✅npx --yes bun install --frozen-lockfile✅npx --yes bun test ./tests/tui-shell-render.test.ts --timeout 15000✅ (2 passing)./node_modules/.bin/tsc --noEmit✅npx --yes bun test ./tests --timeout 15000✅ (150 passing)npx --yes bun run build✅./zero --help✅- GitHub checks: ubuntu, macOS, and Windows smoke jobs ✅
No blocking correctness, security, or regression issues found in the latest startup-splash delta.
gnanam1990
left a comment
There was a problem hiding this comment.
Automated Hermes Agent rereview
Verdict: Approve
Rereviewed PR #24 after new commits 16de941 (feat(tui): rebuild startup splash into reusable components) and 2eb503c (feat(tui): use figlet Electronic wordmark for ZERO splash logo), which landed after my previous approval on 668ad0e.
What changed since the previous review:
- Refactored the inline startup splash into reusable
src/tui/startup/*components:Header,ZeroLogo,CommandChips,PromptBox,ShortcutHints, and splash-local theme. - Preserved the controlled
StartupScreeninterface used byTuiShell, keeping input/terminal size ownership in the shell. - Replaced the splash logo with a figlet Electronic-style ZERO wordmark that degrades to a compact title on narrow terminals.
Review notes:
- The decomposition is scoped to the startup splash and keeps the no-session-clutter behavior intact.
- The wordmark width guard (
maxWidth >= LOGO_WIDTH) avoids wrapping/broken glyphs on narrow terminals. - No new correctness, security, or regression blockers found in the latest delta.
Validation performed locally in /tmp/zero-pr24-review:
git diff --check origin/codex/m1-model-selector-ui...HEAD✅npx --yes bun install --frozen-lockfile✅npx --yes bun test ./tests/tui-shell-render.test.ts --timeout 15000✅ (2 passing)npx --yes tsc --noEmit✅npx --yes bun test ./tests --timeout 15000✅ (150 passing)npx --yes bun run build✅./zero --help✅
GitHub checks are green across ubuntu, macOS, and Windows smoke jobs.
gnanam1990
left a comment
There was a problem hiding this comment.
Automated Hermes Agent rereview
Verdict: Approve
Rereviewed PR #24 after new commit b386c14 (feat(tui): switch splash wordmark to figlet Rebel with two-tone cyan), which landed after my previous approval on 2eb503c.
What changed since the previous review:
- Replaced the Electronic figlet ZERO splash wordmark with the Rebel 3D figlet wordmark.
- Added glyph classification/run rendering in
src/tui/startup/ZeroLogo.tsxso solid front faces render bright cyan while shaded faces render dim cyan. - Kept the narrow-terminal fallback path intact when
maxWidth < LOGO_WIDTH.
Review notes:
- The delta is limited to the startup logo component and does not alter shell control flow, input handling, provider/model state, or transcript rendering.
- The run-splitting approach is deterministic and safe for Ink rendering; it preserves spaces and pads lines to a consistent width for centering.
- No new correctness, security, or regression blockers found in the latest delta.
Validation performed locally in /tmp/zero-pr24-rereview-0708:
git diff --check origin/codex/m1-model-selector-ui...HEAD✅npx --yes bun install --frozen-lockfile✅npx --yes bun test ./tests/tui-shell-render.test.ts --timeout 15000✅ (2 passing)npx --yes tsc --noEmit✅npx --yes bun test ./tests --timeout 15000✅ (150 passing)npx --yes bun run build✅./zero --help✅
GitHub checks are green across ubuntu, macOS, and Windows smoke jobs.
gnanam1990
left a comment
There was a problem hiding this comment.
Automated Hermes Agent rereview
Verdict: Approve
Rereviewed PR #24 after new commit 8d01576 (feat(tui): simplify shortcut hints to a clean single line), which landed after my previous approval on b386c14.
What changed since the previous review:
src/tui/startup/ShortcutHints.tsxnow renders a quieter single-line shortcut hint row instead of boxed keycaps.- Shortcut labels were shortened from "sends/accepts command/exits" to "send/complete/exit".
- The row keeps
flexWrap/flexShrinkbehavior for narrow terminals and uses muted middot separators between hint groups.
Review notes:
- The delta is limited to presentational startup-splash shortcut hints.
- It does not alter shell state, input handling, provider/model resolution, agent execution, tool execution, or persisted configuration.
- No correctness, security, or regression blockers found in the latest delta.
Validation performed locally in /tmp/zero-pr24-rereview-0712:
git diff --check origin/codex/m1-model-selector-ui...HEAD✅npx --yes bun install --frozen-lockfile✅npx --yes bun test ./tests/tui-shell-render.test.ts --timeout 15000✅ (2 passing)npx --yes tsc --noEmit✅npx --yes bun test ./tests --timeout 15000✅ (150 passing)npx --yes bun run build✅./zero --help✅
GitHub checks are green across ubuntu, macOS, and Windows smoke jobs.
gnanam1990
left a comment
There was a problem hiding this comment.
Automated Hermes Agent rereview
Verdict: Changes Requested
Rereviewed PR #24 after new commit 6692667 (feat(tui): add Claude-Code-style mode status line to splash), which landed after my previous approval on 8d01576.
Existing review/comment context considered
- Prior reviewer
anandh8xapproved the TUI shell decomposition with no blockers. - My prior approvals covered the earlier splash/header/transcript/prompt refactors and the shortcut hint simplification.
- Existing PR comment only asked other reviewers to review; no technical concerns were pending.
What changed in this push
- Added
src/tui/startup/ModeStatus.tsxwith build/plan/auto-accept/bypass labels. - Added
theme.warnfor caution styling. - Rendered
ModeStatusat the bottom ofStartupScreen.
Blocking issue
StartupScreennow advertises an "Active agent mode" / "shift+tab to cycle" status line, butTuiShellnever passes real mode state into it.StartupScreentherefore defaults tomode = 'build'even when the app is already in plan mode (isPlanMode), tools are disabled, or any future mode state is active. That makes the splash status line misleading exactly where it is intended to communicate the active mode. Please derive/pass the displayed startup mode from the existing shell/app state (at minimumisPlanMode, and avoid advertising modes that are not actually wired/cycleable yet), or make the line purely static until mode cycling exists.
Validation
npx --yes bun --version→ 1.3.14npx --yes bun install --frozen-lockfile→ passed, no changesnpx --yes bun test→ passed (150 tests)npx --yes bun run typecheck→ passednpx --yes bun run build→ passed (Built zero)
Automated rereview by Hermes Agent.
gnanam1990
left a comment
There was a problem hiding this comment.
Automated Hermes Agent rereview
Verdict: Changes still requested
Rereviewed after new commit 7db7f0b (feat(tui): show slash-command menu on splash, drop keycap hints).
What changed
- Startup splash now receives and renders
CommandSuggestions, so typing/on the splash can show the command menu. - Removed the separate
ShortcutHintsrow.
Existing blocker status
This does not resolve the previous blocking issue from commit 6692667: TuiShell still renders StartupScreen without passing real mode state, and StartupScreen still defaults mode = 'build' while ModeStatus advertises an active mode plus shift+tab to cycle.
Please derive/pass the displayed startup mode from existing shell/app state (at minimum isPlanMode) and avoid advertising mode cycling that is not actually wired, or make the mode line static until cycling exists.
Validation
- Inspected delta:
git diff 66926672a4ea873ac82208a6c16adfea61a3853d..origin/codex/tui-shell-redesign -- src/tui/StartupScreen.tsx src/tui/TuiShell.tsx src/tui/startup/ModeStatus.tsx src/tui/startup/ShortcutHints.tsx tests/tui-shell-render.test.ts - GitHub CI observed green for ubuntu, macOS, and Windows smoke jobs.
Automated rereview by Hermes Agent.
gnanam1990
left a comment
There was a problem hiding this comment.
Automated Hermes Agent rereview
Verdict: Changes still requested
Rereviewed after new commit 0ed1dcf (feat(tui): redesign in-session working view).
What changed
- Working view header now derives active file plus git branch/ahead-behind metadata.
- Footer now shows model, estimated tokens/cost/context percent, and live/idle state.
- Tool-call rows were simplified into compact activity summaries, with inline diff cards for edit/apply-patch-style changes.
Existing blocker status
This push does not resolve the prior blocking issue: TuiShell still renders StartupScreen without passing real mode state, and StartupScreen/ModeStatus still default to build while advertising shift+tab to cycle.
Affected area remains:
src/tui/TuiShell.tsx: startup path calls<StartupScreen ... />without passingisPlanModeor another derived startup mode.src/tui/startup/ModeStatus.tsx: defaultmode = 'build'and text says(shift+tab to cycle), but the startup splash does not reflect actual plan mode and mode cycling is not wired.
Please derive/pass the displayed startup mode from existing shell/app state (at minimum isPlanMode) and avoid advertising unwired mode cycling, or make the mode line static until cycling exists.
Validation
- Inspected PR diff with
gh pr diff 24 --repo Gitlawb/zero. - Inspected new delta with
git diff 7db7f0bf47a61499c61e8f406ab6416a8c074a26..origin/codex/tui-shell-redesign -- src/tui tests/tui-shell-render.test.ts. - GitHub CI observed green for ubuntu, macOS, and Windows smoke jobs on the latest commit.
Automated rereview by Hermes Agent.
gnanam1990
left a comment
There was a problem hiding this comment.
Automated Hermes Agent rereview
Verdict: Changes still requested
Rereviewed after new commit 1d96786 (feat(tui): animate live dot and running tool rows).
What changed
- Added
src/tui/LiveDot.tsxto pulse the footer indicator while the agent is thinking. - Running tool rows now render an
ink-spinnerdots spinner, resolving to the static status dot after completion. TuiStatusBarnow usesLiveDotfor the right-side live indicator.
Existing blocker status
This latest animation-only push still does not resolve the outstanding startup-mode blocker: the startup splash mode line is not wired to real shell state.
Affected area remains:
src/tui/TuiShell.tsx: the startup path still calls<StartupScreen ... />without passingisPlanModeor any derived startup mode.src/tui/startup/ModeStatus.tsx: still defaultsmode = 'build'and says(shift+tab to cycle), even though startup mode cycling is not wired and plan mode is not reflected.
Please derive/pass the displayed startup mode from existing shell/app state (at minimum isPlanMode) and avoid advertising unwired mode cycling, or make the mode line static until cycling exists.
Validation
- Inspected new delta with
git diff 0ed1dcfcea4b434ad41a0e560b5053ac0a79985d..origin/codex/tui-shell-redesign -- src/tui tests/tui-shell-render.test.ts. - GitHub CI status observed: ubuntu and macOS smoke succeeded; Windows smoke was still in progress when this rereview was posted.
Automated rereview by Hermes Agent.
Blockers
Non-Blocking
Looks Good
Verdict: Changes Requested — Clean component work, but the startup mode line is behaviorally wrong and the stacked branch needs to be brought onto |
gnanam1990
left a comment
There was a problem hiding this comment.
Automated Hermes Agent rereview
Verdict: Changes still requested
Rereviewed PR #24 at head 9cc94df (fix: restore startup shortcut hints) after the prior changes-requested review on 1d96786.
Existing review/comment context considered
- Prior approval from
anandh8xfor the TUI shell decomposition. - Prior Hermes reviews, including the blocking startup-mode concern introduced by the
ModeStatusline. - Author comment noting two blockers: misleading startup mode/cycle hint and the stacked branch still targeting
codex/m1-model-selector-uiinstead of landing cleanly onmain.
What changed in this push
- Removed
src/tui/startup/ModeStatus.tsxand the defaultbuild mode/shift+tab to cyclestartup status line. - Restored startup shortcut hints (
Enter,Tab,Ctrl+C). - Updated the TUI shell render test to assert the startup splash no longer contains
shift+tab.
Blocker status
- ✅ Startup mode blocker resolved. The splash no longer advertises an unwired/default
build modeorshift+tabcycling. - ❌ Main landing path still blocked. The PR is still based on
codex/m1-model-selector-ui, and a merge-tree check against currentorigin/mainreports a content conflict insrc/tui/App.tsx:git merge-tree --write-tree origin/main HEADexits1- conflict:
src/tui/App.tsx
Please rebase/retarget this PR onto current main (or otherwise resolve the src/tui/App.tsx conflict) so the branch can land cleanly on the default branch.
CI / validation
Local validation in /tmp/zero-pr-watch passed:
git diff --check origin/codex/m1-model-selector-ui...HEAD✅- temporary Bun
1.3.14install/check:bun install --frozen-lockfile✅ bun test ./tests/tui-shell-render.test.ts --timeout 15000✅ (2 passing)bun x tsc --noEmit✅bun test ./tests --timeout 15000✅ (150 passing)bun run build✅./zero --help✅
GitHub checks on the latest head:
- Ubuntu smoke ✅
- macOS smoke ✅
- Windows smoke ❌ —
zero --versiontest timed out at 15s and exited143intests/cli-version.test.ts.
Even though local macOS validation passes and the startup-mode issue is fixed, the branch should not be approved until the current Windows CI failure and the main merge conflict are resolved.
Automated rereview by Hermes Agent.
Blockers
Non-Blocking
Looks Good
Verdict: Changes Requested — Startup mode is fixed, but the branch still cannot land cleanly on current |
Replace the inlined StartupScreen with composable Header, ZeroLogo, CommandChips, PromptBox and ShortcutHints under src/tui/startup, plus a self-contained theme. Keeps the same props so TuiShell is unchanged; typecheck clean, shell render test passing.
Outlined glyphs with a dotted fill — closer to the splash mockup than the solid block. Generated from figlet (not hand-drawn); lines padded to equal width so the block stays centered.
Use the Rebel 3D figlet font for ZERO; render solid front faces in bright cyan and the shaded drop-shadow dim, so the 3D depth reads correctly. Generated from figlet, padded to equal width for clean centering.
Drop the boxed keycaps (heavy/noisy); render keys in cyan with dim labels and a faint middot separator. Wraps on narrow terminals.
New ModeStatus shows the active mode (build/plan/auto-accept/bypass) with a chevron indicator, a shift+tab cycle affordance, and a /-command hint; color-coded per mode. Presentational for now — shell wires the actual cycling later.
Render CommandSuggestions on the startup splash (TuiShell only showed it in the in-session view, so typing / on the splash showed nothing). Remove the Enter/Tab/Ctrl+C keycap line; the mode line + command menu cover the affordances.
Header now shows the active file + git branch/ahead-behind; footer shows model · tokens · cost · ctx% · live. Activity rows are mockup-style (dot + tool + summary: Read N lines / Grep "q" N matches / Edit +A -B), and edits render an inline DiffCard (red/green). Usage/git are derived/estimated for now; live token usage + structured diffs are follow-ups.
Add a pulsing LiveDot in the footer (heartbeat while the agent works, steady otherwise) and an animated spinner on tool rows while they're running (resolves to a static dot on completion). Each is an isolated leaf component so only it repaints per tick. Thinking spinner already existed.
9cc94df to
303829e
Compare
BlockersNone found. Non-Blocking
Looks Good
Verdict: Approve — Clean TUI shell redesign; the startup-mode, main-landing, and CLI lazy-load concerns are resolved from this side. |
gnanam1990
left a comment
There was a problem hiding this comment.
Automated Hermes Agent rereview
Verdict: Approve
Rereviewed PR #24 after the branch was force-updated/rebased onto main and latest head 303829e (fix: lazy load tui for cli commands). I inspected the current PR diff and validated the two previously blocking areas.
Resolved blockers
- ✅ Main landing path is now clean:
origin/mainis an ancestor oforigin/codex/tui-shell-redesign, andgit merge-tree --write-tree origin/main origin/codex/tui-shell-redesignexits0with tree9350ca5366b55edb3fe1df36028873d1d8efa1aa. - ✅ Windows
zero --versionhang concern is addressed by lazy-loading the TUI only for interactive startup. Local./zero --versionreturns0.1.0, and the targeted CLI version tests pass. - ✅ The earlier startup-mode/cycle-hint blocker remains resolved:
ModeStatusis gone, shortcut hints are restored, and the render test assertsshift+tabis absent.
Validation performed on a detached worktree at origin/codex/tui-shell-redesign
npx --yes bun install --frozen-lockfile✅git diff --check origin/main...HEAD✅npx --yes bun test ./tests/tui-shell-render.test.ts ./tests/cli-version.test.ts --timeout 15000✅ (5 passing)npx --yes bun test ./tests --timeout 15000✅ (195 passing)npx --yes tsc --noEmit✅npx --yes bun run build✅ (Built zero)./zero --help✅./zero --version✅ (0.1.0)
GitHub currently reports no checks yet for the new 303829e branch head via gh pr checks, so this approval is based on local validation plus the clean merge-tree result.
Automated rereview by Hermes Agent.
anandh8x
left a comment
There was a problem hiding this comment.
Re-review: TUI shell redesign (v2)
Still no blockers. This iteration adds significant new surface — startup splash, inline diffs, live indicator, git status, token estimation — on top of the v1 component decomposition. The merge stays blocked but the code itself is clean.
What's new (since v1)
- Startup splash —
StartupScreen+startup/components (ZeroLogo, Header, PromptBox, CommandChips, ShortcutHints) render a centered wordmark + chip bar when only system messages exist. Degrades gracefully on narrow terminals with a minimal "▌ ZERO ▐" fallback ZeroLogo— ASCII wordmark with two-tone glyph rendering (solid faces in bright cyan, shaded drop-shadow dimmed). Lightweight figlet-inspired rendering per character class, not per characterDiffCard— Inline diff foredit_file/apply_patchtool calls, capped at 16 lines with "N more..." overflow.buildEditDiffis a simple old→new concatenation (no unified-patch parsing)LiveDot— 2 Hz pulsing indicator (●/◌), owns its own interval so only the dot repaints, not the whole status barTuiHeader— Now shows active file path (collapsed $HOME → ~) on the left, git branch + ↑ahead ↓behind on the right. Model/provider moved to status barTuiStatusBar—model · tokens · cost · ctx%on the left, LiveDot + "live" on the right. Token count estimated at chars/4 until real usage events landTuiPromptBox— Mode-aware placeholder text ("Zero is working...", "Plan the next change...", default). Cursor character uses border color for visibilityToolCallRenderer— Completely rewritten: per-tool LABELS (Read, Grep, Bash, Edit...), smartsummarize()with line counts, match counts, +N -M diffs, inlineDiffCardfor edits, animatedink-spinnerwhile runningTranscript— User messages get background + symbol styling. System messages detect 'Error:' prefix for red coloring. Logos only shown at startupLogo— Compact inline "ZERO" badge rather than ASCII art block during chatCommandSuggestions— Labeled "commands" prefix, clearer Tab hinttheme.ts— Now uses custom hex colors (#05080a dark bg, cyan/mint/blue accents) instead of Ink named colors. Full dark theme paletteApp.tsx— UsesuseWindowSizefrom Ink, git branch tracking viaexeca,deriveActiveFile()from tool call args,estimateTokens()rough count, error redactiontests/tui-shell-render.test.ts— InkrenderToStringtests: startup splash content check, working view with messages/commands
Minor observations
- Token estimation —
estimateTokensuses chars/4 with a fixed 200K context window and $0.003/1K rate. Rough placeholder until real usage tracking arrives deriveActiveFile— Parsesm.argsfrom tool calls to findpath/filefields. Args have beenredactZeroString'd by this point, so file paths containing secret-like substrings would be corrupted (extremely unlikely for paths)showLogo—messages.every(m => m.type === 'system')— switches to working view once any non-system message appears. CleanuseWindowSize+ manual resize listener — Both present;useWindowSizeprovidesrowswith the manualprocess.stdout.rowsas fallback. Redundant but harmless- Startup theme — Has its own
theme.tsseparate from the maintuiTheme. Keeps the startup splash self-contained; some color overlap (both use cyan) - No
--connectivityequivalent — Not expected here, just noting the TUI has no health check integration yet
Summary
Redesigns the terminal chat surface into a more mature composable TUI shell.
App.tsxwhile preserving existing slash commands, model selection flow, provider runtime resolution, and debug mode behaviorNotes
This PR is intentionally stacked on
codex/m1-model-selector-uiso review only sees the TUI shell redesign after the model selector slice.Reference from
D:\codings\Opensource\Dwas used only for architecture and UX patterns. No code was copied or translated.Validation
bun run typecheckbun test ./tests --timeout 15000bun run build