1
0
Fork 0
Code Issues Pull requests Projects Releases 2 Packages Wiki Activity Actions Pages

Add graph viewport controls

This commit is contained in:
Andraxion 2026-07-24 16:09:56 -04:00
parent 195a57210a
commit 5a17830b9a
13 changed files with 204 additions and 20 deletions

View file

@ -1,14 +1,14 @@
# Active slice
```text
Slice: DFG-10 project-bound graph visualization (complete)
Goal: Make a configured DocForge graph directly inspectable through one lightweight, generic, read-only web interface started by MCP.
In scope: One fixed `docforge_visualize` MCP tool; one built-in HTML/CSS/JavaScript template; loopback-only ephemeral HTTP; an unguessable per-process URL token; project-bound overview, search, exact-node, and bounded-neighborhood reads; deterministic graph layout; stale-index rejection; adapter compatibility; lifecycle and cross-project isolation tests; and contract/version documentation.
Out of scope: Arbitrary database paths; arbitrary SQL; canonical or derived writes; project selection; external network binding; accounts; persistent web hosting; project-specific templates; code execution; Git, build, deployment, or publication operations; and changeset application.
Done when: Generic and adapter projects can invoke the same MCP tool, receive a loopback URL, inspect only their validated graph, and pass protocol, security, lifecycle, cross-project, formatting, type, and complete test gates.
Owners: DocForge owns the fixed visualization template, read-only HTTP boundary, token, query limits, and index validation. The configured project owns canonical facts and adapter extraction. The MCP process owns the visualization lifetime. The user owns opening the returned local URL.
Slice: DFG-11 graph viewport navigation (complete)
Goal: Make dense DocForge node neighborhoods navigable without changing their graph data or authority boundary.
In scope: Pointer-centered mouse-wheel zoom; left-button drag pan; explicit zoom-in, zoom-out, and reset controls; a live zoom percentage; a drag threshold that preserves node clicks; viewport reset when a new root loads; responsive styling; focused HTML interaction-contract checks; JavaScript syntax validation; and complete regression verification.
Out of scope: Graph mutation; node reposition persistence; alternate layouts; minimaps; touch gestures beyond pointer-event compatibility; arbitrary templates; external hosting; canonical writes; or any new HTTP endpoint.
Done when: Users can zoom and pan the SVG canvas, ordinary node clicks still navigate, controls remain discoverable and keyboard-operable, the HTTP surface is unchanged, and the complete DocForge gate passes.
Owners: DocForge owns the viewport state and controls. The configured project continues to own graph facts. The MCP process continues to own the snapshot and listener lifetime.
```
**Next gate:** None planned. Measure actual graph-browser use before extending layout, export, or
remote-access policy. Canonical application remains permanently out of scope under
**Next gate:** None planned. Measure actual graph-browser use before extending layout, export,
minimap, or remote-access policy. Canonical application remains permanently out of scope under
`docs/APPLICATION_DECISION.md`.