Skip to content

feat(cli): show working animation in preview - #193

Merged
codeaholicguy merged 3 commits into
mainfrom
feature-preview-typing-indicator
Aug 21, 2026
Merged

codeaholicguy merged 3 commits into
mainfrom
feature-preview-typing-indicator

Conversation

@codeaholicguy

Copy link
Copy Markdown
Owner

Motivation

The console preview had no live signal while its selected agent was running, so an unchanged poll-driven conversation could look stalled.

Design

Implements approved Option C as a dedicated bottom-row leaf: a fixed-width braille spinner at 160 ms followed by lowercase working.

The five binding decisions are preserved:

  1. Copy is working.
  2. The row is reclaimed for conversation content while inactive.
  3. Braille cadence is 160 ms; reduced-motion configuration remains a future enhancement.
  4. Unicode is first-class, with |/-\\ selected only for TERM=dumb; an explicit ASCII capability is deferred.
  5. Activity follows the last observed status and continues while input pauses polling.

The indicator appears only for the selected interactive agent in AgentStatus.RUNNING. Waiting, idle, unknown, and absent agents render no activity row; pinning does not affect activity semantics.

Performance and correctness

  • The interval and frame state live only in the memoized leaf component.
  • Frame ticks do not rerender the preview parent or reparse Markdown.
  • Activity chrome stays outside conversation rows, row-count compensation, and scroll state.
  • The interval is cleared on status transition and unmount.
  • Tests verify positive-offset scroll stability and no scroll-clamp calls across animation frames.

Validation

  • npm ci
  • npm run build — 6 projects passed
  • npm test — 139 files / 1,937 tests passed across 6 projects
  • npm run lint — 6 projects passed; no errors (existing warnings only)
  • npx nx run-many -t typecheck — all configured targets passed
  • npx tsc --noEmit -p packages/cli/tsconfig.json
  • Focused activity coverage — 100% statements, branches, functions, and lines
  • npx ai-devkit@latest lint --feature preview-typing-indicator

Risks

No known blocking risks. Status remains poll-observed rather than a token-stream freshness guarantee, as designed.

@codeaholicguy
codeaholicguy merged commit 9dced35 into main Aug 21, 2026
7 checks passed
@codeaholicguy
codeaholicguy deleted the feature-preview-typing-indicator branch August 21, 2026 03:58
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