[BUG] PR review panel shows wrong file diff (same files for all PRs) — diff payload cached/decoupled from branch label

Resolved 💬 5 comments Opened May 20, 2026 by cycha Closed Jun 20, 2026

Summary

In the Claude Code desktop app's PR review panel (right-hand split), the file list + diff content shown does not match the PR currently selected in the pinned-session left pane. All PR rows in the pinned list also display the same LOC counter (e.g. +293/-72), regardless of the actual PR size on GitHub.

The branch label in the right pane (main → feat/<branch>) updates correctly when switching PR rows, but the file tree + diff payload below it appears cached from an earlier-selected PR.

Repro

  1. Pin a session that surfaces multiple draft/open PRs (in my case ~12 PRs from a parallel migration wave, all branched off main).
  2. Click PR row A → right pane loads its diff. Confirm files match.
  3. Click PR row B → branch label in right pane updates to main → <B-branch>, but the file tree + diff content stays as A's payload.
  4. Cycle through every row → all show A's files; LOC counter on every row reads identical placeholder value.

Expected

  • Right-pane file tree + diff content refreshes to match selected PR's branch.
  • Each PR row shows its own additions/deletions count.

Actual

  • Right-pane file tree + diff content stays frozen on first-loaded PR's content.
  • Every PR row in left pane shows identical LOC count.

Verified ground truth by running gh pr view <num> --json additions,deletions,changedFiles and gh pr diff <num> --name-only for each PR — every PR has distinct file lists and distinct LOC totals (ranging from 8 files / +722 add to 40 files / +2531 add in my repro set). Panel was showing one specific older PR's files for every selection.

Likely cause (speculation)

  • Diff payload cached at session level, keyed by something stable across row changes (so subsequent selections reuse the first-loaded payload).
  • OR diff computed against a stale local worktree state — the parent worktree is checked out on different branches at different points, and the panel may be reading from disk rather than from GitHub.
  • The shared LOC value looks like a single placeholder reused for every row.

Environment

  • Claude Code: 2.1.138 (desktop app)
  • OS: macOS 26.4.1 (build 25E253)
  • Repo: private monorepo with many concurrent worktrees under .claude/worktrees/
  • All PRs in repro have base main and distinct heads

Workaround

Use gh pr diff <num> or open the PR's Files-changed tab on GitHub for ground truth.

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗