-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Review panel should support partial staging and diff against staged content #10482
Copy link
Copy link
Open
Labels
area:code-reviewGit diff views, review UI, review comments, and PR-focused agent flows.Git diff views, review UI, review comments, and PR-focused agent flows.duplicateThis issue or pull request already exists.This issue or pull request already exists.enhancementNew feature or request.New feature or request.os:macmacOS-specific behavior, regressions, or requests.macOS-specific behavior, regressions, or requests.repro:highThe report includes enough evidence that the issue appears highly reproducible.The report includes enough evidence that the issue appears highly reproducible.triagedIssue has received an initial automated triage pass.Issue has received an initial automated triage pass.
Metadata
Metadata
Assignees
Labels
area:code-reviewGit diff views, review UI, review comments, and PR-focused agent flows.Git diff views, review UI, review comments, and PR-focused agent flows.duplicateThis issue or pull request already exists.This issue or pull request already exists.enhancementNew feature or request.New feature or request.os:macmacOS-specific behavior, regressions, or requests.macOS-specific behavior, regressions, or requests.repro:highThe report includes enough evidence that the issue appears highly reproducible.The report includes enough evidence that the issue appears highly reproducible.triagedIssue has received an initial automated triage pass.Issue has received an initial automated triage pass.
Summary
Add VS Code-style staging to Warp's review panel so users can stage individual lines or hunks, clearly distinguish staged versus unstaged changes, and review later agent edits against the staged baseline instead of always against HEAD.
Problem
The current review workflow does not let users approve only part of an agent's work at line or hunk granularity. That makes it hard to accept the good parts, keep the rest unstaged, and ask the agent to revise only the unapproved portions.
A related problem shows up after partial approval: if a file already has staged changes and the agent edits it again, the review panel should show only the new diff relative to what is already staged, not the full diff relative to HEAD. Without that, it is difficult to tell what changed since the user last approved part of the file.
Reproduction steps or desired workflow
Artifacts
None attached.
Warp version
Unknown
Operating system
macOS
Possible source references
app/src/code_review/mod.rs: code review panel surface that appears related to review-panel behavior.app/src/code_review/diff_state/local.rs: local diff-state handling that seems relevant to HEAD/worktree/index comparisons.app/src/util/git.rs: Git helper layer that may be relevant for index-aware staging and staged-vs-unstaged diff computation.app/src/workspace/view/right_panel.rs: right-panel integration point that may be involved in presenting review state.