v26.05.27.0: PostCard redesign + IR-style tag suffix + drop meta/rating + extension v1.0.4 CSP fix #28

Merged
bvandeusen merged 0 commits from dev into main 2026-05-27 11:31:18 -04:00
bvandeusen commented 2026-05-27 11:30:48 -04:00 (Migrated from git.fabledsword.com)

Summary

Five themes accumulated on dev since v26.05.26.5:

  1. PostCard redesign — container-query responsive layout, full-post PostModal (Patreon-style, stays in-curator), masonry PostImageGrid, empty-thumb placeholder, Pinia postModal.js store, modal store extended for post-scoped image cycling, htmlSanitize whitelist util for description rendering. ArtistPostsTab widened to 1600px. get_post returns uncapped thumbnails for the modal grid.

  2. IR-style tag-suffix inputTagAutocomplete drops the kind dropdown; new parse_kind_prefix util at backend/app/utils/tag_prefix.py mirrors IR's pattern (KNOWN_KINDS = character, fandom, series); POST /api/tags accepts name without kind and parses prefix at the boundary; explicit kind always wins.

  3. Drop meta + rating tag kinds — alembic 0023 deletes existing meta/rating rows (CASCADE clears related image_tag/alias/allowlist/suggestion_rejection/reference_embedding/series_page) and recreates the tag_kind ENUM without them. Drop/recreate ck_tag_fandom_requires_character CHECK around the type swap to dodge operator does not exist: tag_kind = tag_kind_old. Python enum + frontend KIND_OPTIONS/KIND_COLOR/KIND_ICONS/KINDS trimmed.

  4. Extension v1.0.4 — MV3 content_security_policy.extension_pages override to OMIT upgrade-insecure-requests. The default MV3 CSP was silently upgrading fetch('http://curator/...') to https:// and failing with NS_ERROR_GENERATE_FAILURE. Operator-hit on first Test connection attempt.

  5. Test pin fixestests/test_api_tags.py prefix tests repointed from artist:Eric to character:Saber (artist was dropped from KNOWN_KINDS earlier per the provenance-axis separation).

Migrations

alembic 0023_drop_meta_rating_tag_kinds — destructive (DELETEs meta/rating tag rows). Operator chose "clean break" over "convert to general".

Test plan

  • CI green (Forgejo Actions)
  • Deploy: :latest pulled, app / worker / ml-worker / scheduler / web recreated; alembic 0023 applied
  • Reinstall extension from the new ext-1.0.4 XPI — Test connection no longer NetworkErrors
  • Tag input on image modal: typing character:Saber parses to (Saber, kind=character) without the dropdown
  • PostCard compact at narrow widths, expands at wide; click opens PostModal in-curator
  • SELECT enum_range(NULL::tag_kind); no longer contains meta or rating
## Summary Five themes accumulated on dev since v26.05.26.5: 1. **PostCard redesign** — container-query responsive layout, full-post `PostModal` (Patreon-style, stays in-curator), masonry `PostImageGrid`, empty-thumb placeholder, Pinia `postModal.js` store, modal store extended for post-scoped image cycling, `htmlSanitize` whitelist util for description rendering. `ArtistPostsTab` widened to 1600px. `get_post` returns uncapped thumbnails for the modal grid. 2. **IR-style tag-suffix input** — `TagAutocomplete` drops the kind dropdown; new `parse_kind_prefix` util at `backend/app/utils/tag_prefix.py` mirrors IR's pattern (KNOWN_KINDS = `character`, `fandom`, `series`); `POST /api/tags` accepts `name` without `kind` and parses prefix at the boundary; explicit `kind` always wins. 3. **Drop `meta` + `rating` tag kinds** — alembic 0023 deletes existing meta/rating rows (CASCADE clears related image_tag/alias/allowlist/suggestion_rejection/reference_embedding/series_page) and recreates the `tag_kind` ENUM without them. Drop/recreate `ck_tag_fandom_requires_character` CHECK around the type swap to dodge `operator does not exist: tag_kind = tag_kind_old`. Python enum + frontend KIND_OPTIONS/KIND_COLOR/KIND_ICONS/KINDS trimmed. 4. **Extension v1.0.4** — MV3 `content_security_policy.extension_pages` override to OMIT `upgrade-insecure-requests`. The default MV3 CSP was silently upgrading `fetch('http://curator/...')` to `https://` and failing with NS_ERROR_GENERATE_FAILURE. Operator-hit on first Test connection attempt. 5. **Test pin fixes** — `tests/test_api_tags.py` prefix tests repointed from `artist:Eric` to `character:Saber` (artist was dropped from KNOWN_KINDS earlier per the provenance-axis separation). ## Migrations `alembic 0023_drop_meta_rating_tag_kinds` — destructive (DELETEs meta/rating tag rows). Operator chose "clean break" over "convert to general". ## Test plan - [ ] CI green (Forgejo Actions) - [ ] Deploy: `:latest` pulled, `app` / `worker` / `ml-worker` / `scheduler` / `web` recreated; alembic 0023 applied - [ ] Reinstall extension from the new ext-1.0.4 XPI — `Test connection` no longer NetworkErrors - [ ] Tag input on image modal: typing `character:Saber` parses to (Saber, kind=character) without the dropdown - [ ] PostCard compact at narrow widths, expands at wide; click opens PostModal in-curator - [ ] `SELECT enum_range(NULL::tag_kind);` no longer contains `meta` or `rating`
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/FabledCurator#28