Repository navigation
Closed
Description
Tracks #41. Project-side companion to the home preset gallery (#77 / #96 / #150). Fills the project-context "what is this codebase" axis.
Status: shipped via #175 (merged)
The shipped layout diverges from the original Composition section below. See Final layout for what actually landed.
Final layout
Frame around a centred identity block, not the splash-y hero originally drafted:
- Identity (centre) —
git_repo_namefiglet viatext_ascii(blocks, quadrant) +git_age(Text,format = "full") +code_loc(Text) summary. - Top row —
code_loc(Bars)list_ranking("Lines of code") |git_age(Entries)grid_table("Project age") |code_comments(Bars,unit = "loc")list_ranking("Comment density"). All capped at 4 rows so the strip reads uniformly. - Title row sides —
code_files(Bars)list_rankingleft | figlet centre |code_largest_files(Bars)list_rankingright. - Bottom row —
git_churn(Bars)list_ranking|code_todos(TextBlock)list_plain(location list, gets the wider 2/4 slot) |code_todos(Bars)list_ranking(TODO hotspots — same scan, per-file count).
Renderer improvements that landed alongside the preset to make tiles fill cells properly:
chart_barexposes a newbar_gapoption; horizontal bars default tobar_gap = 0(was effectively 1, leaving blank rows between bars).list_rankingstretches the label column to the cell width and truncates overlong labels with…so the value column never gets clipped.grid_tablesizes the key column to the widest key + Fill(1) for the value, and right-aligns values by default.
Deltas from original Composition
- Hero —
code_language_logo(image) dropped: the half-block fallback didn't read on terminals without sixel/kitty/iTerm2 image protocols, and the original spec's "figlet/ASCII fallback" never materialised in the fetcher (which was Image-only). Replaced with the project-name figlet which works everywhere. chart_barper-language LOC — replaced withlist_ranking(text-first ranking; the bar visual added little in narrow tiles and Rust-dominant repos collapsed the other bars to invisible).git_commits_activityheatmap — dropped: overlaps withproject_github, which already covers commit cadence.git_contributors— dropped: same reason —project_githubcovers it.code_language_logohero — see above.
The spec's body 5 — hotspots (code_largest_files + code_todos) survived, expanded into the title-row right side panel + bottom-row TODO list and TODO hotspots.
Definition of Done
-
src/templates/project_codebase.tomladded (feat(templates): add project_codebase preset (#164) #175) - Registered in
src/templates/mod.rs::TEMPLATESunderTemplateContext::Project(feat(templates): add project_codebase preset (#164) #175) - Listed on the docs-site Presets page with rendered HTML via
cargo xtask(feat(templates): add project_codebase preset (#164) #175) - Install picker (feat: "splashboard install" — one-shot setup (rc wiring + starter config from template) #58) shows it in the project slot — automatic via
for_context(TemplateContext::Project) - All four
templates::tests(parse / fetcher-known / renderer-known / renders-without-panic) green for the new template
Widgets
Flat status list — every widget the preset uses, shipped or not.
-
code_todos(shipped feat(fetcher): add code_todos #114) -
git_contributors(not used in final layout — see Deltas) -
git_commits_activity(not used in final layout — see Deltas) -
code_loc(shipped feat(fetcher): addcode_locfor tracked-line counts per language #167) -
code_files(shipped feat(fetcher): add code_files — top-level-dir ranking + headline file count #170) -
code_largest_files(shipped feat(fetcher): add code_largest_files for refactor-candidate hunting #171) -
code_language_logo(shipped feat(fetcher): add code_language_logo for repo-language Devicon hero #169 — not used in final layout, see Deltas) -
git_age(shipped feat(fetcher): addgit_agefor repository age from first commit #165) -
git_churn(shipped feat(fetcher): add git_churn and enforce single-shape renderers #166) -
code_comments(added during feat(templates): add project_codebase preset (#164) #175 fixture work)
Out of scope
- Publish-side stats (
npm_downloads/crates_downloads/pypi_downloads/package_release/oss_*). Tracked under meta: fetcher roadmap - Coding & Build #64; not all repos publish a package, so they don't earn a preset slot. Power users add them per-dir as standalone widgets. - Smart preset behaviour (e.g. auto-add
crates_downloadsifCargo.toml [package]exists). Out of scope for v1; preset is a static layout. - New renderer primitives.
text_ascii/text_plain/chart_bar/grid_table/list_ranking/list_plaincover the layout. rubygems_downloads(currently missing from meta: fetcher roadmap - Coding & Build #64 alongside the existing npm/cargo/pypi entries) — orthogonal gap, leave to a separate housekeeping pass.
Activity
feat(fetcher): add `git_churn` and enforce single-shape renderers
feat(fetcher): add `git_churn` and enforce single-shape renderers
feat(fetcher): add `git_churn` for top-changed files in last N days
feat(fetcher): add code_files — top-level-dir ranking + headline file…
feat(templates): add project_codebase preset
Merge pull request #175 from unhappychoice/feat/template-project-code…
unhappychoice commentedon Apr 27, 2026
Shipped via #175 (merged 848b9c5).