mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
## Summary - Preserve plain-string errors returned by Tauri and show an actionable message when huddle audio is unavailable in the relay deployment. - Use one error formatter across channel, timeline, wave, and profile huddle actions while preserving other relay and device errors. - Complete the huddle lifecycle when audio setup fails after publishing a start event, preventing peers and reloaded clients from reconstructing a phantom active huddle. - Cover unavailable-audio formatting and START → rollback-END reconstruction with regression tests. ## Behavior The Tauri huddle commands reject with a plain string. Several desktop toast call sites only preserved JavaScript `Error` objects, so the relay message was discarded and replaced with “Failed to join huddle.” The desktop now recognizes `huddle_audio_unavailable` and the current relay message, then shows: > Huddle audio isn’t available on this server. Ask an administrator to turn it on. Other relay and device messages remain intact, including microphone errors. `start_huddle` also publishes `KIND_HUDDLE_STARTED` before audio setup. If setup fails, rollback now publishes `KIND_HUDDLE_ENDED` through the normal end-and-archive path before resetting local state. This makes the failed start observable to lifecycle reconstruction and prevents stale join affordances. ## Checks - `cd desktop && pnpm test` — 3,405 passed - `cd desktop/src-tauri && cargo test` — 1,560 passed, 13 ignored; 3 diagnostic tests passed - `cd desktop && pnpm exec playwright test tests/e2e/channels.spec.ts --project=smoke --grep 'huddle rollback end event'` — passed - `just desktop-tauri-check` - `cd desktop && pnpm typecheck` - `cd desktop && pnpm check` - Pre-commit and pre-push hooks