Files
codewhale/crates
Hunter Bown a328344691 feat(tui): restore 🐳🐋 cycling status indicator next to the effort chip
The whale was a 12-frame animated indicator (`🐳, 🐳., 🐳.., 🐳..., 🐳..,
🐳., 🐋, 🐋., 🐋.., 🐋..., 🐋.., 🐋.`) that shipped from v0.3.5 onward
and rendered in the top-right status cluster of the header. Commit
`1a04659a9` ("smoother TUI streaming") quietly swapped it for a 6-frame
geometric ring (`◍ ◉ ◌ ◌ ◉ ◍`); `f4dbf828c` later deleted the function
entirely. Nothing in the CHANGELOG mentioned either step, and the
absence has been on the maintainer's mind ever since.

This commit restores the whale as a configurable status indicator that
sits immediately before the reasoning-effort chip ("next to max"):

- `widgets/header.rs` gains a public `header_status_indicator_frame`
  helper and a `HeaderData::with_status_indicator(Option<&'static str>)`
  builder. The frame computation is pure (keyed off `turn_started_at`
  and the mode string) so the widget itself stays a stateless render.
- The chip renders as the first item in the status cluster, before
  `provider` / `effort` / `Live` / context. Idle state shows a steady
  🐳; an active turn cycles frames every 420 ms (same cadence as the
  original v0.3.5 implementation).

New setting `status_indicator`:

- `whale` (default) — restored historical cycling.
- `dots` — the 6-frame geometric replacement, for users who came in
  during the dots era and prefer it.
- `off` — hide the chip entirely.

Settable via `/config status_indicator <whale|dots|off>`, persisted in
`settings.toml`, mirrored in the typed `config_ui::SettingsSection`
with a new `StatusIndicatorValue` enum so the web/JSON config surface
sees it too.

Default-to-whale rationale: this restores the historical behaviour for
every user, including those who never realized the whale was gone, and
keeps the "🐳 in /config" delight that the project's name has always
implied.

Regression-guarded by seven new tests in `widgets/header.rs::tests`
covering idle frame, frame advancement, dots variant, off variant
including aliases, unknown-mode fallback to whale, render placement
before the effort label, and confirmation that `off` hides the chip
without disturbing the effort chip layout.
2026-05-11 18:59:52 -05:00
..
2026-05-10 20:40:20 -05:00
2026-05-10 20:40:20 -05:00
2026-05-10 20:40:20 -05:00
2026-05-10 20:40:20 -05:00
2026-05-10 20:40:20 -05:00
2026-05-10 20:40:20 -05:00
2026-05-10 20:40:20 -05:00