Module dashboard
Expand description
Dashboard-specific analyses: the parameterised SQL queries that feed the single-file SPA dashboard’s widgets.
These mirror the per-analysis modules elsewhere in analyses/ — each
is a parameterised SQL query over the already-ingested fact store that
returns a row struct. They live here rather than in the output layer
because a query failure is an analysis failure (exit code 4), not an
output/I/O failure. The row structs they return are serialised into the
SPA JSON payload by output::spa.
Structs§
- Clone
Summary - Per-file clone overlay row: how many distinct clone groups touch the path. Surfaced as a colour-mode toggle on the hotspot circle-pack so users can see structural-duplication hotspots overlaid on the same file layout they already know from the cognitive / author / AI modes.
- Daily
Commit - One day’s commit count for the calendar heatmap.
- Import
Edge Row - One resolved import edge for the architecture force-graph widget.
- Kamei
Risk Row - Per-commit Kamei JIT-SDP feature row for the Delivery Risk
Sparkline widget. Drops the merge-commit subset (their Kamei
vectors are 0 by design — see
gix_repo.rs::changed_files_for_commit) and the date-null fringe. - Trend
Point - One (month, path, score) point in the trends multi-line.
- XRay
Entry - One function in the X-Ray sunburst.
Functions§
- run_
clone_ summary - Per-file clone-group counts from the
clonestable. Empty result when no clone groups exist (small repo, no Tier-1 sources, ormin_clone_node_countfiltered everything out at ingest time). One row per path that appears in ≥ 1 clone family — files with zero clone groups are dropped so the payload stays compact. - run_
daily_ commits - Per-day commit counts for the calendar heatmap (W10). Returns one row per day with at least one commit, sorted by date ascending.
- run_
imports_ for_ arch_ graph - Pull every resolved import edge from the
importstable. Only resolved edges (wheretarget_pathis non-NULL) participate so the SPA graph reflects the dependency surfaceCodeLorecan actually visualise. - run_
kamei_ risk - Pull the last-N non-merge commits with their Kamei JIT-SDP feature vector for the Delivery Risk Sparkline widget. Returns rows in chronological order (oldest → newest) so the widget can render left-to-right as a calendar-time bar series.
- run_
trends - Build a per-(month, path) trend series restricted to
pathsfor the trends multi-line widget (W9). The score per (month, path) is the count of revisions that touched the path during the month. Emptypathsreturns an empty Vec — the widget renders nothing. - run_
xray - Aggregate function-level cognitive complexity per (path, function)
from the
complexity_metricstable for the X-Ray sunburst (W8). Returns at mostlimitrows ordered bycognitive DESC, since the sunburst becomes unreadable past a few hundred functions and the JSON payload would blow up on monorepos otherwise.