diff --git a/frontend/src/components/Feed.tsx b/frontend/src/components/Feed.tsx index 04a0ef5..633df6d 100644 --- a/frontend/src/components/Feed.tsx +++ b/frontend/src/components/Feed.tsx @@ -310,12 +310,21 @@ export default function Feed({ list .map((v) => (overrides[v.id] ? { ...v, status: overrides[v.id] } : v)) .map((v) => (savedOverrides[v.id] !== undefined ? { ...v, saved: savedOverrides[v.id] } : v)); - const items: Video[] = withOverrides(loaded).filter((v) => matchesView(v.status, filters.show)); + const merged: Video[] = withOverrides(loaded); + const items: Video[] = merged.filter((v) => matchesView(v.status, filters.show)); // The in-app player's queue (auto-advance / loop / prev-next). It's the filtered feed, but the // watch-state view filter is NOT applied — so marking the current video watched keeps it in the // sequence (no reindex/reload mid-play), matching "watched doesn't affect the list". A video that // goes hidden still drops out ("visible affects"). - const playerQueue: Video[] = withOverrides(loaded).filter((v) => v.status !== "hidden"); + const playerQueue: Video[] = merged.filter((v) => v.status !== "hidden"); + + // A live search ingests new catalog videos, so the disabled feed queries still hold their stale + // pre-search cache. Drop them so the feed re-fetches fresh on return. + const dropFeedCaches = () => { + qc.removeQueries({ queryKey: ["feed"] }); + qc.removeQueries({ queryKey: ["feed-count"] }); + qc.removeQueries({ queryKey: ["facets"] }); + }; // --- Live YouTube search mode ------------------------------------------------------------- // A separate data source rendered in the same cards/player. No watch-state view filter (the @@ -341,16 +350,11 @@ export default function Feed({
); })} - {( - <> -