test(ui): color-matrix for the home-screen render surface#256
Merged
Conversation
The ui color-matrix harness from the coverage audit. ui was the lowest own-coverage package (62%) — the merged profile hid it because internal/cli tests hit the render helpers transitively while asserting only plain substrings, never the glyph or the color. Now pinned in BOTH color modes: - CheckLine / CrossLine / WarnLine / Errorf / MenuRow / Infof / PromptHeader / PromptHint (all 0% own): glyph + text render, and ANSI escapes appear iff color is on. - Para multi-line indent branch (0% own). ui own-coverage 62% -> 74.7%. No production changes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
bugbot run |
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 11ab111. Configure here.
saadqbal
approved these changes
Jul 14, 2026
saadqbal
left a comment
Collaborator
There was a problem hiding this comment.
LGTM 👍 Good call testing the glyph + the color escapes directly rather than the plain substrings the cli-layer tests settle for — verified every case paints with ≥1 attr so the colored-mode ANSI assertion holds, incl. PromptHeader/PromptHint.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ui color-matrix harness from the coverage audit.
uiwas the lowest own-coverage package (62%) — the merged profile hid it becauseinternal/clitests hit the render helpers transitively while asserting only plain substrings, never the glyph or the color. Now pinned in both color modes:CheckLine/CrossLine/WarnLine/Errorf/MenuRow/Infof/PromptHeader/PromptHint(all 0% own): glyph + text render, and ANSI escapes appear iff color is on.Paramulti-line indent branch (0% own).uiown-coverage 62% → 74.7%. No production changes.🤖 Generated with Claude Code
Note
Low Risk
Test-only additions with no runtime or behavioral changes to the UI package.
Overview
Adds
internal/ui/color_matrix_test.goto raise own coverage forPrinterhelpers that were only exercised indirectly frominternal/clitests (glyphs and ANSI were never asserted).TestPrinter_ColorMatrixtable-testsCheckLine,CrossLine,WarnLine,Errorf,MenuRow,Infof,PromptHeader, andPromptHintin plain and colored modes: required glyphs/text must appear, and ANSI escapes (via sharedescfromui_test.go) must appear only whenWithColor(true).TestPrinter_ParaMultilinelocks the multi-lineParabranch so each line gets a two-space indent.No production code changes; tests only.
Reviewed by Cursor Bugbot for commit 11ab111. Bugbot is set up for automated code reviews on this repo. Configure here.