From 54d7129bfc38d92d45babbc23aedde55fec6252b Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Thu, 13 Aug 2026 05:11:48 +0000 Subject: [PATCH] Re-run search whenever file list updates. --- frontend/src/stores/main.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/stores/main.ts b/frontend/src/stores/main.ts index f3a67c4..abd0765 100644 --- a/frontend/src/stores/main.ts +++ b/frontend/src/stores/main.ts @@ -79,6 +79,7 @@ export const useMainStore = defineStore('main', { connected: false, authInProgress: false, cursor: '' as string, + lastSearchLoc: '' as string, server: {} as Record & { public?: boolean paskia?: boolean @@ -159,6 +160,10 @@ export const useMainStore = defineStore('main', { this.docVersion++ // Sync documents to search worker this.syncSearchWorker() + // Re-run the current search against the updated file list + if (this.query) { + this.search(this.query, this.lastSearchLoc) + } }, /** Patch aspect ratios on existing docs from a server ar update message */ updateAr(arMap: Record) { @@ -268,6 +273,7 @@ export const useMainStore = defineStore('main', { // Update query immediately so watchers know we're handling this this.query = query + this.lastSearchLoc = loc // Cancel pending timers if (loadingTimer) {