Redesign graph nodes around semantic contributors
This commit is contained in:
parent
cb4353fe8c
commit
252033e30a
14 changed files with 447 additions and 137 deletions
|
|
@ -19,7 +19,7 @@ commit when Git is available; it cannot change repository state.
|
|||
- 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.14.0.
|
||||
- Core, CLI, and MCP server: version 0.15.0.
|
||||
|
||||
Schema files describe the generic interchange contract. Runtime validation remains responsible for
|
||||
path confinement, source hashing, relationship resolution, dependency cycles, project limits, stale
|
||||
|
|
@ -105,7 +105,7 @@ Descriptor filtering accepts only
|
|||
family, authority, status, or tag plus one exact value. There is no write endpoint, arbitrary query
|
||||
endpoint, static filesystem handler, external asset, or project-selection control.
|
||||
|
||||
The `graph-browser@14` template provides mouse-wheel zoom centered on the pointer, left-button drag
|
||||
The `graph-browser@15` 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
|
||||
|
|
@ -116,6 +116,12 @@ whenever a neighborhood is rendered. The page is fixed to the browser viewport.
|
|||
filter results fill the left panel, neighborhood traversal fills the right panel, and only the
|
||||
center SVG canvas pans or zooms.
|
||||
|
||||
Canvas nodes are semantic cards. The focus and relation-derived Structure, Behavior, Dependency,
|
||||
Execution, Data, Evidence, Context, and Related categories have distinct rails and badges. Cards
|
||||
display the readable leaf title and node kind. Long titles wrap instead of being clipped. The
|
||||
complete qualified title and stable node identifier remain available in the SVG tooltip and node
|
||||
inspectors. This display shortening is presentation-only and never changes indexed identity.
|
||||
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ only through the explicit local CLI integration command.
|
|||
|
||||
## Visualization boundary
|
||||
|
||||
`docforge_visualize` starts the fixed built-in `graph-browser@14` template against the currently
|
||||
`docforge_visualize` starts the fixed built-in `graph-browser@15` 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.
|
||||
|
||||
|
|
|
|||
|
|
@ -229,11 +229,12 @@ DocForge starts at the focus and traverses every stored incoming and outgoing re
|
|||
the selected depth and fixed edge limit. The graph preserves the relationships exactly as the
|
||||
index stores them. It does not reinterpret direction or exclude contextual relationships.
|
||||
|
||||
The focus appears at the center. Outgoing nodes and their descendants form one visual role, while
|
||||
incoming or lateral nodes form another. This is the broadest view and is useful for inspecting raw
|
||||
adapter output, discovering nearby nodes, and choosing a better focus. It can also be the noisiest
|
||||
view because containment, documentation, dependencies, calls, imports, and other relationship
|
||||
types may all appear together.
|
||||
The focus appears at the center. Every other card is categorized by the relationship that explains
|
||||
its contribution to the focus: Structure, Behavior, Dependency, Execution, Data, Evidence,
|
||||
Context, or Related. This is the broadest view and is useful for inspecting raw adapter output,
|
||||
discovering nearby nodes, and choosing a better focus. It can also be the noisiest view because
|
||||
containment, documentation, dependencies, calls, imports, and other relationship types may all
|
||||
appear together.
|
||||
|
||||
In Nodes, **Hide node** removes that node and its incident edges from the presentation. It does not
|
||||
remove other nodes merely because they become disconnected.
|
||||
|
|
@ -282,6 +283,34 @@ Adjacent traversal is deliberately bounded. After DocForge includes a direct mem
|
|||
dependency owned by the focus, it continues toward that branch rather than fanning back out
|
||||
through unrelated siblings. Depth and edge limits provide a second guard against an unbounded web.
|
||||
|
||||
### Reading graph cards
|
||||
|
||||
The canvas presents nodes as compact semantic cards rather than anonymous circles:
|
||||
|
||||
- **Focus** identifies the node being explained.
|
||||
- **Structure** identifies packages, modules, classes, methods, definitions, and other containment
|
||||
paths that establish where the focus exists.
|
||||
- **Behavior** identifies base classes, derived classes, and implementation relationships.
|
||||
- **Dependency** identifies imported modules and required services or helpers.
|
||||
- **Execution** identifies callers, dispatchers, launchers, activators, and focus-owned execution
|
||||
branches.
|
||||
- **Data** identifies values or resources read and written.
|
||||
- **Evidence** identifies tests, verification, governing rules, and documentation.
|
||||
- **Context** identifies descriptive relationships that do not imply execution or ownership.
|
||||
- **Related** is the deterministic fallback for adapter-specific relationships that do not fit a
|
||||
built-in category.
|
||||
|
||||
The colored rail, category badge, edge style, and relationship label provide separate visual cues.
|
||||
Color is not the only signal. Cards also display the node kind, such as `Test class` or
|
||||
`Test method`.
|
||||
|
||||
Canvas cards use the readable leaf name. For example,
|
||||
`tests.test_settings.SettingsTests.test_default_settings_load` appears as
|
||||
`test_default_settings_load`, while `tests.test_settings` appears as `test_settings`. Long leaf
|
||||
names wrap at identifier boundaries instead of being truncated. The complete qualified title and
|
||||
stable node ID remain available in the pointer tooltip, compact descriptor, and full inspector, so
|
||||
the shorter canvas label never changes identity or loses information.
|
||||
|
||||
### Hiding nodes and pruning ancestors
|
||||
|
||||
Hidden nodes are browser presentation state. Hiding never changes canonical files, the derived
|
||||
|
|
@ -533,8 +562,8 @@ ambiguous adapter evidence.
|
|||
|
||||
### Full inspector content does not fit
|
||||
|
||||
DocForge 0.14 uses a fixed header and footer with a scrollable inspector body. If an older page is
|
||||
still open, stop and reopen the visualization so it loads the current `graph-browser@14` template.
|
||||
DocForge 0.15 uses a fixed header and footer with a scrollable inspector body. If an older page is
|
||||
still open, stop and reopen the visualization so it loads the current `graph-browser@15` template.
|
||||
|
||||
### Render output is stale
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue