Skip to content

feat(ui): turn-scoped thinking indicator with live reasoning readout#11

Merged
lavindeep merged 1 commit into
ui-reworkfrom
feat/ui-thinking-indicator
Jun 28, 2026
Merged

feat(ui): turn-scoped thinking indicator with live reasoning readout#11
lavindeep merged 1 commit into
ui-reworkfrom
feat/ui-thinking-indicator

Conversation

@lavindeep

Copy link
Copy Markdown
Owner

Branch 5/9 — the flagship of the UI v2 rework. Surfaces what a model turn is doing (the rework was motivated by cloud reasoning models running ~80 min invisible).

What

On submit the app echoes ❯ <message>, then a live frontier line renders as the last transcript row:
✈·· cruising… 38s · 1.8k reasoning — plane glides, phrase advances through flight phases, timer ticks, reasoning-token estimate climbs while the model thinks. Completed tool calls/responses append above it, so it moves down as work finishes (and the auto-following pane keeps it visible). At turn end it freezes to a permanent record: ✓ done · 38s · 1.8k reasoning · 2.4k total.

  • Continuous across the whole turn — started once at the first model call, never reset per tool call (unlike v0.10.1's per-call spinner); only turn_finished freezes it.
  • Reasoning = chars/4 estimate (no tokenizer); done-line total = exact summed output_tokens from turn stats; elapsed from the runtime's authoritative stats.elapsed_s.
  • Gated on [ui] show_reasoning_summary (default on; off → plane/phrase/timer only) — previously dead config, now consumed at both AppUI construction sites.
  • Animation via Application(refresh_interval=0.1); the indicator render bypasses the width cache while active. A dangling indicator from an errored turn is discarded at the next turn's start so it never poisons the following timer (full turn-failure UX → branch 6).

Verification

  • Gate green: ruff + mypy --strict, 1357 passed.
  • Reviewed by two independent reviewers (Opus skeptical + Codex). The continuity guarantee is proven red-first (break begin_response to restart, or end_response to clear → continuity tests red-fail). The cross-turn-poisoning fix (Opus catch) is also red-first tested.
  • Default TerminalUI REPL byte-identical; stream_thinking stays a no-op there. DESIGN §31.14 in the same commit.
  • Live gate pending (maintainer-run): the animation + reasoning-climb need a real reasoning model — run next.

Surface what a model turn is doing — the feature the full-screen rework
was for. On submit the app echoes the user's message, then a live
'frontier' line renders as the last transcript row:

  ✈··  cruising… 38s · 1.8k reasoning

The plane glides, the phrase advances through flight phases, the timer
ticks, and the reasoning-token estimate climbs while the model is
thinking. Completed tool calls and responses append above the line, so it
moves down the transcript as work finishes, and the auto-following pane
keeps it in view. At turn end it freezes to a permanent record:

  ✓ done · 38s · 1.8k reasoning · 2.4k total

The timer and phrase span the WHOLE turn — started once at the first
model call and never reset per tool call (unlike the old per-call
spinner). Only turn_finished freezes it. The reasoning figure is a
chars/4 estimate (no tokenizer); the done line's total is the exact
summed output-token count from the turn stats. The readout is gated on
[ui] show_reasoning_summary (default on; off → plane/phrase/timer only),
which until now was dead config. Animation rides the Application's
refresh_interval; the indicator render bypasses the width cache while
active. A dangling indicator from an errored turn is discarded at the
next turn's start so it never poisons the following timer (full
turn-failure UX is a later branch).

Only AppUI gains this; the default TerminalUI REPL is unchanged.
DESIGN.md §31.14 added.
@lavindeep lavindeep merged commit 688ae30 into ui-rework Jun 28, 2026
2 checks passed
@lavindeep lavindeep deleted the feat/ui-thinking-indicator branch June 28, 2026 06:53
lavindeep added a commit that referenced this pull request Jul 2, 2026
feat(ui): turn-scoped thinking indicator with live reasoning readout
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