fix(canvas): 去掉「双击连线直接断开」——日志证实这是这次断线的直接原因
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 2m52s

_boot.log 证据(2026-11-27):
- 同一条边 e1795790118954(n1795790112627_199074 > n1795788899243_541047)被删 5 次,
  栈全部是 replace <- ... <- onDoubleClick <- react-dom,即「双击连线 = 断开连线」这条旧捷径
- board-sync-apply ws=ws1791793128523_269487 edges 14→14 gone=1 added=1 出现 4 次:
  磁盘版本把内存里的边换回去,于是「又连回老参考图」
- gen-run-start / gen-run-end 各 1 条且 edges 都是 14:生成流程本身没有改边

改动:
- src/ui-canvas-view.js:EdgePath 去掉 onDoubleClick 断线(线与节点热区都是细条,双击极易误中);
  断线仍可单击选中后 Delete、右键菜单、或拖到空白处
- src/runtime-workbench-logic.js:board-sync-apply 日志补具体端点(goneE/addE),下次直接看出方向
This commit is contained in:
qiqi committed 2026-11-28 00:08:19 +08:00
1 parent 74ed31a143
commit bdd975cac0
3 files changed
+13 -7

No files matched your search

+6 -3
View File
@@ -993,10 +993,13 @@
const before = (refs.edges || [])
const after = (curWs.edges || [])
const kept = new Set(after.map((e) => e && e.id))
const gone = before.filter((e) => e && !kept.has(e.id)).length
const added = after.filter((e) => e && !before.some((x) => x && x.id === e.id)).length
const goneList = before.filter((e) => e && !kept.has(e.id))
const addList = after.filter((e) => e && !before.some((x) => x && x.id === e.id))
const gone = goneList.length
const added = addList.length
if (gone || added) {
const line = 'board-sync-apply ws=' + curWs.id + ' edges ' + before.length + '→' + after.length + ' gone=' + gone + ' added=' + added
const fmt = (list) => list.slice(0, 2).map((e) => String(e.from) + '>' + String(e.to)).join(',')
const line = 'board-sync-apply ws=' + curWs.id + ' edges ' + before.length + '→' + after.length + ' gone=' + gone + ' added=' + added + ' goneE=' + fmt(goneList) + ' addE=' + fmt(addList)
const st = (typeof window !== 'undefined') ? window.IWBStorageFile : null
if (st && typeof st.logLine === 'function') st.logLine(line)
}