From 30bc32f0140f19aab37e13b7002acee5efe42538 Mon Sep 17 00:00:00 2001 From: keyolk Date: Sun, 30 Aug 2026 21:47:37 +0900 Subject: [PATCH] fix: repair master test build after concurrent search PRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #160 added a SearchMode argument to updateSearchResults while #162 added tests that call it. Both were green on their own branches and neither touched the other's files, so git merged them without conflict — but the merged tree does not compile: vet: search_resume_test.go:17: not enough arguments in call to a.updateSearchResults have ([]session.SearchResult) want ([]session.SearchResult, session.SearchMode) Production code is unaffected (go build passes); only the test callers are stale. Pass SearchModeScan, which is what these tests were written against — they exercise live badges and resume, not index coverage. --- internal/tui/search_resume_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/tui/search_resume_test.go b/internal/tui/search_resume_test.go index a14f815..c2c450a 100644 --- a/internal/tui/search_resume_test.go +++ b/internal/tui/search_resume_test.go @@ -14,7 +14,7 @@ func searchApp(t *testing.T, sessions []session.Session, results []session.Searc a.enterSearchMode() a.searchInput.Blur() // focus the result list, not the query box a.searchQuery = "q" - a.updateSearchResults(results) + a.updateSearchResults(results, session.SearchModeScan) return a } @@ -64,7 +64,7 @@ func TestSearchResultLiveStateComesFromStore(t *testing.T) { a := newTestApp([]session.Session{{ID: "s1", ShortID: "s1", ProjectName: "proj", IsLive: true}}) a.enterSearchMode() a.searchInput.Blur() - a.updateSearchResults([]session.SearchResult{{Session: &snapshot, Snippet: "hit"}}) + a.updateSearchResults([]session.SearchResult{{Session: &snapshot, Snippet: "hit"}}, session.SearchModeScan) item := a.searchResultList.Items()[0].(searchResultItem) if !item.live { @@ -76,7 +76,7 @@ func TestSearchResultLiveStateComesFromStore(t *testing.T) { b := newTestApp([]session.Session{{ID: "s2", ShortID: "s2", ProjectName: "proj2", IsLive: false}}) b.enterSearchMode() b.searchInput.Blur() - b.updateSearchResults([]session.SearchResult{{Session: &staleLive, Snippet: "hit"}}) + b.updateSearchResults([]session.SearchResult{{Session: &staleLive, Snippet: "hit"}}, session.SearchModeScan) if b.searchResultList.Items()[0].(searchResultItem).live { t.Error("stale snapshot won over the store — an exited session is still shown live")