From a4de81930e50a2f392cde375100ba3bcefe0f039 Mon Sep 17 00:00:00 2001 From: npeter83 Date: Fri, 12 Jun 2026 17:39:28 +0200 Subject: [PATCH] fix(feed): clear optimistic overrides on refetch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The feed kept per-video optimistic status overrides until filters changed, so a status reverted elsewhere (e.g. Unwatch from the notification center) was masked by the stale override and stayed filtered out of the current view. Also clear overrides when fresh feed data arrives — the server is then authoritative. --- frontend/src/components/Feed.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/components/Feed.tsx b/frontend/src/components/Feed.tsx index 87d75ef..2652be3 100644 --- a/frontend/src/components/Feed.tsx +++ b/frontend/src/components/Feed.tsx @@ -42,7 +42,12 @@ export default function Feed({ getNextPageParam: (last) => (last.has_more ? last.offset + last.limit : undefined), }); + // Drop optimistic status overrides when filters change OR fresh server data + // arrives — after a refetch the server is authoritative, so a stale override + // (e.g. a video reverted to "new" from the notification center) won't keep it + // filtered out of the current view. useEffect(() => setOverrides({}), [filters]); + useEffect(() => setOverrides({}), [query.dataUpdatedAt]); const countQuery = useQuery({ queryKey: ["feed-count", filters],