Skip to content

[eas-cli] Stop spinners from repeating their text after a terminal resize - #4473

Closed
szdziedzic wants to merge 2 commits into
mainfrom
t3code/fix-simulator-log-resize-loop
Closed

szdziedzic wants to merge 2 commits into
mainfrom
t3code/fix-simulator-log-resize-loop

Conversation

@szdziedzic

Copy link
Copy Markdown
Contributor

Why

When you resize the terminal during eas simulator, the "Simulator session active" spinner can print its text again on every frame. The screen fills with copies of the line.

How

eas-cli uses ora 5.1.0. It counts how many terminal lines the spinner text wraps to only when the text changes. It uses that count to clear the previous frame. The simulator spinner text is long and wraps. When the terminal gets narrower, the text wraps to more lines, but the count stays the same. So each frame clears too few lines and leaves one copy behind.

The ora() wrapper in src/ora.ts now recalculates the line count before each frame. It sets the text to its current value, because the text setter does the recalculation. All eas-cli spinners get the fix.

Right after a resize, at most one stale line can stay behind, because the frame on screen was drawn at the old width. After that, the spinner clears correctly.

Test Plan

  • Added src/__tests__/ora-test.ts. It simulates a TTY that gets narrower from 200 to 40 columns and checks that each frame clears all 3 wrapped lines. The test fails without the fix (1 line cleared) and passes with it.
  • yarn typecheck, yarn lint, and yarn fmt:check pass.
  • Manual: run eas simulator, then make the terminal window narrower. The spinner line must not repeat.

🤖 Generated with Claude Code

szdziedzic and others added 2 commits September 24, 2026 23:49
…size

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

@szdziedzic szdziedzic closed this Sep 24, 2026
@codecov

codecov Bot commented Sep 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.46%. Comparing base (5198a2c) to head (b10d44f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4473      +/-   ##
==========================================
+ Coverage   72.43%   72.46%   +0.04%     
==========================================
  Files         975      975              
  Lines       46620    46625       +5     
  Branches    10072    10072              
==========================================
+ Hits        33763    33783      +20     
+ Misses      11857    11842      -15     
  Partials     1000     1000              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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