Repository navigation
feat(web): rename tag labels from the tag picker - #537
Merged
Merged
Conversation
lindixu6-hash
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the work on this. The tag_labels approach reads cleanly and the rename flow makes sense. Because this introduces a schema change (v2) and a new PUT /api/tags endpoint, it needs a maintainer decision before merge. A couple of points worth covering in the meantime: how existing tags are migrated/backfilled on upgrade, and whether the old label behaviour stays backwards compatible for installs that never rename a tag.
4 tasks done
Store custom labels in metadata.db so renames survive later captures, expose PUT /api/v2/tags, and add an inline rename control in the tag picker.
EyJunge1
force-pushed
the
feat/tag-labels
branch
from
December 4, 2026 08:56
4117638 to
613cf0f
Compare
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.
Summary
The tag picker labels project tags with the project root path (
C:\Users\me\code\avenma-property), because every capture stores the root asdisplay_name. There was no way to rename a tag.This adds a tag-level label:
tag_labelstable inmetadata.db(schema v2). A label is one row keyed bycontainer_tag, not a rewrite of every memory.handleListTagsoverlays those labels onto the existing distinct-tag rows.PUT /api/tagsupserts a label. The container tag must match{prefix}_{project|user}_{16 hex}, the label is trimmed of control characters, required, and capped at 120 chars.Storing the label separately matters: renaming by rewriting
display_nameon the existing rows would be undone the next time a capture inserted a row carrying the project path again.tests/api-handlers-tag-labels.test.tscovers exactly that sequence.Independent of #536. That one improves the default label (project name instead of path); this one lets a user override it. Either can merge first.
Test plan
bun test tests/api-handlers-tag-labels.test.ts— 4 pass: malformed tag rejected, empty/oversized label rejected, label returned byhandleListTags, label survives a later capture that inserts a pathdisplay_namebun run check(format, lint, typecheck)bun run buildbun testfull suite: same 3 failures as unmodifiedmainon this machine (config default, onnxruntime shim, plugin loader bundle boundary), no new failuresKnown limitations
btn-rename-tag,btn-save-tag-label). Other locales fall back to English until translated.