# Default categories

Open Settings → Library → Categories, choose Manga, Anime or Novel, then select
**Default category for new library entries**. Each media type has its own choice:

- **Ask each time** preserves the existing category picker when categories exist.
- **Uncategorized** adds new entries without a category prompt or assignment.
- A category adds new entries directly to that category.

The choice is profile-local and persists across restarts. It is implemented in shared
code for Android, iOS, desktop and web. Existing installations default to Ask each time;
their existing library entries and category assignments are unchanged.

The repository applies a valid default only when an entry first becomes a favorite
and has no categories. Repeated favorite writes do not reassign an entry that the user
explicitly left Uncategorized. Existing category assignments are preserved. Explicit
category-picker selections, including Uncategorized, take precedence over the default.
Explicit category and favorite changes publish together in one database transaction,
so observers never see an intermediate automatic assignment.
Removing an entry from the library still clears its categories; adding it later uses
the current default again.

Defaults are validated against categories belonging to the entry's media type.
Missing, invalid, deleted, or cross-media IDs are never assigned. Deleting a category
through category management clears defaults pointing to it. If sync/restore removes
or replaces categories, an invalid default displays Ask each time until reconfigured.

The category settings page observes category/default changes without reacting to
unrelated download-progress writes. Default assignment is performed in the database
transaction that changes favorite state. Preferences are nested under feature settings,
avoiding the JVM constructor-parameter limit in DbSettings. They follow the existing
device-local feature preference policy for backups and synchronization.
