fix(teams): personal spaces offer create-a-team instead of a doomed invite - #1032
Open
juandavidr7 wants to merge 2 commits into
Open
fix(teams): personal spaces offer create-a-team instead of a doomed invite#1032juandavidr7 wants to merge 2 commits into
juandavidr7 wants to merge 2 commits into
Conversation
…onal spaces
Since C8, inviting from a personal space answers 403 personal_space by
design, but the client still rendered the Organization > People "Add
someone" form there: it gated only on the multiplayer capability plus
owner/admin role, and every user is owner of their personal space. Users
invited, hit the wall, and saw a generic red failure toast (8/8 production
invite failures on 2026-07-22).
Gate on the gateway's new server-truth signal instead: GET /v1/capabilities
now returns spaceKind ("personal" | "team") for the active space, refetched
on every space switch exactly like role. Additive and read tolerantly:
- spaceKind "personal": the People tab body becomes a "create a team to
invite people" CTA that opens the existing CreateTeamDialog (which
switches into the new team on success, so the real invite surface
appears right after); the Admin index People row caption follows.
- spaceKind "team": unchanged (roster + add row / read-only admin notice).
- spaceKind absent (older gateway): unchanged, so hosted team users on a
stale gateway never lose the invite surface.
Changes: additive Capabilities.spaceKind in ui/engine-client, a pure
isPersonalSpace gate in app/src/lib/org-roles.ts beside the other caps-only
role gates, the People tab branch + PeopleCreateTeamCta component, and
en/es/pt copy under teams:people.personal + org.index.rows.peoplePersonal.
The gateway stays the sole enforcer; this only stops offering a dead end.
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.
Client half of the Teams invite fix (server half: gethouston/cloud#156). Fixes the confirmed production bug where users invited teammates from their PERSONAL space, the gateway answered
403 personal_spaceby design, and the client showed a generic red failure toast — because the People surface only gated onmultiplayer+ role, and everyone owns their personal space.What
spaceKind?: "personal" | "team"onui/engine-clientCapabilities— the gateway's server-truth signal for the ACTIVE space, refetched on space switch. Tolerant reader: absent (older gateway) keeps today's behavior byte-identical.isPersonalSpace(caps)inapp/src/lib/org-roles.ts, beside the other capability-only gates.CreateTeamDialog; on success the app switches into the new team, capabilities refetch asteam, and the real invite surface appears — the journey continues instead of dead-ending. Admin index People caption follows suit.canSeeMembers/canSeeOrganizationuntouched — Admin (Activity/Usage) and Permissions stay reachable in personal spaces; only the invite affordance is replaced.share-via-team-flowwas already personal-aware.teams:people.personal.*), teams-and-inviting language only.Decision table
capabilities.spaceKind"personal""team"Tests
App suite 1950/1950 (new cases for the three states in
org-roles.test.ts),tsgo --noEmitclean,check-localesin sync,houston-webtypecheck + shim parity OK, engine-client typecheck/tests clean, Biome clean.Notes
spaceKindabsent until then).spaceKindto add a personal-space Playwright e2e; existing e2e exercise the absent path.