fix(desktop): make starter channels best-effort for community joiners#2482
Open
thomaspblock wants to merge 1 commit into
Open
fix(desktop): make starter channels best-effort for community joiners#2482thomaspblock wants to merge 1 commit into
thomaspblock wants to merge 1 commit into
Conversation
Joining an established community failed onboarding with 'starter channels created but metadata not yet available' whenever the community's starter channels (general / welcome-everyone) no longer matched the pristine spec — renamed, made private (their kind:39000 metadata is invisible to a non-member joiner), archived, or converted to a forum. Every new member hit the error deterministically on the Meet-your-starter-team screen. Starter-channel setup is a real requirement only for the community founder creating them; for a joiner, a customized starter set is normal community evolution, not a failure. Downgrade both layers to best-effort: - ensure_starter_channels (Rust) logs and proceeds instead of erroring when the full starter set is not observable; membership joins still happen for whatever starter channels do match. - ensureStarterChannels (TS) returns nullable generalChannel/welcomeChannel instead of throwing when the ensured list lacks a full match. No callers consumed those fields outside tests. The private Welcome channel flow is unchanged and was already independent of this failure. Co-authored-by: Thomas Petersen <thomasp@squareup.com> Signed-off-by: Thomas Petersen <thomasp@squareup.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Joining an established community fails onboarding on the "Meet your starter team" screen with:
Reported for the meshllm community — reproduced by multiple joiners (#buzz-bugs thread).
ensure_starter_channelsrequires 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 returningErrwhen the full starter set is not observable after create + metadata polling.ensure_starter_channel_membershipsalready 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/welcomeChannelbecome nullable instead of throwing"Starter channels were not available after setup". No callers consumed those fields outside tests (verified by grep — onlyresult.channelsis used inhooks.ts).The private Welcome channel flow is unchanged and was already independent of this failure.
Testing
ensureStarterChannels succeeds without a full starter set (customized community)— renamedgeneral, nowelcome-everyone; asserts no throw, null fields.