@multiplatform.one/node-graph 11.10.4 → 11.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/edges/GraphEdge.cjs +9 -2
- package/dist/cjs/edges/GraphEdge.native.cjs +9 -2
- package/dist/cjs/edges/GraphEdge.native.js +9 -2
- package/dist/cjs/edges/GraphEdge.native.js.map +1 -1
- package/dist/cjs/edges/edgePath.cjs +36 -5
- package/dist/cjs/edges/edgePath.native.cjs +39 -6
- package/dist/cjs/edges/edgePath.native.js +39 -6
- package/dist/cjs/edges/edgePath.native.js.map +1 -1
- package/dist/cjs/index.cjs +2 -0
- package/dist/cjs/index.native.cjs +2 -0
- package/dist/cjs/index.native.js +2 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/native/canvasReport.cjs +37 -0
- package/dist/cjs/native/canvasReport.native.cjs +39 -0
- package/dist/cjs/native/canvasReport.native.js +41 -0
- package/dist/cjs/native/canvasReport.native.js.map +1 -0
- package/dist/esm/edges/GraphEdge.mjs +10 -3
- package/dist/esm/edges/GraphEdge.mjs.map +1 -1
- package/dist/esm/edges/GraphEdge.native.js +10 -3
- package/dist/esm/edges/GraphEdge.native.js.map +1 -1
- package/dist/esm/edges/edgePath.mjs +34 -5
- package/dist/esm/edges/edgePath.mjs.map +1 -1
- package/dist/esm/edges/edgePath.native.js +37 -6
- package/dist/esm/edges/edgePath.native.js.map +1 -1
- package/dist/esm/index.mjs +2 -1
- package/dist/esm/index.native.js +2 -1
- package/dist/esm/native/canvasReport.mjs +14 -0
- package/dist/esm/native/canvasReport.mjs.map +1 -0
- package/dist/esm/native/canvasReport.native.js +14 -0
- package/dist/esm/native/canvasReport.native.js.map +1 -0
- package/dist/jsx/edges/GraphEdge.mjs +10 -3
- package/dist/jsx/edges/GraphEdge.mjs.map +1 -1
- package/dist/jsx/edges/GraphEdge.native.cjs +9 -2
- package/dist/jsx/edges/GraphEdge.native.js +9 -2
- package/dist/jsx/edges/GraphEdge.native.js.map +1 -1
- package/dist/jsx/edges/edgePath.mjs +34 -5
- package/dist/jsx/edges/edgePath.mjs.map +1 -1
- package/dist/jsx/edges/edgePath.native.cjs +39 -6
- package/dist/jsx/edges/edgePath.native.js +39 -6
- package/dist/jsx/edges/edgePath.native.js.map +1 -1
- package/dist/jsx/index.js +2 -1
- package/dist/jsx/index.mjs +2 -1
- package/dist/jsx/index.native.cjs +2 -0
- package/dist/jsx/index.native.js +2 -0
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/native/canvasReport.mjs +14 -0
- package/dist/jsx/native/canvasReport.mjs.map +1 -0
- package/dist/jsx/native/canvasReport.native.cjs +39 -0
- package/dist/jsx/native/canvasReport.native.js +41 -0
- package/dist/jsx/native/canvasReport.native.js.map +1 -0
- package/package.json +7 -7
- package/src/dom/NodeGraphDomInner.tsx +2 -0
- package/src/dom/wire.ts +6 -0
- package/src/edges/GraphEdge.deferredRouting.spec.tsx +67 -0
- package/src/edges/GraphEdge.tsx +17 -3
- package/src/edges/edgePath.spec.ts +51 -0
- package/src/edges/edgePath.ts +47 -4
- package/src/index.native.ts +2 -0
- package/src/index.ts +2 -0
- package/src/native/NodeGraph.native.tsx +28 -7
- package/src/native/canvasReport.spec.tsx +141 -0
- package/src/native/canvasReport.ts +53 -0
- package/types/dom/NodeGraphDomInner.d.ts.map +1 -1
- package/types/dom/wire.d.ts +6 -0
- package/types/dom/wire.d.ts.map +1 -1
- package/types/edges/GraphEdge.d.ts.map +1 -1
- package/types/edges/edgePath.d.ts +16 -0
- package/types/edges/edgePath.d.ts.map +1 -1
- package/types/index.d.ts +2 -0
- package/types/index.d.ts.map +1 -1
- package/types/index.native.d.ts +2 -0
- package/types/index.native.d.ts.map +1 -1
- package/types/native/NodeGraph.native.d.ts.map +1 -1
- package/types/native/canvasReport.d.ts +42 -0
- package/types/native/canvasReport.d.ts.map +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/node-graph",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.12.0",
|
|
4
4
|
"description": "Node graph editor — React Flow on web, Tamagui knob-aware nodes, an Expo DOM host on native",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"multiplatform",
|
|
@@ -91,16 +91,16 @@
|
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"@dagrejs/dagre": "^3.1.1",
|
|
94
|
-
"@multiplatform.one/forms": "^11.
|
|
95
|
-
"@multiplatform.one/theme": "^11.
|
|
94
|
+
"@multiplatform.one/forms": "^11.12.0",
|
|
95
|
+
"@multiplatform.one/theme": "^11.12.0",
|
|
96
96
|
"@tamagui/web": "3.2.3",
|
|
97
97
|
"@xyflow/react": "^12.12.0",
|
|
98
98
|
"@xyflow/system": "0.0.83",
|
|
99
99
|
"tamagui": "3.2.3"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
-
"@multiplatform.one/config": "11.
|
|
103
|
-
"@multiplatform.one/test-utils": "11.
|
|
102
|
+
"@multiplatform.one/config": "11.12.0",
|
|
103
|
+
"@multiplatform.one/test-utils": "11.12.0",
|
|
104
104
|
"@tamagui/build": "3.2.3",
|
|
105
105
|
"@testing-library/react": "^16.3.3",
|
|
106
106
|
"@types/react-dom": "^19.3.0",
|
|
@@ -113,9 +113,9 @@
|
|
|
113
113
|
"vitest": "^4.1.12"
|
|
114
114
|
},
|
|
115
115
|
"peerDependencies": {
|
|
116
|
-
"@multiplatform.one/components": "^11.
|
|
116
|
+
"@multiplatform.one/components": "^11.12.0",
|
|
117
117
|
"expo": ">=55",
|
|
118
|
-
"expo-haptics": "58.0.
|
|
118
|
+
"expo-haptics": "58.0.8",
|
|
119
119
|
"react": "^19.1.0",
|
|
120
120
|
"react-dom": "^19.1.0",
|
|
121
121
|
"react-native": ">=0.83.0",
|
|
@@ -47,6 +47,7 @@ import { probeRenderedFamily } from "../theme/faces";
|
|
|
47
47
|
import { xyflowVersion } from "../react-flow/xy";
|
|
48
48
|
import type { NodeGraphDomInnerProps, NodeGraphDomOptions } from "./NodeGraphDomShell";
|
|
49
49
|
import { readBootElapsedMs, graphReadySettleMs as settleGraceMs, stampBootStage } from "./boot";
|
|
50
|
+
import { edgeRoutingStats } from "../edges/edgePath";
|
|
50
51
|
import { createGraphEventEmitter, createRevEchoGate, isBenignCanvasError } from "./wire";
|
|
51
52
|
import type { FaceProbeWire, GraphEventWire, GraphFaceDeliveryWire } from "./wire";
|
|
52
53
|
|
|
@@ -443,6 +444,7 @@ export function NodeGraphDomInner(props: NodeGraphDomInnerProps) {
|
|
|
443
444
|
renderMode: "detail",
|
|
444
445
|
scheme: envelope.value.scheme,
|
|
445
446
|
lastError: null,
|
|
447
|
+
edgeRouting: edgeRoutingStats(),
|
|
446
448
|
},
|
|
447
449
|
});
|
|
448
450
|
}, [
|
package/src/dom/wire.ts
CHANGED
|
@@ -86,6 +86,12 @@ export interface GraphDiagnosticsWire {
|
|
|
86
86
|
readonly renderMode: "detail" | "overview";
|
|
87
87
|
readonly scheme: "light" | "dark";
|
|
88
88
|
readonly lastError: { readonly phase: GraphErrorPhase; readonly message: string } | null;
|
|
89
|
+
readonly edgeRouting?: {
|
|
90
|
+
readonly calls: number;
|
|
91
|
+
readonly tracked: number;
|
|
92
|
+
readonly aroundBoxes: number;
|
|
93
|
+
readonly ms: number;
|
|
94
|
+
};
|
|
89
95
|
}
|
|
90
96
|
|
|
91
97
|
/**
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FZ-14110: an edge paints its plain path first and routes around boxes on a
|
|
3
|
+
* deferred render. On Large200 the box router cost 9.5 s of a 10.4 s boot on
|
|
4
|
+
* the simulator, four full passes for 133 edges, and the first frame waited
|
|
5
|
+
* for all of it. Deferring the obstacles puts the cheap path on the first
|
|
6
|
+
* frame and the routed one on an interruptible render after it.
|
|
7
|
+
*/
|
|
8
|
+
import { cleanup, waitFor } from "@testing-library/react";
|
|
9
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
10
|
+
import { createElement } from "react";
|
|
11
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
12
|
+
import { buildFlowPath } from "./edgePath";
|
|
13
|
+
import { edgeClearance } from "./edgeRoute";
|
|
14
|
+
|
|
15
|
+
const paths: string[] = [];
|
|
16
|
+
|
|
17
|
+
vi.mock("../react-flow/xy", () => ({
|
|
18
|
+
BaseEdge: (props: { path: string }) => {
|
|
19
|
+
paths.push(props.path);
|
|
20
|
+
return createElement("path", { d: props.path });
|
|
21
|
+
},
|
|
22
|
+
EdgeLabelRenderer: (props: { children?: unknown }) => props.children ?? null,
|
|
23
|
+
}));
|
|
24
|
+
|
|
25
|
+
const obstacles = {
|
|
26
|
+
boxes: [{ id: "b", x: 150, y: 20, width: 100, height: 60 }],
|
|
27
|
+
clearance: edgeClearance,
|
|
28
|
+
links: [],
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
vi.mock("./useEdgeObstacles", () => ({
|
|
32
|
+
useEdgeObstacles: () => obstacles,
|
|
33
|
+
}));
|
|
34
|
+
|
|
35
|
+
afterEach(() => {
|
|
36
|
+
cleanup();
|
|
37
|
+
paths.length = 0;
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
describe("GraphEdge defers routing (FZ-14110)", () => {
|
|
41
|
+
it("draws the plain path on the first render and the routed one after", async () => {
|
|
42
|
+
const { GraphEdge } = await import("./GraphEdge");
|
|
43
|
+
const geometry = {
|
|
44
|
+
sourceX: 0,
|
|
45
|
+
sourceY: 50,
|
|
46
|
+
targetX: 400,
|
|
47
|
+
targetY: 50,
|
|
48
|
+
sourcePosition: "right" as never,
|
|
49
|
+
targetPosition: "left" as never,
|
|
50
|
+
};
|
|
51
|
+
const [plain] = buildFlowPath("smoothstep", geometry);
|
|
52
|
+
renderWithProviders(
|
|
53
|
+
createElement(GraphEdge as never, {
|
|
54
|
+
id: "e",
|
|
55
|
+
source: "a",
|
|
56
|
+
target: "b",
|
|
57
|
+
...geometry,
|
|
58
|
+
data: { kind: "flow" },
|
|
59
|
+
}),
|
|
60
|
+
);
|
|
61
|
+
await waitFor(() => expect(paths.at(-1)).not.toBe(plain));
|
|
62
|
+
expect(paths.map((path) => (path === plain ? "plain" : "routed"))).toEqual(
|
|
63
|
+
expect.arrayContaining(["plain", "routed"]),
|
|
64
|
+
);
|
|
65
|
+
expect(paths.indexOf(plain)).toBeLessThan(paths.findIndex((path) => path !== plain));
|
|
66
|
+
});
|
|
67
|
+
});
|
package/src/edges/GraphEdge.tsx
CHANGED
|
@@ -14,11 +14,13 @@
|
|
|
14
14
|
import { usePresetContext, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
15
15
|
import { defaultKnobs } from "@multiplatform.one/theme";
|
|
16
16
|
import type { Animation, BorderWidth } from "@multiplatform.one/theme";
|
|
17
|
-
import { memo, useId, useMemo } from "react";
|
|
17
|
+
import { memo, useDeferredValue, useId, useMemo } from "react";
|
|
18
18
|
import { SizableText, useTheme, View } from "tamagui";
|
|
19
19
|
import { BaseEdge, EdgeLabelRenderer } from "../react-flow/xy";
|
|
20
20
|
import type { EdgeProps } from "../react-flow/xy";
|
|
21
21
|
import { buildEdgePath } from "./edgePath";
|
|
22
|
+
import { edgeClearance } from "./edgeRoute";
|
|
23
|
+
import type { EdgeObstacles } from "./edgeRoute";
|
|
22
24
|
import { edgeArrowhead, resolveEdgeStyle, themeTokenName } from "./edgeStyle";
|
|
23
25
|
import type { EdgeStyle } from "./edgeStyle";
|
|
24
26
|
import { useEdgeObstacles } from "./useEdgeObstacles";
|
|
@@ -75,6 +77,8 @@ function useStrokeValue(stroke: string): string {
|
|
|
75
77
|
return typeof value === "string" ? value : "currentColor";
|
|
76
78
|
}
|
|
77
79
|
|
|
80
|
+
const unroutedObstacles: EdgeObstacles = { boxes: [], clearance: edgeClearance, links: [] };
|
|
81
|
+
|
|
78
82
|
export function GraphEdgeComponent(props: EdgeProps) {
|
|
79
83
|
const data = (props.data ?? {}) as GraphEdgeData;
|
|
80
84
|
const { borderWidth, animation } = useEdgeKnobs();
|
|
@@ -86,15 +90,25 @@ export function GraphEdgeComponent(props: EdgeProps) {
|
|
|
86
90
|
});
|
|
87
91
|
const strokeValue = useStrokeValue(style.stroke);
|
|
88
92
|
const obstacles = useEdgeObstacles();
|
|
93
|
+
const routedObstacles = useDeferredValue(obstacles, unroutedObstacles);
|
|
89
94
|
const { sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition } = props;
|
|
90
95
|
const [d, labelX, labelY] = useMemo(
|
|
91
96
|
() =>
|
|
92
97
|
buildEdgePath(
|
|
93
98
|
style.path,
|
|
94
99
|
{ sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition },
|
|
95
|
-
|
|
100
|
+
routedObstacles,
|
|
96
101
|
),
|
|
97
|
-
[
|
|
102
|
+
[
|
|
103
|
+
style.path,
|
|
104
|
+
sourceX,
|
|
105
|
+
sourceY,
|
|
106
|
+
targetX,
|
|
107
|
+
targetY,
|
|
108
|
+
sourcePosition,
|
|
109
|
+
targetPosition,
|
|
110
|
+
routedObstacles,
|
|
111
|
+
],
|
|
98
112
|
);
|
|
99
113
|
const label = data.label ?? (typeof props.label === "string" ? props.label : undefined);
|
|
100
114
|
const markerId = `mp-graph-arrow-${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FZ-14110: the routing counters the canvas reports in `ready`. A build with
|
|
3
|
+
* no obstacles costs nothing and counts nothing; a routed build counts one
|
|
4
|
+
* call and the branch it took; reset clears them.
|
|
5
|
+
*/
|
|
6
|
+
import { beforeEach, describe, expect, it } from "vitest";
|
|
7
|
+
import { buildEdgePath, edgeRoutingStats, resetEdgeRoutingStats } from "./edgePath";
|
|
8
|
+
import { edgeClearance } from "./edgeRoute";
|
|
9
|
+
|
|
10
|
+
const geometry = {
|
|
11
|
+
sourceX: 0,
|
|
12
|
+
sourceY: 50,
|
|
13
|
+
targetX: 400,
|
|
14
|
+
targetY: 50,
|
|
15
|
+
sourcePosition: "right" as never,
|
|
16
|
+
targetPosition: "left" as never,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
describe("edge routing counters (FZ-14110)", () => {
|
|
20
|
+
beforeEach(resetEdgeRoutingStats);
|
|
21
|
+
|
|
22
|
+
it("counts nothing for a build with no obstacles", () => {
|
|
23
|
+
buildEdgePath("smoothstep", geometry);
|
|
24
|
+
buildEdgePath("bezier", geometry, { boxes: [], clearance: edgeClearance, links: [] });
|
|
25
|
+
expect(edgeRoutingStats()).toEqual({ calls: 0, tracked: 0, aroundBoxes: 0, ms: 0 });
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it("counts a routed build and the box router when a box sits on the straight path", () => {
|
|
29
|
+
const obstacles = {
|
|
30
|
+
boxes: [{ id: "b", x: 150, y: 20, width: 100, height: 60 }],
|
|
31
|
+
clearance: edgeClearance,
|
|
32
|
+
links: [],
|
|
33
|
+
};
|
|
34
|
+
buildEdgePath("smoothstep", geometry, obstacles);
|
|
35
|
+
const stats = edgeRoutingStats();
|
|
36
|
+
expect(stats.calls).toBe(1);
|
|
37
|
+
expect(stats.tracked + stats.aroundBoxes).toBeLessThanOrEqual(1);
|
|
38
|
+
expect(stats.ms).toBeGreaterThanOrEqual(0);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it("resets to zero", () => {
|
|
42
|
+
buildEdgePath("smoothstep", geometry, {
|
|
43
|
+
boxes: [{ id: "b", x: 150, y: 20, width: 100, height: 60 }],
|
|
44
|
+
clearance: edgeClearance,
|
|
45
|
+
links: [],
|
|
46
|
+
});
|
|
47
|
+
expect(edgeRoutingStats().calls).toBe(1);
|
|
48
|
+
resetEdgeRoutingStats();
|
|
49
|
+
expect(edgeRoutingStats().calls).toBe(0);
|
|
50
|
+
});
|
|
51
|
+
});
|
package/src/edges/edgePath.ts
CHANGED
|
@@ -25,6 +25,39 @@ export interface PathGeometry {
|
|
|
25
25
|
* separate step builder, and the design's table names four path SHAPES, not
|
|
26
26
|
* four functions.
|
|
27
27
|
*/
|
|
28
|
+
/**
|
|
29
|
+
* What routing has cost this realm since load, or since the last reset
|
|
30
|
+
* (FZ-14110). `calls` counts every routed build, `tracked` the ones a rank
|
|
31
|
+
* track answered, `aroundBoxes` the ones that went through the box router,
|
|
32
|
+
* `ms` the wall clock inside all of them. The canvas puts it in its `ready`
|
|
33
|
+
* diagnostics, which is how a device run says whether 200 nodes meant 133
|
|
34
|
+
* routes or 133 routes per measurement batch.
|
|
35
|
+
*/
|
|
36
|
+
export interface EdgeRoutingStats {
|
|
37
|
+
readonly calls: number;
|
|
38
|
+
readonly tracked: number;
|
|
39
|
+
readonly aroundBoxes: number;
|
|
40
|
+
readonly ms: number;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const routingStats = { calls: 0, tracked: 0, aroundBoxes: 0, ms: 0 };
|
|
44
|
+
|
|
45
|
+
export function edgeRoutingStats(): EdgeRoutingStats {
|
|
46
|
+
return { ...routingStats, ms: Math.round(routingStats.ms * 10) / 10 };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function resetEdgeRoutingStats(): void {
|
|
50
|
+
routingStats.calls = 0;
|
|
51
|
+
routingStats.tracked = 0;
|
|
52
|
+
routingStats.aroundBoxes = 0;
|
|
53
|
+
routingStats.ms = 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const now = (): number =>
|
|
57
|
+
typeof performance !== "undefined" && typeof performance.now === "function"
|
|
58
|
+
? performance.now()
|
|
59
|
+
: Date.now();
|
|
60
|
+
|
|
28
61
|
export function buildEdgePath(
|
|
29
62
|
path: EdgePathKind,
|
|
30
63
|
geometry: PathGeometry,
|
|
@@ -32,6 +65,8 @@ export function buildEdgePath(
|
|
|
32
65
|
): [d: string, labelX: number, labelY: number] {
|
|
33
66
|
const built = buildFlowPath(path, geometry);
|
|
34
67
|
if (!obstacles || obstacles.boxes.length === 0) return built;
|
|
68
|
+
const started = now();
|
|
69
|
+
routingStats.calls += 1;
|
|
35
70
|
const ends: EdgeEnds = {
|
|
36
71
|
sourceX: geometry.sourceX,
|
|
37
72
|
sourceY: geometry.sourceY,
|
|
@@ -40,10 +75,18 @@ export function buildEdgePath(
|
|
|
40
75
|
sourceSide: geometry.sourcePosition as EdgeSide,
|
|
41
76
|
targetSide: geometry.targetPosition as EdgeSide,
|
|
42
77
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
78
|
+
try {
|
|
79
|
+
const tracked = routeOnTrack(path, ends, obstacles);
|
|
80
|
+
if (tracked) {
|
|
81
|
+
routingStats.tracked += 1;
|
|
82
|
+
return tracked;
|
|
83
|
+
}
|
|
84
|
+
if (!pathIntrudes(built[0], ends, obstacles)) return built;
|
|
85
|
+
routingStats.aroundBoxes += 1;
|
|
86
|
+
return routeAroundBoxes(path, ends, obstacles) ?? built;
|
|
87
|
+
} finally {
|
|
88
|
+
routingStats.ms += now() - started;
|
|
89
|
+
}
|
|
47
90
|
}
|
|
48
91
|
|
|
49
92
|
export function buildFlowPath(
|
package/src/index.native.ts
CHANGED
|
@@ -80,6 +80,8 @@ export {
|
|
|
80
80
|
setNodeGraphDomEntry,
|
|
81
81
|
} from "./native/domEntryRegistry";
|
|
82
82
|
export type { NodeGraphDomEntry } from "./native/domEntryRegistry";
|
|
83
|
+
export { setNodeGraphCanvasReporter } from "./native/canvasReport";
|
|
84
|
+
export type { NodeGraphCanvasReport, NodeGraphCanvasReporter } from "./native/canvasReport";
|
|
83
85
|
|
|
84
86
|
export {
|
|
85
87
|
bootStageIndex,
|
package/src/index.ts
CHANGED
|
@@ -214,6 +214,8 @@ export {
|
|
|
214
214
|
setNodeGraphDomEntry,
|
|
215
215
|
} from "./native/domEntryRegistry";
|
|
216
216
|
export type { NodeGraphDomEntry } from "./native/domEntryRegistry";
|
|
217
|
+
export { setNodeGraphCanvasReporter } from "./native/canvasReport";
|
|
218
|
+
export type { NodeGraphCanvasReport, NodeGraphCanvasReporter } from "./native/canvasReport";
|
|
217
219
|
|
|
218
220
|
export { layoutWithDagre, defaultLayoutSpacing } from "./layout/dagre";
|
|
219
221
|
export { buildLayoutRequest, layout, reconcilePositions } from "./layout/layout";
|
|
@@ -52,6 +52,7 @@ import type { NodeId, Viewport } from "../model/index";
|
|
|
52
52
|
import { recordGraphError, resetGraphError } from "../diagnostics/lastError";
|
|
53
53
|
import { GraphFallback } from "./GraphFallback.native";
|
|
54
54
|
import type { GraphFallbackReason } from "./GraphFallback.native";
|
|
55
|
+
import { reportNodeGraphCanvas } from "./canvasReport";
|
|
55
56
|
import { getNodeGraphDomEntry } from "./domEntryRegistry";
|
|
56
57
|
import type { NodeGraphDomEntry } from "./domEntryRegistry";
|
|
57
58
|
|
|
@@ -315,10 +316,11 @@ export function NodeGraphNative(props: NodeGraphNativeProps) {
|
|
|
315
316
|
*/
|
|
316
317
|
useEffect(() => {
|
|
317
318
|
if (ready || painted || restarting) return;
|
|
318
|
-
const timer = setTimeout(
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
319
|
+
const timer = setTimeout(() => {
|
|
320
|
+
const timedOut = { reason: "no-ready" as const, message: lastReport.current ?? undefined };
|
|
321
|
+
reportNodeGraphCanvas({ t: "failure", ...timedOut });
|
|
322
|
+
setFailure(timedOut);
|
|
323
|
+
}, timeout);
|
|
322
324
|
return () => clearTimeout(timer);
|
|
323
325
|
}, [attempt, painted, ready, restarting, timeout]);
|
|
324
326
|
|
|
@@ -356,6 +358,15 @@ export function NodeGraphNative(props: NodeGraphNativeProps) {
|
|
|
356
358
|
case "ready":
|
|
357
359
|
setReady(true);
|
|
358
360
|
setStage(event.diagnostics.stage);
|
|
361
|
+
reportNodeGraphCanvas({
|
|
362
|
+
t: "ready",
|
|
363
|
+
stage: event.diagnostics.stage,
|
|
364
|
+
nodesMounted: event.diagnostics.nodesMounted,
|
|
365
|
+
nodesInDocument: event.diagnostics.nodesInDocument,
|
|
366
|
+
layoutRunner: event.diagnostics.layoutRunner,
|
|
367
|
+
renderMode: event.diagnostics.renderMode,
|
|
368
|
+
edgeRouting: event.diagnostics.edgeRouting,
|
|
369
|
+
});
|
|
359
370
|
onReady?.(event.diagnostics);
|
|
360
371
|
return;
|
|
361
372
|
case "commit":
|
|
@@ -380,9 +391,17 @@ export function NodeGraphNative(props: NodeGraphNativeProps) {
|
|
|
380
391
|
return;
|
|
381
392
|
case "paint":
|
|
382
393
|
setPainted(true);
|
|
394
|
+
reportNodeGraphCanvas({ t: "paint", bootMs: event.bootMs });
|
|
383
395
|
onPaint?.(event.bootMs);
|
|
384
396
|
return;
|
|
385
397
|
case "layoutResult":
|
|
398
|
+
reportNodeGraphCanvas({
|
|
399
|
+
t: "layoutResult",
|
|
400
|
+
runner: event.runner,
|
|
401
|
+
ms: event.ms,
|
|
402
|
+
nodeCount: event.nodeCount,
|
|
403
|
+
error: event.error,
|
|
404
|
+
});
|
|
386
405
|
onLayoutResult?.({
|
|
387
406
|
runner: event.runner,
|
|
388
407
|
ms: event.ms,
|
|
@@ -411,10 +430,12 @@ export function NodeGraphNative(props: NodeGraphNativeProps) {
|
|
|
411
430
|
// and replacing a working canvas with a fallback because one handler
|
|
412
431
|
// threw would be the worse failure.
|
|
413
432
|
if (event.phase !== "runtime") {
|
|
414
|
-
|
|
415
|
-
reason: event.phase === "boot" ? "no-ready" : event.phase,
|
|
433
|
+
const failed = {
|
|
434
|
+
reason: event.phase === "boot" ? ("no-ready" as const) : event.phase,
|
|
416
435
|
message: event.message,
|
|
417
|
-
}
|
|
436
|
+
};
|
|
437
|
+
reportNodeGraphCanvas({ t: "failure", ...failed });
|
|
438
|
+
setFailure(failed);
|
|
418
439
|
}
|
|
419
440
|
onError?.(event);
|
|
420
441
|
return;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FZ-11167: the canvas reporter sees what the native host sees. A fake DOM
|
|
3
|
+
* entry plays the wire events the real canvas sends, a tick after mount as a
|
|
4
|
+
* WebView would (the host resets its state in its own mount effect, after the
|
|
5
|
+
* entry's); the reporter must get
|
|
6
|
+
* paint, ready and the relayout answer in that order, the watchdog's failure
|
|
7
|
+
* when nothing arrives, and a reporter that throws must not cost the host its
|
|
8
|
+
* own callbacks.
|
|
9
|
+
*/
|
|
10
|
+
import { cleanup, screen, waitFor } from "@testing-library/react";
|
|
11
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
12
|
+
import { createElement, useEffect } from "react";
|
|
13
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
14
|
+
import type { NodeGraphDomProps } from "../dom/NodeGraphDomShell";
|
|
15
|
+
import { NodeGraphNative } from "./NodeGraph.native";
|
|
16
|
+
import { setNodeGraphCanvasReporter } from "./canvasReport";
|
|
17
|
+
import type { NodeGraphCanvasReport } from "./canvasReport";
|
|
18
|
+
|
|
19
|
+
afterEach(() => {
|
|
20
|
+
cleanup();
|
|
21
|
+
setNodeGraphCanvasReporter(null);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const envelope = {
|
|
25
|
+
schemaVersion: 1,
|
|
26
|
+
knobs: {},
|
|
27
|
+
intent: null,
|
|
28
|
+
surface: { size: "md", density: "comfortable" },
|
|
29
|
+
scheme: "light",
|
|
30
|
+
themeName: "light",
|
|
31
|
+
prefersReducedMotion: true,
|
|
32
|
+
vars: {},
|
|
33
|
+
fonts: [],
|
|
34
|
+
pixelRatio: 1,
|
|
35
|
+
revision: 1,
|
|
36
|
+
} as never;
|
|
37
|
+
|
|
38
|
+
const readyEvent = {
|
|
39
|
+
t: "ready",
|
|
40
|
+
diagnostics: {
|
|
41
|
+
stage: "ready",
|
|
42
|
+
bootMs: 120,
|
|
43
|
+
renderer: "react-flow-dom",
|
|
44
|
+
xyflowVersion: "12.11.5",
|
|
45
|
+
layoutRunner: "none",
|
|
46
|
+
faces: [],
|
|
47
|
+
faceDelivery: [],
|
|
48
|
+
nodesMounted: 12,
|
|
49
|
+
nodesInDocument: 12,
|
|
50
|
+
culling: true,
|
|
51
|
+
renderMode: "detail",
|
|
52
|
+
scheme: "light",
|
|
53
|
+
lastError: null,
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
function entryPlaying(events: readonly object[]) {
|
|
58
|
+
return function FakeDomEntry(props: NodeGraphDomProps) {
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
const timer = setTimeout(() => {
|
|
61
|
+
for (const event of events) void props.onEvent(JSON.stringify(event));
|
|
62
|
+
}, 0);
|
|
63
|
+
return () => clearTimeout(timer);
|
|
64
|
+
}, []);
|
|
65
|
+
return createElement("div", { "data-testid": "webview" });
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function mount(entry: unknown, readyTimeoutMs: number, extra: Record<string, unknown> = {}) {
|
|
70
|
+
return renderWithProviders(
|
|
71
|
+
createElement(NodeGraphNative, {
|
|
72
|
+
documentJson: JSON.stringify({ version: 1, nodes: [], edges: [] }),
|
|
73
|
+
domEntry: entry as never,
|
|
74
|
+
envelope,
|
|
75
|
+
readyTimeoutMs,
|
|
76
|
+
rev: 0,
|
|
77
|
+
schemaId: "node-graph-demo",
|
|
78
|
+
...extra,
|
|
79
|
+
}),
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
describe("the canvas reporter (FZ-11167)", () => {
|
|
84
|
+
it("gets paint, ready and the relayout answer from the host", async () => {
|
|
85
|
+
const reports: NodeGraphCanvasReport[] = [];
|
|
86
|
+
setNodeGraphCanvasReporter((report) => reports.push(report));
|
|
87
|
+
mount(
|
|
88
|
+
entryPlaying([
|
|
89
|
+
{ t: "paint", bootMs: 84 },
|
|
90
|
+
readyEvent,
|
|
91
|
+
{ t: "layoutResult", runner: "worker-blob", ms: 7, nodeCount: 12 },
|
|
92
|
+
]),
|
|
93
|
+
60_000,
|
|
94
|
+
);
|
|
95
|
+
await waitFor(() => expect(reports).toHaveLength(3));
|
|
96
|
+
expect(reports).toEqual([
|
|
97
|
+
{ t: "paint", bootMs: 84 },
|
|
98
|
+
{
|
|
99
|
+
t: "ready",
|
|
100
|
+
stage: "ready",
|
|
101
|
+
nodesMounted: 12,
|
|
102
|
+
nodesInDocument: 12,
|
|
103
|
+
layoutRunner: "none",
|
|
104
|
+
renderMode: "detail",
|
|
105
|
+
},
|
|
106
|
+
{ t: "layoutResult", runner: "worker-blob", ms: 7, nodeCount: 12, error: undefined },
|
|
107
|
+
]);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
it("gets the watchdog's failure when nothing arrives", async () => {
|
|
111
|
+
const reports: NodeGraphCanvasReport[] = [];
|
|
112
|
+
setNodeGraphCanvasReporter((report) => reports.push(report));
|
|
113
|
+
mount(entryPlaying([]), 10);
|
|
114
|
+
await screen.findByLabelText("Retry");
|
|
115
|
+
expect(reports).toEqual([{ t: "failure", reason: "no-ready", message: undefined }]);
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
it("gets a module failure the canvas reports", async () => {
|
|
119
|
+
const reports: NodeGraphCanvasReport[] = [];
|
|
120
|
+
setNodeGraphCanvasReporter((report) => reports.push(report));
|
|
121
|
+
mount(entryPlaying([{ t: "error", phase: "module", message: "no such module" }]), 60_000);
|
|
122
|
+
await waitFor(() => expect(reports).toHaveLength(1));
|
|
123
|
+
expect(reports).toEqual([{ t: "failure", reason: "module", message: "no such module" }]);
|
|
124
|
+
await waitFor(() => expect(screen.queryByTestId("webview")).toBeNull());
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
it("drops a throwing reporter's report and keeps the host's own callbacks", async () => {
|
|
128
|
+
setNodeGraphCanvasReporter(() => {
|
|
129
|
+
throw new Error("sink is gone");
|
|
130
|
+
});
|
|
131
|
+
const onPaint = vi.fn();
|
|
132
|
+
mount(entryPlaying([{ t: "paint", bootMs: 10 }]), 60_000, { onPaint });
|
|
133
|
+
await waitFor(() => expect(onPaint).toHaveBeenCalledWith(10));
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
it("is silent with no reporter set", async () => {
|
|
137
|
+
const onPaint = vi.fn();
|
|
138
|
+
mount(entryPlaying([{ t: "paint", bootMs: 10 }]), 60_000, { onPaint });
|
|
139
|
+
await waitFor(() => expect(onPaint).toHaveBeenCalledWith(10));
|
|
140
|
+
});
|
|
141
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The hook a device check reads the canvas through (FZ-11167).
|
|
3
|
+
*
|
|
4
|
+
* The native host already learns when the canvas painted, what `ready`
|
|
5
|
+
* carried, what a relayout answered and why it gave up; nothing outside the
|
|
6
|
+
* component could see any of it without a screen. One reporter, set by the
|
|
7
|
+
* app, receives each of those as a plain value, so a launch argument can turn
|
|
8
|
+
* them into HTTP posts and a shell script can wait for the paint. Nothing is
|
|
9
|
+
* set by default, and a reporter that throws loses that one report, never the
|
|
10
|
+
* canvas.
|
|
11
|
+
*/
|
|
12
|
+
export type NodeGraphCanvasReport =
|
|
13
|
+
| { readonly t: "paint"; readonly bootMs: number | null }
|
|
14
|
+
| {
|
|
15
|
+
readonly t: "ready";
|
|
16
|
+
readonly stage: string | null;
|
|
17
|
+
readonly nodesMounted: number;
|
|
18
|
+
readonly nodesInDocument: number;
|
|
19
|
+
readonly layoutRunner: string;
|
|
20
|
+
readonly renderMode: string;
|
|
21
|
+
readonly edgeRouting?: {
|
|
22
|
+
readonly calls: number;
|
|
23
|
+
readonly tracked: number;
|
|
24
|
+
readonly aroundBoxes: number;
|
|
25
|
+
readonly ms: number;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
| {
|
|
29
|
+
readonly t: "layoutResult";
|
|
30
|
+
readonly runner: string;
|
|
31
|
+
readonly ms: number;
|
|
32
|
+
readonly nodeCount: number;
|
|
33
|
+
readonly error?: string;
|
|
34
|
+
}
|
|
35
|
+
| { readonly t: "failure"; readonly reason: string; readonly message?: string };
|
|
36
|
+
|
|
37
|
+
export type NodeGraphCanvasReporter = (report: NodeGraphCanvasReport) => void;
|
|
38
|
+
|
|
39
|
+
let reporter: NodeGraphCanvasReporter | null = null;
|
|
40
|
+
|
|
41
|
+
export function setNodeGraphCanvasReporter(next: NodeGraphCanvasReporter | null): void {
|
|
42
|
+
reporter = next;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function reportNodeGraphCanvas(report: NodeGraphCanvasReport): void {
|
|
46
|
+
const current = reporter;
|
|
47
|
+
if (!current) return;
|
|
48
|
+
try {
|
|
49
|
+
current(report);
|
|
50
|
+
} catch {
|
|
51
|
+
// A reporter is a sink for a check; it never takes the canvas down with it.
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeGraphDomInner.d.ts","sourceRoot":"","sources":["../../src/dom/NodeGraphDomInner.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAyBH,OAAO,KAAK,EAAE,sBAAsB,EAAuB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"NodeGraphDomInner.d.ts","sourceRoot":"","sources":["../../src/dom/NodeGraphDomInner.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAyBH,OAAO,KAAK,EAAE,sBAAsB,EAAuB,MAAM,qBAAqB,CAAC;AA2BvF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,sCAmc9D"}
|
package/types/dom/wire.d.ts
CHANGED
|
@@ -83,6 +83,12 @@ export interface GraphDiagnosticsWire {
|
|
|
83
83
|
readonly phase: GraphErrorPhase;
|
|
84
84
|
readonly message: string;
|
|
85
85
|
} | null;
|
|
86
|
+
readonly edgeRouting?: {
|
|
87
|
+
readonly calls: number;
|
|
88
|
+
readonly tracked: number;
|
|
89
|
+
readonly aroundBoxes: number;
|
|
90
|
+
readonly ms: number;
|
|
91
|
+
};
|
|
86
92
|
}
|
|
87
93
|
/**
|
|
88
94
|
* A finished perf run, as it crosses the bridge (milestone 6, design §13).
|
package/types/dom/wire.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../../src/dom/wire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC;AAExC,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEvE,+EAA+E;AAC/E;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,kDAAkD;IAClD,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,yEAAyE;IACzE,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;CAC5D;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,S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Edge.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAIvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"GraphEdge.d.ts","sourceRoot":"","sources":["../../src/edges/GraphEdge.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAIvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAQlD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,eAAO,MAAM,aAAa,gBAAgB,CAAC;AAE3C,MAAM,WAAW,aAAa;IAC5B,+BAA+B;IAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,uEAAuE;IACvE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,IAAI;IAAE,WAAW,EAAE,WAAW,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAE,CAIjF;AA4BD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,+BAoFlD;AA+BD,eAAO,MAAM,SAAS,gEAA2B,CAAC;AAElD,qDAAqD;AACrD,eAAO,MAAM,cAAc;;CAA0C,CAAC"}
|