My earlier widget-store fix (shapesEqual pre-check before setState) only helps when localStorage already has cached data. On PWA reinstall / cache wipe / first load, the store init is DEFAULT_WIDGETS → server fetch → setState → grid re-layout. Result: wrong widgets flash on screen before the real layout replaces them.
Fix options
- Hide widget area until `hydrated: true`. Brief blank desktop (~200ms) on cold start, no wrong-widgets flash. Simpler.
- Skeleton placeholders while hydrating. More polish, more code.
I'd go with (1) — less jarring than default-then-replace.
Where to touch
- `desktop/src/stores/widget-store.ts` — already exposes `hydrated` state
- `desktop/src/components/WidgetLayer.tsx` — gate the render on `hydrated`
Acceptance
My earlier widget-store fix (shapesEqual pre-check before setState) only helps when localStorage already has cached data. On PWA reinstall / cache wipe / first load, the store init is DEFAULT_WIDGETS → server fetch → setState → grid re-layout. Result: wrong widgets flash on screen before the real layout replaces them.
Fix options
I'd go with (1) — less jarring than default-then-replace.
Where to touch
Acceptance