Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

feat(visualization): every edge points where the run went

rubenluetke10-beepd38ab4f51c9d
diff --git a/jarvis/ui/web/frontend/src/views/VisualizationView.test.tsx b/jarvis/ui/web/frontend/src/views/VisualizationView.test.tsx
index d583d6acff..2475f0b808 100644
--- a/jarvis/ui/web/frontend/src/views/VisualizationView.test.tsx
+++ b/jarvis/ui/web/frontend/src/views/VisualizationView.test.tsx
@@ -349,6 +349,44 @@ describe("VisualizationView", () => {
expect(canvas.scrollLeft).toBe(40);
});
+ it("points every edge with an arrowhead, alarm-coloured after a failure", async () => {
+ installFetchMock(
+ [{ slug: "run-new", utterance: "Deploy it", status: "error" }],
+ { "run-new": [] },
+ {
+ "run-new": {
+ plan: { plan_id: "run-new", vision: "Deploy it", status: "failed" },
+ steps: [
+ {
+ step_id: "t1:0",
+ name: "npm run deploy",
+ tool_name: "Bash",
+ status: "failed",
+ error: "exit 1",
+ },
+ ],
+ },
+ },
+ );
+
+ renderView();
+
+ await screen.findByTestId("graph-node-step");
+ const edges = screen.getAllByTestId("graph-edge");
+ expect(edges.length).toBeGreaterThan(0);
+ // Since the track wraps, an edge can run back to the left — only a
+ // pointed end keeps the flow readable, on every single edge.
+ for (const edge of edges) {
+ expect(edge.getAttribute("marker-end")).toMatch(/url\(#viz-arrow/);
+ }
+ // The edge into the failed step wears the alarm arrow, not the brand one.
+ expect(
+ edges.some(
+ (e) => e.getAttribute("marker-end") === "url(#viz-arrow-failed)",
+ ),
+ ).toBe(true);
+ });
+
it("keeps a press on a node a click, never a pan", async () => {
installFetchMock(
[{ slug: "run-new", utterance: "Draw the architecture", status: "success" }],
diff --git a/jarvis/ui/web/frontend/src/views/VisualizationView.tsx b/jarvis/ui/web/frontend/src/views/VisualizationView.tsx
index 95b331508e..662042ce2f 100644
--- a/jarvis/ui/web/frontend/src/views/VisualizationView.tsx
+++ b/jarvis/ui/web/frontend/src/views/VisualizationView.tsx
@@ -694,6 +694,35 @@ function GraphCanvas({
className="absolute inset-0"
aria-hidden
>
+ {/* Arrowheads. Since the track wraps, an edge can run back to the
+ left — only a pointed end keeps the flow readable. markerUnits
+ defaults to strokeWidth, so a highlighted edge's arrow grows
+ with its stroke for free. refX=8 puts the tip exactly on the
+ path end — the target card's port, drawn on the layer above. */}
+ <defs>
+ <marker
+ id="viz-arrow"
+ viewBox="0 0 8 8"
+ refX="8"
+ refY="4"
+ markerWidth="5.5"
+ markerHeight="5.5"
+ orient="auto"
+ >
+ <path d="M 0 0 L 8 4 L 0 8 Z" className="fill-primary/70" />
+ </marker>
+ <marker
+ id="viz-arrow-failed"
+ viewBox="0 0 8 8"
+ refX="8"
+ refY="4"
+ markerWidth="5.5"
+ markerHeight="5.5"
+ orient="auto"
+ >
+ <path d="M 0 0 L 8 4 L 0 8 Z" className="fill-destructive/80" />
+ </marker>
+ </defs>
{graph.edges.map((edge) => {
const from = byId.get(edge.from);
const to = byId.get(edge.to);
@@ -706,9 +735,11 @@ function GraphCanvas({
return (
<path
key={edge.id}
+ data-testid="graph-edge"
d={edgePath(from, to)}
fill="none"
strokeWidth={active ? 2.5 : 1.5}
+ markerEnd={`url(#${edge.failed ? "viz-arrow-failed" : "viz-arrow"})`}
className={
edge.failed
? active