Yokan / rebuild
Course 1 8624561

NON_UI_IMPLEMENTATION.md

docs/parity/NON_UI_IMPLEMENTATION.md

documentation / design asset376 lines
1# Non-UI parity implementation23Requested 2026-10-14: implement every remaining functional gap in4`ANIMETAIL_DIFF.md`, with every ported capability available across supported5platforms. Existing Yokan features and user data must be preserved. A registered6adapter, configuration model or placeholder is not completed support.78## Delivery ledger910| Stage | Scope | Status |11|---|---|---|12| 1 | Download new releases, category/unread/filler rules, download-ahead, retention and protected cleanup | Implemented and verified 2026-10-15 |13| 2 | Tall-image splitting, external downloaders, image data saver and exceptions; browser CBZ support | Implemented and verified 2026-10-15 |14| 3 | Search parser and fields, automatic grouping, category defaults/sorting, new sorts and filters | Implemented and verified 2026-10-15 |15| 4 | Update constraints/restrictions/grouping scope and Updates/Upcoming filtering | Implemented and verified 2026-10-16; device telemetry limits documented |16| 5 | Local-video playback verification, frame-derived artwork, season/metadata schemas, credits/source relations | Implemented and verified 2026-10-18; native picker UI, on-device playback and external bridge binaries documented |17| 6 | Filler editing and chapter/episode defaults propagation | Implemented and verified 2026-10-18; season-list preferences documented as remaining |18| 7 | Reader splitting/rotation, mode-specific processing, skip policies, spread export/clipboard/folders/volume keys | Implemented and verified 2026-10-18; iOS volume keys, web/Android 8–9 title folders documented as platform blockers (`../features/READER_PROCESSING.md`) |19| 8 | Casting/queues, seek previews, sleep timer, host failover, persistent playback options and speed presets | Implemented and verified 2026-10-18; header-dependent streams cannot cast, no live Chromecast verification (`../features/CHROMECAST.md`, `../features/PLAYER_PLAYBACK.md`) |20| 9 | Subtitle priorities/filtering/secondary tracks/screenshots, PiP policies and external-player preference | Implemented and verified 2026-10-18; iOS/desktop system PiP and web external player documented as blockers (`../features/PLAYER_SUBTITLES_PIP_EXTERNAL.md`) |21| 10 | Torrent engine, recovery, lifecycle, tracker reset and proxy settings | Implemented and verified 2026-10-18; desktop-managed TorrServer, remote server on all platforms; Android/iOS/web hosting documented as blockers (`../features/TORRENT_STREAMING.md`) |22| 11 | MangaUpdates, Shikimori, Bangumi, Hikka, MangaBaka, TMDB account tracking | Implemented and verified 2026-10-18; Hikka web (CORS), Bangumi web OAuth, non-Android OAuth paste and live accounts documented |23| 12 | Komga, Kavita, Suwayomi, Jellyfin progress adapters, auto-binding and provider ID searches | Implemented and verified 2026-10-18; self-hosted server CORS and live servers documented |24| 13 | SyncYomi, Drive state sync, sync triggers and Mihon/Aniyomi protobuf export | Implemented and verified 2026-10-18; web CORS, Google loopback paste and live servers/accounts documented |25| 14 | Cross-platform Discord presence/account switching/custom status/privacy | Implemented and verified 2026-10-18; gateway login uses the user's token (Discord ToS caveat shown), browser gateway untested (`../features/DISCORD_PRESENCE.md`) |26| 15 | Screenshot/recents/notification privacy, lock idle timeout and per-source incognito | Implemented and verified 2026-10-18; desktop/web capture protection documented as blockers (`../features/PRIVACY_AND_SECURITY.md`) |27| 16 | Hide library items in source feeds and personalized TMDB recommendations | Implemented and verified 2026-10-18; live TMDB account unverified |28| 17 | Shared-text/search intake, external repository and backup handlers, shortcuts, installation backend equivalents | Implemented and verified 2026-10-18; Shizuku not applicable (private DexClassLoader extensions), iOS Swift/desktop packaging unbuilt, web backup/shortcuts N/A (`../features/OS_INTEGRATIONS.md`) |2930## Implementation rules3132- Domain rules, persisted state, HTTP adapters and configuration live in shared code.33- Native-only mechanisms need equivalent platform integrations or an explicitly34  documented external/platform blocker; they must not be silently omitted.35- Optional integrations use user-owned credentials and configuration. No upstream36  credentials are copied or embedded.37- Automatic downloads are opt-in and use the existing persistent, constrained,38  deduplicated queue. Cleanup preserves local-library originals, active tasks,39  bookmarks and excluded categories by default.40- Tests must cover actual behavior and failure/cancellation/recovery boundaries.41  Each completed stage is compiled for desktop, Android, iOS and web.4243## Verification and blockers4445Stage 1: 207 desktop regression tests and 6 Kotlin/Wasm browser integration tests46passed. Desktop, Android, iOS simulator ARM64 and Wasm compiled. Real Chrome OPFS47checks passed for 12 MiB streaming, reload recovery, resume, range serving, protected48deletion, path isolation and HTML sandboxing. A temporary asynchronous negative49control correctly failed and was removed before the final passing run.5051The web target previously had no download filesystem. Stage 1 adds OPFS storage,52async file APIs, a range-serving media worker and bounded streaming HTTP for extra53profiles. Legacy backups remain compatible, and profile deletion removes owned54OPFS files while preserving explicit exports. Anime/novel download resolution and55offline consumption were completed alongside the policy integration.5657See `../features/DOWNLOAD_AUTOMATION.md` for behavior, defaults and recovery details.58Stage 2 adds processing/downloader controls and completes browser archive support;59broader local-library import/management stays in stage 5. Stage 3 is complete;60stage 4 is verified with documented telemetry limits; stages 5–17 are verified with61their documented platform blockers. Integrated run on 2026-10-18: Android, iOS62simulator ARM64, desktop and web compiled; 1,900 desktop tests (one manifest63assertion updated for the new intent filters, then passing; 2 skipped), 1,63164Kotlin/Wasm browser tests, 1,672 Android unit tests and 17 bundled-bridge tests passed.65No live accounts, servers, devices, Chromecasts or torrent swarms were exercised.6667Stage 2 progress: tall-image splitting, wsrv/reSmush/Bandwidth Hero image data saver,68source/format exceptions, original fallback and browser CBZ creation/reading are69implemented. The image integration passed 69 desktop tests and compilation on all70four targets. Chrome checks passed streamed CBZ creation and reading, compressed71entries, reload recovery, CRC failures, path/index bounds and original-file protection.72The follow-up Kotlin/Wasm run passed 19 integration tests, including CBZ creation73and reload across the Kotlin/JavaScript boundary, compression protocols, and74isolated HTTP streaming. The final broader run passed 249 desktop regression tests75and 26 Kotlin/Wasm browser tests, including the real browser Skia image codec and76six aria2 protocol cases. Desktop, Android, iOS simulator ARM64 and web compiled.77The >64 MiB streaming test retains its backpressure assertions; its Mocha timeout78was increased from 2 to 30 seconds to accommodate cold/slow hosts. Chrome also79verified archive write-failure recovery and protection of nested original files.8081Stage 2 is now connected end to end: manual-download routing, preferred backend,82server configuration/testing, remote queue progress and controls, durable admission,83serialized recovery, account/source identity checks, safe retries and reactive polling.84Remote receipts are device-local and never create local offline marks. Queue credentials85and operational data are stripped from exports, including sensitive backups.8687The final integration run passed 270 desktop regressions and 60 Kotlin/Wasm browser88tests, and compiled desktop, Android, iOS simulator ARM64 and web. These include89profile isolation/retirement, atomic settings mutations, backup/sync filtering,90UI-to-backend manual routing, visibility-controlled polling and server switching.91No live aria2 server/account verification is implied; the JSON-RPC boundary is tested92with deterministic fixtures against the documented protocol. Users supply their server.93See `../features/DOWNLOAD_IMAGE_PROCESSING.md` and94`../features/EXTERNAL_DOWNLOADER_PROGRESS.md`.9596Stage 3 progress: shared advanced search now supports boolean expressions, negation,97parentheses, text-field aliases, counts, update intervals and UTC date comparisons.98It preserves existing phrase/comma/genre searches, compiles once per query, bounds99input/token/depth complexity, and reuses observed chapter indexes without database100reads. The in-app library menu includes syntax help. The first run passed 20 desktop101tests and compiled desktop, Android, iOS simulator ARM64 and web.102103Default-category preferences for manga/anime/novels are connected to category settings,104detail favorite actions and the repository. Existing assignments and explicit category105choices take precedence; missing/deleted/cross-media defaults cannot assign categories.106The final run passed 61 desktop regression tests and 20 Kotlin/Wasm browser tests,107with no failures, errors or skipped tests, and compiled desktop, Android, iOS simulator108ARM64 and web. Explicit category/favorite changes publish in one transaction, without109an intermediate default assignment. Schedule queries use all known release dates even110when release filters reduce the chapter list used for count comparisons. Tests include111atomic snapshot publication, malformed/bounded queries, restart/serialization,112per-media isolation, explicit choices, deleted/foreign categories and migration safety.113Automatic source/status/tracker-status/tag grouping and Ungrouped views, stable group114identities, an All view, category-specific card display/sort and scoped reset are now115connected in shared code. Grouping is independent per media type and preserves manual116assignments. Tracker metadata projections and release-selection reuse avoid chapter117regrouping on unrelated tracker writes; large group tab rows are virtualized.118The final grouping/category run passed 43 desktop checks and 29 Kotlin/Wasm browser119tests, with no failures, errors or skipped checks, and compiled desktop, Android,120iOS simulator ARM64 and web. The desktop checks include real Compose layout/navigation121with 1,000 tag groups at 360px and 1024px widths. Rendered images were inspected; the122selected distant group is visible and underlined after immediate alignment, and tab123widths fit their labels. This is a shared desktop render check at phone/desktop widths,124not native-device UI or frame-rate verification.125Stage 3 is complete: stable seeded random, normalized tracker-mean score, first-fetch126date and anime airing sorts, provider-specific tracking and custom interval filters127are connected. Public-ID airing lookup is explicit, bounded, batched and profile-owned;128cached values survive network failures and reject stale source/binding responses.129The final run passed 98 desktop checks and 78 Kotlin/Wasm browser tests, with no130failures, errors or skipped tests, and compiled desktop, Android, iOS simulator ARM64131and web. Room v12→v13 migration/reopen verifies preserved existing data and new dates.132The initial browser invocations selected zero tests because class-only wildcard133patterns did not match Wasm's full test names; corrected trailing-wildcard patterns134ran the 78 tests. No failed invocation is counted as verification.135See `../features/LIBRARY_SEARCH.md`, `../features/LIBRARY_DEFAULT_CATEGORIES.md` and136`../features/LIBRARY_GROUPING.md`, plus `../features/LIBRARY_SORTS_AND_FILTERS.md`.137138External integration protocols and current platform capabilities will be checked139against primary documentation when each integration is implemented. No external140account, provider or hardware verification is implied.141142Stage 4 progress: Updates row filters and separate Updates/Upcoming category filters143are connected in shared code and persisted per media type. Chapter lookups are indexed144once per title with update records; preference changes reuse resolved activity rows.145Verification passed: 15 desktop checks and 15 Kotlin/Wasm browser tests, with no146failures, errors or skipped tests, and desktop/Android/iOS simulator ARM64/web compilation.147Smart-update restriction switches and grouping-based refresh scope are now connected148for each media type. Defaults preserve global refresh and existing cadence. Captured149scope uses raw memberships independently of search/row filters, and empty/stale groups150cannot expand to global refresh. Scheduler/controller/single-title service calls are151serialized; error reports update atomically within the run's media/group scope and152preserve concurrent settings and other reports. Unchanged reports avoid extra writes.153The final combined run passed 62 desktop checks and 62 Kotlin/Wasm browser tests,154with no failures, errors or skipped tests, and compiled desktop, Android, iOS simulator155ARM64 and web. See `../features/ACTIVITY_FILTERS.md`,156`../features/SMART_UPDATE_RULES.md` and `UPDATE_CONSTRAINTS_NOTES.md`.157158Stage 4 is complete at the application-policy level: network/power conditions are159configured, persisted and enforced in shared automatic refresh admission, with real160readers for all four targets and Android/iOS job integration. Manual refresh remains161independent. Deferred runs retain retry eligibility and unchecked error reports;162Android condition deferrals do not exhaust the ordinary failure retry limit.163The final run passed 54 desktop checks, 71 Kotlin/Wasm browser tests and 3 Android164WorkManager unit checks, with no failures, errors or skipped tests, and compiled all165four targets. Tests include actual bounded processes and browser JavaScript interop,166strict JSON values, denied/missing/stalled APIs, cache freshness, policy cancellation,167profile isolation and deferral after service-lock waits/between titles/media types.168169Concrete telemetry limits remain: some browsers cannot report battery/Wi-Fi/cost;170macOS command interfaces cannot report cost; some virtual paths, Linux systems or171restricted desktop APIs cannot supply a reading. Power/Wi-Fi restrictions defer172with visible reasons when unknown, and unknown cost has an explicit user classification.173These limits are not represented as successful hardware detection or silent bypasses.174Native power changes and actual OS job timing were not exercised. See175`../features/AUTOMATIC_UPDATE_CONSTRAINTS.md`. Later parity stages remain required.176177Stage 5 progress: the scanner now prepares asynchronous storage, bounds metadata/cover178reads and preserves edits/deletion made while reads suspend. Browser OPFS has indexed179readable entry listings, iterative traversal, and accurate empty-vs-missing directory180state after deletion/reload. The run passed 28 desktop checks and 10 Kotlin/Wasm browser181tests, with no failures, errors or skipped tests, and compiled all four targets.182File/folder imports are now available on all four targets with bounded 64 KiB reads,183coalesced progress, cancellation/profile retirement, protected originals and durable184COPY/READY journal recovery. Managed imports stay invisible until publication, including185when a configured scan root is their ancestor; published roots do not duplicate entries.186iOS uses open-in-place scoped, coordinated reads. Browser single-image reading uses187the actual media worker, and local media bypasses remote image optimizers.188The final combined run passed 77 desktop checks and 43 Kotlin/Wasm browser tests and189compiled all four targets. Two native iOS integration tests passed separately in a190fully booted simulator; Gradle’s standalone native runner still failed file coordination191and is explicitly not a passing suite. Native picker/provider UI remains unverified.192Browser EPUB chapters/resources are now connected to the shared scanner and193profile-owned reader through bounded asynchronous ZIP sessions. The shared parser194preserves spine order/paths; inventories are cached, full rescans invalidate them,195and repeated embedded images share bytes. Cancellation joins in-flight JavaScript196reads before archive/storage finalization, and CRC/size validation protects reads.197This addition passed 89 desktop checks and 45 Kotlin/Wasm browser tests with no198failures, errors or skips; all four targets compiled and the standalone Chrome199storage/archive harness passed. Tests exercise actual EPUB import, offline rich200content/images, cache reuse, retained progress, malformed size/CRC and cancellation.201The core anime `details.json` title/author/artist/description/genre/status fields now202merge with legacy metadata through bounded, cached asynchronous reads. Source numeric203statuses use a separate mapping; Licensed/Upcoming support was added in the follow-up below.204Empty genres clear file-provided tags, malformed optional details fall back, and205concurrent edits/progress survive. This addition passed 51 desktop checks and 47206Kotlin/Wasm browser tests with no failures/errors/skips and compiled all four targets,207including a real OPFS title-details fixture. Local cast was added in the follow-up below.208Episode sidecars now supply names, dates, filler flags, scanlators, summaries and209previews through bounded cached asynchronous reads and binary-search matching.210Explicit source numbers, season zero and original release labels survive display211renames, Room migration/reopen, backups and legacy sync. IDs, file paths and progress212remain stable across rescans. Verification passed 199 desktop checks, 111 Kotlin/Wasm213browser tests and 8 Android unit checks with no failures/errors/skips; all four214targets compiled. Tests include real OPFS scanning and Android SAF URI path planning;215provider UI and actual native video playback remain unverified.216One-level nested video discovery is connected on all four file backends, using217immediate children and provider display names rather than deriving Android document218paths. Per-folder sidecars and nested relative previews work, including season zero.219The follow-up passed 202 desktop checks, 113 Kotlin/Wasm browser tests and 8 Android220unit checks with no failures/errors/skips, compiled all four targets, and passed the221standalone Chrome storage/archive harness. IDs/progress survive repeated scans.222The shared detail screen's episode-season selector and a bounded per-scan sidecar223cache are verified: 63 desktop checks and 50 Kotlin/Wasm browser tests passed without224failures/errors/skips, and all four targets compiled. Compact/wide desktop Compose225renders received a scoped `ship` finish review; native-device UI remains unverified.226Licensed/Upcoming are now distinct database/domain values; the original six enum227ordinals remain intact. Native storage/backups and hub documents retain them, while228legacy Mangayomi exports use compatible Unknown fallbacks and legacy pulls preserve229existing unsupported local values. Verification passed 152 desktop checks and 83230Kotlin/Wasm browser tests without failures/errors/skips and compiled all four targets.231Local metadata cast now persists in the normalized Room v15 credit table and native232backups/hub documents, appears on the shared detail screen and exports with metadata.233Missing/malformed cast preserves existing credits; an explicit empty array clears them.234Portrait resolution reuses the scanner's contained image paths. Verification passed235182 desktop checks and 65 Kotlin/Wasm browser tests without failures/errors/skips,236including actual Room migration/reopen/replacement/deletion, zero cast-row writes on237progress updates and real OPFS scanning; all four targets compiled. Compact/wide238desktop Compose renders received a scoped `ship` review, with native-device UI unverified.239The shared JavaScript/Mihon detail decoder now carries optional source cast into the240same storage, backup/sync and detail-screen path. Missing/malformed data preserves241credits, empty lists clear them, and source portraits are limited to web URLs. Offline242detail fallback isolates sources with identical URLs and does not return unrelated243chapters for missing titles. Verification passed 54 desktop checks and 49 Kotlin/Wasm244browser tests without failures/errors/skips, including actual QuickJS execution and245repository persistence; all four targets compiled. Bridge binaries still need to246supply cast in their response. The bundled Android bridge now forwards optional cast247and Upcoming; 14 Android bridge unit checks passed and the app compiled, including248an actual class compiled against the older interface and loaded against the new host.249External bridge binaries that omit credits need their own update.250Source-provided related entries are connected for JavaScript and Mihon runtimes251(bundled Android bridge included) through a shared on-demand screen; see252`../features/SOURCE_RELATIONS.md`. Verification passed 57 desktop checks and 51253Kotlin/Wasm browser tests and compiled all four targets. External bridge binaries254must implement the method themselves.255Stage 5 completion: Animetail season records are separate titles linked by `parentId`,256with `fetchType` and `seasonNumber` (Room v16, nondestructive v15 migration). JavaScript257(`fetch_type` + optional `getSeasonList`), Mihon (`getSeasonList`) and the bundled258Android bridge (extensions-lib 16 `FetchType`/`season_number`, older APKs default to259Episodes) feed them; refresh and library updates upsert seasons and refresh each season.260The library, home and local lists show parents only; cleanup keeps seasons of library261shows; the detail screen lists seasons with progress/continue and opens each season's262own page. Local folders without episode files become Seasons titles, moving earlier263flattened progress/history to the season records and passing an earlier favorite season264folder's library membership to its show once. Backups/hub documents keep the fields,265merges remap parents, older payloads default to Episodes, legacy exports omit them.266Local-video playback was verified on desktop through the real scanner, player resolution267and libmpv. Two playback bugs were fixed: libmpv refused to start under any non-C268LC_NUMERIC inherited by the JVM (e.g. `LANG=en_US.UTF-8`), and `%XX` file names failed269through `file://` URLs. Frame-derived covers (Seasons parents use their first season)270and episode thumbnails are generated after scans with bounded, cancellable, content-keyed271caching: Android `MediaMetadataRetriever`, iOS `AVAssetImageGenerator`, desktop headless272libmpv and browser `<video>`+canvas. Formats a platform cannot decode, and Linux without a273system libmpv, produce no artwork. Verification passed 167 desktop checks (including the274Room v15→16 migration/reopen test and three real-libmpv checks with no skips), 84275Kotlin/Wasm browser tests and 17 Android bridge unit checks, without failures/errors/skips;276all four targets compiled. Native picker/provider UI, on-device Android/iOS playback and277external bridge binaries that omit cast/relations/season fields remain outside this278verification. See `../features/SEASON_RECORDS.md`, `../features/LOCAL_VIDEO_ARTWORK.md`279and `../features/LOCAL_LIBRARY_COMPATIBILITY.md`.280281Stage 6: episodes can be manually marked/unmarked as filler (`chapter.fillerOverride`;282null follows the source). Refreshes, rescans and syncs keep writing the source value, so283the user mark wins; download policies, the new anime Filler filter, legacy sync/export and284merges use the effective value. The chapter/episode filter sheet's **Set as default**285stores sort and filters as the media type default, optionally resetting library entries of286that type to it; unconfigured titles follow it and no default preserves existing behavior.287Verified in the same run above (`FillerOverrideTest`, `ChapterListDefaultsTest`,288download-policy, sync-mapper and local-rescan checks on desktop and Wasm). Season-list289sort/display preferences are not implemented. See290`../features/FILLER_AND_CHAPTER_DEFAULTS.md`.291292Stage 10: a shared TorrServer HTTP client and `TorrentStreams` service (`features.torrent`,293off by default) resolve torrent library entries and extension magnet/`.torrent` videos into294TorrServer `play` stream URLs in `ProfileReaderContent.videos()`, the one source for295playback, quality switching, failover, casting and external players. Anime downloads use296the same expansion. Each video file of a multi-file torrent becomes its own stream after297metadata polling, and Animetail's `index=` selects one file. Local `.torrent` files are298uploaded. The tracker list, with a reset to Animetail's list, is merged into the server's299full `BTSets` (`DefaultTrackers`, `RetrackersMode` 1). Desktop can run the pinned official300`MatriX.147` binary (SHA-256-verified opt-in download, or a user-provided path) as a301supervised subprocess. Supervision covers the `/echo` health check, crash restart with302backoff, killing orphans by pid and start time, a JVM shutdown hook, restart on303port/proxy/binary change, per-profile state removed with the profile, and stop on session304retirement. Tracker/peer/full proxy settings become TorrServer launch flags, because its305settings API has no proxy fields. Every platform can use a remote server; TorrServer's CORS306allows all origins and private networks. Android, iOS and web cannot host the engine: APK307size (+64 MB arm64) and W^X; no subprocesses and GPL-3.0/App Store terms; browser308sandbox. Yokan never bundles the GPL-3.0 binary because the repository has no license file.309Verification: 9 MockEngine `TorrentStreamsTest` cases on desktop and Kotlin/Wasm, 4 real310subprocess `DesktopTorrServerHostTest` cases with a fake server, and 10 `TorrentUtilsTest`311cases, all without failures or skips. All four targets compiled. No real swarm, remote312server or device playback was exercised.313314Stages 11 and 12: shared adapters for MangaUpdates, Shikimori, Bangumi, Hikka, MangaBaka and TMDB315(sync ids 10–15) and enhanced Komga, Kavita, Suwayomi and Jellyfin server trackers (20–23) are316registered with the existing trackers: Tracking settings (credentials dialog with the provider's317rejection message; OAuth via the existing `yokan://tracker/<provider>` callback on Android, pasted318code/callback URL elsewhere), Manage trackers, the detail tracking search, library tracker319filters/grouping/scores and backups (credentials only in sensitive backups). The repository now320notifies `TrackerAccounts` after local writes: bind fetches or creates the remote entry, edits and321reading (with *Update progress after reading*) push progress/status/score, detail opens refresh322with never-backwards "smart sync", and unbind can also delete the remote entry. Enhanced trackers323accept titles from their server's source, match the source link to the configured server, bind on324library add and sync chapter/episode-number progress both ways (remote progress marks local325chapters read). An opt-in *Track when adding to library* binds other signed-in trackers on exactly326one same-title result. `id:<provider id>` resolves directly on all new trackers and on AniList, MAL,327Kitsu, SIMKL and Trakt. The original five adapters keep their local-only bind/update behavior;328Jellyfin uses the current `/Items` and `/UserPlayedItems` routes. Verification passed 128 tracker329desktop checks (149 with detail/local-library regressions) and 131 Kotlin/Wasm browser tests without330failures/errors/skips, all against Ktor `MockEngine` HTTP fixtures (auth, search, `id:`, bind,331update wire formats, refresh, unbind, token refresh/expiry and rejected credentials); all four332targets compiled. No live account or server was used. Concrete blockers: Hikka sends no CORS333headers to other origins (no browser support); Bangumi's OAuth token endpoint has no CORS (web uses334a personal token); MangaUpdates returned 403 to all probes from the verification host, so its335browser CORS is unverified; self-hosted servers need CORS configured for web; desktop/iOS/web have336no `yokan://` dispatcher, so OAuth codes are pasted. `ParityStateContractTest`'s three navigation-order337checks fail on the current worktree's added Home navigation entry, independent of tracking.338See `../features/TRACKERS_EXTENDED.md`.339340Stage 13: **SyncYomi** and **Google Drive** are new sync providers (`SyncServerProvider.SyncYomi`/341`GoogleDrive`, stored by name, no Room change) routed by `HybridSyncService`. SyncYomi follows upstream:342`GET/PUT {host}/api/sync/content` with `X-API-Token`, raw protobuf `Backup` bodies, required `ETag`,343`If-Match` on upload, 404 = no remote, unreadable body overwritten, 412 restarts the run (3 passes, then344a conflict error). Drive state sync keeps one Yokan-format `yokan_sync.json.gz` in `appDataFolder`345with a device id, a `yokan_sync.lock` lock (10-minute expiry, foreign-lock refusal, oldest-lock wins on346simultaneous starts, always released) and merges only files written by another device; sign-in uses the347user's own Desktop-app OAuth client with PKCE and a pasted `http://127.0.0.1` callback. Both merge the348remote copy through a new guarded `BackupService.applyBackupIf(plan, Merge, accepts)` and keep the349identity/lease/guarded-commit invariants of `../architecture/PROFILE_OWNERSHIP.md`; existing Hub,350Mangayomi and `cloud://` backup paths are unchanged. Six device-local sync triggers (chapter read/open,351episode seen/open, app start/resume) drive the scheduler's provider-agnostic sync through a352session-owned single-flight coordinator (5 s/1 s debounce, 60 s minimum gap, one queued follow-up) hooked353at repository level and the Compose `ON_START` lifecycle. `BackupFormat.Tachiyomi` exports Animetail's354`Backup` protobuf (`.tachibk` gzip, raw at compression 0); the importer now also reads tracks, history,355favorite, fetch dates, numbers and episode filler, with upstream millisecond dates and 0-based pages.356Stage 16: a per-media-type, device-local *Hide entries already in library* preference filters source357Popular/Latest/Search/Filter listings and Home source feeds using the in-library badge's link set358(no per-item reads), re-filters on toggle/library change without refetching and auto-loads up to five359further pages when a page is fully hidden; global search is unfiltered, as upstream. Home gains a360*Recommended from your TMDB titles* shelf: up to 8 TMDB-tracked seeds, `/3/{movie|tv}/{id}/recommendations`361with the TMDB tracker's API key (Home read token as fallback), at most 3 concurrent requests, ranked by362seed frequency, excluding tracked/library titles, cached 6 h per seed set and cancelled with the Home load.363Verification passed 203 desktop checks and 155 Kotlin/Wasm browser tests without failures/errors/skips364(new: `SyncYomiSyncServiceTest`, `GoogleDriveSyncServiceTest`, `HybridSyncServiceTest`,365`SyncTriggerCoordinatorTest`, `RepositorySyncTriggersTest`, `TachiyomiBackupEncoderTest` with round-trip and366field-number/wire-type fixtures, `SourceLibraryHidingTest`, `HomeFeedHidingTest`,367`TmdbRecommendationsTest`, `HomeTmdbRecommendationsTest`, plus sync/backup/home regressions), all against368scripted HTTP fixtures; all four targets compiled. `HubSyncServiceTest.interruptedMultiChunkBootstrapRestartsFromTheBeginning`369fails (33 of 34 Hub tests pass): it scripts two bootstrap chunks for 2,000 titles, and the uncommitted370stage 4/5 title fields appear to need a third 10,000-op chunk; Hub chunking was not changed here.371Concrete blockers: browsers need a SyncYomi server with CORS for `X-API-Token`/`If-Match`/`PUT` and an372exposed `ETag`; Google's token/Drive CORS is unverified; the loopback page is not intercepted on any373platform (the user pastes its address) and Android/iOS custom-scheme redirects would need platform OAuth374client types; the web build cannot gzip, so its `.tachibk` and Drive file are uncompressed (readers accept375both). No live SyncYomi server, Google account, TMDB account or Mihon/Aniyomi/Animetail restore was used.376See `../features/SYNC_PROVIDERS_EXTENDED.md`, `../features/SOURCE_FEED_HIDING.md` and `../features/HOME_DISCOVERY.md`.377

Search chapters, reference and source filenames.