Skip to content

Keep spinner frames out of redirected output - #278

Open
danielgaskins wants to merge 2 commits into
firecrawl:mainfrom
danielgaskins:fix/non-tty-spinner
Open

danielgaskins wants to merge 2 commits into
firecrawl:mainfrom
danielgaskins:fix/non-tty-spinner

Conversation

@danielgaskins

@danielgaskins danielgaskins commented Sep 23, 2026 •

Copy link
Copy Markdown

What changed

  • animate spinners only when stderr is attached to a terminal
  • keep the final success or failure line in redirected output
  • cover interactive and redirected behavior with spinner tests

Why

When stderr is redirected, writing a spinner frame every 80 ms creates a large stream of terminal control codes. This keeps the interactive experience while leaving redirected logs with one useful status line.

Testing

  • pnpm run build
  • pnpm run type-check
  • pnpm test (622 tests)

Addresses the non-TTY spinner portion of #102.


Summary by cubic

Keeps spinner animation frames out of redirected stderr so redirected logs contain only the final success or failure line instead of terminal control codes every 80 ms. Animation is gated on process.stderr.isTTY, and tests cover interactive, redirected success, redirected failure, and fallback to the latest message when no final message is provided. Addresses the non-TTY spinner portion of #102.

Written for commit 75ad066. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files

Shadow auto-approve: would not auto-approve because issues were found.

Fix all with cubic | Re-trigger cubic

Comment thread src/__tests__/utils/spinner.test.ts
Comment thread src/__tests__/utils/spinner.test.ts
@danielgaskins

Copy link
Copy Markdown
Author

I added tests for both points. The interactive test now checks that no more frames are written after success. The redirected test checks that succeed() uses the latest update when no final message is passed. The full suite, type check, and formatting check pass.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 1 file (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Shadow auto-approve: would auto-approve. Gates spinner animation on stderr being a TTY so redirected output emits one final status line instead of repeated control codes, with tests covering interactive and redirected paths.

Re-trigger cubic

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