Team joining mode + self-service leave#2086
Merged
Merged
Conversation
…model
Introduces JoiningMode (open/request_only/invite_only/closed) replacing the
former is_private bool, plus self-service POST /teams/{team_id}/join for
OPEN teams. Marketplace visibility is now unconditional for every team
(ReBAC public relation granted to all, backfilled lazily) — joining_mode
gates only membership, never discovery. Existing teams migrate to
request_only, matching the prior mailto-based behavior exactly.
Frontend: TeamSettingsParameters gets a 4-way ButtonGroup (extended with
per-item color override) replacing the private/public Switch; TeamCard's
mailto flow is replaced by joining_mode-driven rendering (instant join,
disabled request button, or a closed/invite-only label).
RFC: FRED-TEAM-CONFIG-RFC.md §5.1.1. Tracking: id-legend.yaml TEAM-09,
issue #2084.
Any team member can now remove themselves from a team via the existing
DELETE /teams/{team_id}/members/{user_id} endpoint (admin permission
check bypassed for same-identity calls) — the last-admin invariant still
applies, so a team's sole team_admin cannot leave. The team-settings
gear icon opens to every member instead of admins only, scoped per
role: plain members get a read-only Members view plus a new "Leave
team" action; elevated roles keep the existing full panel.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The first column's content sat flush against the table's left edge. Added an opt-in firstColumnInset prop to the shared DataTable (default off, so its other 3 consumers are unaffected) and enabled it on TeamSettingsMembersTable. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mdxeditor/editor bundles Radix Colors, which defines its own --red-10
(and other ramp steps) on :root — colliding with ours and silently
corrupting --on-error (and any other token built on a colliding ramp
step) app-wide once that editor's stylesheet loads. Prefixed every ramp
family (indigo, light-blue, light-purple, cold-green, mustard, red,
cold-grey) with core- in color-ramps.css and updated every reference in
colors-semantic-{light,dark}.css and teamColor.ts (the only other
direct consumer).
Also switched --scrim's hue to pure black (rgb(0,0,0)), same opacity.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.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.
Summary
Team.is_privatewith a 4-wayjoining_mode(open/request_only/invite_only/closed) marketplace model, plus self-servicePOST /teams/{team_id}/joinfor open teams. Marketplace discovery becomes unconditional (ReBACpublicrelation granted to every team);joining_modeonly gates membership. Existing teams migrate torequest_only, matching prior real-world behavior exactly.DELETE /teams/{team_id}/members/{user_id}endpoint (same-identity bypass of the admin permission check); the last-admin invariant still applies, so a team's soleteam_admincannot leave. Team settings become reachable by every member, scoped per role: plain members get a read-only Members view plus a new "Leave team" action.core-to stop a silent collision with Radix Colors bundled inside@mdxeditor/editor(was corrupting--on-errorapp-wide once that editor's stylesheet loaded).Commits
feat(TEAM-09): replace team is_private with joining_mode marketplace modelfeat(AUTHZ-09): allow team members to leave a teamfix: inset the first column of the team members tablefix: prefix color ramp tokens with core- to avoid third-party collisionsTracking
docs/swift/rfc/FRED-TEAM-CONFIG-RFC.md§5.1.1,docs/swift/rfc/FRED-AUTHORIZATION-TARGET-MODEL-RFC.mdPart 9id-legend.yaml: TEAM-09, AUTHZ-09Test plan
make code-quality+make test(control-plane-backend) — 501 passedmake code-quality(tsc/prettier/eslint) +make test— 597 passed🤖 Generated with Claude Code