test(ui): cover Newline, autoColor, and the spinner (74.7% -> 100%)#271
Conversation
- 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>
|
bugbot run |
|
👋 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.) |
There was a problem hiding this comment.
✅ 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
left a comment
There was a problem hiding this comment.
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%.
Wave-2 coverage for
internal/ui: 74.7% → 100%.Newline(was 0%).autoColor: NO_COLOR-set, non-*os.File, and non-terminal*os.Filearms.Spinner/run/Stop: static (color-off) one-liner + animated (color-on) goroutine. The animated test sleeps past one 120ms tick to coverrun's tick arm, thenStopdrains the goroutine before the buffer is read — race-clean under-race.make cigreen.🤖 Generated with Claude Code