Skip to content

[FEATURE] Add tag rename, merge, and cleanup operations #174

Description

@mors119

Summary

Add workspace-wide tag management operations.

As a project evolves, tags may be renamed, duplicated, misspelled, or replaced by a better classification. Users need a safe way to maintain tag consistency across all notes.

Operations

Rename

performance → optimization

Replace the tag across all matching notes.

Merge

bug + defect → issue

Move notes from one or more source tags into a target tag and remove duplicates.

Remove

Remove a tag from every note after explicit confirmation.

Find unused tags

If FrilVault later stores a tag registry or color metadata, identify tags no longer attached to any note.

Requirements

  • Implement transformations in frilvault-core.
  • Update notes atomically where practical.
  • Avoid duplicate tags after rename or merge.
  • Report the number of affected notes.
  • Provide a preview or confirmation before destructive changes.
  • Preserve unrelated note fields and formatting.
  • Refresh VS Code views and indexes after completion.
  • Support CLI commands or an equivalent command structure.

Possible CLI

flvt tag rename todo task
flvt tag merge bug defect --into issue
flvt tag remove legacy
flvt tag list --unused

Exact command naming may follow the existing CLI conventions.

Acceptance Criteria

  • Tags can be renamed across the workspace.
  • Multiple tags can be merged safely.
  • Tags can be removed after confirmation.
  • Duplicate tags are eliminated.
  • The number of affected notes is reported.
  • Failed writes do not silently leave partially updated data.
  • Tests cover conflicts, duplicates, and empty matches.

Design Principle

Tag organization must remain maintainable as the vault grows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions