You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: Codex (GUI)-style Git diff view with ability to stage each chunk using "+" #334
@jasongitmail, quick update, now you can revert each chunk of code (no "stage" yet). And also add annotations for AI for any line in the diff view. This is in the latest release (along with many other features)
If you want to put in a PR to add the "stage" feature, we can prioritize in getting it in the release today or tmr too!
I rechecked this against the current combined diff/source-control implementation while triaging the newer duplicate/overlapping request #2429.
Verified current state:
Combined "view all" diffs are present and load per-file diff content.
Unstaged text diff sections are editable and saving writes the whole modified file back.
Source Control supports file-level stage, unstage, and discard through git add, git restore --staged, and discard/clean flows.
The diff UI supports line comments/AI notes, and the existing chunk revert mentioned above is not the same as hunk staging.
What remains for this issue is specifically hunk/range staging and hunk/range accept/deny controls. That needs a structured patch API, not just another button in the header, because it has to keep staged vs unstaged diffs correct and work safely for local, SSH, and runtime-backed worktrees. I left the scoped implementation breakdown on #2429: #2429 (comment)
Picking this up — thanks @nwparker for the scoped breakdown on #2429, I followed it closely. Opened #5950.
Approach: git stays the source of truth for hunks — fetch the per-file unified diff (new git.diffPatch), rebuild a minimal patch for the selected hunk, and apply it with git apply --cached / --reverse (new git.applyPatch). git apply's atomicity is the staleness guard, so a patch that no longer applies fails cleanly and the view refreshes instead of corrupting the index. Works local + SSH + runtime via dedicated RPCs (no widening of the relay exec allowlist). The control is a hover-revealed pill, gated off for binary, read-only branch/commit, errored, and dirty (unsaved-edit) diffs.
Scoped this first PR to whole-hunk stage/unstage (the piece @AmethystLiang invited here); sub-hunk / line-range selection is a clean follow-up on the same patch API.
Automated screenshot pass — this comment is from a bulk process that only adds visual context (Electron e2e captures or re-uploaded docs product shots). It is not a code review, triage decision, or claim that the change is verified. Images may be current baselines or related product references, not before/after of a specific PR branch.
What this image is
Reference only: current Source Control empty-state panel from Electron e2e, plus an existing in-repo annotate-diff product shot. Not a chunk-stage UI prototype.
In our community communication, many people mentioned the need for temporary storage blocks, hoping to implement it as soon as possible, which is really important for manual review.
19. Is anyone currently actively working on this? If not, I would like to pick this up and submit a PR to help implement this workflow.
I’ve been following this for a while, and there hasn’t been much new progress. Unfortunately, I don’t have enough foundational skills to implement it myself. If you’re willing and capable, I’d highly encourage and support you to submit this PR.
Activity
AmethystLiang commentedon Apr 6, 2026
The new versions of Orca does have a "view all" changes tab
Right now it's read-only but agree more editing ability would be nice.
And staging / unstaging each chuck does make sense. Can add that soon
AmethystLiang commentedon Apr 26, 2026
@jasongitmail, quick update, now you can revert each chunk of code (no "stage" yet). And also add annotations for AI for any line in the diff view. This is in the latest release (along with many other features)
If you want to put in a PR to add the "stage" feature, we can prioritize in getting it in the release today or tmr too!


nwparker commentedon May 30, 2026
I rechecked this against the current combined diff/source-control implementation while triaging the newer duplicate/overlapping request #2429.
Verified current state:
git add,git restore --staged, and discard/clean flows.What remains for this issue is specifically hunk/range staging and hunk/range accept/deny controls. That needs a structured patch API, not just another button in the header, because it has to keep staged vs unstaged diffs correct and work safely for local, SSH, and runtime-backed worktrees. I left the scoped implementation breakdown on #2429: #2429 (comment)
dannyisbad commentedon Jun 21, 2026
Picking this up — thanks @nwparker for the scoped breakdown on #2429, I followed it closely. Opened #5950.
Approach: git stays the source of truth for hunks — fetch the per-file unified diff (new
git.diffPatch), rebuild a minimal patch for the selected hunk, and apply it withgit apply --cached/--reverse(newgit.applyPatch).git apply's atomicity is the staleness guard, so a patch that no longer applies fails cleanly and the view refreshes instead of corrupting the index. Works local + SSH + runtime via dedicated RPCs (no widening of the relay exec allowlist). The control is a hover-revealed pill, gated off for binary, read-only branch/commit, errored, and dirty (unsaved-edit) diffs.Scoped this first PR to whole-hunk stage/unstage (the piece @AmethystLiang invited here); sub-hunk / line-range selection is a clean follow-up on the same patch API.
AmethystLiang commentedon Jun 21, 2026
@dannyisbad, I'm taking this back from @nwparker. thanks so much for the PR! will try to get it landed soon
nwparker commentedon Jul 24, 2026
What this image is
Reference only: current Source Control empty-state panel from Electron e2e, plus an existing in-repo annotate-diff product shot. Not a chunk-stage UI prototype.
Visual evidence
1 remaining item
feat(git): stage and unstage individual diff hunks (stablyai#334)
EdgerHao commentedon Sep 18, 2026
In our community communication, many people mentioned the need for temporary storage blocks, hoping to implement it as soon as possible, which is really important for manual review.
Deadicated03 commentedon Oct 31, 2026
Is anyone currently actively working on this? If not, I would like to pick this up and submit a PR to help implement this workflow.
EdgerHao commentedon Nov 4, 2026
I’ve been following this for a while, and there hasn’t been much new progress. Unfortunately, I don’t have enough foundational skills to implement it myself. If you’re willing and capable, I’d highly encourage and support you to submit this PR.
Deadicated03 commentedon Nov 4, 2026
Alright I will give it a try and see if it's possible.