# Smart update rules and group refresh scope

Library settings offers separate restriction switches for each media type:

- **Skip completed titles** excludes titles whose stored status is Completed.
- **Only update caught-up titles** skips titles with any known unread/unseen release.
- **Only update started titles** requires a read release or finite positive progress
  when releases are known. Empty titles remain eligible to discover their first list.
- **Respect expected release period** honors the automatic cadence or the title's
  manual update interval. An explicit zero-day interval remains every-update.

The first three switches default off; expected-period checking defaults on, preserving
Yokan's existing behavior. Restrictions combine, and apply to manual library refreshes
and scheduled refreshes through the same service. They use known release records;
reader display/release filters do not discard records from these admission checks.
Explicit single-title refresh remains available independently of library restrictions.

**Library refresh scope** defaults to Entire library. Current group refreshes the
selected manual category, source, status, tracker-status or tag group. The third choice
uses the current group except when Ungrouped is selected, which refreshes all eligible
titles. The All page also uses global scope. Membership is captured before the request,
independently of text searches and row filters. A missing/stale group or unloaded
projection produces an empty scope; it cannot silently expand to a full-library run.
Scheduled jobs and refreshes from Updates/Calendar remain global, honoring category,
pinned-source and smart-update restrictions.

The service defensively copies captured IDs, intersects them with the requested media
type's current favorites, and applies the existing source/category admission checks.
A profile-owned service mutex serializes scheduler, controller and single-title calls.
Cancellation of a waiting caller leaves the service usable. Existing late-response
guards still preserve local edits and reject deleted/replaced source identities.

Final error reports update settings atomically and replace only the run's captured
media/group error scope. They preserve concurrent preference changes and error reports
from other groups or media types. The controller still reports only this run's errors.

Preferences and controls are shared across Android, iOS, desktop and web and persist
per profile under the existing device-local feature settings. Device/network/power
constraint selection is documented in `AUTOMATIC_UPDATE_CONSTRAINTS.md`, including
the visible deferral behavior when telemetry is unavailable.

Verification: 62 desktop checks and 62 Kotlin/Wasm browser tests passed, with no
failures, errors or skipped tests. Desktop, Android, iOS simulator ARM64 and web
compiled. Tests cover defaults, cadence overrides, combined rules,
empty titles, malformed progress, per-media serialization, raw group scope despite
search filters, stale/empty groups, service serialization, cancelled waiters, scoped
error retention and concurrent preference preservation. The serialized-call test
counts actual extension requests, proving a waiting caller does not start a second
fetch. Unchanged error reports avoid redundant settings writes.
