Add multi-repo garden windowsill view (#8) - #18
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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— newReadAt(dir, author, window)reads a specific repo directory;Readnow delegates to it. Each repo defaults to its owngit config user.email, so per-repo author filtering is preserved (acceptance criterion). AddsRepoName()for cell labels.internal/render—Garden([]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, withAddGardenRepos/RemoveGardenRepos(absolutize + de-dup).cmd/garden.go—commit-sprout garden [paths...],--scan <dir>(one-level parent scan), saved-set fallback,--add/--remove/--listmanagement,--author/--window. Read-only render: it never mutates any repo's remembered plant state.Acceptance criteria (#8)
--add/saved set and--scancommit-sprout gardenrenders one small plant per repo side by side (the "windowsill" variant)user.email;--authoroverrides)Example
Resolution order
explicit path args →
--scan <dir>→ saved set.Testing
gofmt -lclean,go vet ./...clean,go build ./...ok,go test ./... -race -count=1green (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.