Skip to content

feat: add interactive visualization command (fallow viz)#33

Open
BartWaardenburg wants to merge 1 commit intomainfrom
feat/interactive-codebase-visualization
Open

feat: add interactive visualization command (fallow viz)#33
BartWaardenburg wants to merge 1 commit intomainfrom
feat/interactive-codebase-visualization

Conversation

@BartWaardenburg
Copy link
Copy Markdown
Collaborator

Summary

  • Add fallow viz subcommand that generates a self-contained HTML file with treemap and graph views
  • Treemap: nested Canvas treemap with squarify algorithm, color-coded by status, click-to-drill-down, search, dark mode
  • Graph: d3-force layout with directory/Louvain clustering, filter buttons, hover highlights, pan/zoom
  • Output formats: HTML (default, opens browser), DOT, Mermaid
  • Frontend built with Rolldown (Oxc ecosystem), vanilla TypeScript + d3-force/zoom + graphology-louvain

Rebased from #18.

Test plan

  • cargo run -- viz generates HTML and opens in browser
  • Treemap drill-down and breadcrumb navigation work
  • Graph view clustering toggle and filters work
  • DOT and Mermaid output formats generate valid output
  • Dark mode toggle works in both views

🤖 Generated with Claude Code

Add `fallow viz` subcommand that generates a self-contained HTML file with:

Treemap view:
- Nested Canvas treemap with squarify algorithm
- Files colored by status (blue=clean, amber=unused exports, red=unused, green=entry)
- Click-to-drill-down with breadcrumb navigation
- Hover tooltips with file details and unused export names
- Search, dark mode, keyboard navigation

Graph view:
- d3-force layout with directory-based and Louvain import-based clustering
- Opacity modulation (issues bright, clean dimmed)
- Glow + dashed borders on problem nodes
- Filter buttons (All/Unused/Issues)
- Cluster toggle (Directory/Imports)
- Hover highlights node neighborhood with labels
- d3-zoom for smooth pan/zoom

Output formats: HTML (default, opens browser), DOT, Mermaid

Frontend built with Rolldown (Oxc ecosystem), vanilla TypeScript + d3-force/zoom + graphology-louvain.
@github-actions
Copy link
Copy Markdown
Contributor

🌿 Fallow

⚠️ 2 dead code · ✅ Duplication · ✅ Complexity

Dead code (2 issues)
Category Count
Unused dependencies 2
Metric Value
Dead exports 44.4%
Avg complexity 1

Tip

Run fallow fix --dry-run to preview auto-fixes. Add /** @public */ above exports to preserve them.
See inline review comments for per-finding details.

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fallow Allocations

Details
Benchmark suite Current: 2d7c7dc Previous: 93867ff Ratio
Total Bytes Allocated 3036870 bytes 3031062 bytes 1.00
Total Allocations 11957 allocations 11945 allocations 1.00
Peak Memory 422082 bytes 420734 bytes 1.00
Peak Allocations 3878 allocations 5168 allocations 0.75

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fallow Binary Size

Details
Benchmark suite Current: 2d7c7dc Previous: 93867ff Ratio
Binary Size (fallow) 122352176 bytes 120895224 bytes 1.01

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fallow Benchmarks

Details
Benchmark suite Current: 2d7c7dc Previous: 93867ff Ratio
parse_single_file 39342 ns/iter (± 197) 45718 ns/iter (± 1433) 0.86
full_pipeline_10_files 959723 ns/iter (± 13443) 1134386 ns/iter (± 13178) 0.85
full_pipeline_100_files 1956124 ns/iter (± 20472) 2508647 ns/iter (± 60862) 0.78
full_pipeline_1000_files 11430520 ns/iter (± 155832) 15023901 ns/iter (± 247282) 0.76
resolve_re_export_chains 95989 ns/iter (± 2867) 100273 ns/iter (± 375) 0.96
cache_round_trip 2786 ns/iter (± 14) 1973 ns/iter (± 18) 1.41
dupe_detect_2x500_identical 161257 ns/iter (± 9645) 205327 ns/iter (± 5285) 0.79
dupe_detect_2x2000_identical 732251 ns/iter (± 6462) 914681 ns/iter (± 8636) 0.80
dupe_detect_10x500_identical 1513312 ns/iter (± 14922) 1709302 ns/iter (± 35970) 0.89
dupe_detect_50x200_diverse 462024 ns/iter (± 16295) 530777 ns/iter (± 12876) 0.87
dupe_detect_100x200_mixed 3443195 ns/iter (± 44195) 4235683 ns/iter (± 38499) 0.81
dupe_detect_2x5000_identical 2011548 ns/iter (± 5157) 2536583 ns/iter (± 6925) 0.79

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Fallow Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.10.

Benchmark suite Current: 2d7c7dc Previous: 93867ff Ratio
cache_round_trip 2786 ns/iter (± 14) 1973 ns/iter (± 18) 1.41

This comment was automatically generated by workflow using github-action-benchmark.

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