mirror of
https://github.com/block/buzz.git
synced 2026-11-12 12:22:06 +00:00
Thufir's r6 review found the legacy→scoped migration exposed legacy data to bootstrap even when the scoped write threw or the legacy delete did not take, wrapped in a swallowed try/catch. On any storage failure the legacy key survived while the relay still received the legacy preferences and could seed-publish them; a second relay later read the same legacy key and seeded it too — so "globally one-time" held only on the happy path. migrateLegacyStore now exposes migrated data only when ownership is proven: write the scoped key, delete the legacy key, and confirm the delete took. On a scoped-write throw, a legacy-delete throw, or a delete that silently does not take, roll back the partial scoped copy and return DEFAULT_STORE, leaving the migration retryable. An empty store cannot seed-publish (bootstrap's non-empty-local gate), so DEFAULT is safe. The identical flaw existed in all three lanes with a legacy primary-cache migration — sections (pre-existing on main), stars, and mutes. Sort has no such migration and is untouched. Concurrent claimants are safe: every window resolves the same app-wide active community, so at any instant they scope to the same relay and any race migrates the identical value to the identical key; a second relay only enters play after a community switch, which is strictly after the first scoped read consumed the legacy key. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Buzz
Desktop chat shell with:
- Tauri + React + TypeScript + Vite
- Tailwind CSS
- shadcn/ui-ready shared components
- Biome (lint/format/check)
- Feature-driven frontend structure
Scripts
pnpm dev- run the web frontendpnpm tauri dev- run the desktop apppnpm build- typecheck and build frontendpnpm typecheck- TypeScript checkspnpm lint- Biome lintpnpm format- Biome format (write)pnpm check- Biome check
Structure
src/shared- reusable app-wide code (ui,lib,styles)src/features- feature modules (vertical slices)src/app- top-level app composition