test(tui): cover repository table header - #73
Conversation
| header := Header{} | ||
| header.SetReport(report.ScanReport{RepoStates: make([]report.RepoState, 2)}, false) | ||
|
|
||
| view := header.View() |
There was a problem hiding this comment.
Header Test Misses Composition
This test verifies the header component in isolation, but the production TUI view combines only the repository table, details, and footer; it never includes the initialized repository header. The test therefore passes while users cannot see reposcan • N repos. Add a regression assertion through the production model view after wiring the header into that layout. This is non-blocking, but the current test does not protect the user-visible behavior.
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
- Temporary Go test constructs the production TUI model with a populated repository header and asserts the rendered model omits that header, establishing the composition gap.
- Shell command copies the temporary focused test into the TUI package, runs it, and removes the copied test afterward, providing a repeatable production-path check.
- Executed the PR's direct header-view test successfully, showing the limited isolated behavior it covers.
- Executed the focused production `Model.View()` test successfully; it shows the isolated header text exists but both header strings are absent from the production view.
|
thanks for your time and contributing to this project 🚀 |
|
@be-student template look like this. Please update PR description with this and fill relevant data Pull RequestDescriptionChanges MadeTesting
Screenshots (if applicable)Checklist
Additional Notes |
Addresses part of #63.
Adds behavioral coverage for repository counts, stash-aware dirty counts, and rendered header content. Package statement coverage increases from 0% to 100%.
Validation:
go test -race ./...,go vet ./..., andgo build ./....AI use: I used OpenAI Codex to help write the tests, then reviewed them and ran the checks above.
Greptile Summary
The new header test verifies component output, but the main TUI layout does not render that component. The header text therefore remains invisible to users. This is a non-blocking concern and does not make the change unsafe to merge.
Confidence Score: 4/5
Safe to merge with a non-blocking test-coverage gap: the production TUI still omits the repository-table header.
One confirmed non-blocking concern remains. The rendered production model was exercised and did not include the configured header text.
Files Needing Attention: internal/render/tui/repostableheader/reposTableHeader_test.go needs a production-composition assertion; internal/render/tui/view.go omits the initialized header from the layout.
What T-Rex did
Comments Outside Diff (1)
General comment
reposcan • N reposheader, despiteRender()constructing and storing it inModel.rtHeader. The PR test atinternal/render/tui/repostableheader/reposTableHeader_test.go:43only tests the isolated component and therefore cannot establish visible production behavior.internal/render/tui/view.go:34-40joinsreposTable,reposDetails, andfooterwithout rendering or joiningm.rtHeader.View().m.rtHeader.View()inModel.View()and include it in the vertical layout; adjust available body/table height as needed. Add a production-composition regression test asserting the configured header text occurs inModel.View().Content.Reviews (1): Last reviewed commit: "test(tui): cover repository table header" | Re-trigger Greptile
Context used: