Skip to content

test(ui): cover Newline, autoColor, and the spinner (74.7% -> 100%)#271

Merged
saadqbal merged 1 commit into
developfrom
test/coverage-wave2-ui
Jul 14, 2026
Merged

test(ui): cover Newline, autoColor, and the spinner (74.7% -> 100%)#271
saadqbal merged 1 commit into
developfrom
test/coverage-wave2-ui

Conversation

@LukasWodka

@LukasWodka LukasWodka commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Wave-2 coverage for internal/ui: 74.7% → 100%.

  • Newline (was 0%).
  • autoColor: NO_COLOR-set, non-*os.File, and non-terminal *os.File arms.
  • Spinner/run/Stop: static (color-off) one-liner + animated (color-on) goroutine. The animated test sleeps past one 120ms tick to cover run's tick arm, then Stop drains the goroutine before the buffer is read — race-clean under -race.

make ci green.

🤖 Generated with Claude Code

- Newline: the blank-line emitter (was 0%).
- autoColor: NO_COLOR-set, non-*os.File writer, and non-terminal *os.File — all
  three "plain output" arms.
- Spinner/run/Stop: both the static (color-off) one-liner and the animated
  (color-on) goroutine. The animated test sleeps past one 120ms tick to cover
  run's tick arm (frame advance + redraw), then Stop drains the goroutine before
  the buffer is read — race-clean under -race.

Package hits 100%.

make ci green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@LukasWodka LukasWodka self-assigned this Jul 14, 2026
@LukasWodka

Copy link
Copy Markdown
Contributor Author

bugbot run

@LukasWodka

Copy link
Copy Markdown
Contributor Author

👋 Heads-up — Code review queue is at 32 / 30

Above the WIP limit. The team convention is to review existing PRs before opening new work.

Open PRs currently in Code review (oldest first):

Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.)

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 3e2d7d4. Configure here.

@saadqbal saadqbal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM 👍 autoColor (NO_COLOR / non-file / non-TTY arms) and both spinner modes check out — static path's nil stop makes Stop() an idempotent no-op, and the animated Stop() drains via <-done before the buffer read, so it's clean under -race. Nice to get ui to 100%.

@saadqbal
saadqbal merged commit 768b704 into develop Jul 14, 2026
23 checks passed
@saadqbal
saadqbal deleted the test/coverage-wave2-ui branch July 14, 2026 10:43
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.

2 participants