feat: auto-cleanup orphaned tags when removed from entries

Tags that are no longer associated with any entry are automatically
deleted from the database when a tag is removed from an entry.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Thomas Richter
2026-02-01 23:13:50 +01:00
parent b00d71956e
commit c92aec14d3
2 changed files with 13 additions and 0 deletions

View File

@@ -342,6 +342,9 @@ export const actions: Actions = {
);
tagRepository.updateEntryTags(id, updatedTags);
// Clean up orphaned tags
tagRepository.cleanupOrphanedTags();
return { success: true };
}
};