Skip to content

Closes #5488 - Unifies how paused/conflicted operations are surfaced#5490

Merged
ianhattendorf merged 2 commits into
mainfrom
unify-rebase-operations
Jul 10, 2026
Merged

Closes #5488 - Unifies how paused/conflicted operations are surfaced#5490
ianhattendorf merged 2 commits into
mainfrom
unify-rebase-operations

Conversation

@ianhattendorf

@ianhattendorf ianhattendorf commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Description

Closes #5488

Unifies how GitLens surfaces a paused/conflicted Git operation (rebase, merge, cherry-pick, revert) into a single rule and a single code path, eliminating the "triple reaction" and the host-dependent "Show Conflicts" behavior.

The rule

Situation Surface
From inside the rebase editor (any op) Commit Graph WIP details
Op is merge / cherry-pick / revert Commit Graph WIP details (even when the Graph is gated — shows the upsell)
Op is rebase, Graph accessible Commit Graph WIP details
Op is rebase, Graph gated Interactive Rebase Editor
  • Graph WIP details = gitlens.showGraph show-wip — selects the WIP row and forces the details panel visible; the paused-op/conflict banner renders itself for all four op types. Plain reveal, not enter-resolve (no forced AI mode).
  • The Commits view is removed entirely as a paused-op surface — no more unconditional focus-steal.
  • Conflict pauses defer to the Graph; interactive rebase pauses do not — a rebase that pauses for todo editing / edit / reword / break still opens the rebase editor as today.

Changes

  • showPausedOperationStatus now owns the rule (Graph WIP details, or the rebase editor for a gated rebase). Adds a colocated isGraphAccessible check and revealPausedOperationInGraph dispatch; drops the container.views.commits reveal. The openRebaseEditor option becomes fromRebaseEditor (used by the in-editor "Show Conflicts").
  • onRebaseChanged splits by pause type: conflict pauses route through the helper; interactive pauses keep the existing viewColumn/background/preserveFocus reword logic. hasActionableRebaseState now also returns hasConflicts, avoiding a second status call.
  • Post-conflict handlers (rebase / merge / cherry-pick / revert) route through the helper instead of gitlens.showCommitsView, keep the plain informational toast, and drop the redundant Open Rebase Editor toast buttons.
  • "Show Conflicts" callers (Home, Graph, rebase editor) drop the per-caller type/openRebaseEditor decision — the helper decides.
  • Dead-code removal: CommitsView.revealPausedOperationStatus.

The explicit Open Rebase Editor buttons (Home/Graph/tree paused-op nodes), the passive tree/banner renders, and the AI enter-resolve flow are intentionally unchanged.

Testing

Build + check + unit tests pass. Live-exercised via vscode-inspector on a conflict fixture (subscription/gating simulated) — all six cases pass, no Commits view focus-steal in any of them, console clean (only pre-existing Graph host warnings):

# Case Result
1 Rebase conflict, Graph accessible (Pro) ✅ Graph WIP details + conflict banner; no rebase-editor tab; toast has no Open Rebase Editor button
2 Rebase conflict, Graph gated (Community + private) ✅ Rebase editor opens; no Graph
3 Merge conflict, Graph gated ✅ Graph opens with the Pro upsell (type ≠ rebase always routes to the Graph)
4 Show Conflicts from inside the rebase editor ✅ Routes to the Graph (fromRebaseEditor), never the Commits view
5 Interactive edit pause (no conflict) ✅ Rebase editor still auto-opens
6 openOnPausedRebase: false + wizard conflict ✅ Surfaces via the post-conflict handler (the watcher early-returns)

@augmentcode

augmentcode Bot commented Jul 9, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR unifies how GitLens surfaces paused/conflicted Git operations (merge, rebase, cherry-pick, revert) to avoid duplicate UI reactions and inconsistent “Show Conflicts” behavior.

Changes:

  • Introduces a single helper, showPausedOperationStatus, to decide whether to surface via Commit Graph WIP details (preferred) or the Interactive Rebase Editor (for gated rebases)
  • Routes conflict/paused handlers for merge/cherry-pick/revert (and rebase conflict paths) through the helper instead of focusing the Commits view
  • Updates “Continue/Skip” paused-operation actions to use the same surfacing path on errors
  • Makes “Show Conflicts” consistent across Home, Graph, and Rebase Editor (with a fromRebaseEditor hint)
  • Adjusts rebase-change handling to treat conflict pauses differently from interactive pauses
  • Removes dead code: CommitsView.revealPausedOperationStatus and related Commits-view surfacing

Technical Notes: Graph surfacing uses gitlens.showGraph with the show-wip action to select the WIP row and force details visibility; rebase editor surfacing remains the fallback when the graph is unavailable for rebases.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread src/git/actions/pausedOperation.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR centralizes and standardizes how GitLens surfaces paused/conflicted Git operations (rebase, merge, cherry-pick, revert) to eliminate competing UI reactions and make “Show Conflicts” behavior consistent across hosts and entry points.

Changes:

  • Introduces a unified showPausedOperationStatus rule that primarily routes users to the Commit Graph WIP details (or to the Interactive Rebase Editor only for gated rebases outside the rebase editor).
  • Refactors rebase auto-open behavior to distinguish conflict pauses (route via the unified helper) from interactive pauses (keep existing rebase-editor opening behavior).
  • Removes Commits view as a paused-operation surface (including dead-code removal of CommitsView.revealPausedOperationStatus) and updates callers to the new helper/signatures.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/git/actions/pausedOperation.ts Implements the unified paused-op surfacing rule and updates continue/skip flows to route to it
src/webviews/rebase/rebaseEditor.ts Splits rebase pause handling: conflicts route through the unified helper; interactive pauses keep existing behavior
src/webviews/rebase/rebaseWebviewProvider.ts Updates paused-op actions to new signatures and ensures in-editor “Show Conflicts” routes to Graph
src/webviews/plus/graph/graphWebview.ts Simplifies “Show Conflicts” to rely on the unified helper logic
src/webviews/home/homeWebview.ts Simplifies “Show Conflicts” and updates continue/skip to new signatures
src/views/viewCommands.ts Updates paused-op continue/skip view commands to new signatures
src/views/commitsView.ts Removes dead code for revealing paused operation status in Commits view
src/commands/git/rebase.ts Routes rebase conflict/already-in-progress handling through the unified helper (removes redundant toasts/buttons)
src/commands/git/merge.ts Routes merge conflict/already-in-progress handling through the unified helper
src/commands/git/cherry-pick.ts Routes cherry-pick conflict/already-in-progress handling through the unified helper; updates skip signature
src/commands/git/revert.ts Routes revert conflict/already-in-progress handling through the unified helper
CHANGELOG.md Documents the behavioral unification and removal of Commits-view focus stealing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/git/actions/pausedOperation.ts Outdated
@gitkraken-services

gitkraken-services Bot commented Jul 9, 2026

Copy link
Copy Markdown

Rebase Successful

Skipped — PR is mergeable as-is, no push needed

Summary

Metric Value
Status Clean rebase — no conflicts
Target main
Source unify-rebase-operations

Generated by Merge Mate at 2026-07-10 16:02:04 UTC

@ianhattendorf ianhattendorf force-pushed the unify-rebase-operations branch from 9683979 to 973f4c4 Compare July 9, 2026 19:12
@ianhattendorf ianhattendorf requested a review from a team July 9, 2026 19:12
Unifies every paused merge/rebase/cherry-pick/revert surfacing decision
into showPausedOperationStatus: Graph WIP details (with the conflict
banner) when available, or the rebase editor for rebases when the Graph
is gated. Drops the Commits-view focus-steal and its now-unused reveal,
removes the redundant "Open Rebase Editor" toast buttons, and makes
"Show Conflicts" consistent across Home, Graph, and the rebase editor.
Splits onRebaseChanged by pause type: conflict pauses follow the
unified paused-operation surfacing rule (Graph WIP details when
accessible, the rebase editor when gated), while interactive pauses
(todo editing, edit, reword, break) keep auto-opening the rebase
editor as before.
@ianhattendorf ianhattendorf force-pushed the unify-rebase-operations branch from 973f4c4 to c10e36b Compare July 10, 2026 16:33
@ianhattendorf ianhattendorf merged commit 071b8ec into main Jul 10, 2026
6 checks passed
@ianhattendorf ianhattendorf deleted the unify-rebase-operations branch July 10, 2026 16:37
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.

Paused/conflicted operations are surfaced inconsistently (the "triple reaction")

2 participants