From 0ce53fb87af5b44f3cb5e70779af3d004535c4bb Mon Sep 17 00:00:00 2001 From: Caleb Allen Date: Sun, 29 Mar 2026 17:34:40 -0400 Subject: [PATCH] fix: local search results now render before full pipeline completes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The full Search() call was blocking the render even after SearchLocal returned results — both awaits ran in the same async function, and Wails may serialize Go calls preventing the microtask yield from triggering a render. Split executeFullSearch into a separate async method invoked with void (fire-and-forget). executeSearch now returns after SearchLocal completes, letting Lit render the local results immediately. The full pipeline results replace them when ready. --- frontend/src/components/explore-view/explore-view.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/components/explore-view/explore-view.ts b/frontend/src/components/explore-view/explore-view.ts index 037b3bd..314b5dd 100644 --- a/frontend/src/components/explore-view/explore-view.ts +++ b/frontend/src/components/explore-view/explore-view.ts @@ -543,6 +543,11 @@ export class ExploreView extends LitElement { } // Phase 2: full pipeline (MB + LB + reranking). + // Fire-and-forget so the local results render immediately. + void this.executeFullSearch(version, query, startTime); + } + + private async executeFullSearch(version: number, query: string, startTime: number) { try { const result = await Search(query);