Yokan / rebuild
Course 1 8624561

LIBRARY_GROUPING.md

docs/features/LIBRARY_GROUPING.md

documentation / design asset51 lines
1# Library grouping and category overrides23Open a library's filter/settings sheet → Display → **Group library by**. Each media4type independently remembers Categories, Source, Status, Tracker status, Tags, or5Ungrouped. All implementations are shared by Android, iOS, desktop and web.67Categories remains the default and preserves manual assignments, ordering and hidden8categories. Automatic grouping creates views without writing category assignments.9Source views distinguish source IDs even when names are equal, with a legacy name/10language fallback for entries without IDs. Status uses the title's stored status.11Tracker status includes every distinct status across bound providers; an entry may12appear in several status views, with a separate Untracked view. Tag views trim13whitespace and merge case variants, include a title once per tag, and retain an14Untagged view. Ungrouped shows the entire filtered library.1516Group tabs are derived from the unfiltered library, so searching/filtering keeps17their identities and shows zero counts rather than reshuffling or removing them.18Automatic IDs are stable and distinct from manual category IDs, Uncategorized and19the All view. Hash collisions are detected and resolved in a deterministic order.20The All tab makes all-category searches and bulk selection refer to the page that21is actually visible. Tab navigation works for manual and automatic groups.2223Select a manual category, open the library settings sheet, and enable **Custom24display and sort for …** to store that category's card layout, grid size, badges,25continue buttons and sort order. Initial values copy the current global settings.26Changes in that scope preserve global settings and other categories/media types.27Disable the option to return to inherited settings. Tab visibility and library-wide28counts remain global. The All page and automatic groups use global settings.29Deleting a category removes its overrides. Preferences persist per profile and follow30the existing device-local feature preference backup/sync policy.3132Membership building uses one pass over library entries followed by one pass over33sorted matches, rather than a full-library scan for every source/tag/status. More34than 64 tabs use a lazy row with stable keys; only visible tabs are composed. Existing35small tab rows retain their Material behavior. Source/tag labels are bounded in width36in the lazy row, and long labels ellipsize.37Tabs fit their label width within those bounds. Distant programmatic jumps align38immediately; selecting a visible tab retains the short scroll animation.3940Tracker metadata is projected once in the shared library index. Provider/status/score41changes publish a new index without regrouping chapters; refresh timestamps and remote42progress-only writes do not publish another index. Selected chapter releases are reused43when only tracker metadata or completed-download counts change. Grouping, sorting and44category layout changes do not reselect chapter releases or read the database per title.4546Verification: 43 targeted desktop checks and 29 Kotlin/Wasm browser tests passed,47with compilation for Android, iOS simulator ARM64, desktop and web. The desktop48render check lays out 1,000 tag groups at 360px and 1024px widths and navigates to49the last group. The inspected renders are generated under50`composeApp/build/reports/library-ui/`. These checks do not claim native-device51runtime coverage or a measured frame rate.52

Search chapters, reference and source filenames.