← Back to Pull requests

feat(sync): rework storage wizard into Cloud Sync overlay over Chrome bookmarks (#409) #427

Closed
unknown closed this pull request without merging on Dec 02, 2026 20:43 UTC
View on GitHub
unknown unknown commented on Dec 02, 2026 20:20 UTC
Author

Part of #409

Implements phase 3 of #409 (Cloud Sync overlay + wizard rework + retiring the standalone Firebase store path):

  • Always-local primary store: useBookmarkStore always opens Chrome's local composite store (local) as the sole primary store, passes { onError } for local subscription failures, and leaves Firebase completely unloaded (resolveCloudSyncTarget()) unless Cloud Sync is configured and enabled.

  • Lazy Cloud Sync overlay (cloudSyncOverlay.js & useCloudSyncOverlay.js): lazily imports Firebase and syncEngine.js, promotes staged wizard connections (bm_store_draft → bm_store + bm_sync_enabled = "true"), auto-upgrades pre-#409 bm_store Firebase configurations when bm_sync_enabled is unset, safely adopts pre-#409 non-UUID Firestore docs into Chrome's local store before cleaning up migrated legacy doc IDs after syncEngine.start(), and keeps sign-in signals non-blocking over local Chrome bookmarks.

  • Wizard & UI rework (StorageSection, StorageWizard, StorageWizardMergeStep, BookmarkApp, OptionsModal, QuickAdd, StoreFallbackScreen): reworks Storage configuration into Cloud Sync (Pause sync / Resume sync, Disconnect, and a non-blocking banner to finish email-link sign-in), configures QuickAdd with { enableSync: false }, and updates StoreFallbackScreen to direct non-extension contexts to the Chrome extension.

  • Scope note: Phase 4 of #409 (tombstones and field-level conflict/delete tracking) remains tracked on #409 for a follow-up PR.
  • Verification


  • npm run ci </dev/null: exited 0 (version policy, third-party notices, formatting, ESLint, 140 Vitest test files / 1683 tests passed, Chrome MV3 build + check-chunk-laziness.mjs, and Storybook build).

  • Claude Sonnet pre-push security/code review performed and all identified findings addressed before pushing.
  • <!-- agent-bot-write: ghw_2bdbf371130b2c71 session=210bdd5e08f0 bot=trueline-antigravity-agent[bot] conversation_id=e99b26b3-53f9-4d7f-8337-fb33257bb240 conversation_id_source=self-reported -->

    Diff: 258 lines (+193 / -65) across 3 files Reviewer: qwts Review duration: 23m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 258 lines diff across 3 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.332
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #427"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.2% (MEDIUM) · Higher = larger blast radius
    39.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.5% · Safe to merge
    15.5%