Fix WebDAV auto sync conflict handling#4006
Conversation
1c63347 to
d290add
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d290addfc6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let Some(base_snapshot_id) = last_synced_snapshot_id(status) else { | ||
| return SnapshotSyncState::Conflict; |
There was a problem hiding this comment.
Preserve legacy manifest baselines for auto-sync
For profiles that synced before this change, the stored status has last_remote_manifest_hash but no last_*_snapshot_id. When those users make a local-only edit after upgrading and the remote manifest is unchanged, last_synced_snapshot_id(status) is None, so this path classifies the safe upload as Conflict and pauses WebDAV auto-sync indefinitely until the user resolves it manually. The S3 guard still falls back to last_remote_manifest_hash, but this WebDAV state assessment ignores that existing baseline; pass/compare the remote manifest hash or migrate the status so upgraded users do not get false conflicts.
Useful? React with 👍 / 👎.
Summary
This PR improves WebDAV auto-sync conflict handling to avoid automatically overwriting remote changes.
Changes
Scope
Tests
pnpm format:checkpnpm typecheckpnpm test:unitpnpm build:renderercargo fmt --manifest-path src-tauri/Cargo.toml --checkgit diff --check