Add WebGPU graph surface plan (Track A)#307
Conversation
…rer technical notes Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… agent-runnable harness Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Implementation update — A0 harness landed, pivoting to renderer replacementThe local benchmark/fixture foundation is now pushed. I’m stopping further baseline tuning and moving directly to getting the replacement graph into Open in Editor, then removing the legacy graph. Local current-renderer numbers (Mac arm64, Chromium, 1280×720)
The two repeated 10k runs produced identical counts and fixture hash: Visual references now in the branchNext implementation path
I’ll add the next update with a screenshot/GIF from the replacement renderer running in Open in Editor and the graph size/FPS observed locally. |
Owned 2D renderer is now running in Open in EditorPushed the first vertical replacement slice in
Local Open in Editor validationValidated in the Extension Development Host against an indexed seed-307 Markdown workspace with 1,000 nodes / 3,090 connections. Zoom, middle-button pan, hover tooltip, fit, and continuous layout rendering all worked in the editor webview. Interaction capture (45 zoom inputs + 45-step pan):
Production webview build passes. The primary 2D bundle dropped from the A0 baseline 886.48 KB / 247.36 KB gzip to 718.93 KB / 215.17 KB gzip. The remaining legacy 3D chunk is still isolated at 1.51 MB and is the next removal target. Evidence and metadata are committed in |
Legacy graph runtime removedPushed
Production source compilation and the production extension/webview build pass. The dependency scan across extension source/package metadata is clean. Bundle resultThe build now emits only the owned graph webview bundle—the separate 1,506.94 KB legacy 3D chunk is gone.
That is a 191.58 KB (21.6%) main-bundle reduction and 40.04 KB (16.2%) gzip reduction from A0, before the WebGPU implementation starts. The plan now explicitly records d3-force, Obsidian, and react-force-graph as architecture/behavior references while keeping them out of production dependencies, and makes node-radius collision a mandatory invariant for every engine/rendering path. Next: remove Timeline, finish stale test-contract migration, then begin the WebGPU surface against the owned engine/camera/picking contracts. |
First WebGPU graph is live in Open in EditorPushed the WebGPU MVP in The owned surface now runtime-probes
The typed-array CPU engine remains the layout source, including its radius-based collision pass, pin/release behavior, and deterministic fixed-step force integration. Actual GPU validationValidated locally in VS Code 1.128.0's Extension Development Host Open in Editor with 1,000 nodes / 3,090 edges. The surface reported Composited frame: GPU-only frame (overlay deliberately hidden): Interaction capture: Scripted Playwright interaction pacing (45 zoom + 45 pan inputs): 88 frames / 2.270s, 38.33 effective FPS, p50 22.3ms, p95 29.1ms, max 38.7ms. This is an integration responsiveness number, not yet the 50k/100k throughput result—the Canvas decoration overlay still intentionally does parity work on every frame. Production build and source compilation pass; targeted WebGPU color-contract tests pass (3/3). Current bundle is 682.43 KB / 205.00 KB gzip, still 204 KB smaller than A0 despite adding the GPU backend. |
Timeline removal completePushed Removed the timeline UI, extension↔webview protocol, provider/indexing/playback paths, git-history cache/analyzer, shared timeline contracts, runtime state, repository settings, export/bootstrap surfaces, and timeline-owned churn indexing/sizing. Legacy persisted Normal graph navigation was extracted before deletion:
Production source now has only three intentional Validation performed locally: production TypeScript clean, production extension/webview build clean (745 webview modules), and focused file-opening coverage 19/19 passing. No CI used. Per the latest owner direction, future performance testing is capped at 10k nodes; I will not run additional 50k/100k performance suites. |
2D-only cleanup + owned DAG constraintsRecent pushes:
Top-down DAG mode on the indexed 10,000-node / 31,089-edge workspace: The 10k rAF-paced camera check remained smooth at 144.31 FPS, p95 8.3ms, max 8.7ms with worker physics dispatch off the main thread. Local quality status after the removals:
No CI used. |
Final local verification checkpointThe replacement branch is now at
Fresh local verification (no CI):
The acceptance harness now deliberately targets the owned interaction/decoration canvas where tests need 2D pixels or synthetic pointer dispatch; the GPU canvas remains the first composited layer. As directed, performance testing is capped at 10k going forward. The previously committed 50k result remains historical evidence only. |
Parity + controlled performance checkpoint (
|
| Control | Tested range |
|---|---|
| Repel Force | 0 → 20 |
| Center Force | 0 → 1 |
| Link Distance | 30 → 500 |
| Link Force | 0 → 1 |
The adapter now also preserves legacy D3 damping semantics (velocity retention = 1 - stored damping).
Controlled legacy comparison (5 runs each)
Same seed-307 1k fixture, Chromium 145, 1280×720, device scale 1, same scripted pan/zoom, same machine, same forced-GC protocol. Headless Chromium uses the owned Canvas fallback, so this is a strict fallback-vs-legacy comparison—not a WebGPU headline.
| Metric (median) | Legacy dcb0165ec |
Owned fallback | Change |
|---|---|---|---|
| Interaction FPS | 13.54 | 34.73 | +156.54% (2.57×) |
| Settle time | 2,976.5ms | 2,455ms | −17.52% |
| Hover p50 | 7.4ms | 18.8ms | +154.05% regression |
| Retained heap | 6.80MB | 10.31MB | +51.56% regression |
I am explicitly disclosing the two regressions rather than folding unlike workloads into a misleading speedup. Raw run arrays and environment are committed at references/comparison/legacy-vs-owned-1k.json.
Actual GPU / dynamic update measurements
- latest 10k Open in Editor: 142.98 FPS, p50 7.0ms, p95 8.5ms, GPU p50 1.0ms, overlay p50 0.9ms
- five 9k↔10k worker/WebGPU update runs:
- add 1,000 nodes: 326.2ms median
- remove 1,000 nodes: 346.0ms median
- restyle 900 nodes: 49.3ms median
- camera zoom preserved: yes
Evidence: open-editor-dynamic-10k/metadata.json.
Current PR-level bundle versus A0: 886.48KB → 712.94KB raw (−19.58%), 247.36KB → 212.69KB gzip (−14.02%), plus removal of the separate 1.51MB legacy 3D chunk.
Final parity verification (
|








Summary
react-force-graphwith a CodeGraphy-owned WebGPU 2D renderer and custom typed-array physics engine (Track A: A0 baseline harness → A7 remove react-force-graph).Sibling plan: the Rust core track lives in #305 (
docs/plans/2026-07-10-rust-core-plan.md); the two tracks are independent until that plan's convergence phases.Validation
🤖 Generated with Claude Code