Conversation
Extract the saved-tab-group merge logic into a shared helper so both JSON import and Drive restore reuse the same duplicate-handling behavior without introducing a dependency from Drive code into list-page UI code. Extend the Drive restore orchestration with an explicit restore mode options bag. The existing replace behavior remains the default for backward compatibility, while a new merge mode reads the current saved groups and duplicate policy, merges backup groups in linear time using a shared URL index, and then persists the merged result. Update the options restore dialog to expose Merge as a separate row action next to the existing destructive Restore action. The UI messaging now makes the difference between the two actions explicit, and the restore status text reflects whether the user ran a merge or a full replace. Add unit and integration coverage for the new merge flow. The new tests verify that existing groups are preserved, duplicate URLs are rejected when the current settings require it, new backup groups are appended, and the options page wires the new action through end-to-end.
Update the user and engineering docs to describe the new non-destructive Merge action alongside the existing destructive Restore action. The README now tells users when to choose Merge versus Restore. The Drive spec and implementation plan now describe both restore paths so the documented behavior matches production. TESTING.md is updated so the expected backup/restore coverage explicitly includes merge restore.
Stop serializing installId into Drive backup JSON payloads. The local install ID still exists for Drive folder isolation and local backup-index bookkeeping, but it no longer leaks into the exported backup file itself. That keeps a backup created on one install importable on any other install without carrying machine-specific identity data in the payload. This change also updates restore-focused tests to assert the new portable payload shape and adds a backwards-compatibility test proving older backup files that still contain installId continue to restore successfully. Documentation for the Drive backup format was updated to match the new payload contract.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Google Drive backup and restore feature by providing users with more granular control over how backups are applied. Instead of only being able to overwrite existing data, users can now choose to merge backup content with their current tab groups, preserving their active workspace while integrating new data. This change improves flexibility and user experience, making the backup system more robust and adaptable to different user needs. The underlying backup format has also been made more portable, ensuring future compatibility and ease of use across multiple installations. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a valuable "merge" option for restoring from Google Drive backups, enhancing the existing restore functionality. It also improves backup portability by removing the installId from the payload and refactors shared logic into a new module. The changes are well-supported by documentation and test updates. However, a significant issue has been identified where the new merge functionality unexpectedly overwrites user settings, which contradicts the behavior described in the UI and could lead to a poor user experience.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #30 +/- ##
=======================================
+ Coverage 94.8% 95.0% +0.1%
=======================================
Files 18 19 +1
Lines 2132 2204 +72
Branches 556 563 +7
=======================================
+ Hits 2023 2094 +71
- Misses 97 99 +2
+ Partials 12 11 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Stop including settings in Google Drive backup payloads and stop applying settings during Google Drive restore. This makes the Drive backup feature operate only on saved tab groups. Local extension settings remain sourced from extension storage, which avoids overwriting install-specific preferences during cross-device or cross-profile Drive restores. Implementation details: - remove from the serialized Drive backup payload type - stop reading settings during Drive backup serialization - stop normalizing and writing settings during Drive restore - keep merge restore behavior unchanged for tab groups by continuing to read the current duplicate policy from local settings storage - update Drive-specific documentation and README wording to reflect tab-only backup/restore semantics - update unit and integration tests to assert that Drive restores leave existing settings untouched, while still tolerating legacy backup files that may contain extra fields Validation run locally after the change: - pnpm compile - pnpm lint - pnpm test - pnpm build - pnpm test:e2e
No description provided.