pingdotgg / pingdotgg/t3code

[Bug]: Diff shows prior branch's changes as deletions after switching checked-out branch mid-thread

Open
#8,204 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. In a thread, ask the agent to make changes on branch A (checked out).
  2. Ask the agent to switch to and make changes on branch B, which gets checked out.
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.