Skip to content

feat(communities): skip join consent covered by a Builderlab account - #2912

Merged
baxen merged 1 commit into
mainfrom
mbot/skip-join-consent-for-accounts
Nov 7, 2026
Merged

baxen merged 1 commit into
mainfrom
mbot/skip-join-consent-for-accounts

Conversation

@baxen

@baxen baxen commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

What

When someone is signed in to Builderlab and the community is one their Builderlab server hosts, Buzz no longer asks for the join policy's age and terms boxes:

  • Onboarding (Join a community → Continue, or an owned community): the community joins at once, without the Join Community page, as a just-created community already did. Back from a failed join still goes through Join Community, so a join that keeps failing has a way out.
  • In-app Add a community: Continue skips the access step and goes straight on, unless the relay refuses the read and there is no code to claim. If a claim is refused, the dialog falls back to the access step, where another code can be entered.
  • An invite claim sends age_confirmed: true for the account holder.

Imported keys (no account), and communities that no signed-in server hosts, still see the boxes.

Why

Builderlab account setup collects a date of birth and says "By continuing, you agree to the Buzz Terms of Service and Privacy Policy". Those are the same documents bb-public relays publish as their join policy. A companion kgoose change refuses birthdays under 18, so the account is now a stronger age signal than the checkbox.

How

  • accountConsents(identity, relay) in src/features/communities/account-consent.ts: the federated session is signed-in and its authority.communityHosts covers the relay (coversCommunity, the rule native uses to attach tokens).
  • consentAsked(policy, given) moves to join-policy.ts, so FindCommunity and CommunityDialog share it.
  • FindCommunity takes consentGiven(found). When it returns true, the page shows no boxes and Join attests { adult: true, agreed: true }.
  • Welcome sets its auto-join flag (renamed from created to joinAtOnce) for a just-created community or one the account consents to.
  • docs/identity.md and docs/buzz-help.md are updated.

Dependencies

  • A companion Builderlab change refuses birthdays under 18 in account setup. Ship it before this, or the account's age signal is weaker than the checkbox it replaces.

Testing

  • vitest run src/features/communities src/features/identity src/app: all pass, including the existing join-policy tests.
  • New tests, with fail-then-pass checked by disabling accountConsents:
    • account-consent.test.ts: session states, covered and uncovered hosts.
    • FindCommunity.test.tsx: given consent shows no boxes and attests on Join, and with autoJoin it joins at once.
    • CommunityDialog.test.tsx: a signed-in account skips the access step and claims with age_confirmed: true; a refused claim lands on the access step; signed out still asks.
    • identity.test.tsx: an invite link for an account-hosted community reaches the profile step without Join Community or boxes, and claims with age_confirmed: true.
  • pnpm typecheck, pnpm lint and the commit and push hooks pass.
  • Deferred: not exercised in the native app against bb-public. That needs a human run: sign in with a Builderlab account, then join a *.communities.buzz.xyz community, from onboarding and from Add a community.

Open questions

  • Legal: is account setup's "By continuing, you agree" note enough to replace the join checkbox?
  • Accounts created before the kgoose change may hold under-18 birthdays.

A signed-in Builderlab account's setup records a date of birth (kgoose refuses one under 18) and agrees to the Buzz Terms of Service and Privacy Policy that Builderlab-hosted relays publish as their join policy. For a community the account's server hosts, Join Community and the Add-a-community access step no longer show the age and terms boxes, Continue joins at once, and an invite claim confirms the holder's age. Imported keys and communities no signed-in server hosts still ask.

Co-authored-by: mbot <3754f8729004d95654c46dbab3129e4ab9ef05cc2534e2a3fbfc155983bd637b@buzz.block.builderlab.xyz>
Signed-off-by: Bradley Axen <[email protected]>
@baxen
baxen marked this pull request as ready for review November 6, 2026 23:54
@baxen
baxen requested a review from a team as a code owner November 6, 2026 23:54
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T23:57:16.504626Z 754a022 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 754a022191

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +27 to +29
export const ACCOUNT_CONSENT: JoinConsent = Object.freeze({
adult: true,
agreed: true,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Require verified age proof before attesting adulthood

For an account created before the companion kgoose under-18 rejection—or whenever this client ships before that dependency—accountConsents proves only that a session is signed in on a covering host, yet ACCOUNT_CONSENT unconditionally sends adult: true. Such accounts can therefore make Buzz submit a false age attestation while the UI removes the user's confirmation checkbox. Gate this behavior on an explicit server-provided eligibility/consent signal or migrate and revalidate existing accounts before enabling it.

AGENTS.md reference: AGENTS.md:L10-L12

Useful? React with 👍 / 👎.

Comment on lines +18 to +22
const session = identity?.snapshot();
return (
session?.status === "signed-in" &&
session.authority !== null &&
coversCommunity(session.authority.communityHosts, relay)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve consent from the community-specific session

When the target belongs to a configured secondary identity server, FederatedIdentity.forCommunity(relay) owns that server's session, but this helper always reads the root snapshot. A user signed in to the secondary server will consequently still be shown the consent boxes, while a root session cannot represent the relevant server state; CommunitySignIn already demonstrates the required per-community selection. Resolve forCommunity(relay) before checking the snapshot.

AGENTS.md reference: AGENTS.md:L99-L103

Useful? React with 👍 / 👎.

Comment on lines 666 to +669
const find = (origin: string, code = "", justCreated = false) => {
setFinding(origin);
setInviteCode(code);
setCreated(justCreated);
setJoinAtOnce(justCreated || accountConsents(federatedIdentity, origin));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Recompute auto-join after onboarding sign-in

When a signed-out user submits a hosted community and then connects their Builderlab account, find() records joinAtOnce before the sign-in, so it remains false even after the lookup triggers signIn() and the session becomes eligible. The later FindCommunity render sees consentGiven === true but autoJoin === false, leaving the user on an otherwise empty Join Community confirmation instead of joining immediately as documented. Recompute this flag after sign-in or derive auto-join from the current session when the found community settles.

Useful? React with 👍 / 👎.

@baxen
baxen merged commit 11835b1 into main Nov 7, 2026
111 of 113 checks passed
@baxen
baxen deleted the mbot/skip-join-consent-for-accounts branch November 7, 2026 00:33
@morgmart

morgmart commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

🤖 Design review (Design Reviewer agent, head 754a022)

Looks good from a design standpoint. Builderlab members get one less step in onboarding and Add a community. People without an account, and communities their server doesn't host, still see the boxes, and a failed join still has a way back. No must-fix issues.

Optional: in onboarding, the community now joins at once without the Join Community page. That page is also where people see which community they're joining. If an invite link points somewhere unexpected, they find out only after they're in. Consider keeping the community's name visible on the step that follows.

Merge note (not design): the PR depends on the Builderlab change that refuses under-18 birthdays, and it has an open legal question about whether account setup's terms note replaces the checkbox. Both need answers before merge.

Not checked: I didn't run the app or a real Builderlab sign-in, so I didn't check enlarged text or narrow windows.

tellaho added a commit that referenced this pull request Nov 7, 2026
Integrate the mainline sidebar geometry correction while retaining the dialog focus changes.

Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz>

* origin/main:
  fix(sidebar): give Drafts & sent the page rows' icon box (#2946)
  fix(sidebar): drop the draft pencil from channel and DM rows (#2943)
  feat(channels): create #general for the owner of an empty community (#2904)
  feat(agents): move local teams to the relay and show sync state (#2846)
  Preserve legacy emoji avatars during agent import (#2849)
  feat(communities): skip join consent covered by a Builderlab account (#2912)
  fix(mentions): keep @mentions tagged when punctuation or quotes follow the name (#2713)
  fix(sidebar): align Drafts & sent row with channel rows (#2733)
  test(navigation): split the plugin-settings return-path journey (#2800)
  fix(messages): let Escape close Forward and return focus to ⋯ (#2807)
  fix(messages): say older messages can load once Buzz reconnects, instead of an inert Load older button (#2810)
  fix(navigation): say when the open page's plugin is turned off, and open it in Manage plugins (#2817)
  fix(settings): reopen plugin details on Back and Forward (#2825)
  fix(agents): show agent card pictures without a backdrop (#2828)
  feat(agents): team instructions history and agent/team config tools (#2848)
  test(plugin-manager): use an immutable git socket fixture (#2665)
  fix(attention): show the attention toggle when an agent has nothing yet (#2907)

Signed-off-by: Taylor Ho <[email protected]>
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.

3 participants