Skip to content

Layouts and Navigation

CapsaicinBunny edited this page Jun 21, 2026 · 2 revisions

Layouts & Navigation

How to arrange the graph and move around it. For the engineering behind the layout engines, see Layout Engine Internals.

Layout engines

Pick an engine from the toolbar. The view auto-fits when the layout changes (and preserves your camera on a re-filter).

Smart (default)

The default Smart layout (semanticMultilevel) goes beyond a single global graph:

  • Nested package containers — visible group boxes by directory, package, or detected community.
  • Adaptive per-cluster layout — each cluster is laid out with the engine that best fits its shape (a tree-shaped cluster gets a tree, a dense cluster gets something that tolerates density, and so on).
  • Semantic reduction — collapses strongly-connected components and chosen clusters to keep large graphs legible; aggregated edges keep their ×N counts.
  • Edge routing — optional orthogonal routing and community collapse (in the Settings pane).

You don't configure any of this — Smart inspects the graph's shape and chooses. When a region is too large for its ideal engine, Smart safely falls back (see the indicator below).

Classic engines

Also available from the toolbar:

Engine Good for
Layered Hierarchical / directional flow (dagre). Directions: top-down, left-right, bottom-up, right-left.
Tree Tree-shaped dependencies (dagre), same direction options.
Radial Hub-and-spoke around a center.
Circular Cyclic structures laid on a ring.
Grid A dense, uniform overview.
Force-directed Organic clustering (d3-force).

There are also Stress and Backbone engines that Smart selects internally for large/dense and hub-and-leaf graphs. See Layout Engine Internals.

The "layout simplified" indicator

When a region is too big or too dense for the engine that would ideally lay it out, PolyGraph downgrades that region to a grid rather than hang — and tells you it did, with a small "layout simplified" indicator (e.g. "Stress → Grid (2 areas)"). This is expected behavior on very large graphs, not an error. The full reasoning is in Rendering & Performance.

Filters

The sidebar filters narrow what's drawn, by:

  • Node kind / layer — Types, Callables, Members, Modules (see The Graph Model).
  • Language, folder, role, environment (client/server), runtime.
  • Edge kind — show/hide import, call, extends, etc., with a hide all / show all toggle for relationships.
  • External dependencies — a toolbar toggle (off by default).

A "modified" dot indicates which filter groups you've changed from the defaults.

Search & focus

  • Search highlights matching nodes; the renderer dims the rest so matches pop even in a big graph.
  • Focus mode isolates a node and its neighborhood, hiding everything else — useful for following one thread of dependencies.
  • For structured selection (not just text match), use the Query Language.

Connection highlighting

  • Click a card → it and its direct neighbors stay lit; the rest dims, and the connecting edges are emphasized.
  • Shift-click a second card → the shortest path between the two is highlighted, with a status pill showing the number of steps (or "No connection"). This works at any collapse/expand level because it operates on the on-screen cards.

Settings pane

The Settings pane collects view-wide options: abstraction level, layout density, edge routing (curved/orthogonal), community collapse, the minimap, and the local logs toggle (plus Download log). (The light/dark theme toggle lives in the toolbar.) See Rendering & Performance for what telemetry records.

Clone this wiki locally