Skip to content

Add multi-repo garden windowsill view (#8) - #18

Merged
rwrife merged 1 commit into
mainfrom
issue-8-multi-repo-garden
Jul 7, 2026
Merged

rwrife merged 1 commit into
mainfrom
issue-8-multi-repo-garden

Conversation

@rwrife

@rwrife rwrife commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Closes #8

Adds commit-sprout garden: a multi-repo windowsill that renders a row of small plants, one per repository, so you can see commit cadence across several projects at a glance.

What's here

  • internal/gitstat — new ReadAt(dir, author, window) reads a specific repo directory; Read now delegates to it. Each repo defaults to its own git config user.email, so per-repo author filtering is preserved (acceptance criterion). Adds RepoName() for cell labels.
  • internal/renderGarden([]GardenPlant, Options) lays out cells side by side, wrapping rows to terminal width, with ANSI-aware width measurement so colored and plain cells pad to the same geometry (columns always line up). Reuses the existing per-stage/health art.
  • internal/store — persists a saveable garden repo set (garden_repos), fully additive/backward-compatible, with AddGardenRepos/RemoveGardenRepos (absolutize + de-dup).
  • cmd/garden.gocommit-sprout garden [paths...], --scan <dir> (one-level parent scan), saved-set fallback, --add/--remove/--list management, --author/--window. Read-only render: it never mutates any repo's remembered plant state.

Acceptance criteria (#8)

  • Config lists multiple repo paths (or a parent dir to scan) — --add/saved set and --scan
  • commit-sprout garden renders one small plant per repo side by side (the "windowsill" variant)
  • Per-repo author filtering still applies (each repo uses its own user.email; --author overrides)

Example

foo                  bar
   \|/                  ,
    |                  /|
   _|_                ' |
  (   )                _|_
   '-'               (   )
seed/healthy          '-'
no commits yet     leafy/healthy
                   today (2026-07-06)

Resolution order

explicit path args → --scan <dir> → saved set.

Testing

gofmt -l clean, go vet ./... clean, go build ./... ok, go test ./... -race -count=1 green (new tests in gitstat/render/store/cmd covering row packing, wrap-at-width, ANSI-safe padding, add/remove/round-trip persistence, scan/precedence). Manually smoke-tested add/remove/list/render + color alignment + bad-path skip.

README updated with a Garden section and roadmap note.

Render a row of small plants, one per repository, so cadence across
several projects is visible at a glance.

- gitstat.ReadAt(dir, author, window) reads a specific repo (Read now
  delegates to it); each repo defaults to its own git user.email so
  per-repo author identity is preserved. Adds RepoName() for labels.
- render.Garden([]GardenPlant, Options) lays out cells side by side,
  wrapping rows to terminal width, with ANSI-aware column padding so
  colored and plain output align identically.
- store persists a saveable garden repo set (garden_repos, additive and
  backward-compatible) with Add/RemoveGardenRepos helpers.
- cmd/garden: 'commit-sprout garden [paths...]', --scan <dir>, saved-set
  resolution, --add/--remove/--list management, --author/--window, and a
  read-only render (never mutates per-repo plant state).
- Tests across gitstat/render/store/cmd; README documents the feature.
@rwrife rwrife mentioned this pull request Jul 6, 2026
4 tasks
@rwrife
rwrife merged commit 6152924 into main Jul 7, 2026
1 check passed
@rwrife
rwrife deleted the issue-8-multi-repo-garden branch July 7, 2026 09:02
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.

[feature] Multi-repo garden

1 participant