From 5248165e833bf71450ddf9332f99ff33c1e3e7f3 Mon Sep 17 00:00:00 2001 From: yu <191972707@qq.com> Date: Wed, 28 Oct 2026 17:53:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=89=93=E5=BC=80=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=BD=92=E4=B8=80=E5=8C=96=E5=86=99=E7=9B=98=E5=90=8E=E7=94=A8?= =?UTF-8?q?=E6=9C=80=E6=96=B0=20meta=20=E5=8A=A0=E8=BD=BD=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8=EF=BC=8C=E6=B6=88=E9=99=A4=E9=A6=96=E6=AC=A1?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E8=AF=AF=E6=8A=A5=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/App.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx index 0c59f43..914b018 100644 --- a/src/renderer/src/App.tsx +++ b/src/renderer/src/App.tsx @@ -121,8 +121,14 @@ export function App() { try { const loaded = await window.rpa.flows.get(id); const flow = normalizeLegacyLinearLayout(loaded); - if (flow !== loaded) await window.rpa.flows.save(flow, { force: true }); - loadFlow(flow); + if (flow !== loaded) { + // 归一化改写了布局:强制写盘后必须用保存返回的新 meta 加载, + // 否则编辑器持有旧 updatedAt,首次保存会误判磁盘版本冲突 + const saved = await window.rpa.flows.save(flow, { force: true }); + loadFlow(saved.flow); + } else { + loadFlow(flow); + } setActiveFlowId(id); setPage("editor"); } catch (openError) {