Skip to content

feat(web): The Grove — contributor graph, leaderboard, VN i18n & fonts (v0.9.0)#11

Merged
rumitvn merged 2 commits into
mainfrom
feat/grove
Jun 6, 2026
Merged

feat(web): The Grove — contributor graph, leaderboard, VN i18n & fonts (v0.9.0)#11
rumitvn merged 2 commits into
mainfrom
feat/grove

Conversation

@rumitvn

@rumitvn rumitvn commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Phase 6 — "The Grove" 🎋

Turns the dashboard's team-memory data into an Obsidian-style second brain: the repo trunk, its branches, and the contributors who grew it — plus a "best contributor" leaderboard, a full Vietnamese localization, and a Vietnamese-friendly type system.

Built on the realization that contributor identity already lives in the committed .tre-mem/ JSONL (author, set at tre share/graduate time) — so no schema migration was needed.

What's new

  • Grove tabd3-force + hand-rolled canvas graph. Nodes: root/trunk, branches, contributors, facts (pins = young shoots, graduated = mature culms). Bamboo palette from theme tokens (light/dark aware). Hover tooltips; click a branch/fact to drill into Branch detail, click a contributor to highlight their shoots.
  • Contributor leaderboard — weighted value score (pins ×1, graduated ×3) + badges/streaks: Gardener of the week, Most rooted, Longest streak, First sprout.
  • Shareable grove card — one-click canvas → PNG with the tre-mem wordmark.
  • Growth time-lapse — scrub/replay how the grove grew over time.
  • Solo/unshared fallback — backfills contributors from git log authors so a fresh repo is never empty (?fallback=git, flagged git-fallback).
  • i18n — EN ⇄ VI toggle (persisted, auto-detects VN browsers), with a deliberately casual/fun Vietnamese voice across every surface; localized timeAgo.
  • Type system — Baloo 2 (cute rounded display) + Be Vietnam Pro (VN-native body) with VN-capable system fallbacks; fixes the diacritic stacking the old serif had on "vườn".
  • Bug fix.shell grid had 3 children but only 2 rows, so the nav ballooned on low-content pages; now auto auto 1fr.

Surfaces / files

  • Backend: src/sync/read.ts (read-only JSONL reader), src/web/grove.ts (pure aggregators + graph builders + badges), branchAuthors() in src/git/identity.ts, two routes in src/web/api.ts.
  • Frontend: web/i18n.tsx, web/views/{Grove,Leaderboard,GraphCanvas,ShareCard}.tsx, Grove tab in web/app.tsx, Overview promo banner, fonts in scripts/build-web.mjs + web/styles.css.
  • New runtime dep: d3-force (sim only, ~13 kb bundled). Fonts load from Google Fonts CDN.

Test plan

  • pnpm format:check && lint && typecheck && test && build — all green
  • 326 tests (+9 new: test/sync-read.test.ts, test/web-grove.test.ts) — covers value-score weighting, null-author bucketing, badges, graph shape, empty case
  • Live-verified /api/contributors + /api/graph against this repo (real author, 13-node graph)
  • Manual: Grove renders + drills in; EN/VI toggle flips the whole dashboard; share-card PNG; time-lapse; git-fallback on an unshared repo
  • Reviewer: skim the Vietnamese copy in web/i18n.tsx for tone/typos

🤖 Generated with Claude Code

v-rumnv and others added 2 commits June 7, 2026 02:00
Phase 6 "The Grove": a second-brain view of the repo's shared memory plus a
full Vietnamese localization and a Vietnamese-friendly type system.

- Grove tab: d3-force + canvas graph (root/trunk + branches + contributors +
  facts), bamboo-themed, hover/click-to-drill into Branch detail.
- Contributor leaderboard with weighted value score (pins x1, graduated x3) and
  playful badges/streaks (Gardener of the week, Most rooted, Longest streak,
  First sprout).
- Shareable grove card (canvas -> PNG) and a growth time-lapse scrubber.
- Solo/unshared fallback: contributors backfilled from `git log` authors.
- New read-only endpoints /api/contributors and /api/graph, fed by a read-only
  .tre-mem/ JSONL reader (author already lives in the committed JSONL — no
  schema migration).
- i18n: EN/VI toggle (persisted, auto-detect), casual/fun Vietnamese voice
  across every surface; localized timeAgo.
- Type system: Baloo 2 (cute rounded display) + Be Vietnam Pro (VN-native body)
  with VN-capable system fallbacks; fixes diacritic stacking on the old serif.
- Fix: .shell grid had 3 children but 2 rows — the nav row ballooned on
  low-content pages. Now `auto auto 1fr` so main absorbs the slack.

Tests: sync-read + web-grove (pure aggregators + HTTP). 326 passing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts:
#	CHANGELOG.md
#	web/styles.css
@rumitvn rumitvn changed the title feat(web): The Grove — contributor graph, leaderboard, i18n & VN fonts (v0.8.0) feat(web): The Grove — contributor graph, leaderboard, VN i18n & fonts (v0.9.0) Jun 6, 2026
@rumitvn

rumitvn commented Jun 6, 2026

Copy link
Copy Markdown
Owner Author

Merged latest main (the v0.8.0 bamboo green identity) into this branch and resolved the conflicts:

  • Version bumped to v0.9.0 — bamboo identity took v0.8.0, so Grove moves to 0.9.0 (package.json + src/version.ts, CHANGELOG split into ordered [0.9.0] + [0.8.0] entries).
  • Brand token migration — bamboo renamed --bark--bamboo (and --bark-ink--bamboo-deep); migrated every Grove reference (CSS + GraphCanvas + ShareCard + Overview spine) so the graph/leaderboard now use the jade palette.
  • web/styles.css header + .lede em (kept font-style: normal since Baloo 2 has no italic, recolored to --bamboo) and CHANGELOG.md were the two real conflicts; app.tsx auto-merged cleanly (BambooMark + i18n coexist).

Full gate green locally: format, lint, typecheck, 326 tests, build.

@rumitvn rumitvn merged commit 83a07c5 into main Jun 6, 2026
2 checks passed
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.

2 participants