fix(github): requested teams now show in pull request reviewers #19375
main fromrefs/pull/19375/head·merged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubTeams asked to review a GitHub pull request, often by CODEOWNERS, did not show in T3 Code's reviewer list. The conversation query had no Team fragment, so GitHub returned {} for the team and the decoder dropped it. The core detail listed only user logins.
Fix: a requested team is now a reviewer row named by its org/slug (GitHub's combinedSlug, the same handle as an @org/team mention). A GitHub login cannot contain /, so a team never shares a row or a review verdict with a user of the same name. This keeps the two identities apart, as the triage asked. Teams show in the first detail read too, not only after the conversation loads. Reviewer menu team candidates use the same org/slug as their label, and keep the bare slug as the id sent to GitHub. Because the menu updates cached rows by login, taking a team request back now removes its row and never removes a same-named user. No contract change, so web and mobile show the team with its name and avatar without client changes.
Proof:
- New decode test with a team node recorded from #12329 plus a user whose login equals the team slug: both rows stay separate. It failed before the fix and passes now. The core detail test now asserts the team row. It also failed before and passes now.
- Real API, read-only, on #12329: the old query returns
requestedReviewer: {}. The new decoders returnpingdotgg/ping-devs("Ping Devs", team avatar) for the conversation reviewers, the core detail, and the reviewer menu (idping-devs). - GraphQL cost from a
rateLimit(dryRun: true)check is unchanged: conversation query 15 → 15, core query 1 → 1. vp test run packages/source-control-github/src/server/: 353/353 pass. Package typecheck is clean.
Other hosts (GitLab, Bitbucket, Forgejo, Azure DevOps, GitCafe) share no changed code or contract.
Fixes #19206
Reviewed with sol-loop: 1 round with GPT-6.1-Sol.
Model and harness: Claude Opus 5.5 in Claude Code via T3 Code.
🤖 Generated with Claude Code
- 1
juliusmarminge added labelsmacroscope-review
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
Approvability#
Verdict: Approved at
c82031dMacroscope's review found this PR approvable — This is a narrow GitHub reviewer-display bug fix that adds team identities to existing detail, activity, and candidate decoding paths while preserving existing request semantics. The production changes are localized and accompanied by focused tests, with no product-default, infrastructure, or static-analysis configuration changes.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Team
- Run ID:
96a10469-233b-4c54-a759-0e2f76e988ce
📥 Commits
-
Reviewing files that changed from the base of the PR and between 519d64f6cec0a0f9ed18fbca4a3f8695cac44506 and c82031dc1934927ef7d60d5523910c0b679cb68e.
📒 Files selected for processing: 5
-
packages/source-control-github/src/server/GitHubPullRequestApi.test.tspackages/source-control-github/src/server/GitHubPullRequestProvider.test.tspackages/source-control-github/src/server/GitHubPullRequestProvider.tspackages/source-control-github/src/server/gitHubPullRequestJson.test.tspackages/source-control-github/src/server/gitHubPullRequestJson.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
-
📝 Walkthrough
-
The GitHub pull-request decoder now represents requested teams separately from individual reviewer logins and uses organization-qualified team slugs. Review-thread and reviewer-candidate decoding also recognize team data. The provider includes requested teams in pull-request reviewer results.
Changes: Requested team reviewers
Layer / File(s) Summary Decode requested teams
packages/source-control-github/src/server/gitHubPullRequestJson.ts,packages/source-control-github/src/server/gitHubPullRequestJson.test.tsThe core response schema and query include team identifiers and metadata. Decoding maps requested teams to a separate reviewer list using their combined slug. Tests cover a requested team and reviewed user with matching slugs, as well as missing or unrecognized reviewer data. Decode teams in threads and candidates
packages/source-control-github/src/server/gitHubPullRequestJson.ts,packages/source-control-github/src/server/gitHubPullRequestJson.test.tsReview-thread decoding maps teams when actor decoding does not apply. Reviewer candidates use a combined slug when available and fall back to the team slug. Include teams in reviewer results
packages/source-control-github/src/server/GitHubPullRequestProvider.ts,packages/source-control-github/src/server/GitHubPullRequestProvider.test.ts,packages/source-control-github/src/server/GitHubPullRequestApi.test.tsThe provider appends requested teams to individual reviewer entries. API test data and assertions cover a team’s combined slug, name, and avatar. Priority: ➖ Normal
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Feature · Severity of issue fixed: Medium
Suggested reviewers:
juliusmarminge
Merge Risk: ⚪ Minimal · up to
c8203-
Team reviewers retain organization-qualified display identities while requests use the team slug, and conversation decoding is covered by a direct test. No actionable merge risk remains.
Pre-merge checks:
4-
Passed checks: 4 passed-
Check name Status Explanation Title check The title clearly and concisely describes the main change: requested GitHub teams now appear in pull request reviewer lists. Description check The description covers the problem, implementation, scope, linked issue, verification results, API checks, test results, typecheck status, and agent details. It satisfies the required template. Linked Issues check Issue #19206requires GitHub pull request reviewer lists to show requested teams and keep team and user identities separate. The change requests teamcombinedSlugvalues in the core, conversation, a…Out of Scope Changes check The diff changes only GitHub pull request decoding, provider mapping, GraphQL selections, and related tests. These changes directly implement issue #19206. No other source-control host, shared contrac…
-
✨ Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
-
Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Provider Metric Main baseline This PR Impact PR ceiling Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅ Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅ Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅ Codex Live turn WebSocket decoded 20.9 KiB 20.9 KiB 0 B (0.0%) 29.3 KiB ✅ Codex Live turn messages 2 2 0 (0.0%) 8 ✅ Claude Total thread wire 5.0 KiB 5.0 KiB −7 B (−0.1%) 6.8 KiB ✅ Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅ Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB −7 B (−0.6%) 2.0 KiB ✅ Claude Live turn WebSocket decoded 21.2 KiB 21.2 KiB 0 B (0.0%) 29.3 KiB ✅ Claude Live turn messages 2 2 0 (0.0%) 8 ✅ Baseline:
519d64f· PR result:c82031d· Source CI: successScenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
- Codex decoded thread snapshot: 108.5 KiB
- Claude decoded thread snapshot: 108.8 KiB
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes