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

Redesign graph viewer navigation

This commit is contained in:
Andraxion 2026-07-24 23:15:57 -04:00
parent 7834461eb9
commit 9bd41c5982
8 changed files with 354 additions and 72 deletions

View file

@ -23,7 +23,7 @@ approved contract and measured cross-project evidence; it is not an unimplemente
- Result envelope: `schemas/result.schema.json`, version 1.
- Changeset schema: `schemas/changeset.schema.json`, version 1.
- Index schema: version 1, disposable and reproducible.
- Core, CLI, and MCP server: version 0.8.2.
- Core, CLI, and MCP server: version 0.9.0.
Schema files describe the generic interchange contract. Runtime validation remains responsible for
path confinement, source hashing, relationship resolution, dependency cycles, project limits, stale
@ -101,25 +101,35 @@ The HTTP listener binds to `127.0.0.1` on an operating-system-selected port. A c
random token is part of every accepted URL path. Only `GET` and `HEAD` are supported. Responses use
no-store caching, a restrictive content-security policy, frame denial, MIME sniffing protection,
and no-referrer policy. The built-in template uses only same-origin JSON endpoints for graph
overview, bounded search, exact node content, bounded incoming-and-outgoing neighborhoods, and one
lease heartbeat. The heartbeat changes no project or index state. There is no write endpoint,
arbitrary query endpoint, static filesystem handler, external asset, or project-selection control.
overview, bounded search, exact descriptor-category filtering, exact node content, bounded
incoming-and-outgoing neighborhoods, and one lease heartbeat. Descriptor filtering accepts only
family, authority, status, or tag plus one exact value. The heartbeat changes no project or index
state. There is no write endpoint, arbitrary query endpoint, static filesystem handler, external
asset, or project-selection control.
The `graph-browser@6` template provides mouse-wheel zoom centered on the pointer, left-button drag
The `graph-browser@7` template provides mouse-wheel zoom centered on the pointer, left-button drag
pan, explicit zoom-in and zoom-out buttons, a reset-view button, and a live zoom percentage. A
four-pixel drag threshold defers pointer capture and preserves node activation for ordinary clicks.
Loading another root node fits the viewport to the returned neighborhood, including a useful
minimum scale for a single-node result. The current root begins selected, and activating another
graph node moves the visible selection ring to it. Space centers the viewport on the selected node
without changing zoom. Reset restores the fitted neighborhood view. Empty-canvas guidance is hidden
whenever a neighborhood is rendered.
whenever a neighborhood is rendered. The page is fixed to the browser viewport. Search and exact
filter results fill the left panel, neighborhood traversal fills the right panel, and only the
center SVG canvas pans or zooms.
Activating a graph node opens a modal inspector containing that node's complete validated metadata
and content. Inspection does not replace the current neighborhood or reset the viewport. The modal
supports keyboard activation, Escape, explicit close controls, and backdrop dismissal. Loading the
inspected node as the new root requires the separate Explore neighborhood action. Both side panels
support pointer and keyboard resizing. The unblurred modal supports native resizing and constrained
title-bar dragging.
Left-clicking or pressing Enter on a graph node opens a compact descriptor card containing the
validated metadata and content previously shown in the details panel. Its family, authority,
status, and tag pills are buttons that replace the left result list with exact matching nodes.
Right-clicking or pressing Shift+Enter opens the complete inspector. Inspection does not replace
the current neighborhood or reset the viewport. Both dialogs support Escape, explicit close
controls, and backdrop dismissal. Loading the inspected node as the new root requires the separate
Explore neighborhood action. Both side panels support pointer and keyboard resizing. The unblurred
full inspector supports native resizing and constrained title-bar dragging.
The header exposes a Nodes/Flow segmented selector. Both positions intentionally retain the node
graph in this contract version. Flow traversal and layout semantics remain unclaimed until relation
direction and eligibility are defined.
The browser derives presentation roles only from the returned bounded graph. The current root is
the primary focus. Nodes reachable through outgoing edges are children. Remaining incoming and

View file

@ -61,22 +61,25 @@ only through the explicit local CLI integration command.
## Visualization boundary
`docforge_visualize` starts the fixed built-in `graph-browser@6` template against the currently
`docforge_visualize` starts the fixed built-in `graph-browser@7` template against the currently
validated derived index. It may focus one stable node, run one bounded lexical query, or open the
project overview. The tool returns a loopback URL and exact snapshot identity.
The tool cannot select a project, database, template, host, port, filesystem path, or SQL
expression. Its HTTP surface is token-bound, read-only, same-origin, and limited to overview,
search/filter, node-neighborhood JSON, and a read-only browser-lease heartbeat. The browser exposes
an exact validated index snapshot. It rejects index replacement or alteration and requires another
MCP invocation to refresh.
search, exact family/authority/status/tag filtering, node-neighborhood JSON, and a read-only
browser-lease heartbeat. The browser exposes an exact validated index snapshot. It rejects index
replacement or alteration and requires another MCP invocation to refresh.
Viewport interaction is entirely client-side: fitted neighborhood framing, wheel zoom, left-button
drag pan, explicit zoom buttons, reset, and Space-to-center selection never request or mutate
project data. Graph-node activation visibly selects the node, fetches exact node data from the same
bounded read endpoint, and opens a client-side modal inspector. Replacing the current root requires
the modal's explicit Explore neighborhood action. The open browser renews a bounded lease in a
detached local worker, so standard-input transaction completion does not close the listener. The
worker tracks the longer-lived MCP client host and closes when that owner exits.
project data. Left activation visibly selects the node and opens a compact descriptor card.
Right-click opens the full inspector. Descriptor-pill activation fills the fixed left panel with an
exact bounded category result set. The fixed right panel contains neighborhood navigation.
Replacing the current root requires an explicit Explore neighborhood action. The Nodes/Flow
selector retains the same graph until a later contract defines flow semantics. The open browser
renews a bounded lease in a detached local worker, so standard-input transaction completion does
not close the listener. The worker tracks the longer-lived MCP client host and closes when that
owner exits.
Explicit service shutdown closes its tracked worker, and abandoned pages expire.
## Excluded tools

View file

@ -16,11 +16,12 @@ The DocForge repository contains the complete generic CLI and stdio MCP server.
- Project identity, validation, exact-node retrieval, lexical search, and filtering.
- Backlinks, dependency traversal, impact traversal, and bounded context profiles.
- `docforge_visualize`, which starts the token-protected, loopback-only `graph-browser@6` viewer.
- `docforge_visualize`, which starts the token-protected, loopback-only `graph-browser@7` viewer.
The viewer supports search, family filtering, exact-node inspection, bounded neighborhoods,
modal inspection without losing the current neighborhood, explicit neighborhood exploration,
fitted single- and multi-node framing, visible node selection, Space-to-center, mouse-wheel zoom,
left-button drag panning, zoom controls, and viewport reset.
exact descriptor-pill filtering, compact left-click descriptors, full right-click inspection,
fixed search and neighborhood side panels, explicit neighborhood exploration, fitted single- and
multi-node framing, visible node selection, Space-to-center, mouse-wheel zoom, left-button drag
panning, zoom controls, viewport reset, and a reserved Nodes/Flow selector.
- Isolated documentation changesets, proposal validation, diffs, and escaped HTML previews when a
proposal writer and render view are configured.