[PR #1231] [MERGED] feat(web): Add support for merging lists #1767

Closed
opened 2026-03-02 11:59:05 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/karakeep-app/karakeep/pull/1231
Author: @gomnitrix
Created: 4/10/2025
Status: Merged
Merged: 4/16/2025
Merged by: @MohamedBassem

Base: mainHead: dev_merge_list


📝 Commits (3)

📊 Changes

8 files changed (+325 additions, -3 deletions)

View changed files

📝 apps/web/components/dashboard/lists/ListOptions.tsx (+15 -1)
apps/web/components/dashboard/lists/MergeListModal.tsx (+209 -0)
📝 apps/web/lib/i18n/locales/en/translation.json (+7 -1)
📝 apps/web/lib/i18n/locales/zh/translation.json (+7 -1)
📝 packages/shared-react/hooks/lists.ts (+15 -0)
📝 packages/shared/types/lists.ts (+13 -0)
📝 packages/trpc/models/lists.ts (+46 -0)
📝 packages/trpc/routers/lists.ts (+13 -0)

📄 Description

This PR implements the feature requested in #1060, enabling users to merge contents from one list into another selected non-smart list with deduplication functionality.

Key Changes

  • Added new merge functionality with deduplication between lists in trpc/models
  • Added corresponding UI components to support the merge feature (see screenshot below)

Screenshot

Merge list interface Merge confirmation dialog

Internationalization (i18n) Notes

New form labels have been added with translations for:

  • English (en)
  • Chinese (zh)

Translations for other supported languages are currently missing. I’m unsure if it’s expected for contributors to provide full translations, or if there’s a separate process for translations. I'm happy to add AI-generated translations if that's acceptable--just let me know.

During implementation, I noticed an edge case in how text-type bookmarks are handled during import, and it could affect the expected user flow:
When importing bookmarks from files that exported from this app, the system creates new text-type bookmarks with identical content but different bookmark IDs in each import. In a word, the import function does not deduplicate text-type bookmarks.

This leads to:

  • Multiple imported lists containing duplicate bookmarks with different IDs.
  • The merge function is unable to deduplicate these bookmarks, as it relies on bookmark IDs for comparison.
  • That might break the ideal workflow described in #1060, where users re-import to sync updates and expect merging to help clean up duplicates.

If this behavior isn’t intended, I think it might make sense to track it as a separate issue.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/karakeep-app/karakeep/pull/1231 **Author:** [@gomnitrix](https://github.com/gomnitrix) **Created:** 4/10/2025 **Status:** ✅ Merged **Merged:** 4/16/2025 **Merged by:** [@MohamedBassem](https://github.com/MohamedBassem) **Base:** `main` ← **Head:** `dev_merge_list` --- ### 📝 Commits (3) - [`5f938b2`](https://github.com/karakeep-app/karakeep/commit/5f938b2853737b8359cb24850023aeb81563eff1) feat: Support list merging - [`d59e051`](https://github.com/karakeep-app/karakeep/commit/d59e0515200bf7c26fccaaf6d09cc389ec0daa8d) some fixes - [`d92db50`](https://github.com/karakeep-app/karakeep/commit/d92db50f3d3c2aa662cd38ef8eb2499897289bc9) move @hoarder to @karakeep ### 📊 Changes **8 files changed** (+325 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/components/dashboard/lists/ListOptions.tsx` (+15 -1) ➕ `apps/web/components/dashboard/lists/MergeListModal.tsx` (+209 -0) 📝 `apps/web/lib/i18n/locales/en/translation.json` (+7 -1) 📝 `apps/web/lib/i18n/locales/zh/translation.json` (+7 -1) 📝 `packages/shared-react/hooks/lists.ts` (+15 -0) 📝 `packages/shared/types/lists.ts` (+13 -0) 📝 `packages/trpc/models/lists.ts` (+46 -0) 📝 `packages/trpc/routers/lists.ts` (+13 -0) </details> ### 📄 Description This PR implements the feature requested in #1060, enabling users to merge contents from one list into another selected non-smart list with deduplication functionality. #### Key Changes - Added new merge functionality with deduplication between lists in trpc/models - Added corresponding UI components to support the merge feature (see screenshot below) #### Screenshot <div style="display: flex; flex-direction: column; gap: 10px;"> <img src="https://github.com/user-attachments/assets/28de2a8c-1015-4934-8a82-679d5c6652a3" height="300" alt="Merge list interface" style="max-height: 100%; width: auto;"/> <img src="https://github.com/user-attachments/assets/8ef41fe0-5f68-4fca-b552-3e2dec6bc545" width="600" alt="Merge confirmation dialog" style="max-width: 100%; height: auto;"/> </div> #### Internationalization (i18n) Notes New form labels have been added with translations for: - English (en) - Chinese (zh) Translations for other supported languages are currently missing. I’m unsure if it’s expected for contributors to provide full translations, or if there’s a separate process for translations. I'm happy to add AI-generated translations if that's acceptable--just let me know. #### Related Issue Discovery During implementation, I noticed an edge case in how text-type bookmarks are handled during import, and it could affect the expected user flow: When importing bookmarks from files that exported from this app, the system creates new text-type bookmarks with identical content but different bookmark IDs in each import. In a word, the import function does not deduplicate text-type bookmarks. This leads to: - Multiple imported lists containing duplicate bookmarks with different IDs. - The merge function is unable to deduplicate these bookmarks, as it relies on bookmark IDs for comparison. - That might break the ideal workflow described in #1060, where users re-import to sync updates and expect merging to help clean up duplicates. If this behavior isn’t intended, I think it might make sense to track it as a separate issue. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 11:59:05 +03:00
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#1767
No description provided.