Spotted during a UI review of the recent media-view changes. Files: simalytics/Views/Explore/SearchResultsView.swift (the if visibleResults.isEmpty branch) + SearchResultsViewModel.
SearchResultsView mounts as soon as searchText is non-empty, and searchResults starts [], so the very first keystroke immediately shows ContentUnavailableView("No Results"). debounceSearch then sleeps ~1s and (for the .all scope) runs three sequential network fetches, so the misleading "No Results" screen is shown for 1s+ (often several seconds) on every keystroke before real results arrive. It reads as "your query matched nothing" when in fact nothing has been searched yet.
Fix: track an in-flight / has-searched state. e.g. @State private var isSearching = false; set it true in the .onChange handlers right before calling debounceSearch, and false when results are assigned. Then show the empty state only when visibleResults.isEmpty && !isSearching, and show a ProgressView (or nothing) while isSearching && visibleResults.isEmpty. Optionally clear stale results when the query changes so previous matches don't linger.
Source: multi-agent UI review, 2026-07-02.
Spotted during a UI review of the recent media-view changes. Files:
simalytics/Views/Explore/SearchResultsView.swift(theif visibleResults.isEmptybranch) +SearchResultsViewModel.SearchResultsViewmounts as soon assearchTextis non-empty, andsearchResultsstarts[], so the very first keystroke immediately showsContentUnavailableView("No Results").debounceSearchthen sleeps ~1s and (for the.allscope) runs three sequential network fetches, so the misleading "No Results" screen is shown for 1s+ (often several seconds) on every keystroke before real results arrive. It reads as "your query matched nothing" when in fact nothing has been searched yet.Fix: track an in-flight / has-searched state. e.g.
@State private var isSearching = false; set ittruein the.onChangehandlers right before callingdebounceSearch, andfalsewhen results are assigned. Then show the empty state only whenvisibleResults.isEmpty && !isSearching, and show aProgressView(or nothing) whileisSearching && visibleResults.isEmpty. Optionally clear stale results when the query changes so previous matches don't linger.Source: multi-agent UI review, 2026-07-02.