[GH-ISSUE #1010] Remember ignored duplicate tags suggestions #664

Open
opened 2026-03-02 11:51:45 +03:00 by kerem · 3 comments
Owner

Originally created by @alesito85 on GitHub (Feb 10, 2025).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1010

Describe the feature you'd like

Admin has a feature that suggests duplicate tags for merging. It works well enough but it doesn't remember tags that the user has ignored for merging. So over time these would have to be ignored again and again.
Instead the feature should remember the tag combinations that have been ignored so that they're not suggested again.

Describe the benefits this would bring to existing Hoarder users

Less clicking again and again...

Can the goal of this request already be achieved via other means?

No.

Have you searched for an existing open/closed issue?

  • I have searched for existing issues and none cover my fundamental request

Additional context

No response

Originally created by @alesito85 on GitHub (Feb 10, 2025). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1010 ### Describe the feature you'd like Admin has a feature that suggests duplicate tags for merging. It works well enough but it doesn't remember tags that the user has ignored for merging. So over time these would have to be ignored again and again. Instead the feature should remember the tag combinations that have been ignored so that they're not suggested again. ### Describe the benefits this would bring to existing Hoarder users Less clicking again and again... ### Can the goal of this request already be achieved via other means? No. ### Have you searched for an existing open/closed issue? - [x] I have searched for existing issues and none cover my fundamental request ### Additional context _No response_
Author
Owner

@rtim75 commented on GitHub (Oct 8, 2025):

Also, whenever I merge a single entry of tags, all entries that I ignored, are reset and I have to ignore them again

<!-- gh-comment-id:3380067220 --> @rtim75 commented on GitHub (Oct 8, 2025): Also, whenever I merge a single entry of tags, all entries that I ignored, are reset and I have to ignore them again
Author
Owner

@MohamedBassem commented on GitHub (Oct 12, 2025):

@claude Can you implement this feature? We might need a new table to remember ignored suggestions, we'll probably also need a way to list those ignored suggestions and potentially-unignore them if needed.

<!-- gh-comment-id:3394248547 --> @MohamedBassem commented on GitHub (Oct 12, 2025): @claude Can you implement this feature? We might need a new table to remember ignored suggestions, we'll probably also need a way to list those ignored suggestions and potentially-unignore them if needed.
Author
Owner

@claude[bot] commented on GitHub (Oct 12, 2025):

Claude finished @MohamedBassem's task —— View jobclaude/issue-1010-20251012-1154Create PR ➔


Implementation Complete!

Tasks

  • Understand current duplicate tag detection implementation
  • Design database schema for ignored tag pairs
  • Implement database migration
  • Update tRPC procedures to handle ignored pairs
  • Update frontend to persist ignored suggestions
  • Add UI to manage ignored suggestions
  • Commit and push changes

What Was Implemented

Database Layer

  • Created ignoredTagPairs table with userId, tagId1, tagId2 fields
  • Tag pairs are stored in alphabetical order (tagId1 < tagId2) to ensure uniqueness
  • Foreign keys cascade on delete (when user or tags are deleted, ignored pairs are cleaned up)
  • Unique constraint prevents duplicate entries

Backend (tRPC)
Added 4 new procedures to packages/trpc/routers/tags.ts:

  1. ignoreDuplicateSuggestion - Persists ignored tag pairs to database
  2. listIgnoredPairs - Returns all ignored pairs with full tag details for the UI
  3. unignorePair - Removes a specific pair from the ignore list
  4. getIgnoredPairIds - Efficient query to get just IDs for filtering suggestions

Frontend

  • Updated TagDuplicationDetention.tsx:
    • Fetches ignored pairs on mount
    • Filters out any suggestions where tag pairs are ignored
    • "Ignore" button now persists to database via API
    • Suggestions remain hidden even after page refresh or merging other tags
  • Created new IgnoredTagPairs.tsx component:
    • Lists all ignored tag pairs
    • Provides "Unignore" button to restore pairs to suggestions
    • Added to cleanups page with collapsible section

Benefits

  • Ignored suggestions are remembered across sessions
  • No more re-ignoring the same pairs repeatedly
  • Ignored pairs persist even when other tags are merged
  • Users can review and manage their ignored pairs
  • Clean data model with proper cascade deletes

Branch: claude/issue-1010-20251012-1154 | Job Run

<!-- gh-comment-id:3394249007 --> @claude[bot] commented on GitHub (Oct 12, 2025): **Claude finished @MohamedBassem's task** —— [View job](https://github.com/karakeep-app/karakeep/actions/runs/18443571105) • [`claude/issue-1010-20251012-1154`](https://github.com/karakeep-app/karakeep/tree/claude/issue-1010-20251012-1154) • [Create PR ➔](https://github.com/karakeep-app/karakeep/compare/main...claude/issue-1010-20251012-1154?quick_pull=1&title=feat%3A%20Remember%20ignored%20duplicate%20tag%20suggestions&body=Implements%20%231010%0A%0AAdds%20persistent%20storage%20for%20ignored%20duplicate%20tag%20suggestions%20so%20users%20don%27t%20have%20to%20repeatedly%20ignore%20the%20same%20tag%20combinations.%0A%0A%23%23%20Changes%0A-%20Add%20%60ignoredTagPairs%60%20database%20table%0A-%20Implement%20tRPC%20procedures%20for%20managing%20ignored%20pairs%0A-%20Update%20duplicate%20detection%20UI%20to%20filter%20ignored%20pairs%0A-%20Add%20management%20UI%20to%20view%2Funignore%20pairs%0A%0A%F0%9F%A4%96%20Generated%20with%20%5BClaude%20Code%5D%28https%3A%2F%2Fclaude.ai%2Fcode%29) --- ### Implementation Complete! ✅ #### Tasks - [x] Understand current duplicate tag detection implementation - [x] Design database schema for ignored tag pairs - [x] Implement database migration - [x] Update tRPC procedures to handle ignored pairs - [x] Update frontend to persist ignored suggestions - [x] Add UI to manage ignored suggestions - [x] Commit and push changes #### What Was Implemented **Database Layer** - Created `ignoredTagPairs` table with userId, tagId1, tagId2 fields - Tag pairs are stored in alphabetical order (tagId1 < tagId2) to ensure uniqueness - Foreign keys cascade on delete (when user or tags are deleted, ignored pairs are cleaned up) - Unique constraint prevents duplicate entries **Backend (tRPC)** Added 4 new procedures to `packages/trpc/routers/tags.ts`: 1. `ignoreDuplicateSuggestion` - Persists ignored tag pairs to database 2. `listIgnoredPairs` - Returns all ignored pairs with full tag details for the UI 3. `unignorePair` - Removes a specific pair from the ignore list 4. `getIgnoredPairIds` - Efficient query to get just IDs for filtering suggestions **Frontend** - Updated `TagDuplicationDetention.tsx`: - Fetches ignored pairs on mount - Filters out any suggestions where tag pairs are ignored - "Ignore" button now persists to database via API - Suggestions remain hidden even after page refresh or merging other tags - Created new `IgnoredTagPairs.tsx` component: - Lists all ignored tag pairs - Provides "Unignore" button to restore pairs to suggestions - Added to cleanups page with collapsible section **Benefits** - ✅ Ignored suggestions are remembered across sessions - ✅ No more re-ignoring the same pairs repeatedly - ✅ Ignored pairs persist even when other tags are merged - ✅ Users can review and manage their ignored pairs - ✅ Clean data model with proper cascade deletes --- **Branch**: `claude/issue-1010-20251012-1154` | [Job Run](https://github.com/karakeep-app/karakeep/actions)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#664
No description provided.