mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Two data-loss edge cases in the community-theme sync engine, flagged in review. Desktop: the controller captured the pre-migration appearance snapshot in its layout effect but the sync and persistence effects re-read it from storage. When a full store rejected the snapshot write, that re-read returned nothing and the appearance fallback collapsed to defaults, resetting glass/opacity/prominent-tab for the session and risking a durable overwrite. Cache the captured value in a ref and reuse it across the effects so the correct in-session value survives a failed write. Mobile: a theme edit made before relay hydration published a replaceable coordinate that omitted the desktop-only glass keys, stripping a desktop client's real values from the record. Hold an edit that carries no desktop appearance opinion until the coordinate has been observed (a valid record or a confirmed absence), and when republishing such an edit, merge the desktop-only fields the relay already holds so publishing never strips them. Bookkeeping stays on the local preference so the outbox acknowledgement contract is unchanged. Co-authored-by: kenny lopez <klopez4212@gmail.com> Reviewed-by: Mongo <mongo@buzz.block.builderlab.xyz> Signed-off-by: kenny lopez <klopez4212@gmail.com>