From 8d3165c8c4615def7d04280808a4f910981401be Mon Sep 17 00:00:00 2001 From: stroblme Date: Thu, 15 Oct 2026 21:46:05 +0200 Subject: [PATCH] A lane chip clears the card above its run: running downwards ELK keeps runs half a chip and a border (14px) from nodes, so House history's feedback chip no longer covers the node border at 390 (crossings and node order unchanged, Demo house 178px taller); an empty string reads "" on its chip --- frontend/src/components/Flow/LiveEdge.tsx | 3 ++- frontend/src/components/Flow/layout.ts | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Flow/LiveEdge.tsx b/frontend/src/components/Flow/LiveEdge.tsx index 33b46b6..527c1ad 100644 --- a/frontend/src/components/Flow/LiveEdge.tsx +++ b/frontend/src/components/Flow/LiveEdge.tsx @@ -174,7 +174,8 @@ function formatValue(value: unknown): string { if (typeof value === "number") { return Number.isInteger(value) ? String(value) : value.toFixed(2) } - if (typeof value === "string") return value + // An empty string reads the way `null` and `[]` do, not as an empty pill. + if (typeof value === "string") return value || '""' // A media reference serialised whole is a line of hash: what belongs in a // chip this size is what kind of bytes crossed the edge. if (isRef(value)) return describeArtifact(value as Record) diff --git a/frontend/src/components/Flow/layout.ts b/frontend/src/components/Flow/layout.ts index e523bd3..cf94b02 100644 --- a/frontend/src/components/Flow/layout.ts +++ b/frontend/src/components/Flow/layout.ts @@ -294,6 +294,17 @@ function graphOf( RANK_GAP[direction], ), "org.eclipse.elk.padding": `[top=${MARGIN},left=${MARGIN},bottom=${MARGIN},right=${MARGIN}]`, + // Running downwards, a chip moved onto a run across the flow (see + // `longestRun`) is centred on it, so a run keeps half a chip and a + // node's border clear of the nodes it passes. ELK's default of 10px + // put such a chip over the border of the card above it. + ...(across + ? {} + : { + "org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers": String( + LABEL_H / 2 + 2, + ), + }), // What decides a tie is the order the document lists things in, so the // graph reads the way the flow is written rather than however the // algorithm happened to land.