fix(web): stop showing a fake team structure on Teams - #97
Conversation
The directory's `team` value lives on the `users` table and no product surface writes it, so agents can never carry a team and humans only do if a row was edited by hand. In practice every entry returns null, which made the view file the entire organisation under one "Unassigned" heading — a grouping that promised structure the system does not have. Group by team only when at least one entry actually carries one; otherwise fall back to actor type (People / Pack agents / System actors), which is always populated by the server and is the distinction that matters today. Header and footer copy now describe what is on screen, and the summary counts humans and agents per actor type instead of subtracting, so system actors are never reported as humans. No roster is invented and no team-management surface is added — the view still renders exactly what the governed directory returns. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 58 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
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. Comment |
Phase 2 of 6.
Teams grouped the whole organisation under a single "Unassigned" heading, and always would.
teamlives on theuserstable, notactors— so agents can never have one, and nothing in the product writes it for humans. On the live homelab every actor returnsteam: null.Decision
Not building team management. There is no write path, and inventing one is a feature rather than a fix. The view is made truthful instead.
Drive-by fix
The summary counted
total - agentsas humans, which reportedsystemactors as people. Both are now counted byactorType.Recommendation on a real team model
Worth building, but not next, and not as a
users.teamstring.That column is free text on
userswith no write path, no uniqueness, no membership table, and structurally no way for an agent to hold one — so it cannot express what the product actually needs, which is "this human and these agents work the same queue". Doing it properly means ateamstable plus a polymorphic membership join overactors(notusers), org-scoped, capability-checked on mutation, audited on membership change. That is a vertical slice throughpackages/roomsgovernance, the directory query, an API surface, and UI.The useful groupings today are already real and already shown: actor type here, capability grants on Capabilities, assignment on Operations. A team model earns its keep once a governance rule needs to name a team — "dispatch to whoever is on the triage rota", "this team approves its own runs". Build it because governance needs the boundary, not because a page wants a heading.
Note for whoever runs
pnpm formatnextThe repo's pinned prettier resolves to 3.9.6, and two pre-existing lines in
MemberRowalready fail its check onmain. Left alone to keep this diff minimal. Formatting is not enforced in CI (lintistsc --noEmit), so that drift is latent.🤖 Generated with Claude Code