refactor(tags): unify suggestion source — one canonical DB-tag dropdown (#154) #209

Merged
bvandeusen merged 1 commits from dev into main 2026-07-10 15:52:45 -04:00
Owner

Unifies the tag-suggestion system and fixes the confidence-% flicker in the Explore + view-modal tag rail.

Every suggestion is a canonical DB tag now (tagging-v2 #114: heads + CCIP score existing concept tags). The pre-heads apparatus for model-predicted tags that didn't exist in the DB — creates_new_tag/raw_name/via_alias, the /suggestions/alias endpoint + add_alias_and_accept, AliasPickerDialog, and the store's aliasAccept/removeAlias — was dead and is removed.

The % flicker fix: the type-to-add dropdown was two row sources (server autocomplete + the image's ML suggestions) merged with a dedup that dropped the %-bearing suggestion row when the debounced server hit landed. Now it's ONE list of DB-tag matches, each annotated with the model's confidence (joined by canonical_tag_id) when the tag was scored for this image. No dedup, no flicker; picking a suggested tag still records acceptance via TagPanel.findPending.

Single fetch: score_image now reports above_threshold per row (vs the head's own suggest cut, separate from the inclusion floor), so the rail makes one min=0 request and derives the panel (above-threshold) + dropdown (all, text-filtered) client-side. The two /suggestions calls collapse to one.

Kept: manual "Create 'X' as " for novel typed names; the alias table + tag-side alias admin + auto-apply alias matching. Net −316 lines across 14 files (AliasPickerDialog.vue deleted).

Commit: a444cf8. CI green on dev tip (run 2110: lint + backend unit + integration + frontend build).

Post-merge: curator :latest redeploy picks it up (no migration).

🤖 Generated with Claude Code

https://claude.ai/code/session_01CgZP9v2otxVJymiYsnVuMy

Unifies the tag-suggestion system and fixes the confidence-% flicker in the Explore + view-modal tag rail. Every suggestion is a canonical DB tag now (tagging-v2 #114: heads + CCIP score existing concept tags). The pre-heads apparatus for model-predicted tags that didn't exist in the DB — `creates_new_tag`/`raw_name`/`via_alias`, the `/suggestions/alias` endpoint + `add_alias_and_accept`, `AliasPickerDialog`, and the store's `aliasAccept`/`removeAlias` — was dead and is removed. **The % flicker fix:** the type-to-add dropdown was two row sources (server autocomplete + the image's ML suggestions) merged with a dedup that dropped the %-bearing suggestion row when the debounced server hit landed. Now it's ONE list of DB-tag matches, each annotated with the model's confidence (joined by `canonical_tag_id`) when the tag was scored for this image. No dedup, no flicker; picking a suggested tag still records acceptance via `TagPanel.findPending`. **Single fetch:** `score_image` now reports `above_threshold` per row (vs the head's own suggest cut, separate from the inclusion floor), so the rail makes one `min=0` request and derives the panel (above-threshold) + dropdown (all, text-filtered) client-side. The two `/suggestions` calls collapse to one. Kept: manual "Create 'X' as <kind>" for novel typed names; the alias table + tag-side alias admin + auto-apply alias matching. Net −316 lines across 14 files (`AliasPickerDialog.vue` deleted). Commit: `a444cf8`. CI green on dev tip (run 2110: lint + backend unit + integration + frontend build). **Post-merge:** curator `:latest` redeploy picks it up (no migration). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01CgZP9v2otxVJymiYsnVuMy
bvandeusen added 1 commit 2026-07-10 15:52:40 -04:00
refactor(tags): unify suggestion source — one canonical DB-tag dropdown, drop dead raw/alias machinery (#154)
CI / backend-lint-and-test (push) Successful in 36s
CI / lint (push) Successful in 3s
CI / frontend-build (push) Successful in 20s
CI / integration (push) Successful in 3m45s
a444cf82d1
Every tag suggestion is a canonical DB tag now (tagging-v2 #114: heads + CCIP
score EXISTING concept tags). The pre-heads apparatus for model-predicted tags
that didn't exist in the DB — creates_new_tag / raw_name / via_alias, the
/suggestions/alias endpoint + add_alias_and_accept, AliasPickerDialog, and the
store's aliasAccept/removeAlias — was dead and is removed.

The type-to-add dropdown was TWO row sources (server autocomplete + the image's
ML suggestions) merged with a dedup that dropped the %-bearing suggestion row
when the debounced server hit landed — the operator's "confidence % flickers
then vanishes". Now it's ONE list of DB-tag matches, each annotated with the
model's confidence (join by canonical_tag_id) when the tag was scored for this
image. No dedup, no flicker; picking a suggested tag still records acceptance
via TagPanel.findPending.

Single per-image fetch: score_image now reports above_threshold per row
(computed vs the head's own suggest cut, separate from the inclusion floor), so
the rail makes ONE min=0 request and derives the panel (above_threshold) and the
dropdown (all, text-filtered) client-side — the two /suggestions calls collapse
to one. Manual "Create 'X' as <kind>" (novel typed names) is unchanged; the
alias table + tag-side alias admin + auto-apply alias matching are untouched.

Tests: gate/serializer assertions updated (above_threshold; dropped dead-field
+ alias-endpoint checks); frontend spec seeds via the single load and covers the
byCategory/aboveByCategory split.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CgZP9v2otxVJymiYsnVuMy
bvandeusen merged commit d13efe1b69 into main 2026-07-10 15:52:45 -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#209