Yokan / rebuild
Course 1 8624561

HOME_DISCOVERY.md

docs/features/HOME_DISCOVERY.md

documentation / design asset97 lines
1# Home and discovery23Home is implemented entirely in `commonMain` and is available on Android, iOS,4desktop and web. New installations start at Home. Existing explicit navigation5orders are preserved; Home is appended when it is missing. Navigation settings6can move or hide it. Compact navigation uses four destinations and a Sections7menu when more than five destinations are enabled.89## Discover and resume1011- Featured titles have manual paging, with optional automatic advance every12  seven seconds. Automatic advance is off by default and pauses during scrolling,13  on e-ink displays, and when Compose reports a zero motion-duration scale.14- Continue reading and watching combines manga, anime and novels. It resumes the15  saved chapter or advances from a completed chapter to the next unread entry in16  reader order. Manga pages, video timestamps and novel percentages retain their17  own units. Deleted history references are ignored.18- AniList supplies popular anime, manga and novels, plus recommendations based19  on the most recent title. Recommended for you combines discovery and library20  titles, preferring genres shared with recent activity.21- Optional TMDB trending movie and series shelves use the API Read Access Token22  supplied by the user in Customize Home.23- With TMDB enabled, "Recommended from your TMDB titles" asks TMDB24  (`/3/{movie|tv}/{id}/recommendations`) about up to eight titles tracked with25  the TMDB tracker, most recently updated or watched first. Titles recommended by26  more seeds rank higher; seeds, other TMDB-tracked titles and library titles are27  never suggested. It uses the TMDB tracker's API key, falling back to the Home28  read access token, and is hidden when neither exists or nothing is tracked. One29  failing seed does not hide the shelf. It follows the All/Movie/Series filters,30  can be hidden under visible shelves, and opens cards like the trending shelves.31  Results are cached for six hours per seed set. Upstream Animetail has no32  equivalent shelf.33- Catalog cards find the title across installed sources. Existing matching local34  titles open directly. Source-feed cards open their source-specific title;35  catalog metadata itself does not provide playback or chapter URLs.36- Media filters, actual ratings, provider toggles, visible shelves, shelf size,37  library-only featured titles and completed-title suppression are configurable.38- Up to eight source feeds can combine popular, latest and saved-search listings.39  They can be removed and reordered. Saved searches are checked against the40  current source schema before use. Source engines have the same platform41  capabilities and requirements as Browse.4243## Reliability and storage4445Local resume data is projected from observed repository snapshots off the UI46thread. Provider requests run independently with at most three active requests;47each request has a 15-second deadline. Leaving Home cancels requests. Late48responses cannot overwrite newer configuration. A failed refresh retains usable49items and shows a shelf-specific recovery action. AniList authorization failures50are reported as network problems; credential recovery applies to TMDB. Home51cleanup waits for cancelled request generations and their finalizers before52profile resources are released.5354The profile-owned metadata cache holds at most 32 entries for five minutes (six55hours for TMDB recommendations).56Refresh bypasses the cache. Provider credentials, adult-content settings, source57versions, saved presets and source preferences participate in cache/request58invalidation.5960Home configuration is device-local. It is excluded from hub synchronization and61preserved during restore. Portable exports omit its token and installed-source62references. Credentials are also removed from presentation state.6364## Existing visual system6566Home extends Yokan's existing Material theme: `YokanScaffold`, theme color roles,67the configured app font and Material type hierarchy, shared `CoverImage` and68`EmptyState`, and existing settings tiles and sheet sizing. It introduces no69separate palette, font family or global design tokens. Featured artwork uses a70dark gradient for white text; shelves use the existing rounded cover treatment.71At 840 dp and above, posters widen from 136 dp to 172 dp and the featured panel72grows from 320 dp to 340 dp. These are Home layout choices, not app-wide rules.7374## Validation7576Common tests cover resume projection, filters, title matching, ratings, provider77failure/timeout/cancellation, source-runtime disposal, cache refresh/expiry,78token export and compact navigation. Desktop Compose render tests cover phone,79tablet, desktop, 150% text, empty/error states and the customization toolbar.80Images are in `composeApp/build/reports/home-ui`: `home-*.png` are81desktop-rendered shared layouts; `native-android-*.png` are Android runtime82captures. Capture existence alone does not establish visual approval.8384Final combined verification passed desktop, WasmJs, iOS SimulatorArm64 and85debug Android compilation, plus 142 tests with zero failures, errors or skips.86Android debug assembly and native UI capture passed earlier, before the final87code-only cleanup and provider-error refinements.8889The scoped finish review approved shipping for native Android phone, tablet and901.4× font captures, with supplemental shared Compose layouts and no material91fixes requested. Native iOS runtime and the actual desktop shell have not92received visual verification; no final all-platform UI approval has been93established.9495For optional local capture artwork, set `YOKAN_HOME_UI_COVER` and96`YOKAN_HOME_UI_BANNER` to local image paths when running `HomeScreenRenderTest`.97The test also works without artwork and never requires the network.98

Search chapters, reference and source filenames.