Skip to content

fix: preserve locally modified bookmark titles, folders, and ordering during sync#9

Merged
ralyodio merged 5 commits intomasterfrom
fix/bookmark-ordering-on-sync
Mar 19, 2026
Merged

fix: preserve locally modified bookmark titles, folders, and ordering during sync#9
ralyodio merged 5 commits intomasterfrom
fix/bookmark-ordering-on-sync

Conversation

@Preshy
Copy link
Copy Markdown
Contributor

@Preshy Preshy commented Mar 19, 2026

Summary

  • Fix bookmark label/title reversion: When a user renames a bookmark locally (e.g., "incident" → "s"), the change was being overwritten by stale cloud data on the next sync. The locallyModifiedBookmarkIds protection only blocked index-only changes from cloud, but allowed title and folder changes through — assuming they were "meaningful edits from another browser." Now all cloud-driven updates are skipped for locally modified bookmarks, letting the local change survive the pull phase and get pushed to cloud.
  • Fix bookmark ordering: Bookmarks were being moved to the end of the toolbar on sync instead of preserving their position (from prior commit on this branch).
  • Version bump to v0.8.30

Root Cause

In categorizeCloudBookmarks and updateLocalBookmarksFromCloud, the locally-modified guard only skipped index-only cloud updates. Title and folder differences were allowed through unconditionally, overwriting local edits. By the time the push phase ran, the local title had already been reverted, so the checksum matched cloud and nothing got pushed — the user's change was silently lost.

@ralyodio ralyodio requested a review from Copilot March 19, 2026 07:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the extension’s two-way bookmark sync conflict-resolution so that locally modified bookmarks (including title/folder/order changes) are not overwritten by cloud data during the pull phase, and it refines ordering behavior to avoid “moved to end” outcomes. It also bumps versions to v0.8.30 across packages and browser manifests.

Changes:

  • Skip all cloud→local updates for bookmarks tracked in locallyModifiedBookmarkIds (title/folder/index), ensuring local edits survive the pull and get pushed.
  • Rework ordering behavior by creating bookmarks/folders without indices during pull and relying on a reorder pass, using a snapshot of user-modified IDs to avoid sync-driven pollution.
  • Version bump to 0.8.30 across packages/apps/manifests.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
apps/extension/src/background/index.js Updates sync logic to fully protect locally modified bookmarks from cloud overwrites; adjusts ordering creation/reorder flow and adds a “user-modified IDs” snapshot.
apps/extension/src/manifest.chrome.json Bumps extension version to 0.8.30.
apps/extension/src/manifest.firefox.json Bumps extension version to 0.8.30.
apps/extension/src/manifest.safari.json Bumps extension version to 0.8.30.
apps/extension/package.json Bumps package version to 0.8.30.
apps/web/package.json Bumps package version to 0.8.30.
packages/core/package.json Bumps package version to 0.8.30.
packages/sources/package.json Bumps package version to 0.8.30.
packages/types/package.json Bumps package version to 0.8.30.
package.json Bumps monorepo version to 0.8.30.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread apps/extension/src/background/index.js Outdated
Comment thread apps/extension/src/background/index.js
Comment thread apps/extension/src/background/index.js
Comment thread apps/extension/src/background/index.js Outdated
Preshy and others added 5 commits March 19, 2026 08:45
Previously, locallyModifiedBookmarkIds protection only skipped index-only
changes from cloud. Title and folder changes were allowed through, which
caused local edits (e.g., renaming a bookmark label) to be overwritten by
stale cloud data during the pull phase. By the time the push phase ran,
the local change had already been reverted, so nothing got pushed.

Now ALL cloud-driven updates are skipped for locally modified bookmarks,
allowing local title, folder, and index changes to survive the pull phase
and get pushed to cloud correctly.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…index-only)

Update categorizeCloudBookmarks, updateLocalBookmarksFromCloud, and tests
to ensure local wins for title, folder, AND index changes when a bookmark
is in locallyModifiedBookmarkIds. Fixes the bug where renaming a bookmark
label locally (e.g. 'incident' -> 's') gets reverted on next sync.

Also reverts Copilot autofix commits that partially restored the old
broken behavior.
@Preshy Preshy force-pushed the fix/bookmark-ordering-on-sync branch from bf3c3aa to f8ae8da Compare March 19, 2026 07:53
@ralyodio ralyodio merged commit e7b4cee into master Mar 19, 2026
2 checks passed
@ralyodio ralyodio deleted the fix/bookmark-ordering-on-sync branch March 19, 2026 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants