# Updates and Upcoming filters

Updates → **Filters** adds independent tri-state Downloaded, Unread/unseen,
Started and unfinished, and Bookmarked filters, plus **Hide excluded scanlators**.
They combine with text search and the media tabs. Downloaded uses completed local
download IDs from the shared library index; queued or remote-only downloads do not
qualify. Started means positive progress on an unfinished chapter or episode. Its
inverse means untouched and unfinished; completed entries are excluded from both.
Invalid/nonfinite legacy progress is treated as no progress. Scanlator matching uses
the same normalization and per-title exclusion lists as title details.

Updates and Upcoming/Calendar each have category inclusion/exclusion controls.
Off leaves a category unconstrained, Include accepts any included category, and
Exclude rejects an entry in any excluded category. Uncategorized is selectable.
Hidden categories remain available for filtering. Deleted, foreign-media or invalid
category preferences are ignored so stale settings cannot leave activity permanently
empty. **Reset filters** clears only the current screen's selected media preferences.
Updates and Upcoming choices are independent for manga, anime and novels.

Preferences persist per profile under the existing device-local feature settings.
Changes publish through observed settings/snapshots, including progress, bookmarks,
completed downloads and category changes. Updates resolves chapter IDs once per
title with update records, rather than repeatedly scanning a title's chapter list.
Filter changes reuse those resolved rows and never query the database per row.
Calendar derives titles/categories/update records from one published snapshot.

All controls and filtering are shared across Android, iOS, desktop and web.
This is the Updates/Upcoming filtering portion of parity stage 4. Smart-update rules
and grouping scope are documented in `SMART_UPDATE_RULES.md`; automatic device/network
constraints and their telemetry limits are documented in `AUTOMATIC_UPDATE_CONSTRAINTS.md`.

Behavior references at the pinned Animetail revision:
[filter controls](https://github.com/Animetailapp/Animetail/blob/d0eab5d6237dd09ebdb21a63fff5b66097c91087/app/src/main/java/eu/kanade/presentation/updates/UpdatesFilterDialog.kt)
and [query rules](https://github.com/Animetailapp/Animetail/blob/d0eab5d6237dd09ebdb21a63fff5b66097c91087/data/src/main/sqldelight/view/updatesView.sq).

Verification: 15 desktop checks and 15 Kotlin/Wasm browser tests passed, with no
failures, errors or skipped tests. Desktop, Android, iOS simulator ARM64 and web
compiled. The shared tests cover combinations, category precedence,
Uncategorized, malformed/stale settings, normalized exclusions, persistence and 3,000
updates in one title. ViewModel checks prohibit live per-row repository reads and
exercise preference/progress/download/category changes.
