# Non-UI parity implementation

Requested 2026-10-14: implement every remaining functional gap in
`ANIMETAIL_DIFF.md`, with every ported capability available across supported
platforms. Existing Yokan features and user data must be preserved. A registered
adapter, configuration model or placeholder is not completed support.

## Delivery ledger

| Stage | Scope | Status |
|---|---|---|
| 1 | Download new releases, category/unread/filler rules, download-ahead, retention and protected cleanup | Implemented and verified 2026-10-15 |
| 2 | Tall-image splitting, external downloaders, image data saver and exceptions; browser CBZ support | Implemented and verified 2026-10-15 |
| 3 | Search parser and fields, automatic grouping, category defaults/sorting, new sorts and filters | Implemented and verified 2026-10-15 |
| 4 | Update constraints/restrictions/grouping scope and Updates/Upcoming filtering | Implemented and verified 2026-10-16; device telemetry limits documented |
| 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 |
| 6 | Filler editing and chapter/episode defaults propagation | Implemented and verified 2026-10-18; season-list preferences documented as remaining |
| 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`) |
| 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`) |
| 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`) |
| 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`) |
| 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 |
| 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 |
| 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 |
| 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`) |
| 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`) |
| 16 | Hide library items in source feeds and personalized TMDB recommendations | Implemented and verified 2026-10-18; live TMDB account unverified |
| 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`) |

## Implementation rules

- Domain rules, persisted state, HTTP adapters and configuration live in shared code.
- Native-only mechanisms need equivalent platform integrations or an explicitly
  documented external/platform blocker; they must not be silently omitted.
- Optional integrations use user-owned credentials and configuration. No upstream
  credentials are copied or embedded.
- Automatic downloads are opt-in and use the existing persistent, constrained,
  deduplicated queue. Cleanup preserves local-library originals, active tasks,
  bookmarks and excluded categories by default.
- Tests must cover actual behavior and failure/cancellation/recovery boundaries.
  Each completed stage is compiled for desktop, Android, iOS and web.

## Verification and blockers

Stage 1: 207 desktop regression tests and 6 Kotlin/Wasm browser integration tests
passed. Desktop, Android, iOS simulator ARM64 and Wasm compiled. Real Chrome OPFS
checks passed for 12 MiB streaming, reload recovery, resume, range serving, protected
deletion, path isolation and HTML sandboxing. A temporary asynchronous negative
control correctly failed and was removed before the final passing run.

The web target previously had no download filesystem. Stage 1 adds OPFS storage,
async file APIs, a range-serving media worker and bounded streaming HTTP for extra
profiles. Legacy backups remain compatible, and profile deletion removes owned
OPFS files while preserving explicit exports. Anime/novel download resolution and
offline consumption were completed alongside the policy integration.

See `../features/DOWNLOAD_AUTOMATION.md` for behavior, defaults and recovery details.
Stage 2 adds processing/downloader controls and completes browser archive support;
broader local-library import/management stays in stage 5. Stage 3 is complete;
stage 4 is verified with documented telemetry limits; stages 5–17 are verified with
their documented platform blockers. Integrated run on 2026-10-18: Android, iOS
simulator ARM64, desktop and web compiled; 1,900 desktop tests (one manifest
assertion updated for the new intent filters, then passing; 2 skipped), 1,631
Kotlin/Wasm browser tests, 1,672 Android unit tests and 17 bundled-bridge tests passed.
No live accounts, servers, devices, Chromecasts or torrent swarms were exercised.

Stage 2 progress: tall-image splitting, wsrv/reSmush/Bandwidth Hero image data saver,
source/format exceptions, original fallback and browser CBZ creation/reading are
implemented. The image integration passed 69 desktop tests and compilation on all
four targets. Chrome checks passed streamed CBZ creation and reading, compressed
entries, reload recovery, CRC failures, path/index bounds and original-file protection.
The follow-up Kotlin/Wasm run passed 19 integration tests, including CBZ creation
and reload across the Kotlin/JavaScript boundary, compression protocols, and
isolated HTTP streaming. The final broader run passed 249 desktop regression tests
and 26 Kotlin/Wasm browser tests, including the real browser Skia image codec and
six aria2 protocol cases. Desktop, Android, iOS simulator ARM64 and web compiled.
The >64 MiB streaming test retains its backpressure assertions; its Mocha timeout
was increased from 2 to 30 seconds to accommodate cold/slow hosts. Chrome also
verified archive write-failure recovery and protection of nested original files.

Stage 2 is now connected end to end: manual-download routing, preferred backend,
server configuration/testing, remote queue progress and controls, durable admission,
serialized recovery, account/source identity checks, safe retries and reactive polling.
Remote receipts are device-local and never create local offline marks. Queue credentials
and operational data are stripped from exports, including sensitive backups.

The final integration run passed 270 desktop regressions and 60 Kotlin/Wasm browser
tests, and compiled desktop, Android, iOS simulator ARM64 and web. These include
profile isolation/retirement, atomic settings mutations, backup/sync filtering,
UI-to-backend manual routing, visibility-controlled polling and server switching.
No live aria2 server/account verification is implied; the JSON-RPC boundary is tested
with deterministic fixtures against the documented protocol. Users supply their server.
See `../features/DOWNLOAD_IMAGE_PROCESSING.md` and
`../features/EXTERNAL_DOWNLOADER_PROGRESS.md`.

Stage 3 progress: shared advanced search now supports boolean expressions, negation,
parentheses, text-field aliases, counts, update intervals and UTC date comparisons.
It preserves existing phrase/comma/genre searches, compiles once per query, bounds
input/token/depth complexity, and reuses observed chapter indexes without database
reads. The in-app library menu includes syntax help. The first run passed 20 desktop
tests and compiled desktop, Android, iOS simulator ARM64 and web.

Default-category preferences for manga/anime/novels are connected to category settings,
detail favorite actions and the repository. Existing assignments and explicit category
choices take precedence; missing/deleted/cross-media defaults cannot assign categories.
The final run passed 61 desktop regression tests and 20 Kotlin/Wasm browser tests,
with no failures, errors or skipped tests, and compiled desktop, Android, iOS simulator
ARM64 and web. Explicit category/favorite changes publish in one transaction, without
an intermediate default assignment. Schedule queries use all known release dates even
when release filters reduce the chapter list used for count comparisons. Tests include
atomic snapshot publication, malformed/bounded queries, restart/serialization,
per-media isolation, explicit choices, deleted/foreign categories and migration safety.
Automatic source/status/tracker-status/tag grouping and Ungrouped views, stable group
identities, an All view, category-specific card display/sort and scoped reset are now
connected in shared code. Grouping is independent per media type and preserves manual
assignments. Tracker metadata projections and release-selection reuse avoid chapter
regrouping on unrelated tracker writes; large group tab rows are virtualized.
The final grouping/category run passed 43 desktop checks and 29 Kotlin/Wasm browser
tests, with no failures, errors or skipped checks, and compiled desktop, Android,
iOS simulator ARM64 and web. The desktop checks include real Compose layout/navigation
with 1,000 tag groups at 360px and 1024px widths. Rendered images were inspected; the
selected distant group is visible and underlined after immediate alignment, and tab
widths fit their labels. This is a shared desktop render check at phone/desktop widths,
not native-device UI or frame-rate verification.
Stage 3 is complete: stable seeded random, normalized tracker-mean score, first-fetch
date and anime airing sorts, provider-specific tracking and custom interval filters
are connected. Public-ID airing lookup is explicit, bounded, batched and profile-owned;
cached values survive network failures and reject stale source/binding responses.
The final run passed 98 desktop checks and 78 Kotlin/Wasm browser tests, with no
failures, errors or skipped tests, and compiled desktop, Android, iOS simulator ARM64
and web. Room v12→v13 migration/reopen verifies preserved existing data and new dates.
The initial browser invocations selected zero tests because class-only wildcard
patterns did not match Wasm's full test names; corrected trailing-wildcard patterns
ran the 78 tests. No failed invocation is counted as verification.
See `../features/LIBRARY_SEARCH.md`, `../features/LIBRARY_DEFAULT_CATEGORIES.md` and
`../features/LIBRARY_GROUPING.md`, plus `../features/LIBRARY_SORTS_AND_FILTERS.md`.

External integration protocols and current platform capabilities will be checked
against primary documentation when each integration is implemented. No external
account, provider or hardware verification is implied.

Stage 4 progress: Updates row filters and separate Updates/Upcoming category filters
are connected in shared code and persisted per media type. Chapter lookups are indexed
once per title with update records; preference changes reuse resolved activity rows.
Verification passed: 15 desktop checks and 15 Kotlin/Wasm browser tests, with no
failures, errors or skipped tests, and desktop/Android/iOS simulator ARM64/web compilation.
Smart-update restriction switches and grouping-based refresh scope are now connected
for each media type. Defaults preserve global refresh and existing cadence. Captured
scope uses raw memberships independently of search/row filters, and empty/stale groups
cannot expand to global refresh. Scheduler/controller/single-title service calls are
serialized; error reports update atomically within the run's media/group scope and
preserve concurrent settings and other reports. Unchanged reports avoid extra writes.
The final combined run passed 62 desktop checks and 62 Kotlin/Wasm browser tests,
with no failures, errors or skipped tests, and compiled desktop, Android, iOS simulator
ARM64 and web. See `../features/ACTIVITY_FILTERS.md`,
`../features/SMART_UPDATE_RULES.md` and `UPDATE_CONSTRAINTS_NOTES.md`.

Stage 4 is complete at the application-policy level: network/power conditions are
configured, persisted and enforced in shared automatic refresh admission, with real
readers for all four targets and Android/iOS job integration. Manual refresh remains
independent. Deferred runs retain retry eligibility and unchecked error reports;
Android condition deferrals do not exhaust the ordinary failure retry limit.
The final run passed 54 desktop checks, 71 Kotlin/Wasm browser tests and 3 Android
WorkManager unit checks, with no failures, errors or skipped tests, and compiled all
four targets. Tests include actual bounded processes and browser JavaScript interop,
strict JSON values, denied/missing/stalled APIs, cache freshness, policy cancellation,
profile isolation and deferral after service-lock waits/between titles/media types.

Concrete telemetry limits remain: some browsers cannot report battery/Wi-Fi/cost;
macOS command interfaces cannot report cost; some virtual paths, Linux systems or
restricted desktop APIs cannot supply a reading. Power/Wi-Fi restrictions defer
with visible reasons when unknown, and unknown cost has an explicit user classification.
These limits are not represented as successful hardware detection or silent bypasses.
Native power changes and actual OS job timing were not exercised. See
`../features/AUTOMATIC_UPDATE_CONSTRAINTS.md`. Later parity stages remain required.

Stage 5 progress: the scanner now prepares asynchronous storage, bounds metadata/cover
reads and preserves edits/deletion made while reads suspend. Browser OPFS has indexed
readable entry listings, iterative traversal, and accurate empty-vs-missing directory
state after deletion/reload. The run passed 28 desktop checks and 10 Kotlin/Wasm browser
tests, with no failures, errors or skipped tests, and compiled all four targets.
File/folder imports are now available on all four targets with bounded 64 KiB reads,
coalesced progress, cancellation/profile retirement, protected originals and durable
COPY/READY journal recovery. Managed imports stay invisible until publication, including
when a configured scan root is their ancestor; published roots do not duplicate entries.
iOS uses open-in-place scoped, coordinated reads. Browser single-image reading uses
the actual media worker, and local media bypasses remote image optimizers.
The final combined run passed 77 desktop checks and 43 Kotlin/Wasm browser tests and
compiled all four targets. Two native iOS integration tests passed separately in a
fully booted simulator; Gradle’s standalone native runner still failed file coordination
and is explicitly not a passing suite. Native picker/provider UI remains unverified.
Browser EPUB chapters/resources are now connected to the shared scanner and
profile-owned reader through bounded asynchronous ZIP sessions. The shared parser
preserves spine order/paths; inventories are cached, full rescans invalidate them,
and repeated embedded images share bytes. Cancellation joins in-flight JavaScript
reads before archive/storage finalization, and CRC/size validation protects reads.
This addition passed 89 desktop checks and 45 Kotlin/Wasm browser tests with no
failures, errors or skips; all four targets compiled and the standalone Chrome
storage/archive harness passed. Tests exercise actual EPUB import, offline rich
content/images, cache reuse, retained progress, malformed size/CRC and cancellation.
The core anime `details.json` title/author/artist/description/genre/status fields now
merge with legacy metadata through bounded, cached asynchronous reads. Source numeric
statuses use a separate mapping; Licensed/Upcoming support was added in the follow-up below.
Empty genres clear file-provided tags, malformed optional details fall back, and
concurrent edits/progress survive. This addition passed 51 desktop checks and 47
Kotlin/Wasm browser tests with no failures/errors/skips and compiled all four targets,
including a real OPFS title-details fixture. Local cast was added in the follow-up below.
Episode sidecars now supply names, dates, filler flags, scanlators, summaries and
previews through bounded cached asynchronous reads and binary-search matching.
Explicit source numbers, season zero and original release labels survive display
renames, Room migration/reopen, backups and legacy sync. IDs, file paths and progress
remain stable across rescans. Verification passed 199 desktop checks, 111 Kotlin/Wasm
browser tests and 8 Android unit checks with no failures/errors/skips; all four
targets compiled. Tests include real OPFS scanning and Android SAF URI path planning;
provider UI and actual native video playback remain unverified.
One-level nested video discovery is connected on all four file backends, using
immediate children and provider display names rather than deriving Android document
paths. Per-folder sidecars and nested relative previews work, including season zero.
The follow-up passed 202 desktop checks, 113 Kotlin/Wasm browser tests and 8 Android
unit checks with no failures/errors/skips, compiled all four targets, and passed the
standalone Chrome storage/archive harness. IDs/progress survive repeated scans.
The shared detail screen's episode-season selector and a bounded per-scan sidecar
cache are verified: 63 desktop checks and 50 Kotlin/Wasm browser tests passed without
failures/errors/skips, and all four targets compiled. Compact/wide desktop Compose
renders received a scoped `ship` finish review; native-device UI remains unverified.
Licensed/Upcoming are now distinct database/domain values; the original six enum
ordinals remain intact. Native storage/backups and hub documents retain them, while
legacy Mangayomi exports use compatible Unknown fallbacks and legacy pulls preserve
existing unsupported local values. Verification passed 152 desktop checks and 83
Kotlin/Wasm browser tests without failures/errors/skips and compiled all four targets.
Local metadata cast now persists in the normalized Room v15 credit table and native
backups/hub documents, appears on the shared detail screen and exports with metadata.
Missing/malformed cast preserves existing credits; an explicit empty array clears them.
Portrait resolution reuses the scanner's contained image paths. Verification passed
182 desktop checks and 65 Kotlin/Wasm browser tests without failures/errors/skips,
including actual Room migration/reopen/replacement/deletion, zero cast-row writes on
progress updates and real OPFS scanning; all four targets compiled. Compact/wide
desktop Compose renders received a scoped `ship` review, with native-device UI unverified.
The shared JavaScript/Mihon detail decoder now carries optional source cast into the
same storage, backup/sync and detail-screen path. Missing/malformed data preserves
credits, empty lists clear them, and source portraits are limited to web URLs. Offline
detail fallback isolates sources with identical URLs and does not return unrelated
chapters for missing titles. Verification passed 54 desktop checks and 49 Kotlin/Wasm
browser tests without failures/errors/skips, including actual QuickJS execution and
repository persistence; all four targets compiled. Bridge binaries still need to
supply cast in their response. The bundled Android bridge now forwards optional cast
and Upcoming; 14 Android bridge unit checks passed and the app compiled, including
an actual class compiled against the older interface and loaded against the new host.
External bridge binaries that omit credits need their own update.
Source-provided related entries are connected for JavaScript and Mihon runtimes
(bundled Android bridge included) through a shared on-demand screen; see
`../features/SOURCE_RELATIONS.md`. Verification passed 57 desktop checks and 51
Kotlin/Wasm browser tests and compiled all four targets. External bridge binaries
must implement the method themselves.
Stage 5 completion: Animetail season records are separate titles linked by `parentId`,
with `fetchType` and `seasonNumber` (Room v16, nondestructive v15 migration). JavaScript
(`fetch_type` + optional `getSeasonList`), Mihon (`getSeasonList`) and the bundled
Android bridge (extensions-lib 16 `FetchType`/`season_number`, older APKs default to
Episodes) feed them; refresh and library updates upsert seasons and refresh each season.
The library, home and local lists show parents only; cleanup keeps seasons of library
shows; the detail screen lists seasons with progress/continue and opens each season's
own page. Local folders without episode files become Seasons titles, moving earlier
flattened progress/history to the season records and passing an earlier favorite season
folder's library membership to its show once. Backups/hub documents keep the fields,
merges remap parents, older payloads default to Episodes, legacy exports omit them.
Local-video playback was verified on desktop through the real scanner, player resolution
and libmpv. Two playback bugs were fixed: libmpv refused to start under any non-C
LC_NUMERIC inherited by the JVM (e.g. `LANG=en_US.UTF-8`), and `%XX` file names failed
through `file://` URLs. Frame-derived covers (Seasons parents use their first season)
and episode thumbnails are generated after scans with bounded, cancellable, content-keyed
caching: Android `MediaMetadataRetriever`, iOS `AVAssetImageGenerator`, desktop headless
libmpv and browser `<video>`+canvas. Formats a platform cannot decode, and Linux without a
system libmpv, produce no artwork. Verification passed 167 desktop checks (including the
Room v15→16 migration/reopen test and three real-libmpv checks with no skips), 84
Kotlin/Wasm browser tests and 17 Android bridge unit checks, without failures/errors/skips;
all four targets compiled. Native picker/provider UI, on-device Android/iOS playback and
external bridge binaries that omit cast/relations/season fields remain outside this
verification. See `../features/SEASON_RECORDS.md`, `../features/LOCAL_VIDEO_ARTWORK.md`
and `../features/LOCAL_LIBRARY_COMPATIBILITY.md`.

Stage 6: episodes can be manually marked/unmarked as filler (`chapter.fillerOverride`;
null follows the source). Refreshes, rescans and syncs keep writing the source value, so
the user mark wins; download policies, the new anime Filler filter, legacy sync/export and
merges use the effective value. The chapter/episode filter sheet's **Set as default**
stores sort and filters as the media type default, optionally resetting library entries of
that type to it; unconfigured titles follow it and no default preserves existing behavior.
Verified in the same run above (`FillerOverrideTest`, `ChapterListDefaultsTest`,
download-policy, sync-mapper and local-rescan checks on desktop and Wasm). Season-list
sort/display preferences are not implemented. See
`../features/FILLER_AND_CHAPTER_DEFAULTS.md`.

Stage 10: a shared TorrServer HTTP client and `TorrentStreams` service (`features.torrent`,
off by default) resolve torrent library entries and extension magnet/`.torrent` videos into
TorrServer `play` stream URLs in `ProfileReaderContent.videos()`, the one source for
playback, quality switching, failover, casting and external players. Anime downloads use
the same expansion. Each video file of a multi-file torrent becomes its own stream after
metadata polling, and Animetail's `index=` selects one file. Local `.torrent` files are
uploaded. The tracker list, with a reset to Animetail's list, is merged into the server's
full `BTSets` (`DefaultTrackers`, `RetrackersMode` 1). Desktop can run the pinned official
`MatriX.147` binary (SHA-256-verified opt-in download, or a user-provided path) as a
supervised subprocess. Supervision covers the `/echo` health check, crash restart with
backoff, killing orphans by pid and start time, a JVM shutdown hook, restart on
port/proxy/binary change, per-profile state removed with the profile, and stop on session
retirement. Tracker/peer/full proxy settings become TorrServer launch flags, because its
settings API has no proxy fields. Every platform can use a remote server; TorrServer's CORS
allows all origins and private networks. Android, iOS and web cannot host the engine: APK
size (+64 MB arm64) and W^X; no subprocesses and GPL-3.0/App Store terms; browser
sandbox. Yokan never bundles the GPL-3.0 binary because the repository has no license file.
Verification: 9 MockEngine `TorrentStreamsTest` cases on desktop and Kotlin/Wasm, 4 real
subprocess `DesktopTorrServerHostTest` cases with a fake server, and 10 `TorrentUtilsTest`
cases, all without failures or skips. All four targets compiled. No real swarm, remote
server or device playback was exercised.

Stages 11 and 12: shared adapters for MangaUpdates, Shikimori, Bangumi, Hikka, MangaBaka and TMDB
(sync ids 10–15) and enhanced Komga, Kavita, Suwayomi and Jellyfin server trackers (20–23) are
registered with the existing trackers: Tracking settings (credentials dialog with the provider's
rejection message; OAuth via the existing `yokan://tracker/<provider>` callback on Android, pasted
code/callback URL elsewhere), Manage trackers, the detail tracking search, library tracker
filters/grouping/scores and backups (credentials only in sensitive backups). The repository now
notifies `TrackerAccounts` after local writes: bind fetches or creates the remote entry, edits and
reading (with *Update progress after reading*) push progress/status/score, detail opens refresh
with never-backwards "smart sync", and unbind can also delete the remote entry. Enhanced trackers
accept titles from their server's source, match the source link to the configured server, bind on
library add and sync chapter/episode-number progress both ways (remote progress marks local
chapters read). An opt-in *Track when adding to library* binds other signed-in trackers on exactly
one same-title result. `id:<provider id>` resolves directly on all new trackers and on AniList, MAL,
Kitsu, SIMKL and Trakt. The original five adapters keep their local-only bind/update behavior;
Jellyfin uses the current `/Items` and `/UserPlayedItems` routes. Verification passed 128 tracker
desktop checks (149 with detail/local-library regressions) and 131 Kotlin/Wasm browser tests without
failures/errors/skips, all against Ktor `MockEngine` HTTP fixtures (auth, search, `id:`, bind,
update wire formats, refresh, unbind, token refresh/expiry and rejected credentials); all four
targets compiled. No live account or server was used. Concrete blockers: Hikka sends no CORS
headers to other origins (no browser support); Bangumi's OAuth token endpoint has no CORS (web uses
a personal token); MangaUpdates returned 403 to all probes from the verification host, so its
browser CORS is unverified; self-hosted servers need CORS configured for web; desktop/iOS/web have
no `yokan://` dispatcher, so OAuth codes are pasted. `ParityStateContractTest`'s three navigation-order
checks fail on the current worktree's added Home navigation entry, independent of tracking.
See `../features/TRACKERS_EXTENDED.md`.

Stage 13: **SyncYomi** and **Google Drive** are new sync providers (`SyncServerProvider.SyncYomi`/
`GoogleDrive`, stored by name, no Room change) routed by `HybridSyncService`. SyncYomi follows upstream:
`GET/PUT {host}/api/sync/content` with `X-API-Token`, raw protobuf `Backup` bodies, required `ETag`,
`If-Match` on upload, 404 = no remote, unreadable body overwritten, 412 restarts the run (3 passes, then
a conflict error). Drive state sync keeps one Yokan-format `yokan_sync.json.gz` in `appDataFolder`
with a device id, a `yokan_sync.lock` lock (10-minute expiry, foreign-lock refusal, oldest-lock wins on
simultaneous starts, always released) and merges only files written by another device; sign-in uses the
user's own Desktop-app OAuth client with PKCE and a pasted `http://127.0.0.1` callback. Both merge the
remote copy through a new guarded `BackupService.applyBackupIf(plan, Merge, accepts)` and keep the
identity/lease/guarded-commit invariants of `../architecture/PROFILE_OWNERSHIP.md`; existing Hub,
Mangayomi and `cloud://` backup paths are unchanged. Six device-local sync triggers (chapter read/open,
episode seen/open, app start/resume) drive the scheduler's provider-agnostic sync through a
session-owned single-flight coordinator (5 s/1 s debounce, 60 s minimum gap, one queued follow-up) hooked
at repository level and the Compose `ON_START` lifecycle. `BackupFormat.Tachiyomi` exports Animetail's
`Backup` protobuf (`.tachibk` gzip, raw at compression 0); the importer now also reads tracks, history,
favorite, fetch dates, numbers and episode filler, with upstream millisecond dates and 0-based pages.
Stage 16: a per-media-type, device-local *Hide entries already in library* preference filters source
Popular/Latest/Search/Filter listings and Home source feeds using the in-library badge's link set
(no per-item reads), re-filters on toggle/library change without refetching and auto-loads up to five
further pages when a page is fully hidden; global search is unfiltered, as upstream. Home gains a
*Recommended from your TMDB titles* shelf: up to 8 TMDB-tracked seeds, `/3/{movie|tv}/{id}/recommendations`
with the TMDB tracker's API key (Home read token as fallback), at most 3 concurrent requests, ranked by
seed frequency, excluding tracked/library titles, cached 6 h per seed set and cancelled with the Home load.
Verification passed 203 desktop checks and 155 Kotlin/Wasm browser tests without failures/errors/skips
(new: `SyncYomiSyncServiceTest`, `GoogleDriveSyncServiceTest`, `HybridSyncServiceTest`,
`SyncTriggerCoordinatorTest`, `RepositorySyncTriggersTest`, `TachiyomiBackupEncoderTest` with round-trip and
field-number/wire-type fixtures, `SourceLibraryHidingTest`, `HomeFeedHidingTest`,
`TmdbRecommendationsTest`, `HomeTmdbRecommendationsTest`, plus sync/backup/home regressions), all against
scripted HTTP fixtures; all four targets compiled. `HubSyncServiceTest.interruptedMultiChunkBootstrapRestartsFromTheBeginning`
fails (33 of 34 Hub tests pass): it scripts two bootstrap chunks for 2,000 titles, and the uncommitted
stage 4/5 title fields appear to need a third 10,000-op chunk; Hub chunking was not changed here.
Concrete blockers: browsers need a SyncYomi server with CORS for `X-API-Token`/`If-Match`/`PUT` and an
exposed `ETag`; Google's token/Drive CORS is unverified; the loopback page is not intercepted on any
platform (the user pastes its address) and Android/iOS custom-scheme redirects would need platform OAuth
client types; the web build cannot gzip, so its `.tachibk` and Drive file are uncompressed (readers accept
both). No live SyncYomi server, Google account, TMDB account or Mihon/Aniyomi/Animetail restore was used.
See `../features/SYNC_PROVIDERS_EXTENDED.md`, `../features/SOURCE_FEED_HIDING.md` and `../features/HOME_DISCOVERY.md`.
