Files
codebase-memory-mcp/tests
Martin Vogel 499eeba51b feat(ui): region level of detail for the galaxy (level=regions, scope=region:N)
The galaxy loaded 'the first max_nodes nodes' of a project, which above
~10k nodes meant freezing the tab (#498 family) or truncating the graph.
Give it a real coarsest level instead: one body per REGION.

Regions are sets of files. Files are assigned by majority vote of their
callables' Leiden communities over the CALLS graph (seeded, deterministic);
files no kept community explains fall back to folder groups (first two
path components), and a final 'misc' bucket catches the rest. Every node
inherits its file's region, all edge types aggregate into region-to-region
weights, and each region carries its name's provenance ('call community:
202 files, 38% under tests/db_functions'), cohesion, member/file counts
and its top callables by degree.

  GET /api/layout?project=X&level=regions   -> region bodies + weighted arcs
  GET /api/layout?project=X&scope=region:N  -> full detail, that region only

Positions come from a golden-angle sphere seed refined by the shared
anchored optimizer (extracted to layout_internal.h alongside the new
cbm_layout_from_nodes core, so the region scope reuses the exact layout
path). Results are cached per (project, indexed_at): on a 48k-node index
the region scene computes in ~1.6s cold, <1ms cached; a 4.8k-node region
scope lays out in ~0.5s.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-08-23 22:14:28 +02:00
..
2026-06-28 13:05:05 +02:00