Skip to content

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

Open
agent-relay-code[bot] wants to merge 2 commits into
mainfrom
feat/teams-settings
Open

agent-relay-code[bot] wants to merge 2 commits into
mainfrom
feat/teams-settings

Conversation

@agent-relay-code

@agent-relay-code agent-relay-code Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

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.

View guided diff

Settings > Teams lets an organization's owners and admins create, rename
and archive teams and put each person in at most one team. The page reads
and writes the control plane's /organizations/{id}/teams routes.

The section appears only when the installation reports the `teams`
capability and the viewer can manage the organization. Installations that
do not report it are unchanged.

- contracts and API client for the team routes; members carry an
  optional teamId
- typed refusals (name taken, archived, not found, not enabled) shown as
  short sentences in the card the action came from
- tests for the page, the capability gate and the settings navigation

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2fa8a46a-0ae6-435f-8fb2-79be0be9a8c3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@greptile-apps

greptile-apps Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; all three previous findings are addressed.

Summary

Adds Settings > Teams for owners and admins when the installation enables teams.

  • Owners and admins can manage organization teams from Settings.

All three previous findings are addressed. No new actionable issues were found.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Admin changes a team or assignment] --> B[Disable controls]
  B --> C[Show the result]
  C --> D[Reload teams and members]
  D --> E{Both requests settled?}
  E -->|No| D
  E -->|Yes| F[Enable controls]
Loading

Reviews (2) · Last reviewed commit: "fix(teams): wait for the refreshed lists..." · Reviewed by Greptile

Comment thread src/admin/teams.tsx Resolved
Comment thread src/admin/teams.tsx Resolved
Comment thread src/admin/teams.tsx Resolved
Review follow-ups on the Settings > Teams page:

- After a write the page reloaded both lists but enabled its controls at
  once, so a second change could act on the person's previous team. The
  controls now stay disabled until both reloads have settled. useLoad
  returns `pending` for this; other callers are unchanged.
- Removing someone who was no longer in that team (the server answers
  `unassigned: false`) said they had been removed. It now says they were
  no longer in the team and that the list was refreshed.
- A notice for the People card was lost when that card is not shown (the
  last team archived meanwhile). It is shown in the Teams card then.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants