feat: instant local search results while full pipeline runs

Added SearchLocal() — queries only the FTS5 index with no network
calls. The frontend now calls SearchLocal first, renders those
results immediately (clearing the loading spinner), then fires the
full Search() pipeline in the background. When full results arrive,
they replace the local hits seamlessly.

For indexed queries this means sub-100ms first results regardless
of how slow MB/LB are. Unindexed queries still show the loading
spinner until the full pipeline completes.
This commit is contained in:
2026-03-29 16:45:25 -04:00
parent a93a83c4d2
commit 4138fe593d
4 changed files with 47 additions and 1 deletions
+2
View File
@@ -35,6 +35,8 @@ export function Search(arg1:string):Promise<explore.MBSearchResult>;
export function SearchArtists(arg1:string):Promise<Array<explore.MBArtist>>;
export function SearchLocal(arg1:string):Promise<explore.MBSearchResult>;
export function SearchRecordings(arg1:string):Promise<Array<explore.MBRecording>>;
export function SearchReleaseGroups(arg1:string):Promise<Array<explore.MBReleaseGroup>>;
+4
View File
@@ -66,6 +66,10 @@ export function SearchArtists(arg1) {
return window['go']['explore']['Service']['SearchArtists'](arg1);
}
export function SearchLocal(arg1) {
return window['go']['explore']['Service']['SearchLocal'](arg1);
}
export function SearchRecordings(arg1) {
return window['go']['explore']['Service']['SearchRecordings'](arg1);
}