feat(tui): refresh the TUI and sync upstream correctness fixes - #45
Conversation
Accumulated working state: the in-flight TUI work plus an upstream sync and follow-up fixes found while reviewing it. TUI - Draw the welcome cube with background-filled cells. A font paints only its glyph box, so in terminals that add line spacing two stacked rows of block glyphs showed a seam; filling the cell background closes it. All three render paths (header, web ready banner, rainbow easter egg) share one painter. - Add a wink: roughly once a minute a blink lands as a wink instead, one eye following the live gaze. - Make the cube's face the live activity indicator. The header lives in the transcript and scrolls away once work starts, so the face now drives the activity line and follows what the agent is doing. - Group configure-once options under /settings and keep them out of completion; they still work when typed. /settings gains Secondary model. - Cap retry status lines so a large provider error body cannot flood the activity line. Subagents - Route subagents at any configured model, not just the primary and secondary roles, advertising the routable set with capability flags. - profile.model accepts the same role keywords, superseding model_preference without breaking existing agent files. - Drop Agent/AgentSwarm from the coder profile so a subagent cannot spawn its own subagents. Engine - Announce swarm mode through the context-injection layer instead of pushing and popping reminders directly. - Build provider SDK clients with maxRetries: 0 so cancelling during a retry backoff takes effect immediately. - Send an interrupted reasoning-only assistant message with explicit empty content so strict gateways stop rejecting the whole session. - Degrade an idle-session steer to a turn launch, matching v1. - Report every gap an independent completion review finds, and collect long Bash output in tail mode without quadratic recompaction. - Hide internal agent profiles from delegatable subagent listings. Tests and docs - Pin prompt-cache prefix stability: append-extension across steps, turns and a swarm-mode toggle, plus an opt-in live provider cache-hit check. - Make the provider catalog tests read an injected cache rather than the developer's real on-disk snapshot. - Regenerate the config and state manifests; document model routing and the settings grouping in both languages.
|
Important Review skippedToo many files! This PR contains 193 files, which is 93 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (193)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Related Issue
No linked issue — the problems are described below.
Problem
Several unrelated problems had accumulated in the working tree, plus a set of upstream fixes we had not yet taken.
The welcome cube was visibly broken. Two stacked rows of block glyphs showed a horizontal seam. A font paints only its own glyph box, and terminals that add line spacing (Terminal.app among them) leave a gap between rows — Claude Code's face does not show this because a terminal fills a cell's background rect edge to edge regardless of font metrics. The face also only ever appears before the first prompt, since the welcome header lives in the transcript and scrolls away as soon as work starts.
Subagent model selection was two overlapping mechanisms.
model_preferenceoffers exactly two roles, whileprofile.modeltakes any alias, and both fed the same binding path. Neither could send a task to a model chosen for its capabilities. Separately, thecoderprofile carriedAgent/AgentSwarm— andcoderis what subagents are spawned as, so a subagent could spawn its own subagents and make fan-out recursive.Cancellation was unresponsive during retries. Provider SDK clients defaulted to
maxRetries: 2with a backoff sleep that never observes the turn's abort signal, so Ctrl+C during a 429 or 5xx only took effect after the sleep elapsed, and those hidden attempts double-counted the engine's own retry budget.A turn interrupted mid-reasoning bricked the session. The assistant message left holding only a reasoning fragment serialised with neither
contentnortool_calls, and strict Chat Completions gateways then rejected every later request in that session.Prompt-cache prefix stability was unverified. Provider caching only pays off when each request extends the previous one without rewriting earlier history, and nothing checked it — a regression would have surfaced only as cost and latency drift.
What changed
TUI. Solid logo cells now set the cell background, which closes the seam; all three render paths (header,
echadron webready banner, rainbow easter egg) share one painter. Every cell is a full block so nothing renders shorter than its neighbours — the previous half-block edges made the silhouette look clipped once the body was filled. The cube gained a wink, and its face now drives the activity line, following the streaming phase, tool execution, pending approvals and retries. Configure-once options (/theme,/editor,/features,/secondary_model,/reload-tui) are grouped under/settingsand kept out of completion; they still work when typed, and/settingsgained a Secondary model entry so nothing became unreachable.Subagents.
AgentandAgentSwarmaccept any configured[models]entry id formodelin addition toprimary/secondary, and the tool description lists what the session has configured with resolved capability flags.profile.modelaccepts the same role keywords, so it fully supersedesmodel_preferencewhile existing agent files keep working unchanged.coderno longer carries the delegation tools.Engine. Swarm mode is announced through the context-injection layer rather than pushing and popping reminders, which removes a context mutation from a mode toggle. Provider clients are built with
maxRetries: 0. A reasoning-only assistant message is sent with explicit empty content. An idle-session steer degrades to launching a turn and syncs title/lastPrompt, matching v1 and closing a divergence the parity suite had pinned as intentional. Completion reviews report every gap they find rather than collapsing more than eight into a generic failure, and tail-mode Bash output compacts on a slack threshold instead of on every chunk, which was quadratic.Tests. Prefix stability is now pinned across the steps of a tool-calling turn, consecutive turns, and a swarm-mode toggle, with an opt-in live check that proves a real provider cache hit. The provider catalog tests read an injected cache rather than the developer's real on-disk snapshot, which is why they passed in CI and failed locally.
Checklist
pnpm changeset, or this PR needs no changeset.