Draft
Restore Pull Requests metrics in team-scoped view by enriching team reportData with PR day totals#450
Conversation
Co-authored-by: karpikpl <3539908+karpikpl@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix pull request data rendering in team view
Restore Pull Requests metrics in team-scoped view by enriching team reportData with PR day totals
Jul 31, 2026
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.
Organization scope returned Pull Requests metrics, but team scope rendered the PR tab as empty because team aggregation preserved usage totals while dropping
day_totals[].pull_requests. This change aligns team responses with org responses so the PR tab has the data it expects.Root cause
aggregateTeamMetrics), which do not include PR aggregates.PullRequestViewerreads PR data fromreportData[].pull_requests; in team scope that field was missing.Backend change: team PR enrichment
enrichTeamReportWithPullRequests(...)inshared/utils/metrics-util-v2.ts.fetchLatestReport(...)and mergespull_requestsinto matchingday_totalsbyday.Regression coverage
tests/metrics-util-v2-team-path.spec.tswith a focused test asserting teamreportDataincludespull_requestswhen provided by the report API.