dev→main: similar-search render fix + reset-content-tagging + scan persistence #66

Merged
bvandeusen merged 3 commits from dev into main 2026-06-04 16:59:52 -04:00
Owner

Three CI-green fixes/features (HEAD 5a6a956, run #519 green). No new migrations (alembic head stays 0036).

Fixes

  • Gallery similar-search render (26e47a8): the "See all similar" takeover fetched results but drew nothing — GalleryGrid only rendered via date-groups, which similar-mode returns empty (results are ranked, not chronological). Now renders a flat ranked list when there are no date groups (hardens the grid for any non-grouped result set).
  • Cleanup scans survive navigation (5a6a956): the transparency / single-color audit cards held the run + poll timer in local component state, so navigating away lost them. Each card now reconnects to its rule's latest run on mount (?rule= filter added) — resumes polling if running, or shows the completed result.

Feature

  • Reset content tagging (91b0145): a Tag-maintenance action that deletes every general + character tag (cascading their applications/aliases/allowlist/rejections/centroids) so the operator can re-tag from scratch via the Camie auto-suggest, while preserving fandoms, series (+ page order), and stored tagger predictions. Dry-run-preview → confirm flow with a back-up-first warning; irreversible except via DB backup restore.

🤖 Generated with Claude Code

Three CI-green fixes/features (HEAD `5a6a956`, run #519 green). No new migrations (alembic head stays 0036). ## Fixes - **Gallery similar-search render** (`26e47a8`): the "See all similar" takeover fetched results but drew nothing — `GalleryGrid` only rendered via date-groups, which similar-mode returns empty (results are ranked, not chronological). Now renders a flat ranked list when there are no date groups (hardens the grid for any non-grouped result set). - **Cleanup scans survive navigation** (`5a6a956`): the transparency / single-color audit cards held the run + poll timer in local component state, so navigating away lost them. Each card now reconnects to its rule's latest run on mount (`?rule=` filter added) — resumes polling if running, or shows the completed result. ## Feature - **Reset content tagging** (`91b0145`): a Tag-maintenance action that deletes every `general` + `character` tag (cascading their applications/aliases/allowlist/rejections/centroids) so the operator can re-tag from scratch via the Camie auto-suggest, while **preserving fandoms, series (+ page order), and stored tagger predictions**. Dry-run-preview → confirm flow with a back-up-first warning; irreversible except via DB backup restore. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bvandeusen added 3 commits 2026-06-04 16:59:46 -04:00
fix(gallery): render similar-mode results (flat list when no date groups)
CI / lint (push) Successful in 3s
CI / backend-lint-and-test (push) Successful in 12s
CI / frontend-build (push) Successful in 22s
CI / integration (push) Successful in 2m58s
26e47a86cb
The 'See all similar' takeover fetched /api/gallery/similar fine (200, ~100
results) but the grid showed nothing: GalleryGrid renders ONLY by iterating
store.dateGroups, and similar-mode returns date_groups=[] (results are ranked
by cosine distance, not chronological). Zero groups → zero tiles despite
store.images being full. Add a flat fallback: when there are no date groups
but images exist, render them as one ungrouped list in ranked order (no date
headers). The modal Related strip was unaffected (it renders its images
directly). Test locks both the flat and grouped paths.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat(tags): 'Reset content tagging' admin action
CI / lint (push) Successful in 3s
CI / backend-lint-and-test (push) Successful in 11s
CI / frontend-build (push) Successful in 30s
CI / integration (push) Successful in 2m57s
91b0145bc8
Wipe every general + character tag so the operator can re-tag from scratch via
the Camie auto-suggest, while PRESERVING fandoms, series (+ series_page order),
and each image's stored tagger_predictions (so suggestions repopulate
immediately). One set-based DELETE FROM tag WHERE kind IN ('general','character')
— the five tag-referencing tables all cascade, so applications + aliases +
allowlist + rejections + centroids clear automatically; series tags aren't
deleted so series survive; Tag.fandom_id is SET NULL so fandoms are untouched.

Reuses the established dry-run-preview -> confirm pattern: cleanup_service.
reset_content_tagging() + POST /api/admin/tags/reset-content +
TagMaintenanceCard section with a backup-first warning and a red confirm
showing exact counts (tags by kind + image applications). Irreversible except
via DB backup restore; the wipe only fires when the operator confirms.

Tests: service dry-run counts + live delete preserves fandom/series/series_page
while content tags + their image_tag cascade away; API dry-run wiring.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fix(cleanup): library scans survive navigation, reconnect on return
CI / lint (push) Successful in 2s
CI / backend-lint-and-test (push) Successful in 11s
CI / frontend-build (push) Successful in 24s
CI / integration (push) Successful in 2m56s
5a6a95682d
The transparency / single-color audit cards held the run + poll timer in
local component state, so navigating away destroyed both and onMounted never
reconnected — the Celery scan kept running and writing LibraryAuditRun, but
the UI forgot it. Now each card, on mount, fetches its rule's latest run
(GET /api/cleanup/audit?rule=<rule>&limit=1) and rehydrates: shows progress +
resumes polling if still running, or shows the completed result (ready/applied/
error) so the operator can act on it after returning. Adds the ?rule= filter
to the audit-history endpoint + cleanup store latestAuditForRule().

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
bvandeusen merged commit 81688815a0 into main 2026-06-04 16:59:52 -04:00
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#66