Repository navigation
feat(architecture): make the Map a place you can drill into - #2104
Merged
Merged
Conversation
Double-clicking a community hub now enters it: the canvas swaps to that community's own scoped file graph, with the slice's one-hop stubs drawn as the edge of the world. The camera carries across the swap so it reads as one movement rather than a cut to a second page. `?view=files&community=<id>` is a shareable "inside this community"; the breadcrumb and Escape both go up. The payload already existed. `CommunitySlice` was being rendered as decorative satellites on the radial layout instead of being handed to the file-graph renderer, so this is mostly plumbing. `?module=` and `?community=` are one axis, so they get one control reading "Showing: all files / community X / module Y". The module filter now removes nodes rather than dimming them, which is both the honest reading of "filter" and strictly cheaper: the build, the layout and the render all shrink to the selection instead of laying out 1,500 nodes to hide most of them. The community panel goes from graph theory to state. `CommunityDetail` gains a LOC-weighted health rollup, hot/dead/decision counts and an owner, joined with two path-scoped reads over the member list -- `collect_node_signals`, the same join `build_architecture_graph` already uses for the hub discs, plus `get_health_metrics(file_paths=...)`. The neighbour-label loop used to resolve a label for every neighbouring community in the repo and keep ten; it now slices first. The member read cap went 200 -> 2000, because `member_count` disagreed with the community list (587 vs 200 on `ui`) and Phase 2 makes that number a denominator. The panel itself follows the file-health drawer: fixed header and primary action outside the scroll container, a health lede, a hairline fact grid, and the member and neighbour lists behind a `CollapsibleSection` each. Everything used to be expanded, so the figure that answers "is this area in trouble" sat one screen above thirty member rows. Stops being a cul-de-sac: "Talks to" rows navigate (they had no onClick at all), flagged members link to the page that explains the flag, and the file inspector gained Health / History / Decisions / Dead code, each hidden unless the node carries that signal. Fourteen `?view=graph` links across the app pointed at an alias for Communities, where language colouring paints nothing; they now land where their labels promise. Coverage state and real top-contributors were cut with reasons recorded: absence of coverage means "unknown", not "untested", and there is no per-(file, author) table to tally.
…to one
Entering a community drew it as a small ball off-centre with most of the
canvas empty, and drew only the edges leaving the group. Two separate causes.
The seed partitions nodes by community_id and rings the centroids. A slice is
one community by definition, so every member shared an id and landed in one
small disc while the one-hop boundary stubs, which carry their own real ids,
were strewn across the rest of the ring. On a 155-node slice the members
occupied 3.4% of the drawn area. Slices now get their own seed: members fill
the middle as a sunflower, each stub sits on an outer ring at the bearing of
whatever it attaches to, and stubs sharing a bearing are fanned across a band
that grows with how many share it. Same slice: 30.8%. Gated on
boundaryNodeIds, so the constellation and full-graph seeds are unchanged.
The default edge filter was ["import", "crossCommunity"], and "import" was
unreachable: classifyEdge returned it only for an edge with an endpoint
missing from the graph, and those are dropped before they are drawn. So the
default meant cross-community only, which inside a community hid the entire
internal structure. The kind is removed from the palette, the classifier and
the key; the default is {crossCommunity, internal}. On this repo's 1,500-node
graph that goes from 1,052 to 5,027 drawn edges, average degree 3.35.
Also in the chrome around it:
- The header was a bordered panel whose three groups stacked as blocks, so
beside the scope controls it read as a second toolbar. It is one wrapping
row now, with hairlines between groups rather than a box around them.
- All/Hot/Dead moved to the footer beside the node count it changes, and is
withdrawn inside a community, where the slice endpoint returns the whole
community whatever the signal says.
- Path finding and execution flows were two unlabelled glyphs; they are one
named Trace control that states which panel is open.
- "Hide test files" is deleted. It filtered search results and left every
test file drawn.
- Inside a community the key reads the drawn slice instead of the repo-wide
community list, which in API order usually did not include the community
being drawn. It drops Deselect all there, which dimmed the slice you came
to read, gives the faded boundary ring a row, and words the edge kinds for
the scope.
- At repo scope the key paints community swatches with the satellite tint the
canvas actually uses, lists only communities with a node on screen, and
counts the edges shown rather than the edges held.
- Toggling a community re-intersects the filter with what is drawn. An id
left over from a previous graph could make the "everything is on" check
fire on a click that meant hide, un-filtering the canvas instead.
- A found dependency path reports how many of its files this view cannot
draw, and focuses the first one it can.
Opening docs for a file with no wiki page said "No documentation found for this file." over a link to the whole docs tree. That reads as a failure, and it is not one: score_file deliberately returns 0 for a file with no extracted symbols that is neither an entry point nor a hotspot, so roughly half the file nodes in an index have no page by design. Use the same words the file page's own empty state already uses, and offer the file page as the way out. It renders history, health, symbols and graph position for a file with nothing written about it, so it is a real destination rather than a consolation link. The href is passed whether or not a page exists; a host that supplies neither still falls back to browsing.
swati510
approved these changes
Sep 3, 2026
The panel's action changed from expanding a community's members onto the canvas to entering the community, and the prop was renamed with it. The webview still passed the old name, which broke the extension's type check. Its neighbour rows navigate now too, so pass onNeighborSelect through rather than leaving them inert here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Double-clicking a community on the Architecture Map used to blossom its
satellites in place. You could see the file names and do nothing with them.
It now enters the community: the canvas swaps to that community's own file
graph, scoped, with its one-hop neighbours drawn as the edge of the world.
A breadcrumb says where you are, Escape and the crumb both go back up, and
the camera opens out of the hub you clicked rather than cutting to a fresh
frame.
Drawing the slice
The first pass drew it badly, for two reasons that compounded.
The seed partitions nodes by
community_idand puts each community'scentroid on a golden-angle ring. A slice is one community by definition, so
every member shared an id and landed in one small disc, while the boundary
stubs carry their own real ids and were strewn across the rest of the ring.
On a 155-node slice the members held 3.4% of the drawn area. Slices get their
own seed now: members fill the middle as a sunflower, each stub sits on an
outer ring at the bearing of whatever it attaches to, and stubs sharing a
bearing are fanned across a band that grows with how many share it. Same
slice, 30.8%. It is gated on
boundaryNodeIds, which only the slice pathsets, so the constellation and full-graph seeds are untouched.
The default edge filter was
["import", "crossCommunity"], and"import"was unreachable.
classifyEdgereturned it only for an edge with an endpointmissing from the graph, and those are dropped before they are drawn. The
default therefore meant cross-community only, which inside a community hid
the group's entire internal structure and drew only its exits. The kind is
gone from the classifier, the palette and the key, and the default is
{crossCommunity, internal}. On this repo's own 1,500-node graph that is1,052 drawn edges to 5,027, an average degree of 3.35.
Chrome
The header held four separate control regions where every other canvas
surface holds one, and the toolbar's own bordered panel stacked its groups as
blocks, which is what made it read as a second toolbar. It is one wrapping
row now, with hairlines between groups instead of a box around them.
All | Hot | Deadmoved to the footer, beside the node count it changes.It is withdrawn inside a community, where the slice endpoint returns the
whole community whatever the signal says.
named
Tracecontrol that says which panel is open.test file drawn.
The key
Inside a community it reads the drawn slice instead of the repo-wide
community list, which in API order usually did not include the community you
had just entered. It drops
Deselect allthere, which dimmed the slice youcame to read, gives the faded boundary ring a row of its own, and words the
edge kinds for the scope.
At repo scope: community swatches use the satellite tint the canvas actually
paints files with, only communities with a node on screen are listed, and the
count reports the edges shown rather than the edges held. Toggling a
community re-intersects the filter with what is drawn, so an id left over
from a previous graph can no longer make the "everything is on" check fire on
a click that meant hide.
Also
?module=and?community=are one axis, so they are one control: a single"Showing" select, and the module filter removes rather than dims. Neighbouring
communities in the detail panel navigate. The community detail endpoint joins
health, hotspot and dead-code signals, so the panel leads with a health
figure and a plain reading of it instead of a cohesion percentage. Its member
read cap went from 200 to 2,000, which is what made
member_countdisagreewith the community list.
Separately, opening docs for a file with no wiki page said "No documentation
found for this file." over a link to the whole docs tree. That reads as a
failure and it is not one:
score_filereturns 0 for a file with noextracted symbols that is neither an entry point nor a hotspot. The panel now
uses the same words the file page's own empty state uses, and offers the file
page, which renders history, health, symbols and graph position with nothing
written about the file.
Verification
tscand lint clean inpackages/uiandpackages/web; 1,622 ui and 84 webtests pass, including new coverage for the slice seed's degenerate cases (one
member, no stubs, stubs that all hang off one file, cancelling bearings), the
scoped key, and the community-filter intersection;
next buildclean.Checked in light and dark at 2048, 1440, 1200 and 390.