Skip to content

feat(library): remember film/series filters per instance - #92

Open
ndandan wants to merge 2 commits into
Shoshuo:mainfrom
ndandan:pr/library-filter-memory
Open

feat(library): remember film/series filters per instance#92
ndandan wants to merge 2 commits into
Shoshuo:mainfrom
ndandan:pr/library-filter-memory

Conversation

@ndandan

@ndandan ndandan commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Persists each instance's last-used filter set (search, status, quality/
genre/language/network, sort) in localStorage keyed by instance + type,
and restores it on return via the sidebar or Films/Series nav. A head-
loaded script rehydrates the form before first paint; the reset link
clears saved state; explicit query params still win.

ndandan and others added 2 commits August 21, 2026 21:25
Persists each instance's last-used filter set (search, status, quality/
genre/language/network, sort) in localStorage keyed by instance + type,
and restores it on return via the sidebar or Films/Series nav. A head-
loaded script rehydrates the form before first paint; the reset link
clears saved state; explicit query params still win.
…eep links survive filter restore

The films/series pages strip ?open={id} via history.replaceState during
body parse — before this head-loaded script's turbo:load handler runs. The
restore check then saw an empty live URL, mistook the deep link for a bare
visit, and location.replace()d onto the saved filters, killing the
quick-look modal the deep link was opening (and possibly filtering the
target item out entirely).

syncCurrentPage() now reads the query string the document was actually
navigated to from the Navigation Timing entry (which replaceState cannot
touch), trusting it only while its pathname still matches the current
document. Also corrects the changelog entry: search text/page are
deliberately excluded from the persisted set, and restoration is a
one-time redirect on bare visits, not a pre-paint form rehydration.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant