An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: Use a hittable native mindmap drag fixture https://github.com/siyuan-note/siyuan/issues/20300
Daniel5df42f5d9703
diff --git a/app/src/protyle/render/listMindmap/model.test.ts b/app/src/protyle/render/listMindmap/model.test.tsindex 74a629cc41..e16f407a62 100644--- a/app/src/protyle/render/listMindmap/model.test.ts+++ b/app/src/protyle/render/listMindmap/model.test.ts@@ -1891,7 +1891,14 @@ const browserCases = async (sourceCode: string, css: string, taskSource: string,HTMLElement.prototype.hasPointerCapture = originalHasCapture;HTMLElement.prototype.releasePointerCapture = originalReleaseCapture;relationChanges.length = 0;- const nativeHandle = centerPoint(host.querySelector<HTMLElement>(".mindmap-view__route-handle:not(.mindmap-view__route-endpoint)"));+ // 使用远离端点的手动路由,保留触屏设备的大触摸目标及真实命中测试。+ model.metadata.relations[0].route = savedRoute;+ view.update(model);+ await settle();+ const nativeRouteHandle = view.routeHandles.get(`drag-route:${returningSegment}`);+ check.ok(nativeRouteHandle);+ const nativeHandle = centerPoint(nativeRouteHandle);+ check.equal(document.elementFromPoint(nativeHandle.x, nativeHandle.y), nativeRouteHandle);await nativeInput([{type: "mouseMove", ...nativeHandle},{type: "mouseDown", ...nativeHandle, button: "left", clickCount: 1},