Repository navigation
Organise and tidy tags: assistant tools and a merge button in the Tags panel - #80
Merged
Merged
Conversation
The assistant could change one asset's tags but not the vocabulary itself. It can now propose groups (nested categories, existing ones moved or renamed, tags filed into them), renames and merges across every asset carrying a tag, and deletes of unused tags. Each change is a proposal row with a preview (how many assets, and a sample of their names), and nothing is written until the person applies it. - list_tags gives ids, counts and category paths, the category tree, and pages, so a whole vocabulary can be sorted into groups; find_similar_tags finds spellings of one tag. - A rename onto an existing name is recorded as a merge. Merging keeps one attachment per asset and carries the source's category to an unfiled target. - Apply runs tag ops in dependency order, resolves categories proposed in the same turn, skips a stale op with a sentence and re-indexes touched assets once. - Groups are TagCategory rows: no schema change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1geD6BRzqbfoJdeGyQ4Kb
A tag row gets a merge button that opens a "Merge into" step. It says what will happen
before anything does: how many assets will carry the target instead, that the source is
deleted and this can't be undone, and whether the target takes over its category.
Renaming a tag onto a name another tag has opens the same step, already pointed at that
tag, rather than only refusing.
Backed by POST /api/tags/{id}/merge, over the same services.tags.merge_tags the
assistant's merges apply through. It returns the target with its new count and
re-indexes the moved assets. The store's merge is not optimistic: the count is the
server's, and a merge cannot be put back.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1geD6BRzqbfoJdeGyQ4Kb
davior
marked this pull request as ready for review
November 23, 2026 14:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Assistant: organise and tidy the tag vocabulary
The assistant can now propose changes to the tag vocabulary itself, not just to one asset's tags. As with every other assistant proposal, nothing is written until the person presses Apply.
propose_tag_groups). Groups are the existingTagCategory, so there's no schema change or migration. An existing category can be named by its id, or by its path when that matches only one.propose_tag_rename). A rename onto a name that already exists is recorded as a merge. A merge keeps one attachment per asset and carries the source's category over to an unfiled target.propose_tag_delete).list_tagsnow shows ids, usage counts, category paths and the category tree. It pages (offset) and hasuncategorised_onlyandmax_usesfilters, so a whole vocabulary can be sorted into groups.find_similar_tags(new) groups tags that differ only by case, plurals, accents, punctuation or a small typo.Tags panel: merge
POST /api/tags/{id}/merge{target_id}. It returns the target with its new count and re-indexes the moved assets. Merging into itself is a 400; someone else's tag is a 404.The assistant's Apply and the new endpoint both use the same service functions:
merge_tagsandrename_tag(the latter is also behindPATCH /api/tags/{id}).similar_groupsandcategory_pathsare new.Tests
tests/test_assistant_tags.py.test_tags.py: merge-service and merge-endpoint tests, the rename collision, and the look-alike grouping.AssistantPanel.test.tsx.TagPanel.test.tsx.tags.test.ts.🤖 Generated with Claude Code
https://claude.ai/code/session_01V1geD6BRzqbfoJdeGyQ4Kb