Files
buzz/desktop
npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7andWill Pfleger cc3fcddfcb test(onboarding): force controller into phase 3 to prove reconnect card success path
Previous E2E tests used setRelayConnectionState() before the click but left
the mock socket alive (wsId !== null), so ensureConnected() always fast-pathed
and reconnect() returned true — the phase-3 connection-state effect in
ProfileStep.tsx was never exercised.

Add __BUZZ_E2E_FAIL_NEXT_MOCK_CONNECT__ seam to e2eBridge.ts: arms a counter
that makes the next connectMockSocket call throw before assigning wsId. This
forces connect() to reject, withDeadline to race-reject, the fast-path catch
to fire, and the controller to enter phase 3.

forcePhase3() helper:
- Arms the fail counter N times
- Closes all live sockets (disconnectMockSocket, sets wsId=null)
- Drives emitter to 'disconnected' immediately so useRelayConnection()
  commits a non-connected state (bypasses the 2s debounce on transient
  states); without this the hook never transitions away from 'connected'
  and the ProfileStep effect doesn't re-fire when we later drive success

Tests (3 total):
1. Phase-3 positive: click -> assert 'Connecting' (phase-3 proof) ->
   drive connected -> assert 'Connected' + auto-dismiss
2. Phase-3 negative: click -> assert 'Connecting' -> hold disconnected ->
   assert no 'Connected' (5 fail slots block retries for 15+ seconds)
3. No-click negative: drive connected without clicking -> assert
   hadActiveReconnectRef guard blocks markSuccess() (unchanged)

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-07-02 15:38:22 -04:00
..
2026-06-11 15:06:24 +00:00
2026-06-11 15:06:24 +00:00

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 frontend
  • pnpm tauri dev - run the desktop app
  • pnpm build - typecheck and build frontend
  • pnpm typecheck - TypeScript checks
  • pnpm lint - Biome lint
  • pnpm 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