mirror of
https://github.com/block/buzz.git
synced 2026-11-04 08:21:48 +00:00
ProfileStep was observing the sidebar's relayConnectivitySuccess store to detect phase-3 reconnect success. That store is only ever produced by useSidebarRelayConnectionCard, which never mounts during onboarding — AppReady returns OnboardingFlow before the sidebar path renders. Replace the dead cross-surface coupling with a local approach: - Add useRelayConnection() to OnboardingRelayConnectionErrorCard - Add hadActiveReconnectRef to gate markSuccess() on a genuine attempt - Set the ref true when runConnectivityAction starts; clear it and call markSuccess() synchronously on phase-1 success, or leave it armed for the connection-state effect to fire on phase-3 connected transition - Remove the two exports added to useSidebarRelayConnectionCard (no dead API surface) Also fix the controller comment: the first comment incorrectly implied cancelTimers() reached the subscription handle during sync emission. In the assignment-order race, cancelTimers() ran before the handle was assigned; cleanup happens in the if (resolved) block. Say that directly. Add OnboardingRelayConnectionErrorCard.test.mjs: 5 tests covering the guard contract — phase-3 async success, disconnected no-op, no-attempt guard, phase-1 sync success idempotency, and double-connected no-op. 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