Skip to content

th code: distinct user-turn blocks + animated working avatar - #771

Merged
brentrager merged 2 commits into
mainfrom
th-code-user-blocks-avatar
Oct 6, 2026
Merged

brentrager merged 2 commits into
mainfrom
th-code-user-blocks-avatar

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

Problem

In th code the only difference between your turns and Big Smooth's was a You: vs Smooth: label, and nothing on screen showed he was working while a turn ran.

Solution

  • User turns are a block: coral ▌ accent bar, ❯ prompt glyph on the first row (continuations aligned under it), bold default-foreground text. The shape carries the difference, so it survives NO_COLOR, and the default foreground keeps it readable on light and dark terminals. A blank line still separates it from the reply.
  • Tool-call lines are subordinate: indented two columns and dim, with output rows indented under them. The answer prose is untouched.
  • Working avatar (crates/smooth-code/src/avatar.rs): a 3-row mini of the splash avatar (th-a67752 legend) above the status bar, with thinking / running <tool> / writing and an elapsed timer. The glint sweeps across the shades, 4 frames at 5 fps, with the frame taken from the turn clock. It only takes rows from the spacer/preview (never the input box or checklist), and is dropped whole when there is no room. Hidden when idle. Off under NO_COLOR and TH_REDUCED_MOTION=1 / SMOOTH_REDUCED_MOTION=1.
  • AppState::sync_turn_clock runs once per tick, so every place that flips thinking keeps the clock right without being touched.

Verification

  • cargo test -p smooai-smooth-code: 381 passed. New tests cover the user block's shape and styles, the dim and indented tool lines, avatar start/stop, the turn clock, NO_COLOR/reduced-motion gating, frame timing, activity, layout (the avatar never moves the input or status), and a full TestBackend render: the avatar is visible during a turn and gone after, with the composer on the same row.
  • Clippy on the crate adds no non-test warnings.

Pearls th-4a7236 (A), th-e93d9e (B).

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8709a88

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@smooai/smooth Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

brentrager and others added 2 commits October 6, 2026 13:31
…h avatar

The user could not tell their own turns from the agent's: the only difference
was a 'You:' vs 'Smooth:' label. User turns are now a block (coral bar, ❯
glyph, bold text) that reads by shape under NO_COLOR, and tool-call lines are
indented and dim so the answer stands out.

While a turn runs, a 3-row animated Big Smooth from the splash art sits above
the status bar with the activity and elapsed time. It only borrows preview
rows, hides when idle, runs at 5 fps off the turn clock, and is off under
NO_COLOR or TH_REDUCED_MOTION / SMOOTH_REDUCED_MOTION.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…asured 12ms)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@brentrager
brentrager force-pushed the th-code-user-blocks-avatar branch from 94406f4 to 8709a88 Compare October 6, 2026 17:31
@brentrager
brentrager merged commit 6f1170a into main Oct 6, 2026
5 checks passed
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