fix(sync): show live Cloud Sync indicator and stream pulled bookmarks (#432) #433
<!-- codex-pull-request-review-summary -->
<!-- codex-review-state:v1 {"code_review":{"commit_sha":"1628ad30549f1d4c31f403d987d3d74822ddb79c","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} -->
<details>
<summary><strong>Codex Review Summary</strong>: ✅ Completed</summary>
This comment shows the latest Codex review activity on this pull request.
| Review | Status | Commit | Review trigger |
| --- | --- | --- | --- |
| 📝 Code Review | ✅ Completed <relative-time datetime="2026-12-02T23:01:33.993995Z">2026-12-02T23:01:33.993995Z</relative-time> | 1628ad3 | Manual request |
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
</details>
</details>
Unused variable, import, function or class
Unused import React.
---
<p>Remove the unused <code>React</code> import from <code>src/components/CloudSyncBar.stories.jsx</code>.</p>
<ul>
<li>General fix: delete imports that are not referenced in the file.</li>
<li>Best fix here: remove line 1 (<code>import React from "react";</code>) and keep the <code>CloudSyncBar</code> import and story exports unchanged.</li>
<li>Scope: only edit <code>src/components/CloudSyncBar.stories.jsx</code>; no functional logic changes are needed.</li>
<li>Additional requirements: no new methods, definitions, or dependencies.</li>
</ul>
<sub><sub>!P1 Badge</sub></sub> Re-read tombstones after the guarded local list
When one deletion changes the tombstone map while cloud.list() is pending, this branch performs a second asynchronous local.list() but then installs the tombstone snapshot captured before that read. If another bookmark is deleted while the second list is awaiting, the returned list can omit it while localTombs omits its new tombstone; the planner consequently treats the still-live cloud copy as cloud-only, recreates the bookmark, and local.create() clears the tombstone, permanently undoing the user's deletion. Read tombstones.read() again after the awaited list, as the previous implementation did.
Useful? React with 👍 / 👎.
<!-- codex-code-review-finding:v1 -->
<!-- codex-review-receipt:v1 -->
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e0f40e9eb
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
</details>
<sub><sub>!P2 Badge</sub></sub> Abort partial adoption when the verification read fails
If bulkAdd() partially succeeds and the follow-up local.list() also fails transiently, this catch converts the read failure to null and leaves the entire batch in remaining. The subsequent per-item retry therefore creates second copies of every bookmark that already landed in the partial bulk write. Since the successes cannot be identified without that read, propagate the read error or otherwise defer the retry rather than retrying the whole batch.
Useful? React with 👍 / 👎.
<!-- codex-code-review-finding:v1 -->
@codex review
<!-- agent-bot-write: ghw_4d6a06cf94ef0913 session=210bdd5e08f0 bot=trueline-antigravity-agent[bot] conversation_id=e99b26b3-53f9-4d7f-8337-fb33257bb240 conversation_id_source=self-reported -->
<!-- codex-review-receipt:v1 -->
Codex Review: Didn't find any major issues. Keep them coming!
Reviewed commit: 1628ad3054
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
</details>
Approved these changes.
Fixed in 1628ad30549f1d4c31f403d987d3d74822ddb79c.
Re-reading tombstones.read() after the second guarded local.list() in loadReconcileInputs (src/stores/syncEngine.js) and added a regression test in src/stores/syncEngine.test.js.
<!-- agent-bot-write: ghw_b5ad8d1a03a28c5f session=210bdd5e08f0 bot=trueline-antigravity-agent[bot] conversation_id=e99b26b3-53f9-4d7f-8337-fb33257bb240 conversation_id_source=self-reported -->
Fixed in 1628ad30549f1d4c31f403d987d3d74822ddb79c.
Aborted the per-item retry and skipped legacy cleanup in applyLegacyBatch (src/stores/cloudSyncOverlay.js) whenever the local.list() verification read fails after a partial bulkAdd, and added a regression test in src/stores/cloudSyncOverlay.test.js.
<!-- agent-bot-write: ghw_b5ad8d1a03a28c5f session=210bdd5e08f0 bot=trueline-antigravity-agent[bot] conversation_id=e99b26b3-53f9-4d7f-8337-fb33257bb240 conversation_id_source=self-reported -->
qwts
trueline-antigravity-agent[bot]
Summary
-
localCompositeStore: explicit writes (create,bulkAdd,update,updateMany,remove,removeMany,bulkReplace,reorderBookmarks,persistSortedOrder) flush subscribers immediately (flushNotify/emitNow), bounded by a150msmaxWaitonscheduleNotifyso external Chrome bursts never starve UI updates, while isolating notification read errors (emitSeqordering +notifySafelyinchromeBookmarksStore) so post-write read failures cannot reject already-completed writes.-
cloudSyncOverlay&syncEngine/syncPlan: batch cloud pulls and legacy cloud doc adoptions into slices (LOCAL_CREATE_BATCH_SIZE = 25) usingbulkAdd(with partial-failuresettledNodesmetadata preservation inchromeBookmarksStore/localCompositeStoreandretrySliceCreatesper-item fallback so partially failing batches never duplicate bookmarks), coalesce duplicate"local"/"cloud"triggers indrainQueuewith per-source error isolation, and emit structured{ status: "syncing", progress: { phase, done, total } }events (chunking bulk pushes> 25items without flashing progress on routine single edits).CloudSyncBar):- Added
progressstate touseCloudSyncOverlayandcloudSyncBar.*copy inenWizard.js(including indeterminate connecting animation + reduced-motion fallback inindex.css).- Mounted
CloudSyncBarinBookmarkApp.jsx(hidden during non-blockingsignInnotices) with accessible status live announcements and labeled progressbar, plusStorageSection"syncing"pill mapping.- Preserve explicit
patch.createdAtinlocalCompositeStore.jswritePatch.- Track direct
chrome.bookmarks.onRemovedevents on thebookmarkitroot folder (chromeBookmarksStore.js) so deleting the root folder records tombstones cleanly while keepingrootCreatedWithoutDatalatched on transient missing reads.Testing & Verification
npm run format </dev/null && npm run ci </dev/nullpassed (144test files,1748tests passing, ESLint0errors, Chrome build + chunk laziness + Storybook build green).claude -p --model sonnet):APPROVED.Closes #432
<!-- agent-bot-write: ghw_ca1a63b11ff1f6a6 session=210bdd5e08f0 bot=trueline-antigravity-agent[bot] conversation_id=e99b26b3-53f9-4d7f-8337-fb33257bb240 conversation_id_source=self-reported -->