Repository navigation
Refresh sync status on conflict resolution and prevent silent no-ops - #202
Merged
Merged
Conversation
callumalpass
marked this pull request as ready for review
November 26, 2026 22:01
callumalpass
enabled auto-merge (squash)
November 26, 2026 22:01
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.
Fixes tapping a sync conflict button ("Keep this vault's" / "Keep the collection's" / "Keep both") appearing to do nothing, and signing out leaving stale failure/conflict state in the status snapshot until reloading or switching vaults.
Root causes
resolveDefinition()waited for a full follow-upreconcileAll()before publishing updated status, andSyncPanedid not disable the conflict action buttons while resolving. If the follow-up scan was slow or interrupted, the definition had already been resolved on disk/server while the conflict row stayed unchanged on screen.reconcilePass()classifies a path as"resource"when it exists inresourcesAll, even if localmdbase.yamldisagrees ontypes_folder/contracts_folder, butresolveDefinition()previously returned early whensync.kindOf(p) !== "resource"without clearing the failure or refreshing status.readyphase race:needsMergeConfirmation()aborted on object-identitysync.phase !== phaseif anotherreadysnapshot (same collection) arrived duringremoteAll(), while the neweronPhaseskippedstartMirror()becausewas.kind === "ready". That leftphase.kind === "ready"withmirroring === false, makingenqueue()silently ignore conflict buttons andSync now.signOut():onPhase({ kind: "signed_out" })fired beforereleaseCollection()clearedpathFailuresandconflictCopies, andreleaseCollection()never republished status afterwards.Changes
src/sync/native/pass.ts,src/sync/native/transfers.ts,src/sync/native/plugin.ts: Publish busy status at the start ofresolveDefinition()and refreshed status immediately after persisting the cleared failure (before follow-upreconcileAll()); resolve remote resources even across local/remote layout mismatches (or clear stale non-resource failures); reject ifenqueue()did not execute instead of silently returning.src/sync/native/conflicts.ts: RejectkeepConflictCopies()ifenqueue()did not execute.src/sync/native/session.ts: GuardonPhase()/needsMergeConfirmation()bykindandcollectionIdrather thanphaseobject identity so same-collectionreadyupdates don't cancelstartMirror(); republish status at the end ofreleaseCollection().src/workspace/syncPane.ts: Disable conflict resolution buttons immediately while a resolution action is in flight and prevent duplicate clicks.src/i18n/locales/*/messages.po: Sync Lingui source location references (no new untranslated strings).test/native/sync.test.mjs,test/workspaceView.test.ts: Add tests covering immediate status refresh, layout-mismatch resource resolution, mirror-stopped rejection, concurrentreadyphase startup,signOut()snapshot clearing, and button disable/error surfacing.