mirror of
https://github.com/block/buzz.git
synced 2026-11-06 09:21:45 +00:00
The OnboardingRelayConnectionErrorCard.test.mjs unit test was a mirror state machine — it duplicated the component's ref/effect logic in the test file itself, meaning it would pass even if ProfileStep.tsx regressed. Thufir flagged this as not exercising the production path. Replace with two E2E tests in onboarding.spec.ts that drive the real component against the real relay state seam: - 'click shows Connected then auto-dismisses': produces the error card via a relay-unreachable profile save error, drives relay to disconnected, clicks onboarding-reconnect-relay, drives relay to connected, and asserts the card transitions to 'Connected' then auto-dismisses. Exercises the full hadActiveReconnectRef guard and markSuccess() path through real code. - 'connected without a prior click does not show Connected': same card setup, drives disconnected → connected with no click, asserts the card stays in error state. Guards against spurious success on background recovery without user action. Also adds the setRelayConnectionState helper to onboarding.spec.ts, copied from sidebar-relay-card.spec.ts (same seam, same bidirectional guard). 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