Terminal UI

The Catppuccin TUI and its screens

Status: v1 design. The launch animation in §5 is built and the four screens aren't yet. Elaborates the terminal UI of the mockingbird command, the component named in ARCHITECTURE.md §4 and scoped in ARCHITECTURE.md §15 ("Bubble Tea dashboard: live state, latency waterfall, history browser, dictionary editor"). This doc covers the theme and the screen/feature breakdown that section only names in passing. Owner: bhattacharjeenirjhar26@gmail.com Last updated: 2026-10-03

mockingbird has no GUI app, no menubar icon, no floating HUD — per ARCHITECTURE.md §2, point 2, feedback during dictation itself is audio cues only. The TUI is part of the mockingbird command, written in Go with Bubble Tea and Lip Gloss in apps/cli. It is the only visual part of the entire system: a dashboard, a searchable history browser, a dictionary editor, and a latency waterfall — nothing more, nothing that requires a window manager.

Table of contents

  1. What the TUI is, structurally
  2. Why Catppuccin
  3. Palette & flavors
  4. Semantic color mapping
  5. Screens & what each one controls
  6. Navigation model
  7. What the TUI does not control
  8. Accessibility
  9. Open design decisions

1. What the TUI is, structurally

Per the state ownership map and system architecture diagram: the TUI is part of the Go mockingbird command, a separate, optional process that attaches to the daemon over a Unix socket (NDJSON protocol) for live state, and reads data.db directly, read-only, for history/dictionary browsing (WAL mode makes this safe concurrently with the daemon writing — see DATABASE.md §12). It holds no source of truth of its own beyond tiny local view-state (scroll position, active tab) that doesn't need to survive a restart.

Practically: you can quit the TUI entirely and dictation keeps working unaffected — the daemon never depends on it being open. This is the same "headless-testable core" principle from ARCHITECTURE.md §2 applied to the UI layer specifically.

2. Why Catppuccin

Catppuccin is a community-maintained, open-source pastel palette used across a huge range of terminal tools, editors, and TUIs — soothing rather than harsh, with four flavors covering both light and dark, and ports for essentially every framework mockingbird might touch (terminal color libraries included). Picking it isn't arbitrary:

  • It's consistent with what this project already believes. Per PHILOSOPHY.md, mockingbird exists partly to give back to the open-source community that made it possible — theming the one visual surface in the app with a beloved open-source community palette, rather than a proprietary or one-off custom scheme, is a small but genuine extension of that.
  • A user who lives in a terminal likely already has Catppuccin installed somewhere in their stack (Neovim, tmux, Alacritty, Starship, ...) — reusing it means mockingbird's TUI feels native to that setup instead of clashing with it.
  • It ships both light and dark flavors from one coherent design, which matters for a tool that should work equally well in a light or dark terminal — see §3.

Verify hex values against the canonical palette (the catppuccin/catppuccin project on GitHub) at implementation time — the values in §3 below are transcribed from memory of the well-known palette and should be checked against the source before being hardcoded into a theme file.

3. Palette & flavors

Catppuccin ships four flavors, darkest to lightest: Mocha → Macchiato → Frappé → Latte. Each defines the same set of ~26 named colors, just tuned per flavor — a component styled with the token mauve looks right in every flavor without per-flavor special-casing.

  • Default: Mocha (dark) — matches the primary user (a developer, likely already in a dark terminal, per ARCHITECTURE.md §12's Homebrew-first, developer-focused distribution). ARCHITECTURE.md §16's config-surface gap is where flavor selection (auto light/dark detection vs. a manual settings entry — see DATABASE.md §8) gets resolved; not decided yet.
  • Light terminal users get Latte. Whether this is auto-detected (some terminals expose background luminance; Lip Gloss can query it with HasDarkBackground) or a manual toggle is one of the open decisions in §9.
  • Macchiato/Frappé are available as explicit user choices even though neither is the default — no reason to hide them if settings already stores a flavor key.

Base structural colors (background layering, darkest to lightest surface), Mocha values shown:

TokenMocha hexRole
crust#11111bOutermost background, rarely used directly
mantle#181825App background
base#1e1e2ePrimary surface (panels, main content area)
surface0#313244Raised surface (cards, input fields)
surface1#45475aBorders, dividers
surface2#585b70Stronger borders, inactive icons
overlay0–overlay2#6c7086–#9399b2Placeholder text, disabled state
subtext0/subtext1#a6adc8 / #bac2deSecondary text
text#cdd6f4Primary text

Accent colors (used for semantic meaning, not decoration — see §4), Mocha values:

TokenMocha hex
rosewater#f5e0dc
flamingo#f2cdcd
pink#f5c2e7
mauve#cba6f7
red#f38ba8
maroon#eba0ac
peach#fab387
yellow#f9e2af
green#a6e3a1
teal#94e2d5
sky#89dceb
sapphire#74c7ec
blue#89b4fa
lavender#b4befe

Latte (light flavor) inverts the structural ramp — base becomes a near-white (#eff1f5), text becomes a dark slate (#4c4f69) — with the same 14 accent token names remapped to values with equivalent contrast against a light background. Exact Latte hex values should be pulled from the canonical source rather than this doc when the theme file is implemented.

4. Semantic color mapping

Colors are assigned by role, not hardcoded per-component, so a flavor swap (or a future custom-theme option) only touches one mapping table:

UI roleToken (Mocha)Where it's used
Background layerscrust / mantle / base / surface0-2App chrome, panels, cards — see §3
Primary texttextUtterance text, labels
Secondary/muted textsubtext0, overlay0Timestamps, hints, placeholder text
Brand / focus accentmauveActive tab, focused input border, selection
Successgreen"final text injected" confirmation, healthy child-process status
WarningyellowDegraded state (e.g. LLM down, falling back to raw ASR — see ARCHITECTURE.md §2, point 5)
ErrorredChild process crashed and isn't recovering, DB write failure
InfoskyNeutral status text, tooltips
Hotkey FSM state — IDLEoverlay0 (dim)Dashboard state indicator, see ARCHITECTURE.md §5
Hotkey FSM state — ARMED/TAP_WAITyellowtransitional states
Hotkey FSM state — CAPTURE_PTT/CAPTURE_LOCKredactively recording — deliberately the most attention-grabbing color, since this is "your mic is live"
Hotkey FSM state — FINALIZINGskyprocessing
Latency waterfall — VAD stagetealper-stage bar in the waterfall, see §5
Latency waterfall — ASR stageblue
Latency waterfall — LLM stagemauve
Latency waterfall — Inject stagepink
Diff view — removed (raw→final)red, strikethroughhistory browser's raw-vs-cleaned diff
Diff view — added (raw→final)green

The FSM-state and latency-stage colors are picked to also be usable as shapes/labels in a monochrome terminal (see §8) — the color is reinforcement, never the only signal.

5. Screens & what each one controls

flowchart LR
    D["Dashboard\n(default view)"] <--> H["History browser"]
    H <--> DICT["Dictionary editor"]
    DICT <--> L["Latency waterfall"]
    L <--> D

Four screens, matching ARCHITECTURE.md §15, plus two built around the commands rather than the daemon: the launch animation and the home screen. Neither needs the IPC socket.

Launch animation (built)

  • Plays when mockingbird start runs in a terminal, for as long as the engine's start takes and never less than 1.6s. It redraws the website's hero in half blocks. The pixel bird and the mockingbird wordmark pop in pixel by pixel, background pixels twinkle, one letter scrambles every couple of seconds, a plume leaves the beak, and a voice-level skyline rolls along the bottom. Below the art sit the tagline and a status line showing the engine's latest output.
  • When it ends, the still wordmark and tagline stay in the scrollback, followed by everything the engine printed.
  • The bird needs 25 rows. Shorter terminals get the wordmark alone. Below 60×12, or when output isn't a terminal, start runs with no animation.
  • q, Esc, Enter or Ctrl+C skips it. Skipping stops the animation only. The engine's start still finishes, and its output is printed.
  • The bird uses the Catppuccin Mocha tokens mauve, teal, sky, lavender and blue. The wordmark is a sky gradient and the tagline is yellow. They're written as 24-bit escapes, and Bubble Tea downsamples them for terminals with fewer colors and drops them under NO_COLOR.

Home screen (built)

  • Opens when mockingbird runs with no command in a terminal of at least 40×20. Piped output, TERM=dumb and smaller terminals get the engine's plain usage text, the same as mockingbird --help.
  • The top line says whether the background agent is running. Each state has a symbol and a word as well as a color: ● running in green, ○ stopped or ○ not started yet in yellow, ✕ crashed or ✕ exited in red.
  • When the running agent last reported a permission missing, a red line under the title says ✕ missing Input Monitoring (or whichever), with a yellow one under it: ! allow it in System Settings → Privacy & Security, then restart. These lines wrap rather than cut, so a narrow terminal still shows the permission's name and the next step in full. These are the agent's own grants, read from its latest checks: line in agent.log, not the terminal's, which can differ.
  • When tapping Fn opens something in macOS, a yellow line says so: ! tapping Fn opens Show Emoji & Symbols, so tapping won't dictate.
  • The cursor starts on the command that fixes the first problem: start for an agent that isn't running, restart for a missing permission, fn for a taken Fn key. The list keeps its order, so it reads the same every time.
  • Below it, the engine's commands with their one-line summaries, cut to the terminal's width. The list comes from mockingbird help --json (the COMMANDS list in apps/daemon/src/cli.ts, which also builds --help), so the two can't drift apart. The same call carries mockingbird status --json: {"agent", "missing", "fnAction"}, with missing null until the running agent has reported.
  • ↑/↓ or k/j move, Enter runs the command as if it were typed (so start still plays the launch animation), and q, Esc or Ctrl+C quit. The menu erases itself either way, so the scrollback holds only what the command printed.
  • The selected row is mauve with a ▸ pointer, names are text, summaries subtext0 and the key hints overlay0.
  • An engine without help --json (an older clone) gets the plain usage text.
  • Not built yet (#50): the install ending on this screen, which needs #49 to put the Go command in place first.

Model picker (built)

  • Opens when mockingbird models runs with no other arguments in a terminal of at least 52×16 (apps/cli/models.go). Smaller, piped, or an engine without models --json gets the plain list instead.
  • Two tabs, Cleanup and Transcription, the active one mauve, the other overlay0. Cleanup lists the models Ollama has that write text, best measured first; Transcription lists the Whisper files in ~/.mockingbird/models, largest first, named large-v3-turbo Q8_0 rather than by file. Only installed models are listed: the picker downloads nothing. No eval scores are shown; MODELS.md §7a has them.
  • Each row has the name, the size, ● in use in green and default in subtext0. Each tab's cursor starts on the model in use.
  • ←/→, h/l or Tab switch tabs; ↑/↓ or k/j move; Enter switches to the model under the cursor by running models use <name> or models use speech <file>, which saves it through the agent and restarts it. A busy line in sky says so, and the engine's reply follows in green (or red if it failed); the list then reloads. Enter on the model in use does nothing, and on the default row it sends --default, clearing the choice so a later release's default still applies. q, Esc or Ctrl+C quit, and the picker erases itself.
  • An empty tab says why: Ollama not answering (mockingbird start starts it), or no Whisper file yet (mockingbird models pull).

Guided setup (built)

  • mockingbird setup, in a terminal of at least 80×20, or setup from the home screen. Smaller terminals and piped output get the same steps as text.
  • A checklist, one step at a time, each checked before it moves on:
    1. mockingbird is running. Runs start if it isn't. If the agent still isn't running after that, it says so and points at status and the log rather than trying again by itself.
    2. Input Monitoring, Accessibility, Microphone, each with why it's needed. For the first one the agent reports missing, System Settings opens at its pane. Enter restarts the agent (macOS reads permissions when a program starts) and reads its checks again. A permission still off says to check the switch is on for "mockingbird" or "bun", and for the microphone, that Sound → Input picks the right one.
    3. The Fn key is free. Only when tapping Fn opens something in macOS, which includes a key nobody ever set: status reports it as "the macOS default (usually the emoji picker)", and only an explicit "Do Nothing" counts as free (#31). Before that, a new Mac skipped this step and was told to double-tap. It asks Y/n before running fn, since it changes a system-wide setting, and shows the undo command. Enter or y is yes; it never changes the setting without one. Once freed, the step reads "free for dictation once you log out": the setting reads back as free at once, but macOS keeps the old action until a log out (#31).
    4. A test dictation. Waits up to two minutes for the agent's next dictation in its log and says whether it was typed, heard nothing, or couldn't be typed and why. Enter tries again, s skips.
    5. "All set", with how to dictate from now on. If this run freed Fn, it ends instead on "One more step: log out of your Mac and back in", with what tapping Fn still opens until then. It's the last line so it can't be scrolled past. Before, setup said "All set … double-tap it for hands-free" even though a double tap still opened the emoji picker.
  • Step states are ✓ (green), ▸ (mauve) and · (overlay0), so they read without color. Notes are yellow, what's running is sky.
  • The engine does every step. The Go command calls status --json, start, restart, fn, and two helpers only setup uses: setup open <pane> and setup await-dictation. Nothing in Go writes state.
  • A first install ends here: once install.sh has put the Go command in place, and its output is a terminal, it runs mockingbird setup with the keyboard read from /dev/tty (under curl | bash, stdin is the script). "First" means the agent was never set up (no plist yet), so an update leaves a stopped agent stopped. An update, output to a file (a coding agent's install), or no Go command gets the old "Now run: mockingbird start" ending.
  • When fn fails to change the setting, the Fn step shows all of what it printed. When it works, the step label and the last line carry the log out instead.
  • Not built yet (#54): telling the user to restart the Mac when a permission is on but still not applied, and opening System Settings' Keyboard pane instead of writing the Fn default (expected to apply without a log out). Both need checking on a real Mac first: #54 asks for the first to come from real cases, and the second is untested.

Dashboard (default view)

  • Live hotkey FSM state (ARCHITECTURE.md §5), streamed over the IPC socket, colored per §4.
  • Frontmost app (from the Context Poller's cached lookup) — shows which app a dictation would currently target.
  • Child process health — ffmpeg / whisper-server / llama-server, each as a status dot (green running, yellow restarting, red down) fed by the daemon's supervisor.
  • Most recent utterance, live-updated the instant the "final" IPC event fires (ARCHITECTURE.md §6).
  • This is the only screen driven primarily by the IPC socket rather than direct SQLite reads — it's showing in-memory daemon state (state ownership map) that isn't persisted.

History browser

  • Lists utterance rows, most recent first (idx_utterance_created_at, DATABASE.md §10).
  • Full-text search over final_text via utterance_fts (DATABASE.md §4).
  • Filter by app (app_bundle), backed by idx_utterance_app_bundle.
  • Raw-vs-final diff view per utterance — what ASR produced vs. what the LLM/formatter changed, colored per the diff-view row in §4.
  • Per-utterance timing breakdown (t_vad_ms/t_asr_ms/t_llm_ms/t_inject_ms) — the per-utterance version of the aggregate view in the latency waterfall screen.
  • This screen reads data.db directly, read-only — not through IPC.

Dictionary editor (partly built, #102)

  • Built: mockingbird dictionary in a terminal of at least 64×14 (apps/cli/dictionary.go) shows the dictionary table (DATABASE.md §5) as columns: WORD, HEARD AS, NOTE, USES and ADDED ("by you" or "learned"). Empty cells stay blank. The title counts the words and how many were learned. Smaller terminals, piped output and an engine without dictionary list --json get the plain list.
  • Sorted by uses first, the order the cleanup prompt reads them in, so the top is what dictation leans on. s cycles uses, A–Z and newest.
  • The word is never cut. HEARD AS takes its longest entry, up to 16 columns; NOTE takes the rest and is cut with …. A list longer than the window scrolls with the cursor and says how many rows are above or below.
  • Learned rows are subtext0, dimmer than ones you added (text), and say "learned", so they read without color too. The selected row is mauve with a ▸.
  • / filters as you type, on the word, what it's heard as and the note; Enter keeps the filter, Esc clears it. a takes an entry the way dictionary add does (word, heard => word, word (note)); d asks remove <word>? y/n. Both run the engine's dictionary add/remove, which ask the daemon to write over the socket; the reply shows in green, or red when the agent isn't running, and the table reloads. q, Esc or Ctrl+C quit.
  • The screen reads through the engine's dictionary list --json, which opens data.db read-only, and every write goes to the daemon (IPC), preserving the single-writer rule in DATABASE.md §1. The TUI never opens a write transaction against data.db directly.
  • Not built yet: editing a row in place (changing a word's heard-as or note without removing and re-adding it).

Latency waterfall

  • Aggregate, historical view of per-stage timings across utterances — the "is dictation feeling slow lately" screen.
  • One horizontal bar per utterance (or a rolling average), stacked/colored by stage per §4: VAD (teal) → ASR (blue) → LLM (mauve, or visibly absent when llm_skipped = 1, see DATABASE.md §3) → Inject (pink).
  • Exists specifically so a regression is visible without leaving the terminal — same motivation as the bench/ harness attaching a latency/WER report to every release (ARCHITECTURE.md §14), just live instead of per-release.

6. Navigation model

Not finalized — proposed defaults, consistent with typical Bubble Tea terminal-app conventions, to be confirmed once the TUI is actually built:

  • Tab / Shift+Tab or number keys (1–4) to switch screens.
  • Arrow keys / j/k to move selection within a list (history, dictionary).
  • / to jump to search (history browser).
  • Esc to back out of a focused input without discarding the underlying screen.
  • q or Ctrl+C to quit the TUI process (never affects the daemon — see §7).

7. What the TUI does not control

Worth stating explicitly, since it's easy to assume a dashboard controls what it displays:

  • It does not start, stop, or configure dictation capture itself beyond whatever ends up in the (not yet designed) settings surface — the hotkey FSM runs regardless of whether the TUI is open.
  • It cannot directly write to data.db except by asking the daemon to do so over IPC (see the dictionary editor note in §5) — this isn't a permissions restriction, it's the architectural rule in DATABASE.md §1 and ARCHITECTURE.md §8: the daemon is the only writer, full stop.
  • Closing the TUI does not stop dictation. There's no "the app" to quit in the way closing a GUI app would imply — the daemon is the app; the TUI is a window into it.

8. Accessibility

Ties directly to the accessibility belief in PHILOSOPHY.md §2:

  • Color is never the only signal. Every state in §4 (FSM state, process health, diff view) is paired with text or a distinct symbol, so the TUI is fully legible over a monochrome SSH session or to a color-blind user.
  • Catppuccin's flavors are contrast-checked by the palette's own maintainers for both light and dark use — inheriting the palette also inherits that work, rather than mockingbird needing to re-derive accessible contrast ratios from scratch.
  • No feature requires a mouse. Terminal UIs are keyboard-first by construction; §6 should stay that way even once finalized.

9. Open design decisions

  • Flavor selection mechanism — auto-detect vs. manual settings entry; see §3.
  • Exact keybindings — §6 is a proposal.
  • Settings screen — model choice, hotkey rebinding, and theme flavor all need a home; whether that's a fifth TUI screen or a separate mockingbird config CLI is the same open question named in ARCHITECTURE.md §16 ("config surface"), not yet resolved here either.
  • Custom themes beyond the four Catppuccin flavors — not planned for v1; if requested later, the semantic mapping in §4 is what would need to become user-overridable, not the component code itself.

This page is docs/TUI.md in the mockingbird repo. Edit it on GitHub