Skip to content

FFT-TUI - Terminal UI Craft Specialist

FFT-TUI is the deep terminal UI craft specialist for FlowForge. It masters the full Charm.sh stack (BubbleTea, lipgloss, bubbles, glamour, huh, log) under the Elm Model-View-Update pattern, enforcing Go-specific TUI idioms — context propagation, channel discipline, race-free state updates — alongside CVD-safe color palettes, co-render accessibility, and 60 fps render budgets. FlowForge is the only developer-tools ecosystem shipping a dedicated TUI-craft specialist; fft-tui is the engineering depth behind that claim.

  • Elm MVU discipline: Model is world; Update is pure (Model, Msg) → (Model, Cmd); View is referentially transparent — all state changes visible in Update, testable without mocks
  • BubbleTea v1 and v2: vanity import path, Cursed Renderer, declarative View struct, mode-2026 synchronized output, v1→v2 migration patterns
  • lipgloss styling: color-profile detection via colorprofile.Detect, Complete() for cross-profile rendering, AdaptiveColor, layout primitives (JoinHorizontal, JoinVertical), cell-accurate width counting
  • bubbles component composition: textinput, textarea, viewport, list, table, spinner, progress, filepicker, help, key — fan-in/fan-out composability pattern
  • huh forms: the only Charm lib with first-class screen-reader support; BubbleTea embedding; field validation; dynamic field patterns
  • Accessibility (Principle 8 co-render rule): color + glyph + label on every status surface; Bang Wong / Paul Tol CVD-safe palettes; NO_COLOR / FORCE_COLOR / CLICOLOR honoring; WCAG 2.1 AAA 7:1 contrast targets
  • teatest golden-file testing: TestModel, WaitFor, RequireEqualOutput; color-profile pinning in TestMain; goleak goroutine leak detection
  • Goroutine discipline: context.Context propagation through Cmd closures; single-shot-per-Cmd channel pattern; goroutine-leak prevention with goleak.VerifyTestMain
  • Responsive design: terminal width tiers (Tiny < 40 / Narrow 40-59 / Standard 60-79 / Wide 80-119 / Extra-wide 120+); first-render-before-WindowSizeMsg safety; SIGWINCH handling
  • charmbracelet/v2 migration: Cursed Renderer, declarative View, deprecated API removal, mode-2026 support
  • Building or extending any BubbleTea terminal UI — component architecture, state machines, animation, keyboard navigation
  • Auditing an existing TUI for goroutine leaks, fmt.Println renderer-corruption, missing WindowSizeMsg safety, or accessibility violations
  • Migrating from BubbleTea v1 to v2 — vanity import paths, Cursed Renderer adoption, declarative View struct
  • Writing teatest golden-file tests for TUI components with stable cross-CI color-profile behavior
"Build a BubbleTea multi-pane dashboard with a viewport, spinner, and keyboard help component using the Elm MVU pattern with teatest golden-file tests."
"Audit this TUI component for goroutine leaks, fmt.Println renderer-corruption, and first-render WindowSizeMsg safety — produce findings with file:line citations."
"Migrate this BubbleTea v1 program to v2 — update the vanity import path, adopt the declarative View struct, and replace WithAltScreen() with the view.AltScreen field."