Skip to content

fix(website): review the graph doc pages and fix the 3D viewer edge-kind mapping#309

Merged
samchon merged 4 commits into
masterfrom
fix/graph-docs
Jul 2, 2026
Merged

fix(website): review the graph doc pages and fix the 3D viewer edge-kind mapping#309
samchon merged 4 commits into
masterfrom
fix/graph-docs

Conversation

@samchon

@samchon samchon commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Intent

A self-contained review pass over the four /docs/graph pages (built from the launch post), fixing what read abrupt, thin, or factually stale, plus one real defect the review surfaced in the 3D viewer pipeline.

Scope

Viewer edge-kind mapping (fix). ttscgraph dump emits fine-grained wire kinds (calls, instantiates, renders, accesses, type_ref, extends, implements), but the 3D viewers color and label edges by the three display families (value-call, type-ref, heritage). No reduce mapped between the two, so a freshly dumped graph uploaded to the viewer rendered every edge with the fallback color and the legend matched nothing (the shipped example payloads predate the fine-grained kinds, which hid it). The mapping is added to all three mirrored reduces: packages/graph/src/reduce.ts, website/src/components/graph/TtscWebsiteGraphReduce.ts, experimental/benchmark/graph/viewer.mjs.

Docs.

  • Overview: correct the resident-graph claim (the native binary dumps once, the Node server answers from the in-memory graph; there is no warm checker), map -> graph wording, add the source-crawl hero image, a diagnostics bullet, and embed the live 3D viewer component.
  • Design: explain the clarify follow-up action, move the CoT-compliance image here where the concept is defined.
  • Comparison: replace that image (out of context there) with a prose pointer to Design.
  • Viewer: correct the dump description (ids and paths are project-relative, not absolute), document the view flags, name the example repos, tie the three edge families to the full edge-kind set, and spell out the reduction steps.
  • Setup: same map -> graph wording fix.

Deferred

  • The shipped example payloads under website/public/graph/*.json still carry the old family kinds; they render correctly (pre-reduced payloads bypass the mapping) and were not regenerated.

Test plan

  • tsc --noEmit passes in packages/graph and website.
  • Runtime repro of the mapping: a synthetic dump with calls/type_ref/extends/accesses edges reduces to value-call/type-ref/heritage/value-call (was: kinds passed through and rendered colorless).
  • All changed files formatted with the repo prettier config.

🤖 Generated with Claude Code

https://claude.ai/code/session_01N3Cn3zmu1uUVkYJfwyPFeJ

samchon and others added 2 commits July 2, 2026 17:55
`ttscgraph dump` emits the fine-grained wire kinds (calls, instantiates,
renders, accesses, type_ref, extends, implements), but the 3D viewers
color and label edges by the three display families (value-call,
type-ref, heritage). None of the reduce implementations mapped between
the two, so a freshly dumped graph rendered every edge with the fallback
color and the legend matched nothing. Collapse the wire kinds into the
display families in all three mirrored reduces (bundled CLI, website,
experimental); pre-reduced payloads and unknown kinds pass through.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N3Cn3zmu1uUVkYJfwyPFeJ
A pass over the four /docs/graph pages built from the launch post,
fixing what read abrupt, thin, or stale:

- Overview: correct the resident-graph claim (the native binary dumps
  once; the Node server answers from the in-memory graph, there is no
  warm checker), say graph not map, add the source-crawl hero
  image, a diagnostics bullet, and embed the live 3D viewer.
- Design: explain the `clarify` follow-up action, move the
  prosthesis-to-hammer image here where CoT compliance is actually
  defined, and drop the last map wording.
- Comparison: replace the out-of-context CoT-compliance image with a
  prose pointer to Design.
- Viewer: correct the dump description (project-relative ids, no
  absolute-path keying), document the view flags, name the example
  repos, tie the three edge families to the full edge-kind set, and
  spell out the reduction (external, git-ignored, degree cap, orphans).
- Setup: same map -> graph wording fix.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N3Cn3zmu1uUVkYJfwyPFeJ
Copilot AI review requested due to automatic review settings July 2, 2026 08:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR does a focused refresh of the Graph documentation pages and fixes a real viewer defect where newly dumped graphs (with fine-grained edge kinds like calls, type_ref, etc.) rendered with fallback styling because the 3D viewer expects the three display families (value-call, type-ref, heritage).

Changes:

  • Add an explicit edge-kind “wire → display family” mapping in all three mirrored reduction pipelines (package CLI/server, website viewer, benchmark tooling).
  • Update /docs/graph/* pages and the setup docs for clarity/correctness (resident-graph wording, viewer usage/flags, reduction steps, and updated cross-references).
  • Embed the live 3D viewer component on the Graph overview page and improve viewer doc explanations (examples, edge-family meanings, reduction order).

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
website/src/content/docs/setup.mdx Updates wording from “map” to “graph” for @ttsc/graph setup docs.
website/src/content/docs/graph/viewer.mdx Clarifies viewer usage (view flags, dump semantics), edge families vs kinds, and reduction steps.
website/src/content/docs/graph/index.mdx Fixes resident-graph explanation, adds hero image, diagnostics bullet, and embeds the live 3D viewer.
website/src/content/docs/graph/design.mdx Adds/relocates the CoT compliance image and clarifies the clarify follow-up action; tweaks wording.
website/src/content/docs/graph/compare.mdx Replaces an out-of-place image block with a prose pointer to the Design page.
website/src/components/graph/TtscWebsiteGraphReduce.ts Maps fine-grained dumped edge kinds into the viewer’s three display families during reduction.
packages/graph/src/reduce.ts Mirrors the same edge-kind family mapping in the Node-side reducer used by @ttsc/graph view.
experimental/benchmark/graph/viewer.mjs Mirrors the same mapping in the benchmark viewer reducer to keep pipelines consistent.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@samchon samchon changed the title fix(graph): review the graph doc pages and fix the 3D viewer edge-kind mapping fix(website): review the graph doc pages and fix the 3D viewer edge-kind mapping Jul 2, 2026
…g it

Loading three.js, the force-graph engine, and a multi-megabyte example
graph on the docs overview page is too heavy for an entry page that
already carries the interactive benchmark chart. Replace the embedded
viewer with a static TypeORM render linking to the dedicated viewer
page.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N3Cn3zmu1uUVkYJfwyPFeJ
@samchon

samchon commented Jul 2, 2026

Copy link
Copy Markdown
Owner Author

Follow-up: dropped the embedded 3D viewer from the overview page (three.js + a multi-MB example graph is too heavy for an entry page) and replaced it with a static TypeORM render linking to the dedicated viewer page.

@samchon

samchon commented Jul 2, 2026

Copy link
Copy Markdown
Owner Author

Correction: the previous follow-up was a misread of the review feedback. The embedded 3D viewer on the overview page is intentional and is now restored (revert of 1fcdb0b). Final state: the overview embeds the live viewer component in section 3.2.

@samchon samchon merged commit 596ab4d into master Jul 2, 2026
34 checks passed
@samchon samchon deleted the fix/graph-docs branch July 2, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants