Problem:
Current test coverage is limited to the data layer: cache, config, dashboard row building, branch name derivation, check summarization, truncation, JSON parsing, and markdown rendering. Zero BubbleTea Update()/View() logic is tested. Several utility functions and all filter resolution functions are untested.
Solution:
Add the following specific tests:
Filter resolution:
TestResolveIssueFilters_Reset — actionChoice="reset" returns defaults
TestResolveIssueFilters_CustomAssignee — choice="custom" uses AssigneeCustom value
TestResolvePRFilters_DraftTrue / TestResolvePRFilters_DraftFalse — draft filter correctly mapped
Utilities:
TestIsMeAssigned — empty login returns false; login present in list returns true
TestTimeAgo — table-driven: past minute, hour, day, week, month, year; future timestamp; empty string; invalid string
TestDeriveBranchName_Unicode — titles with accented characters, emoji, CJK
BubbleTea Update handlers:
TestAppModel_Update_SwitchTab — dispatching switchTabMsg changes activeTab correctly
TestIssuesModel_Update_KeyRefresh — r key sets loading=true and returns a fetch command
TestIssuesModel_Update_FetchError — error msg sets m.err; subsequent refresh clears m.err
Concurrency:
TestSaveCacheConcurrent — two goroutines call saveCache simultaneously; file is valid JSON afterward; no panic; go test -race passes
Acceptance Criteria:
Problem:
Current test coverage is limited to the data layer: cache, config, dashboard row building, branch name derivation, check summarization, truncation, JSON parsing, and markdown rendering. Zero BubbleTea
Update()/View()logic is tested. Several utility functions and all filter resolution functions are untested.Solution:
Add the following specific tests:
Filter resolution:
TestResolveIssueFilters_Reset—actionChoice="reset"returns defaultsTestResolveIssueFilters_CustomAssignee—choice="custom"usesAssigneeCustomvalueTestResolvePRFilters_DraftTrue/TestResolvePRFilters_DraftFalse— draft filter correctly mappedUtilities:
TestIsMeAssigned— empty login returns false; login present in list returns trueTestTimeAgo— table-driven: past minute, hour, day, week, month, year; future timestamp; empty string; invalid stringTestDeriveBranchName_Unicode— titles with accented characters, emoji, CJKBubbleTea Update handlers:
TestAppModel_Update_SwitchTab— dispatchingswitchTabMsgchangesactiveTabcorrectlyTestIssuesModel_Update_KeyRefresh—rkey setsloading=trueand returns a fetch commandTestIssuesModel_Update_FetchError— error msg setsm.err; subsequent refresh clearsm.errConcurrency:
TestSaveCacheConcurrent— two goroutines callsaveCachesimultaneously; file is valid JSON afterward; no panic;go test -racepassesAcceptance Criteria:
go test -race ./...passesinternal/githubfilter logic increases measurably