Skip to content

feat(prompts): plain line output for spinner and progress in CI - #632

Open
webywz wants to merge 2 commits into
bombshell-dev:mainfrom
webywz:feat/ci-plain-spinner-progress
Open

webywz wants to merge 2 commits into
bombshell-dev:mainfrom
webywz:feat/ci-plain-spinner-progress

Conversation

@webywz

@webywz webywz commented Oct 30, 2026

Copy link
Copy Markdown

Summary

Fixes #629.

When CI=true (or the output stream is not a TTY), spinner() and progress() previously still called block() (cursor hide/show) and emitted spinner frames / progress-bar redraws with erase sequences. CI log viewers then showed noise like ^[?25l and ^[1G^[J.

This change adds a shared isPlainLiveOutput(output) helper (CI=true or !isTTY) and uses it in both components:

  • spinner: plain start line → optional message() lines → final ◇ / ■ / ▲ status line. No block(), frames, or cursor/erase codes.
  • progress: same plain path; the bar is omitted; advance() without a new message is silent (avoids bar-only spam).
  • New option plainMessageUpdates (default true) to skip mid-run message() lines in plain mode when desired.
  • Interactive TTY behavior is unchanged.

Test plan

  • vitest for spinner / progress / accessible / new plain suites (123 tests)
  • Explicit assertions: no cursor/erase codes, no frames, no bar glyphs under CI=true and non-TTY
  • Snapshot updates for existing isCI = true cases

When CI=true or stdout is not a TTY, spinner() and progress() now print
append-only plain lines: no cursor hide/show, no spinner frames, and no
progress bar redraws. TTY interactive behavior is unchanged.

Fixes bombshell-dev#629
@changeset-bot

changeset-bot Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7e09787

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

This PR includes changesets to release 1 package
Name Type
@clack/prompts 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

@dreyfus92

Copy link
Copy Markdown
Member

hey @webywz please tell your agent to respect the PR's template.

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.

[Request] Plain line output for spinner and progress in CI

2 participants