fix(import-export): preserve list hierarchy on karakeep round-trip#2609
fix(import-export): preserve list hierarchy on karakeep round-trip#2609mgrusso wants to merge 1 commit intokarakeep-app:mainfrom
Conversation
When importing a karakeep JSON export, top-level lists (those with no parent in the source file) were placed under the import-session root list instead of being created at the top level of the user's list space. This meant that a round-trip export → import produced a different hierarchy than the original, making it impossible to restore state on another instance. Add a `restoreTopLevelLists` option to `importBookmarksFromFile` that, when enabled, creates exported top-level lists without a parent so the full original hierarchy is faithfully reproduced. The import-session root list is still created and serves as the fallback container for any bookmarks that carry no list assignment. Enable the option automatically for the "karakeep" source in the web hook so that every karakeep-format import is a true state restoration.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis PR adds support for restoring imported list hierarchy at the top level when importing from Karakeep. It introduces a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can suggest fixes for GitHub Check annotations.Configure the |
Greptile SummaryThis PR fixes a long-standing round-trip fidelity bug: top-level lists in a karakeep export were previously always nested under the import-session root list on re-import, making a faithful state restoration impossible. The fix adds a Key changes:
Issues found:
Confidence Score: 4/5
Important Files Changed
|
When importing a karakeep JSON export, top-level lists (those with no parent in the source file) were placed under the import-session root list instead of being created at the top level of the user's list space. This meant that a round-trip export → import produced a different hierarchy than the original, making it impossible to restore state on another instance.
Add a
restoreTopLevelListsoption toimportBookmarksFromFilethat, when enabled, creates exported top-level lists without a parent so the full original hierarchy is faithfully reproduced. The import-session root list is still created and serves as the fallback container for any bookmarks that carry no list assignment.Enable the option automatically for the "karakeep" source in the web hook so that every karakeep-format import is a true state restoration.