{groups.map((group) => {
const byId = Object.fromEntries(group.nodes.map((node) => [node.id, node]));
+ const labeledEdges = group.edges.filter((edge) => intervalLabel(edge) && byId[edge.source] && byId[edge.target]);
const hasBranchPoint = group.nodes.some((node) => node.is_branch_point);
return (
@@ -68,20 +80,40 @@ export function LineageDag({
const from = byId[edge.source];
const to = byId[edge.target];
const midX = (from.x + to.x) / 2;
+ const midY = (from.y + to.y) / 2;
+ const relation = intervalLabel(edge);
return (
-
-
- {tf("{from} follows {to} ({score})", {
- from: from.label,
- to: to.label,
- score: edge.fused_score.toFixed(2),
- })}
-
-
+
+
+
+ {relation
+ ? tf("{from} follows {to} ({score}) — {relation}", {
+ from: to.label,
+ to: from.label,
+ score: edge.fused_score.toFixed(2),
+ relation: t(relation),
+ })
+ : tf("{from} follows {to} ({score})", {
+ from: to.label,
+ to: from.label,
+ score: edge.fused_score.toFixed(2),
+ })}
+
+
+ {relation ? (
+
+ {t(relation)}
+
+ ) : null}
+
);
})}
{group.nodes.map((node) => {
@@ -125,6 +157,36 @@ export function LineageDag({
})}
+ {labeledEdges.length > 0 ? (
+