Skip to content

Add 'Changes in Parent' resource group to SCM view#100

Merged
amandal0903 merged 8 commits intomainfrom
feat-diff-union-visualizor
Apr 10, 2026
Merged

Add 'Changes in Parent' resource group to SCM view#100
amandal0903 merged 8 commits intomainfrom
feat-diff-union-visualizor

Conversation

@amandal0903
Copy link
Copy Markdown
Collaborator

@amandal0903 amandal0903 commented Apr 10, 2026

Description:

Adds a new "Changes in Parent" collapsible section inside the Source Control CHANGES pane that shows the diff between origin/<default_branch>
and the current working tree — matching what a GitHub PR would display.

What it does:

  • Uses git merge-base to compute the branch point, then diffs from there to the working tree (committed + staged + unstaged + untracked)
  • Fetches origin/<default_branch> on refresh (throttled to 60s)
  • Clicking a file opens a diff editor: merge-base version (left) vs working tree (right)
  • Status badges (M, U, A, D, R) shown with proper colors
  • Inline action buttons (stage, discard, copy) hidden — not applicable for parent changes
  • Section auto-hides when empty
  • Generation counter prevents stale concurrent updates

Show committed differences between origin/<default_branch> and HEAD
as a new collapsible section in the Source Control CHANGES pane.
Fetches from remote on refresh (throttled to 60s) and uses a
generation counter to handle concurrent updates safely.
Compare origin/<default_branch> against the working tree instead of
HEAD, so the view matches what a PR would show if everything were
committed. Also includes untracked files from existing resource groups.
- Return unique contextValue for ParentChanges resources so no
  stage/discard/copy inline buttons appear
- Remove multiDiffEditorEnableViewChanges from parent group header
- Include parentChangesGroup in GitDecorationProvider so status
  badges (M, U, A, D) show for all files, not just locally modified ones
- Fire status event after parent changes populate so decorations refresh
Use git merge-base instead of diffing directly against origin/main,
so only files changed on the current branch are shown — matching
what a GitHub PR would display. Also hides inline action buttons
and adds status badge decorations for parent change resources.
- Skip group header and resource inline actions for parentChanges
  group in scmViewPane rendering
- Return unique contextValue for ParentChanges resources
- Remove multiDiffEditorEnableViewChanges from parent group
- Include parentChangesGroup in GitDecorationProvider for badges
- Fire status event after parent changes populate
@amandal0903 amandal0903 force-pushed the feat-diff-union-visualizor branch from 60d8146 to 578994b Compare April 10, 2026 22:11
@amandal0903 amandal0903 changed the title Feat diff union visualizor Add 'Changes in Parent' resource group to SCM view Apr 10, 2026
@amandal0903 amandal0903 merged commit 01d59f1 into main Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant