fix(sync): 端到端强制人设与布局显式选择加入

This commit is contained in:
2026-09-09 07:27:50 +08:00
parent 9ca0c76754
commit 90d29d5641
13 changed files with 320 additions and 21 deletions
+11 -3
View File
@@ -72,7 +72,7 @@ impl Workspace {
if item.sequence > snapshot.boundary {
return Err(HostError::new("SYNC_RESPONSE_INVALID"));
}
if item.operation == "put" {
if item.operation == "put" && self.sync_path_enabled(&item.path)? {
paths.insert(item.path.clone(), "download");
}
}
@@ -93,8 +93,16 @@ impl Workspace {
);
}
let fingerprint = hash(
&serde_json::to_vec(&(&self.vault_id, endpoint, remote, account, &local, snapshot))
.map_err(|_| HostError::new("SYNC_RESPONSE_INVALID"))?,
&serde_json::to_vec(&(
&self.vault_id,
endpoint,
remote,
account,
&local,
snapshot,
self.sync_optional_scope()?,
))
.map_err(|_| HostError::new("SYNC_RESPONSE_INVALID"))?,
);
Ok(Preview {
fingerprint,