Skip to content

Rework the render graph views and make every search exact unless it uses wildcards. - #15

Merged
walterhpearce merged 1 commit into
rustfoundation:mainfrom
walterhpearce:render-graph-views
Oct 31, 2026
Merged

walterhpearce merged 1 commit into
rustfoundation:mainfrom
walterhpearce:render-graph-views

Conversation

@walterhpearce

Copy link
Copy Markdown
Contributor

Reworks the render UI's graph tabs so they load fast and show useful structure, and makes every search exact unless it uses wildcards.

Graph tabs

  • Default: one crate in a fixed radial layout instead of a force-layout hairball. Its latest version's dependencies, the most-downloaded dependents, and a strip of recent versions. Paged, bounded expansions from the details panel (/api/graph/overview/:name, one query, about 75 ms for serde or tokio locally).
  • Deps: a layered dependency tree from the current version, two hops and 300 crates by default, with edge kinds, optional deps, the path from the root, "+N" expansion, and a bounded dependents mode (/api/deps/tree, /api/deps/expand). This replaces the 5,000-edge /api/graph/deps/chain hairball.
  • Map: named landmark crates ranked by downloads and dependents, labelled community blobs, a density heat map, and the selected crate's neighbourhood with jump links. This replaces the grid of "N crates" cells. The in-memory index can be snapshotted to disk (RENDER_LOD_INDEX_CACHE, default /tmp/painter-lod-index.json), so a restart reloads in seconds when the build is unchanged.
  • Callers: one function search box, callers grouped by crate with an expandable tree and a crate call graph, and a callees mode. Results are paged on the server: the per-version aggregate is cached and function names are fetched only for the page shown. A 95k-caller function went from a 9.5 MB response to about 140 KB per page.

Search

  • Typed text is an exact, case-insensitive name everywhere. Only * and ? make it a pattern (tokio*, *-sys).
  • Hint dropdowns still offer partial matches, and every table filter now has one.
  • A pattern opens the best match in the graph tabs and the Callers box. It returns every matching row in the table tabs, and lists matching logins in Publishers.
  • The version tables resolve crate names first, so an exact filter is about 0.2 s instead of timing out at 30 s.

API changes: /api/graph/deps, /api/graph/deps/chain, /api/callers and /api/functions/search are replaced by /api/deps/* and /api/symbols/*. RENDER_DEPS_DEFAULT_EDGES / RENDER_DEPS_MAX_EDGES are now RENDER_DEPS_DEFAULT_NODES / RENDER_DEPS_MAX_NODES.

Testing: npm run typecheck and npm run build pass. Every tab was checked in a headless browser against a full local database, with no console errors.

@walterhpearce
walterhpearce merged commit 0ffff3b into rustfoundation:main Oct 31, 2026
7 checks passed
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.

1 participant