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]: Thread details Changes row ignores the base ref and whitespace setting chosen in the Changes panel #19530
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
Not sure
Steps to reproduce
Open a thread on a feature branch that has commits ahead of the default branch.
In the thread details panel, click the Changes row. The diff panel opens on the branch comparison, and its header totals match the row.
In the diff panel, pick a different base ref in the comparison selector. Alternatively, with whitespace-only edits in the branch, toggle the diff whitespace setting.
Compare the +/- totals in the thread details Changes row with the totals in the diff panel header.
Expected behavior
The Changes row shows the totals of the comparison that clicking it opens: the same base ref and whitespace setting as the diff panel.
Actual behavior
The row keeps showing the totals for the server's automatic base, with whitespace counted. The diff panel header shows the totals for the base ref selected for the thread. After picking another base, the two numbers disagree and the row never follows.
Likely cause (source inspection): GitActionsControl reads gitStatus.branchChanges ?? gitStatus.workingTree, while DiffPanel computes its totals from review.getDiffPreview with the thread's remembered baseRef and ignoreWhitespace.
Related but distinct: #15314 is about which base the automatic comparison picks. This issue is about the row not following the base selected in the panel.
Confirmed on main. This is a bug, though a small one.
The Changes row is supposed to match the diff panel. The code says so: GitActionsControl.tsx has the comment "Matches the diff panel's Changes view". But the row reads gitStatus.branchChanges ?? gitStatus.workingTree, which is the server's automatic base with whitespace counted. DiffPanel gets its totals from review.getDiffPreview using the thread's selected baseRef and ignoreWhitespace. The two only agree while the panel stays on the automatic base with whitespace shown. If you pick a different base or hide whitespace, the row doesn't update.
This is separate from #15314 and its PR #15393, which change which base gets picked automatically, and from #16414, which is about colors.
Workaround: read the totals in the diff panel header.
Possible direction: when the thread has a non-automatic base or ignores whitespace, have the row use the same diff-preview totals as the panel. Another option is to label the row with the base it's comparing against.
Reproduced in the web dev app on Linux at 70e5e384da, using isolated state and a feature branch with one whitespace edit and one added line.
With whitespace hidden, the panel shows +1/-0 and the details row remains +2/-1. Selecting an alternate base at HEAD makes the panel show “No net changes” while the row remains +2/-1. Showing whitespace against main restores matching +2/-1 totals. No matching duplicate found among the 964 open issues.
Activity
juliusmarminge commentedon Oct 14, 2026
Note
Grok responding on behalf of Julius.
Confirmed on main. This is a bug, though a small one.
The Changes row is supposed to match the diff panel. The code says so:
GitActionsControl.tsxhas the comment "Matches the diff panel's Changes view". But the row readsgitStatus.branchChanges ?? gitStatus.workingTree, which is the server's automatic base with whitespace counted.DiffPanelgets its totals fromreview.getDiffPreviewusing the thread's selectedbaseRefandignoreWhitespace. The two only agree while the panel stays on the automatic base with whitespace shown. If you pick a different base or hide whitespace, the row doesn't update.This is separate from #15314 and its PR #15393, which change which base gets picked automatically, and from #16414, which is about colors.
Workaround: read the totals in the diff panel header.
Possible direction: when the thread has a non-automatic base or ignores whitespace, have the row use the same diff-preview totals as the panel. Another option is to label the row with the base it's comparing against.
assets: pingdotgg#19530 before
assets: pingdotgg#19530 after
assets: pingdotgg#19530 after-whitespace
evidence: pingdotgg#19530 before
evidence: pingdotgg#19530 after
juliusmarminge commentedon Oct 21, 2026
Reproduced in the web dev app on Linux at 70e5e384da, using isolated state and a feature branch with one whitespace edit and one added line.
With whitespace hidden, the panel shows +1/-0 and the details row remains +2/-1. Selecting an alternate base at HEAD makes the panel show “No net changes” while the row remains +2/-1. Showing whitespace against main restores matching +2/-1 totals. No matching duplicate found among the 964 open issues.
Whitespace hidden:

Alternate base at HEAD:
