mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Second pass on the community-theme sync engine, closing four data-loss defects re-flagged in review. All are silent persistence/sync bugs; no UI or feature behavior changes. Desktop, snapshot lifetime and refresh: - The appearance snapshot that seeds no-record communities was captured once and never cleared, so after a user changed glass/opacity/prominent-tab a later empty community resurrected the stale pre-migration value and republished it over the current choice. Refresh the durable snapshot on a genuine user glass edit only; accent- or theme-only edits leave it untouched so a community's own glass can never leak into the profile-wide seed, and programmatic per-community applies never reach the persist branch. - The snapshot lived on the per-community controller instance, which remounts under a keyed provider, so a full store lost it across mounts and the next community re-captured the previous one's already-rewritten appearance. Back the capture with a module-level in-memory cache so the profile's first-seen value survives a full store for the life of the process. Mobile, merge and hydration gate: - Merging desktop-only glass from a decoded full cache trusted stale fields, so a mobile accent edit republished stale glass over current relay state. Always overlay the observed remote's desktop-only fields; mobile has no glass-editing UI, so those fields are never locally authored, only inherited. - The pre-hydration hold could strand an edit forever when the first fetch returned unavailable and the subscription stayed quiet. Add a bounded-backoff hydration recovery that re-queries and releases the gate, mirroring the subscription-retry pattern, with cleanup wired into cancelPending and dispose. Co-authored-by: kenny lopez <klopez4212@gmail.com> Reviewed-by: Mongo <mongo@buzz.block.builderlab.xyz> Signed-off-by: kenny lopez <klopez4212@gmail.com>