{
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/domain/Models.kt": "`Manga` is a title for all three media types, selected by `ItemType`. A `Chapter` represents either a comic chapter, novel chapter or anime episode. Source identity and title/chapter IDs connect the repository to stored records; display labels are separate from those identities. `UserSettings` is the smaller domain-facing settings projection, while the serialized database settings contain additional platform and feature preferences. `Manga.equals` compares cover bytes by content and includes every state field; `hashCode` follows the same fields. Without content equality, two independently loaded but identical cover arrays compare unequal. That can cause unnecessary state emissions or rendering; it does not by itself create a recomposition loop.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/domain/TitleCredit.kt": "The serializable cast/credit record preserves the external `image_url` field through `@SerialName`, while callers use the Kotlin property `imageUrl`. Optional role, character and image values remain nullable so missing upstream data stays distinct from an invented value.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/domain/PrivateNotes.kt": "The merge has three early exits: an empty incoming note contributes nothing, an identical note is already present, and a note already appended at the end is not appended again. Otherwise it preserves both texts with a visible separator. This is repeated-import protection for these cases, not a general set-based or commutative text merge.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/domain/ChapterRecognition.kt": "This is the permissive parser used for display, tracker episode numbers and gap counts. The `Chapter` overload prefers valid explicit number/season metadata and uses `numberingName` before a renamed display name. Text parsing strips the title and volume noise, prioritizes episode notation, then extracts a chapter or bare number and its decimal/letter suffix. `null` means unnumbered, while `0.0` is a recognized zero. `chapterSortKeys` introduces season buckets only after at least three episode numbers collide across seasons. `missingChapterCount` truncates recognized numbers to integers and counts gaps between the minimum and maximum; it does not count missing leading chapters. This permissive parser is different from the conservative release identity policy below.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/domain/ChapterReleasePolicy.kt": "Release identity preserves number, season, volume, part, language and edition. Ambiguous ranges and unnumbered names remain independent unless explicit metadata establishes an identity. Selection first excludes hidden groups and unavailable offline releases, then ranks candidates by normalized user priority, downloaded status, normalized group, URL and ID. Those final tie-breakers make the winner independent of input order. Read/bookmark flags are projected from all equivalent releases, including filtered ones; the winner keeps its own file and page position. `equivalentReleaseIds` expands explicit group actions so clearing a flag does not leave it enabled on another equivalent row. `chapterReadingOrder` sorts by season, volume, number and part, with ID as the final tie-breaker.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/domain/ChapterUpdateSchedule.kt": "Upload dates are converted to valid past timestamps, deduplicated and sorted. The arithmetic mean of adjacent gaps equals `(last - first) / (count - 1)`, so the function needs only the endpoints and count. It rounds to whole days and clamps a known short interval to one day. Fewer than two valid dates return `null`. A manual non-null interval overrides inference, including zero, which means always eligible. The default clock comes from `util.nowMillis`; the explicit `now` parameter keeps tests deterministic.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/database/DatabaseEntities.kt": "These are the serializable persistence records and enum values, separate from domain/UI models and Room row classes. Preserve names, constructor defaults and append-only ordinal-sensitive enums. `DbChapter.effectiveFiller` gives the user's nullable override precedence over the source value. The progress helpers merge user state while retaining the owning release's file location and position rules. Other records describe sources, downloads, trackers, cached pages, custom buttons and sync outbox data; these are later consumed by the database, repository and service chapters.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/database/DbSettings.kt": "`DbSettings` is the durable profile settings record. Constructor defaults supply missing fields when decoding older JSON; aliases declared through `@JsonNames` retain older serialized spellings. New settings groups live under `features` because generated constructors/copy methods approach JVM parameter limits. The computed `home` getter delegates to `features.home`; it is not an additional independent setting. Keep device-local identity and credential fields distinct from settings eligible for backup or synchronization, as the later export mappers do.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/database/DbFeaturePreferences.kt": "The nested record collects Home, downloads, image transformation, external download jobs, library, activity, tracking, browsing, sync triggers, player, reader, Discord, privacy and torrent preferences. The transforming serializer recognizes prerelease Home-only payloads using the actual `DbHomePreferences` serializer descriptor, then wraps them under `home`; checking only for keys beginning with `shelf` would miss real legacy fields. `DbDownloadPolicy.ahead` chooses the media-specific look-ahead count and clamps it to 0–100. Keep the policy's consumption bookkeeping fields as well as the visible settings.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/database/DbActivityFilters.kt": "Activity filters are keyed independently by media type. Small immutable helper methods cycle states through neutral/include/exclude and remove neutral values from sparse maps. Category ID `-1` represents Uncategorized; other nonpositive IDs are rejected. The `active` getter uses validated states rather than treating arbitrary stored integers as enabled filters.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/database/DbAutomaticUpdateConstraints.kt": "The record expresses a policy rather than measuring the device. `Legacy` delegates to the existing download-network behavior, while Connected, Unmetered and Wifi request distinct checks. The unknown-cost choice specifies what to do when the platform cannot determine cost. Scheduling adapters in later chapters enforce these values.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/database/DbBrowsePreferences.kt": "Three booleans keep the hide-already-in-library choice independent for manga, anime and novels. The read/write helpers dispatch on `ItemType` and return immutable copies, so source browse screens and Home source feeds can share the same preference without sharing mutable UI state.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/database/DbChapterReleasePreference.kt": "A preference with `mangaId = null` is the global default. Lookup first chooses a title override, then adapts the global default to that title, then constructs defaults. Writes normalize and deduplicate scanlator names. Removing the title override restores inheritance instead of writing a second global row. Ordering helpers append newly available groups and bounds-check move operations.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/database/DbDiscordPreferences.kt": "The account list and active account ID are updated together through immutable helpers. Removing the active account selects a remaining account; activating a nonexistent ID is ignored. `forExport` removes all accounts and active selection, and custom `toString` methods avoid printing tokens. Presence privacy, buttons and display choices remain in the preference record.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/database/DbEinkPreset.kt": "Each preset records a portrait panel size for download sizing. Scaling caps the short side, preserves aspect ratio and never enlarges a smaller image. Refresh scheduling flashes only on positive page-turn multiples of a positive interval; zero disables scheduled flashes.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/database/DbExternalDownloads.kt": "External download state persists user intent separately from observed server state and classified problems. A job contains multiple server files, an endpoint and an account binding so old controls cannot target a newly configured account. `complete` and `terminal` require a nonempty file list and aggregate all files. Temporary URLs/headers and resume bindings have distinct lifetimes; export and submission code must respect those comments.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/database/DbHomePreferences.kt": "Home uses serialized section names and per-source feed records. A feed key combines source, mode and optional preset ID. `forPresentation` strips the TMDB token and source feed references before handing preferences to presentation state, while `toString` reports configuration flags and counts instead of credential values. Preserve section names because stored hidden-section choices depend on them.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/database/DbImageDataSaver.kt": "This record describes an optional image transformation provider, output format, quality, grayscale and exclusions. It does not perform a network request. Keeping reader/download opt-ins independent lets later image services choose whether a page may be sent through the configured provider.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/database/DbLibraryPreferences.kt": "Sparse maps hold per-media grouping, category display, filters, update rules and chapter-list defaults. Getters supply defaults; writers remove entries that return to those defaults. Category assignment distinguishes missing (ask), zero (uncategorized) and positive IDs. Per-title filler filters override media defaults. This structure prevents one media type's filter or category choice from overwriting another's.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/database/DbPlayerPreferences.kt": "Playback additions such as brightness, stream fallback, subtitle ranking, picture-in-picture and external player choice are stored together. `withPlayer` updates the nested record via two `copy` operations, preserving all sibling settings groups. The platform services decide which requested capabilities are available.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/database/DbPrivacyPreferences.kt": "Incognito is global or source-specific. Screenshot protection uses its own Never/Incognito/Always policy; its helper checks the global incognito flag for the middle option. App-lock timeout `-1` disables relocking, zero locks on return, and positive values compare elapsed milliseconds against minutes. Notification redaction is independent from app lock.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/database/DbReaderPreferences.kt": "Paged and continuous modes get separate optional preference groups. A null group inherits legacy global values until the user changes that group; eagerly replacing null with defaults would discard an existing user's settings. The helper materializes effective values only for the group being edited and updates it immutably.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/database/DbSourcePreset.kt": "Saved filter selections use a sealed serializable type with explicit discriminator names. Source identity deliberately omits installation version and local row ID, which can change on restore. Legacy query-only presets are bound to a source identity while that source still exists; missing sources receive an explicit marker rather than being silently rebound to another source.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/database/DbSyncTriggerPreferences.kt": "These opt-in booleans request synchronization at specific reading, playback or app lifecycle events. They live under device-local feature preferences. Event handling and duplicate-trigger suppression belong to the sync services, not this serializable value object.",
  "composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/database/DbTorrentPreferences.kt": "The mode chooses a supervised desktop process or a user-run remote server. Proxy enum values map to command-line flags. `forExport` clears the local executable path, password and proxy URL while preserving exportable configuration. The default tracker list is literal configuration; native process/network behavior is implemented later.",
  "composeApp/src/commonTest/kotlin/eu/friedcutlet/yokan/domain/ChapterRecognitionTest.kt": "The assertions cover decimals, chapter zero versus unnumbered content, gap counts, conditional season sort buckets and identity keys. Reproduce the entire suite; the season-reset cases catch regressions that a three-case introductory parser test misses.",
  "composeApp/src/commonTest/kotlin/eu/friedcutlet/yokan/domain/ChapterReleasePolicyTest.kt": "The tests specify deterministic preferred winners, offline alternatives, conservative identities, state projection and explicit group actions. Pay particular attention to retaining the winning release's own page/file data and keeping uncertain names independent. Some settings/repository assertions need later chapters before they compile.",
  "composeApp/src/commonTest/kotlin/eu/friedcutlet/yokan/domain/ChapterUpdateScheduleTest.kt": "A fixed clock makes every expectation reproducible. The 1, 1 and 10 day gaps distinguish arithmetic mean (4 days) from median (1) and latest gap (10). Other cases exercise epoch seconds/milliseconds, future dates, duplicates, minimum known intervals and manual zero overrides.",
  "composeApp/src/commonTest/kotlin/eu/friedcutlet/yokan/domain/ExplicitChapterNumberTest.kt": "Custom display names must not erase explicit episode numbers, season identity, edition/language distinctions or persisted metadata. This suite crosses repository and database boundaries; run it after those dependencies exist. The sequence assertions also ensure opening an alternate release uses that release rather than an unrelated preferred file.",
  "composeApp/src/commonTest/kotlin/eu/friedcutlet/yokan/domain/TestModels.kt": "The factory creates small valid domain titles with predictable names, links and timestamps. Optional parameters vary only the fields relevant to each test, reducing fixture noise without changing production defaults."
}
