Skip to content

[Feature]: Add git diff mode toggle in the diff panel #1590

@parlali

Description

@parlali

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I am describing a concrete problem or use case, not just a vague idea.

Area

apps/web

Problem or use case

The diff panel currently only shows checkpoint-based turn-by-turn diffs (diff between checkpoint[N-1] and checkpoint[N]). There is no way to see a standard git diff — for example, the working tree diff (git diff + git diff --staged) or a branch-to-branch diff (git diff main...HEAD).

This means:

Proposed solution

Add a toggle in the diff panel header (next to the existing stacked/split and word-wrap toggles) that switches between:

  1. Turn diffs (current behavior) — checkpoint-to-checkpoint diffs, with per-turn chip selection.
  2. Git diff — a live git diff + git diff --staged of the working tree, or optionally a diff against a configurable base ref (e.g. main, origin/main).

When in git diff mode, the turn chip strip could be hidden or replaced with a branch/ref selector.

Why this matters

Smallest useful scope

A single toggle that switches the diff panel from checkpoint mode to showing the output of git diff HEAD (unstaged + staged changes against the latest commit). No branch selector needed in v1.

Alternatives considered

  • Using an external terminal or git diff manually — breaks the flow and loses the integrated file tree / syntax-highlighted diff UX.
  • The existing "All turns" chip shows cumulative checkpoint diffs, but this is still checkpoint-based and misses changes made outside the agent.

Risks or tradeoffs

  • Git diff can be large in repos with many uncommitted changes; may need truncation or lazy loading.
  • Need to decide refresh strategy (on-demand vs. polling vs. file-watcher) to keep the git diff view current.
  • Two diff modes may add UX complexity; clear labeling and sensible defaults are important.

Examples or references

Contribution

  • I would be open to helping implement this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions