✅ fresh
last synced 2026-10-20T11:44:45.791774+00:00 · coverage 100% (
site-impact-view)Validation by Beadloom
doc_sync— same source assync-check.
Impact view (component)
A slice of the features layer of the VitePress site's Feature-Sliced layout. The layout and the layer rule are described in the site's page.
Source: src/beadloom/site_scaffold/.vitepress/theme/features/impact-view/
Overview
The impact mode: everything a change to the selected node reaches, without a depth limit. The toolbar's Impact button switches between it and the neighbourhood. The walk goes from the selected node to what depends on it, then to what depends on those, and so on. Each reached node is drawn in the ring of its fewest steps: the selection is ring 0, direct dependents ring 1, and every distance from the last tone on shares that tone. Which end of an edge depends on the other is the mode's table (site-graph-edges, site-landscape-data), so one walk serves both modes.
- Architecture (
lib/impact.js). The walk goes backwards alongdepends_on,usesandconsumes. The summary gives the count, the rings, the domains and services that hold the reached nodes, each layer boundary the walked edges cross with a count, and the risky nodes: no bound tests, stale docs, docs not checked, open findings. Since BDL-080 a boundary is keyed by layer, the pair (rule, rank), so two rules' ranks are never one boundary. Itsfromandtoare the layers' captions, which name the rule by its title where more than one rule is drawn, and the boundaries are listed in the layers' order: every rule's top to bottom, the rules in the file's order. The commands to copy arebeadloom why <ref>and, when the node has a source,beadloom impact <source>. - Landscape (
lib/contractImpact.js). The walk goes along each contract from its producer to its consumers, for every protocol, so a change reaches the consumers of what a service produces and never its producers. The summary gives the count, the rings, the contracts crossed, their protocols, the broken contracts on the path, and each reached service with a broken or unverified contract. The commands to copy arebeadloom why <ref>andbeadloom ctx <ref>:impacttakes a path or a symbol, and a service on the map has neither.
Both summaries open with the statement that this is the graph's view and not a reading of the code: the architecture follows edges from imports and declarations, the landscape the contracts the reconciler recorded. A click on a node in the risk list selects it.
Public API
impactOf(focus, dependents)returns{ distances, edges }: each reached node by its fewest steps, and the edges walked.impactSummary(focus, impact, { nodeById, parents, layers, edges })andDEPENDENCY_WALK.contractImpactSummary(focus, impact, { edges, contracts })andCONTRACT_WALK.IMPACT_VIEW,ringOf(distance). The ring tones,RING_TONES, are read fromsite-shared'stheme-tokenssince BDL-080 S2a, where the viewer's stylesheet and the impact summary's legend both read them; this slice no longer exports them.ImpactButton(Vue component): propactive, eventtoggle.ImpactSummary(Vue component): propssummaryandsource, eventselect(id).
Depends on
site-graph-nodes,site-graph-edges,site-layers,site-landscape-data(entities).site-shared, forbreadthFirst,shellQuote,RING_TONESand the theme variables of the ring swatches, andCopyCommand.
Tests
src/beadloom/site_scaffold/e2e/impact.spec.js on the architecture: the rings and the summary, each risky node marked and listed, the statement and the two commands, the rings drawn in real colours and removed on leaving the mode, and each doc status listed as its risk. src/beadloom/site_scaffold/e2e/landscape-impact.spec.js on the landscape: every service reached however far, consumers and never producers, the contracts, protocols and broken ones on the path, the services at risk, and, on the landscape the portal serves, a producer reaching its consumer. The landscape cases grow the served landscape from a seeded contract, so five of the six run on a project whose own landscape is empty; the sixth needs a contract the portal serves and skips, naming that shape, where there is none.