fix: 根治保存必弹磁盘冲突——编辑不再污染乐观锁基准

- editorStore 新增 baseUpdatedAt(磁盘基准版本),仅 loadFlow/syncSavedFlow 更新
- 保存 expectedUpdatedAt 改用 baseUpdatedAt;此前用每次编辑都会拨快的
  flow.meta.updatedAt 做比对,导致任何编辑后首次保存必然误判冲突
- 移除 flows:save/get 诊断日志(保留内容一致放行逻辑)
This commit is contained in:
yu committed 2026-10-29 15:33:09 +08:00
1 parent 778f69e14d
commit b40fcbdd35
3 files changed
+23 -5

No files matched your search

+3 -1
View File
@@ -127,7 +127,9 @@ function registerIpc(): void {
for (const flow of createExampleFlows(url)) saveFlow(flow);
return listFlows();
});
ipcMain.handle("flows:get", (_event, id: string) => getFlow(id));
ipcMain.handle("flows:get", (_event, id: string) => {
return getFlow(id);
});
ipcMain.handle("flows:save", (_event, flow: FlowDefinition, opts?: FlowSaveOptions): FlowSaveResult => {
if (!opts?.force && opts?.expectedUpdatedAt) {
let disk: FlowDefinition | null = null;