feat(settings): add a Teams page for owners and admins

AG
10d ago
+987-6

What

Adds Settings > Teams for an organization's owners and admins:

  • create, rename and archive teams
  • put each person in at most one team; choosing another team moves them, "No team" removes them
  • refusals from the control plane (name already in use, team archived, team or member gone, feature not enabled) are shown as short sentences in the card the action came from, and stale lists reload

When it shows

Only when the installation's capabilities report teams and the viewer is an owner or admin. Installations that do not report the capability see no navigation entry, no heading and no request to the team routes. teams defaults to false when an older control plane omits it.

Depends on

The control plane's organization teams routes (/api/v1/organizations/{id}/teams…, feature teams, off by default) in relay-control. That change is on relay-control main (not in a released image yet); until an installation runs it with the feature on, this page is unreachable.

Files

  • src/admin/teams.tsx, src/admin/teams.test.tsx: the page and its tests
  • src/admin/contracts.ts, src/admin/api.ts: team schemas and client calls; members carry an optional teamId
  • src/features/capabilities.ts: teams capability
  • src/admin/settings.tsx: the section, gated as above
  • src/shell/shell.test.tsx, src/flows/flows.test.tsx: capability fixtures

Checks (local, this head)

npm run check steps run one at a time: lint clean, design typecheck clean, 14 test files / 196 tests pass, tsc -b and vite build clean, production isolation check clean.

Not included

No usage report by team yet, and no change to hosted behavior.

Held with merge-train:hold: merge needs the repository owner's OK.

🤖 Generated with Claude Code


Run Proof on this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.