[Bug]: Diff shows prior branch's changes as deletions after switching checked-out branch mid-thread
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
Steps to reproduce:
- In a thread, ask the agent to make changes on branch A (checked out).
- Ask the agent to switch to and make changes on branch B, which gets checked out.
- View the diff for the latest turn.
Expected: Diff for the latest turn shows only the changes made on branch B in that turn.
Actual: The changes previously made on branch A appear in the latest turn's diff as deletions (since branch B doesn't have those changes, the diff-against-branch-A-state treats them as removed).
Likely cause: The diff is computed against a stale base ref (the previously checked-out branch) instead of the newly checked-out branch's actual base.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue by following the listed branch-switching steps, then trace the latest-turn diff computation and how it selects the checked-out branch and base ref. Done means the latest-turn diff shows only changes made on branch B, without branch A changes appearing as deletions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100