Skip to content

feat(tui): configurable loading spinner, default aesthetic - #126

Closed
quickbeard wants to merge 4 commits into
mainfrom
configurable-spinner
Closed

quickbeard wants to merge 4 commits into
mainfrom
configurable-spinner

Conversation

@quickbeard

@quickbeard quickbeard commented Jul 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

Replaces the TUI's braille-dots thinking/loading spinner with a 3-segment filling bar (▰▰▱, 230ms — cli-spinners' aesthetic fill cycle narrowed from 7 segments to 3) and makes the spinner user-configurable via a new optional spinner key in tui.json.

  • Covers every use of the shared Spinner component: Thinking header, running tool/task/bash rows, dialogs, startup screen — plus the codev run subagent inspector.
  • "spinner": "<name>" accepts any cli-spinners preset name (e.g. "dots" restores the old look). Unknown names fall back to the default bar at resolve time instead of failing schema validation, since the host drops the entire tui.json on a schema failure.
  • The config resolves to a {frames, interval} spec (fork-only packages/tui/src/config/spinner.ts): known cli-spinners names map to their preset spec, everything else to the fork-owned 3-segment default — which is why the default doesn't need to be a cli-spinners preset. cli-spinners@3.4.0 (the version already resolved transitively via opentui-spinner) becomes a direct dep of packages/tui.
  • The reduced-motion ⋯ fallback is unchanged.
  • DIVERGENCES.md rows added for all five touched upstream files; CHANGELOG Unreleased entry added.

Verification

  • bun typecheck clean in packages/tui and packages/opencode; packages/client check:generated is a no-op (TuiConfig is not part of the public HttpApi).
  • New fork-only test packages/tui/test/spinner-config.test.tsx (default spec, preset passthrough, fallback, schema); existing tui config/dialog suites and opencode run-CLI suites pass.
  • Live TUI in tmux: default shows the animated ▰▰▱ bar on a running bash row; {"spinner": "dots"} restores braille; {"spinner": "bogus"} falls back to the bar with the rest of the config still applied.

🤖 Generated with Claude Code

quickbeard and others added 4 commits July 26, 2026 23:26
The thinking/loading spinner (Thinking header, running tool/task/bash
rows, dialogs, startup screen, and the run-CLI subagent inspector)
changes from braille dots to the cli-spinners "aesthetic" bar. A new
optional "spinner" key in tui.json accepts any cli-spinners preset
name; unknown names fall back to aesthetic without invalidating the
config. Reduced-motion behavior is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The default is now a fork-owned {frames, interval} spec (aesthetic's
fill cycle at 3 segments instead of 7); the spinner config resolves to
a spec rather than a preset name so the default doesn't have to be a
cli-spinners preset. Named presets in tui.json behave as before.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The 3-segment bar now cycles empty -> full (4 frames at 160ms, the
same 640ms full cycle as cli-spinners' aesthetic) instead of holding
the first segment filled at 80ms.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@quickbeard quickbeard closed this Jul 29, 2026
@quickbeard
quickbeard deleted the configurable-spinner branch July 29, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant