feat(ui): Teams page — list, create, delete + member management - #41
Merged
Merged
Conversation
Adds a full Teams management UI to the React SPA: - Teams.tsx: expandable team list with create/delete (admin only) - Click a team row to expand and see its member list - Add member form (username + role picker: viewer/analyst/operator/admin) - Remove member per-row (admin only), role badges colour-coded by level - Create team modal with name + optional description - All destructive actions (delete team, remove member) require admin role - useAuth: expose 'role' field from /api/v1/auth/me so UI can gate admin actions - teams.ts API client: full CRUD (getTeams, getTeam, createTeam, deleteTeam, addMember, removeMember) matching /api/v1/teams endpoints - App.tsx: add /teams route - Layout.tsx: add Teams nav entry (👥) - Rebuilt static bundle 531 backend tests passing, UI builds clean (45 modules, 0 TS errors). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AbfhpQR6qzZAXcTacEcZvn
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
Adds a full Teams management page to the React SPA, wiring up all existing
/api/v1/teamsendpoints.Changes
ui/src/pages/Teams.tsx(new)ui/src/hooks/useAuth.tsxAuthStateto exposerolefetched fromGET /api/v1/auth/me.ts→.tsx(uses JSX context default)ui/src/api/teams.tsgetTeams,getTeam,createTeam,deleteTeam,addMember,removeMemberui/src/App.tsx+ui/src/components/Layout.tsx/teamsroute added; Teams nav entry (👥) added at bottom of sidebarserver/static/ui/Tests
531 backend tests passing. UI build clean.
🤖 Generated with Claude Code
https://claude.ai/code/session_01AbfhpQR6qzZAXcTacEcZvn
Generated by Claude Code