Repository navigation
feat(settings): add a Teams page for owners and admins - #161
Open
agent-relay-code[bot] wants to merge 2 commits into
Open
agent-relay-code[bot] wants to merge 2 commits into
agent-relay-code[bot] wants to merge 2 commits into
Conversation
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>
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
[Medium impact] The PR appears safe to merge; all three previous findings are addressed.
|
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>
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.
What
Adds Settings > Teams for an organization's owners and admins:
When it shows
Only when the installation's capabilities report
teamsand 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.teamsdefaults tofalsewhen an older control plane omits it.Depends on
The control plane's organization teams routes (
/api/v1/organizations/{id}/teams…, featureteams, 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 testssrc/admin/contracts.ts,src/admin/api.ts: team schemas and client calls; members carry an optionalteamIdsrc/features/capabilities.ts:teamscapabilitysrc/admin/settings.tsx: the section, gated as abovesrc/shell/shell.test.tsx,src/flows/flows.test.tsx: capability fixturesChecks (local, this head)
npm run checksteps run one at a time: lint clean, design typecheck clean, 14 test files / 196 tests pass,tsc -bandvite buildclean, 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
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.