Repository navigation
feat(fetcher): add code_largest_files for refactor-candidate hunting - #171
Conversation
Ranks the largest tracked source files in the discovered git repo. Walks the `gix` index via the shared `for_each_tracked_file` helper, so untracked / `.gitignore`-d files plus committed-vendored trees, lockfiles, and binaries are skipped automatically. Seven shapes from one read: - `Text` headlines the single biggest file (`"src/render/mod.rs (1,234 LOC)"`) - `TextBlock` / `MarkdownTextBlock` / `Entries` / `Bars` carry the per-file ranking - `NumberSeries` sketches the size distribution - `Badge` flags whether the repo holds a refactor-candidate-sized file (`tidy` / `big` / `bloated` / `monster`) — separate health signal from `code_loc`'s repo-total tier Options: `metric = "loc" | "bytes"` (LOC default suits refactor hunting; bytes suits asset-weight audits) and `limit` (default 10). Lands the body 5 "hotspots" slot of the upcoming `project_codebase` preset (#164). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughA new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #171 +/- ##
==========================================
+ Coverage 78.53% 78.58% +0.05%
==========================================
Files 131 132 +1
Lines 24889 25244 +355
==========================================
+ Hits 19546 19839 +293
- Misses 5343 5405 +62
🚀 New features to boost your workflow:
|
Summary
code_largest_files— ranks the largest tracked source files in the discovered git repo. Walks thegixindex via the sharedfor_each_tracked_filehelper, so untracked /.gitignore-d files plus committed-vendored trees, lockfiles, and binaries are skipped automatically.Text(headline),TextBlock/MarkdownTextBlock/Entries/Bars(per-file ranking),NumberSeries(size distribution),Badge(refactor-candidate tier —tidy/big/bloated/monster).project_codebasepreset (feat(templates): add project_codebase preset — repo personality / analytics #164). Sub-issue: meta: fetcher roadmap - Local / System #62.Reference page
Mirrors what
https://splashboard.unhappychoice.com/reference/fetchers/code/code_largest_fileswill show after the docs site rebuilds.text,text_block,markdown_text_block,entries,bars,number_series,badgeOptions
metricloc|bytesloc(text line count, binaries skipped) orbytes(raw file size). LOC suits refactor-candidate hunting; bytes suits asset-weight audits.limitTextBlock/MarkdownTextBlock/Entries/Bars/NumberSeries). TheTextheadline always names just the single largest file.Compatible renderers
texttext_plain,text_ascii,animated_*text_blocklist_plain,animated_*markdown_text_blocktext_markdownentriesgrid_table,animated_*barschart_bar,chart_pie,list_ranking,animated_*number_serieschart_histogram,chart_sparkline,animated_*badgestatus_badge,animated_*Test plan
cargo fmt --all -- --checkcargo clippy --all-targets -- -D warningscargo test(985 passed)cargo run --bin splashboard -- catalog fetcher code_largest_files— all 7 shapes + options + compatible renderers listedText/Entries(default +metric = "bytes") /Bars(chart_bar) /Badgewidget configurations🤖 Generated with Claude Code
Summary by CodeRabbit