fix(notifications): "Find in feed" drops every narrowing that could hide the video

locate() spread the reader's filters and cleared only the tag, search and age cap, so a year, a
custom range, a length, a content type (a hidden Short under "no Shorts") or the scope could still
leave the video out. It builds the filters from nothing now, keeping only the sort and tag modes.
(Also types the C1 test's pending plan.)
This commit is contained in:
2026-09-27 14:53:24 +02:00
parent 98bb841a6a
commit 3372626e34
3 changed files with 45 additions and 12 deletions
+11 -4
View File
@@ -142,15 +142,22 @@ export default function NotificationsPanel() {
// "Find in feed" / undo, ported from the old bell. Works for both hidden and watched
// notices — jump to the feed filtered to that state and the video's channel.
// The narrowing filters that could leave the video out (a tag, "no tag", a search, an age cap) are
// dropped: kept, a channel outside the reader's tag filter found an empty feed.
// Built from nothing, not spread over the reader's filters: EVERY narrowing that could leave the
// video out goes — a tag, "no tag", a search, the age cap, the year, the custom range, the length,
// a content type (a hidden Short under "no Shorts"), the scope and the library source (E28 review
// C2: the spread kept whatever this list forgot). Only how the reader orders and matches stays.
function locate(meta: VideoHiddenMeta | VideoWatchedMeta) {
setFilters({
...filters,
tags: [],
tagModes: filters.tagModes,
untagged: false,
q: "",
maxAgeDays: undefined,
includeNormal: true,
includeShorts: true,
includeLive: true,
scope: "all",
librarySource: "all",
sort: filters.sort,
show: meta.kind === "video-hidden" ? "hidden" : "watched",
channelIds: meta.channelId ? [meta.channelId] : [],
});