Skip to content

fix: show remote pull conflicts in ShowWorkspace for local resolve - #182

Merged
Ziinc merged 6 commits into
mainfrom
cursor/show-remote-conflicts-bcea
Aug 7, 2026
Merged

fix: show remote pull conflicts in ShowWorkspace for local resolve#182
Ziinc merged 6 commits into
mainfrom
cursor/show-remote-conflicts-bcea

Conversation

@Ziinc

@Ziinc Ziinc commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

After Sync/pull against a diverged remote, treq rebased local commits onto branch@origin but left the bookmark on the remote tip. Sync then reported InSync, push was a no-op, and conflicted work only lived on @ — so ShowWorkspace could not offer a reliable resolve-locally-then-push path.

Changes

  • Advance the workspace bookmark to the rebased working-copy tip after pull (and the same path in auto-rebase bookmark conflict resolution)
  • Return has_conflicts on PullWorkspaceResult
  • Sync always completes pull+push even when conflicts remain; refreshes status afterward and warns if conflicts are still present
  • Populate home-repo conflicted_files (was always empty) so the conflict alert can render

Tests

Open in Web Open in Cursor 

pull_workspace_from_remote rebased local commits onto origin but left the
bookmark on the remote tip, so Sync reported InSync and push was a no-op.
Conflicted work only lived on @, forcing users to resolve on the remote.

After rebasing, advance the bookmark to the working-copy tip, report
has_conflicts on the pull result, skip Sync's push when conflicts remain,
always refresh status, and populate home conflicted_files for ShowWorkspace.

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
@cursor

cursor Bot commented Aug 6, 2026

Copy link
Copy Markdown

Why this change

  • pull_workspace_from_remote: after rebasing local commits onto branch@origin, the bookmark used to stay on the remote tip. Sync then looked InSync and push was a no-op, so conflicted work only lived on @ and users had to resolve on the remote.
  • Advancing the bookmark to the WC tip puts the (possibly conflicted) rebased commits on the branch so ShowWorkspace can show them and resolve-then-push works.
  • Sync now skips push when has_conflicts is set and always refreshes status so the conflict alert appears even if push is skipped.

Comment thread src/components/ShowWorkspace.tsx

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

After rebase onto branch@origin, the bookmark used to stay on the remote tip.

  • Sync then looked InSync and push was a no-op
  • Conflicted/rebased commits only lived on @, so resolve-then-push was impossible
  • Advancing the bookmark to the WC tip is what makes ShowWorkspace show remote conflicts for local resolution

See also the same advance in auto_rebase/mod.rs for the shared bookmark-conflict path.

Move the Sync conflict unit test under src/ so vitest picks it up, add an
app-qa screenshot for remote same-file conflicts, and clarify the Sync
toast when conflicts already exist without a new divergent pull.

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Screenshot + unit coverage for the Sync conflict path.

  • Unit test asserts Sync skips push when has_conflicts is set
  • Screenshot drives a real bare-remote same-file divergence and captures the Code alert + Review Conflicts section
  • Lives under scripts/screenshot/specs/ so it stays as visual regression coverage

Do not short-circuit Sync after a conflicting pull — keep fetching and
pushing so remote sync stays available. Still refresh status and warn when
conflicts remain for local resolution.

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Comment thread src/components/ShowWorkspace.tsx
@Ziinc
Ziinc marked this pull request as ready for review August 7, 2026 13:45
cursoragent and others added 3 commits August 7, 2026 13:47
CI tsc failed because the Sync conflicts unit test omitted required
initialSelectedFile. Also extend the screenshot spec to click Sync while
conflicts are present and assert Sync still completes.

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
@Ziinc
Ziinc merged commit e366988 into main Aug 7, 2026
7 checks passed
@Ziinc
Ziinc deleted the cursor/show-remote-conflicts-bcea branch August 7, 2026 18:01
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.

2 participants