Skip to content

[Bug]: Thread details Changes row ignores the base ref and whitespace setting chosen in the Changes panel #19530

Open

Description

@nbrosei

Before submitting

  • 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

  1. Open a thread on a feature branch that has commits ahead of the default branch.
  2. In the thread details panel, click the Changes row. The diff panel opens on the branch comparison, and its header totals match the row.
  3. 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.
  4. 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.

Impact

Minor bug or occasional failure

Version or commit

main @ 7ac952c

Environment

macOS 26.7.1 (arm64), desktop app 0.0.46-nightly.20261014.3105

Logs or stack traces

Screenshots, recordings, or supporting files

No response

Workaround

Read the totals in the diff panel header instead of the thread details row.

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Oct 14, 2026
  2. juliusmarminge commented on Oct 14, 2026

    @juliusmarminge
    Member

    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.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.

  3. added
    acceptedfeature request accepted
    via-triageFiled through npx t3 triage
    and removed
    needs-triageIssue needs maintainer review and initial categorization.
    on Oct 14, 2026
  4. juliusmarminge commented on Oct 21, 2026

    @juliusmarminge
    Member

    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:
    Whitespace hidden: panel +1/-0, row +2/-1

    Alternate base at HEAD:
    Alternate base: empty panel, row +2/-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedfeature request acceptedbugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions