You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Web Pull Requests list applies diff stats from another repository with the same PR number #43556
On the web Pull Requests page (/pull-requests), opening a pull request from another repository that shares a host project (for example, opening a linked cross-repo PR in the detail panel via a borrowed projectId) overwrites the diff line counts (+additions / -deletions) of any same-numbered pull request in the list and prevents its real diff stats from being fetched.
Root Cause
pullRequestDiffStatKey in apps/web/src/components/pullRequest/pullRequestList.logic.ts keys the in-memory statsByRow map only by ${row.environmentId} ${row.projectId} ${row.number}, omitting repository (even though PullRequestDiffStat, pullRequestStatsPersistence, and mobile's pullRequestStatKey all include repository).
When PullRequestsPage merges panelSummary into statsByRow, a cross-repo PR that borrowed projectId (e.g. other/lib#42) is stored under the same key as own/app#42. withDiffStat then applies other/lib#42's counts to own/app#42, and pullRequestStatsKeysToRequest skips fetching own/app#42's real stats because statsByRow.has(key) is already true.
Expected Behavior
pullRequestDiffStatKey and mergePullRequestDiffStats should include the normalized (case-insensitive) repository alongside environmentId, projectId, and number so diff stats from different repositories under the same project never collide.
Activity