LIBRARY_DEFAULT_CATEGORIES.md
docs/features/LIBRARY_DEFAULT_CATEGORIES.md
1# Default categories23Open Settings → Library → Categories, choose Manga, Anime or Novel, then select4**Default category for new library entries**. Each media type has its own choice:56- **Ask each time** preserves the existing category picker when categories exist.7- **Uncategorized** adds new entries without a category prompt or assignment.8- A category adds new entries directly to that category.910The choice is profile-local and persists across restarts. It is implemented in shared11code for Android, iOS, desktop and web. Existing installations default to Ask each time;12their existing library entries and category assignments are unchanged.1314The repository applies a valid default only when an entry first becomes a favorite15and has no categories. Repeated favorite writes do not reassign an entry that the user16explicitly left Uncategorized. Existing category assignments are preserved. Explicit17category-picker selections, including Uncategorized, take precedence over the default.18Explicit category and favorite changes publish together in one database transaction,19so observers never see an intermediate automatic assignment.20Removing an entry from the library still clears its categories; adding it later uses21the current default again.2223Defaults are validated against categories belonging to the entry's media type.24Missing, invalid, deleted, or cross-media IDs are never assigned. Deleting a category25through category management clears defaults pointing to it. If sync/restore removes26or replaces categories, an invalid default displays Ask each time until reconfigured.2728The category settings page observes category/default changes without reacting to29unrelated download-progress writes. Default assignment is performed in the database30transaction that changes favorite state. Preferences are nested under feature settings,31avoiding the JVM constructor-parameter limit in DbSettings. They follow the existing32device-local feature preference policy for backups and synchronization.33