Repository navigation
feat(communities): skip join consent covered by a Builderlab account - #2912
Conversation
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]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
| export const ACCOUNT_CONSENT: JoinConsent = Object.freeze({ | ||
| adult: true, | ||
| agreed: true, |
There was a problem hiding this comment.
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 👍 / 👎.
| const session = identity?.snapshot(); | ||
| return ( | ||
| session?.status === "signed-in" && | ||
| session.authority !== null && | ||
| coversCommunity(session.authority.communityHosts, relay) |
There was a problem hiding this comment.
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 👍 / 👎.
| const find = (origin: string, code = "", justCreated = false) => { | ||
| setFinding(origin); | ||
| setInviteCode(code); | ||
| setCreated(justCreated); | ||
| setJoinAtOnce(justCreated || accountConsents(federatedIdentity, origin)); |
There was a problem hiding this comment.
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 👍 / 👎.
|
🤖 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. |
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]>
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:
age_confirmed: truefor 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)insrc/features/communities/account-consent.ts: the federated session issigned-inand itsauthority.communityHostscovers the relay (coversCommunity, the rule native uses to attach tokens).consentAsked(policy, given)moves tojoin-policy.ts, so FindCommunity and CommunityDialog share it.FindCommunitytakesconsentGiven(found). When it returns true, the page shows no boxes and Join attests{ adult: true, agreed: true }.Welcomesets its auto-join flag (renamed fromcreatedtojoinAtOnce) for a just-created community or one the account consents to.docs/identity.mdanddocs/buzz-help.mdare updated.Dependencies
Testing
vitest run src/features/communities src/features/identity src/app: all pass, including the existing join-policy tests.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 withage_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 withage_confirmed: true.pnpm typecheck,pnpm lintand the commit and push hooks pass.*.communities.buzz.xyzcommunity, from onboarding and from Add a community.Open questions