Context
Team assignment exists on applications (team_id), but the dropdown options are a static JSON snapshot of the teams table, and there is no roster/team-management admin surface anywhere.
Current behavior
config.application.subfields[team_id].options on live forms contains stale team copies (and broken null/"TBD" pseudo-options). New teams never appear without raw SQL.
- Assignment UI:
team_id column/dropdown in the reviewer table + popover (data-driven via subfield config).
- No admin page reads/writes
teams/team_members; board lanes are status-only (board/page.tsx).
- Members API exposes team membership read-only (
/portal/api/v1/members with team_members include); an external read route /api/v1/teams/forms/[id] exists with no admin counterpart.
- Team_id only becomes meaningful on offer acceptance (creates
team_members rows), so mis-assigned teams linger.
Desired behavior
- Teams admin page: list teams, view rosters (members + roles), create/rename/archive teams.
- Sync options:
team_id options derived from the teams table (server-side at load time) instead of the config snapshot; fall back for offline/legacy.
- Optionally: team filter chips on the table, team lanes on the board.
Acceptance criteria
Context
Team assignment exists on applications (
team_id), but the dropdown options are a static JSON snapshot of theteamstable, and there is no roster/team-management admin surface anywhere.Current behavior
config.application.subfields[team_id].optionson live forms contains stale team copies (and brokennull/"TBD"pseudo-options). New teams never appear without raw SQL.team_idcolumn/dropdown in the reviewer table + popover (data-driven via subfield config).teams/team_members; board lanes are status-only (board/page.tsx)./portal/api/v1/memberswithteam_membersinclude); an external read route/api/v1/teams/forms/[id]exists with no admin counterpart.team_membersrows), so mis-assigned teams linger.Desired behavior
team_idoptions derived from theteamstable (server-side at load time) instead of the config snapshot; fall back for offline/legacy.Acceptance criteria