test(overlay): add coverage for overlay rendering - #71
Merged
Conversation
Comment on lines
+136
to
+138
| if !strings.Contains(lines[1], "░") { | ||
| t.Errorf("second line does not contain shadow character: %q", lines[1]) | ||
| } |
There was a problem hiding this comment.
This non-blocking test only checks whether the second row contains a shadow rune, not its column or width, and it does not assert the final row. A shifted or wider shadow can therefore change the rendered overlay while this test still passes, reducing the value of the new regression coverage. Assert the ANSI-stripped complete output, or explicitly check each shadow row and rune position.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Artifacts
- A non-destructive script copies the repository to a temporary directory, runs the baseline test, then runs vertical-extent, horizontal-offset, and width mutants; it shows which broken geometries the existing test accepts.
- Captured output from executing the focused mutation script shows baseline success and that left-offset and wider-shadow mutants still pass, confirming the coverage gap.
Contributor
Author
There was a problem hiding this comment.
tried to fix this in 186e6a3 with help from Codex & Claude
This was referenced Sep 5, 2026
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.
Pull Request
Description
Adds test coverage for the
internal/render/tui/overlaypackage as part of #63.The tests cover the package's current behavior without changing production code. Found some issues that I will raise another PR for 100% coverage.
Changes Made
Testing
go test -cover ./internal/render/tui/overlayfilters,output, etc...Checklist
Greptile Summary
This PR adds coverage for overlay placement and rendering helpers. One non-blocking coverage gap remains: the shadow test does not verify the shadow's full horizontal geometry, so some visible rendering regressions would still pass.
Confidence Score: 4/5
Safe to merge from a product-safety perspective; the remaining concern affects regression protection rather than runtime behavior.
The only finding is a verified, non-blocking test-coverage gap.
Files Needing Attention: internal/render/tui/overlay/overlay_test.go
What T-Rex did
Comments Outside Diff (1)
General comment
TestPlaceOverlayWithShadowchecks the exact first line but only requires thatlines[1]contain at least one░; it does not check the shadow rune's column or count, and it does not assert the final line. Focused temporary-copy mutations shifting the shadow left and increasing its width both passed the current test despite visibly changing the rendered geometry.strings.Contains(lines[1], "░")at lines 136-138 instead of asserting the complete expected shadow geometry or ANSI-stripped line contents across all relevant rows.X .., second row░.., final row....), or assert explicit shadow positions/counts and unchanged final row.Reviews (1): Last reviewed commit: "test(overlay): add coverage for overlay ..." | Re-trigger Greptile