Skip to content

Full UI revamp: treemap + panels + notify watcher + Nord palette#5

Merged
singaraiona merged 1 commit intomainfrom
feat/ui-vitrine
May 1, 2026
Merged

Full UI revamp: treemap + panels + notify watcher + Nord palette#5
singaraiona merged 1 commit intomainfrom
feat/ui-vitrine

Conversation

@singaraiona
Copy link
Copy Markdown
Contributor

Summary

Rebuilds the live UI as the project's vitrine. Same data the scanner already produces — denser presentation, cohesive Nord palette, real-time filesystem-driven updates.

Highlights

  • Squarified treemap sized by file lines, 10 color modes (language / mono / lines / churn / age / risk / instability / author / bus / test_gap), bezier connectors anchored on rect borders with per-edge-type lane offsets.
  • Dense left panel — temperature-colored Quality / 100, six dimensions on a unified N / 100 scale with grade letters, Architecture summary, Evolution summary, Unstable Modules, Cycles list (click to highlight), 220x160 main-sequence scatter (A vs I with the diagonal labelled).
  • Coupling ribbons toggle — curved magenta arcs between change-coupled file pairs.
  • Function-level drill-in — double-click a tile, see a sub-treemap of that file's functions sized by cyclomatic complexity. Esc to close.
  • DSM heatmap in the bottom panel.
  • Filesystem watcher via notify (added to deps, replaces the polling interval). Debounced 150 ms, ignores target / .git / node_modules / .raysense. The --interval flag is gone.
  • Metric consolidationquality_signal dropped from the CLI text output and the left panel. Everything user-visible is now N / 100. Internal data structures keep the field for back-compat.
  • Nord palette end-to-end (polar-night surface, frost blues for system langs, aurora warm tones for accents).
  • Bug fix<svg id="zoom" hidden> wasn't getting display:none from the HTML [hidden] attribute, so the dim overlay was permanently dimming every tile below it. Fixed with an explicit CSS rule.

Numbers

  • 2 files changed, +1066 / -464 lines.
  • 1 dep added: notify = "8".
  • Tests: 123/123, no warnings, fmt clean.

Test plan

  • CI: cargo fmt --check && cargo test.
  • cargo run -q -- . — text output is uniform N / 100, no quality_signal.
  • cargo run -q -- . --uihttp://localhost:7000/ — Nord theme, treemap renders bright, click a tile, click a cycle, double-click for drill-in, toggle coupling ribbons.
  • cargo run -q -- . --watch — only re-runs on real file changes (touch a source file to verify).

Replaces the flex-grid file display with a real architectural-telemetry
dashboard. Same data, much denser presentation, and the UI is now the
project's vitrine rather than a placeholder.

Layout:
- Header with project name + toolbar (color / focus / edge / show edges /
  coupling ribbons).
- Left panel: Quality (temperature-colored number + bar + sparkline),
  six A-F dimensions on a unified `N / 100` scale, Architecture summary,
  Evolution summary, Unstable Modules table, Cycles list, and a 220x160
  main-sequence scatter (instability vs. abstractness, with the A+I=1
  diagonal labelled).
- Centre: SVG squarified treemap. Tile area = lines, fill = selected
  color mode (10 modes total: language / mono / lines / churn / age /
  risk / instability / author / bus / test_gap). Click → detail panel
  with full per-file telemetry; double-click → function-level treemap of
  that file (rects sized by cyclomatic complexity, Esc to close).
- Bezier connectors anchored on the closest rect borders, per-edge-type
  lane offsets so imports / calls / inherits don't overlap, stroke width
  reserved for future per-edge multiplicity. Coupling ribbons toggle
  draws curved magenta arcs between change-coupled file pairs.
- Bottom: collapsible tables — Module DSM heatmap, Module Edges,
  Hotspots, Rules, Complex Functions, Test Gaps.

Reactivity:
- Filesystem watcher via the `notify` crate (added to deps). The
  background scan task only re-runs when a real file changes, debounced
  150 ms; events inside target / .git / node_modules / .raysense are
  ignored. The `--interval` flag is gone — there's nothing to tune.
- SSE on /events still drives in-place page reloads when the snapshot
  hash changes.

Metric consolidation:
- Dropped `quality_signal` from the CLI text output and the left panel.
  Score / 100, coverage / 100, structure / 100, plus the six dimensions
  also scaled to / 100 with an inline grade letter. JSON / SARIF / trend
  recording keep the field for back-compat with existing consumers.

Theme:
- Nord palette throughout (polar-night backgrounds, snow-storm text,
  frost cool blues for system languages, aurora warm tones for accents).
  Cohesive saturation and lightness so the treemap reads as one theme.
- Dark webkit-scrollbar styling so the panels don't break the dark
  surface.

Bug fix:
- `<svg id="zoom" hidden>` was rendering as `display:block` (the HTML
  `[hidden]` attribute isn't honoured on SVG by the user-agent
  stylesheet). The 92%-opaque dim overlay was therefore sitting on the
  treemap permanently, dimming every fill below it. Fixed with an
  explicit `.zoom-overlay[hidden]{display:none}` rule.

CLI help text for --watch updated to reflect the notify watcher.
@singaraiona singaraiona merged commit d57ae5f into main May 1, 2026
1 check passed
@singaraiona singaraiona deleted the feat/ui-vitrine branch May 1, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant