Skip to content

Improve huddle audio failure handling#2578

Merged
wpfleger96 merged 2 commits into
block:mainfrom
damienrj:agent/huddle-audio-unavailable-toast
Jul 24, 2026
Merged

Improve huddle audio failure handling#2578
wpfleger96 merged 2 commits into
block:mainfrom
damienrj:agent/huddle-audio-unavailable-toast

Conversation

@damienrj

@damienrj damienrj commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

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

@damienrj
damienrj marked this pull request as ready for review July 23, 2026 18:06
@damienrj
damienrj requested a review from a team as a code owner July 23, 2026 18:06
@wpfleger96

Copy link
Copy Markdown
Member

I think failed starts can leave a phantom active huddle for other or reloaded clients. desktop/src-tauri/src/huddle/mod.rs publishes KIND_HUDDLE_STARTED before audio setup, but the unavailable-audio rollback archives the ephemeral channel without publishing KIND_HUDDLE_ENDED. HuddleIndicator reconstructs state solely from lifecycle events, so peers—or the starter after remount—can keep seeing and trying to join a huddle that never became usable.

This looks adjacent and pre-existing rather than introduced by the formatter, but this PR's target failure mode exercises it directly. Could we publish an ended event during rollback, or otherwise make rollback observable to lifecycle reconstruction, and cover start → rollback reconstruction?

@damienrj damienrj changed the title Improve unavailable huddle audio errors Improve huddle audio failure handling Jul 23, 2026
@damienrj

Copy link
Copy Markdown
Contributor Author

I think failed starts can leave a phantom active huddle for other or reloaded clients. desktop/src-tauri/src/huddle/mod.rs publishes KIND_HUDDLE_STARTED before audio setup, but the unavailable-audio rollback archives the ephemeral channel without publishing KIND_HUDDLE_ENDED. HuddleIndicator reconstructs state solely from lifecycle events, so peers—or the starter after remount—can keep seeing and trying to join a huddle that never became usable.

This looks adjacent and pre-existing rather than introduced by the formatter, but this PR's target failure mode exercises it directly. Could we publish an ended event during rollback, or otherwise make rollback observable to lifecycle reconstruction, and cover start → rollback reconstruction?

I went ahead now and improve huddle audio failure handling.

@wpfleger96
wpfleger96 merged commit fb4a801 into block:main Jul 24, 2026
25 checks passed
@damienrj
damienrj deleted the agent/huddle-audio-unavailable-toast branch July 24, 2026 19:25
wpfleger96 added a commit that referenced this pull request Jul 24, 2026
## Buzz Desktop release v0.4.25

### Changes since v0.4.24:

- fix(discovery): spawn PowerShell install commands natively on Windows
([#2750](#2750))
([`f3981dbfe`](f3981db))
- fix(desktop): use augmented PATH for model discovery subprocess
([#2753](#2753))
([`3bd3a014c`](3bd3a01))
- Improve huddle audio failure handling
([#2578](#2578))
([`fb4a801ad`](fb4a801))
- fix(onboarding): show real install errors and fix concurrent install
state ([#2658](#2658))
([`9731cd818`](9731cd8))
- feat(node): add Windows managed Node.js fallback (win-x64 + win-arm64)
([#2661](#2661))
([`596386ee5`](596386e))
- fix(desktop): parse runtime team instructions section
([#2645](#2645))
([`269ef357f`](269ef35))
- Match create-channel template selector styling
([#2654](#2654))
([`72bbaece4`](72bbaec))
- feat(desktop): make pull request reviews actionable
([#2510](#2510))
([`9081ab0ec`](9081ab0))
- fix(desktop): shared-compute usability — share toggle, usage
indicator, model resync
([#2448](#2448))
([`9cc9652c7`](9cc9652))
- fix(desktop): refine focused thread dismissal targets
([#2644](#2644))
([`c86c4f59c`](c86c4f5))
- Clarify agent harness defaults in create flow
([#2601](#2601))
([`76aeae703`](76aeae7))
- fix: expose community icon control on open relays
([#2640](#2640))
([`e341b09cb`](e341b09))

**To release:** merge this PR. The tag and build will happen
automatically.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants