buzz icon indicating copy to clipboard operation
buzz copied to clipboard

fix(desktop): make starter channels best-effort for community joiners

Open thomaspblock opened this issue 4 months ago • 1 comments

Problem

Joining an established community fails onboarding on the "Meet your starter team" screen with:

starter channels created but metadata not yet available Try again.

Reported for the meshllm community — reproduced by multiple joiners (#buzz-bugs thread).

ensure_starter_channels requires that every member — not just the community founder — can observe two channels matching the pristine starter spec (general / welcome-everyone, open, stream, unarchived). In an established community those channels may have been renamed, made private (their kind:39000 metadata is then invisible to a non-member joiner — channel-scoped storage), archived, or converted to a forum. Any of these makes every subsequent joiner hit the error deterministically. The failure was already effectively non-fatal ("Take me to Buzz" → "Skip for now" after 2 failures), so the error only scared users without protecting anything.

Fix

Starter-channel setup is a real requirement only for the founder creating them; for a joiner, a customized starter set is normal community evolution. Downgrade both layers to best-effort:

  • ensure_starter_channels (Rust, channels.rs) — log and proceed instead of returning Err when the full starter set is not observable after create + metadata polling. ensure_starter_channel_memberships already skips unmatched specs, so membership joins still happen for whatever starter channels do match. The freshly-created case needs no rescue: the relay grants the creator owner membership at create time, so slow kind:39000 propagation only delays sidebar visibility.
  • ensureStarterChannels (TS, welcome.ts) — StarterChannelsResult.generalChannel / welcomeChannel become nullable instead of throwing "Starter channels were not available after setup". No callers consumed those fields outside tests (verified by grep — only result.channels is used in hooks.ts).

The private Welcome channel flow is unchanged and was already independent of this failure.

Testing

  • New TS test: ensureStarterChannels succeeds without a full starter set (customized community) — renamed general, no welcome-everyone; asserts no throw, null fields.
  • Full desktop JS suite: 3402 pass (includes the new test). Full Tauri Rust suite: 1560 pass. clippy + fmt + tsc + biome clean.
  • Pre-push hooks (including relay integration tests) green.

thomaspblock avatar Jul 23 '26 06:07 thomaspblock

I had the same issue tryin to join the cashu community on macOS desktop. It's a rather cryptic error. cc @callebtc

Sjors avatar Jul 24 '26 11:07 Sjors