oneshotlm
Compare all models on this prompt →

Force-directed graph · qwen3.8-2.4t-a95b

Using the pre-provided d3.min.js (global d3), render an interactive force-directed graph of about 40 nodes in several clusters with draggable nodes, hover highlighting of neighbors, and zoom/pan. Define the sample nodes and links inline.

⛨ sandboxed Open in new tab ↗
transcript · 8 messages
user

Using the pre-provided d3.min.js (global d3), render an interactive force-directed graph of about 40 nodes in several clusters with draggable nodes, hover highlighting of neighbors, and zoom/pan. Define the sample nodes and links inline.

assistant
thinking
Write a single index.html containing a d3 force graph. About 40 nodes, clusters (groups), dragging, highlighting adjacent nodes on hover, zoom. Keep it self-contained.
bash {"command":"ls -la /tmp/ws"}
toolResult

total 276 drwxr-sr-x. 2 node node 23 Aug 13 01:26 . drwxrwsrwx. 3 root node 16 Aug 13 01:26 .. -rw-r--r--. 1 node node 279706 Aug 13 01:26 d3.min.js

assistant
thinking
d3.min.js exists (280KB — probably the complete d3 bundle). Writing index.html.
write /tmp/ws/index.html (10845 bytes)
toolResult

Successfully wrote 10845 bytes to /tmp/ws/index.html

assistant
thinking
Quick sanity check: verify the d3 version in d3.min.js to confirm that the APIs being used (d3.zoom, forceLink with event.transform, the drag event API) are v6/v7 compatible. Check the version string.
bash {"command":"head -c 300 /tmp/ws/d3.min.js; echo; grep -o '\"7\\.[0-9.]*\"' /tmp/ws/d3.min.js | head -1"}
toolResult

// https://d3js.org v7.9.0 Copyright 2010-2023 Mike Bostock !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).d3=t.d3||{})}(this,(function(t){"use strict"; "7.9.0"

assistant
thinking
d3 v7.9.0 — event API usage is correct. Done.

Done. `index.html` is written to `/tmp/ws` — a fully self-contained single-page app using the local `d3.min.js` (v7.9.0, loaded via plain `<script src="d3.min.js">`, no network needed). **What it includes:** - **41 inline-defined nodes in 5 clusters** (Core Platform, Data Services, Frontend, DevOps, Research), each with a hub node, hub-and-spoke intra-cluster links plus random cross-links, and dashed "bridge" links between cluster hubs. - **Force simulation** with link, charge, collide, centering forces, plus a custom gentle *cluster-centroid force* so groups visually separate. - **Draggable nodes** — drag pins/unpins via `fx`/`fy` with `alphaTarget` reheat. - **Hover highlighting** — neighbors and their links light up gold, everything else dims, plus a tooltip showing cluster name and connection count. - **Zoom & pan** — `d3.zoom` (scroll to zoom 0.25×–6×, drag background to pan), cursor feedback while panning. - **Extras** — legend in a HUD panel, node size scaled by degree, labels with outline stroke, responsive resize handling, seeded RNG for reproducible layout. Just open `index.html` in a browser — everything runs sandboxed.

TAKE IT TO CODE

A single self-contained HTML file — copy it and open in any browser, or reuse the prompt with your own pi-agent run.

RUN

modelqwen3.8-2.4t-a95b
vendorQwen
harnesspi-agent
generated2026-08-13

EVALUATION

3/5 working

Force-directed clustered graph with zoom/drag/wheel panning working; keyboard input has no effect, as expected.

Vision grade · anthropic/claude-sonnet-5

MEASUREMENTS

Raw readings from the capture, not a verdict — the grade above is the only judgement. Percentages are how much of the screen changed; the measure under-reports sparse motion on a dark background.

idle motion3.1%
on click0.0%
on drag4.8%
on wheel4.3%
on enter + space0.0%
on arrow keys0.0%
on w/a/s/d0.0%
frame spread16.4 / 255
console errors0
js errors none

METRICS

runtime61.6s
tokens in15k
tokens out4.3k
cached0
cost / run$0.0566