fix: show remote pull conflicts in ShowWorkspace for local resolve - #182
Merged
Conversation
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>
|
Why this change
|
There was a problem hiding this comment.
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>
There was a problem hiding this comment.
Screenshot + unit coverage for the Sync conflict path.
- Unit test asserts Sync skips push when
has_conflictsis 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>
Ziinc
marked this pull request as ready for review
August 7, 2026 13:45
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
After Sync/pull against a diverged remote, treq rebased local commits onto
branch@originbut 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
has_conflictsonPullWorkspaceResultconflicted_files(was always empty) so the conflict alert can renderTests
conflicted_filesand leave the bookmark Aheadhas_conflicts, then shows the conflict alertshared.txtBefore Sync: conflict alert with Sync ↑1 available
After Sync: Synced with conflicts toast, alert remains
Review Conflicts after Sync
To show artifacts inline, enable in settings.