Adding tags field to personas and lorebooks & filter with tags, sort with date and aphabetically - #77
Adding tags field to personas and lorebooks & filter with tags, sort with date and aphabetically#77rppavan wants to merge 1 commit into
Conversation
|
Hey, thanks for working on this. the feature looks good overall, but there are a few things we need to fix before merging:
|
|
Sync. Wire structs never carried tags at all. Worse: materialize_domain_heads feeds a rebuilt snapshot back through the same INSERT OR REPLACE, so a peer editing an unrelated setting nulled out every persona tag on the other device. Now carried through the SELECTs, both wire structs, both apply paths. CHANGE_SCHEMA_VERSION bumped so old heads rebuild from the live DB. Backups/export. Round-trips now: backup, UEC/USC, ST export, character-package importer. Tests both domains, plus one that builds a tagless snapshot the old way so the wipe is demonstrated, not assumed. Tag filter dead end. Facet counts came from the filtered set, so a zero-match selection emptied the chip list, and the clear button was gated on that same count. Selected tags now stick around as zero-count chips, clear follows the selection alone, rules moved into libraryPipeline.ts where they're tested. i18n. All 19 locales, reusing each one's existing wording for "Tags" and lorebooks. Test pins the keys. Also caught library.sort.label, never rendered anywhere; it's the sort button's accessible name now. |
|
Sync is being rewritten completely. Though I havent reviewed any of your code atm. |
Add tag support to personas and lorebooks, including editing UIs, library sorting and faceted tag filtering, and round-tripping across sync, backup, export and transfer. Migration v88 -> v89 adds the tags columns; sync v2 carries the new column automatically via full-row changesets.
Personas and lorebooks can now carry tags, matching the existing Character.tags. Tags are stored as a JSON array in a nullable TEXT column and edited in the persona create/edit forms and the lorebook metadata sheet. Adds organization controls to the Library: a sort toggle (Recent / A–Z, URL-persisted) and a faceted tag-filter chip row. To make tag filtering meaningful across the whole Library, this also gives personas and lorebooks a tags field (characters already had one).
Tags for personas & lorebooks (groundwork)
Library sorting + tag filtering