feat(activity): implement Contribution sparkline with + and - labels #304

Merged
fuzzy merged 1 commit from phase03-contribution-sparkline into main 2026-07-07 10:14:45 +00:00
Owner

What

Add ContributionSparkline() completing Phase 3 (all sparkline types).

Format

+ Additions ⢀⢂⣄⣆...
- Deletions ⢀⢂⢄⣄...
  • Uses existing BrailleSparkline() for single-series rendering
  • + prefix for additions, - prefix for deletions
  • Returns two lines: one for additions, one for deletions
  • Empty window returns + Additions no data\n- Deletions no data

Completed

# Task Status
#204 Core Braille renderer ✓ PR #300
#207 PR sparkline ✓ PR #302
#210 Issue sparkline ✓ PR #302
#214 Contribution sparkline ✓ This PR

Phase 3 is now fully complete. Next: Phase 4 (Activity View Coordinator).

References: #214, #211, #212, #213

Testing

  • 2 new subtests: empty window, two-day data (both lines checked separately)
  • 33 total subtests in activity package
  • golangci-lint run ./internal/activity/ — 0 issues
  • go test ./... — all pass
## What Add `ContributionSparkline()` completing Phase 3 (all sparkline types). ### Format ``` + Additions ⢀⢂⣄⣆... - Deletions ⢀⢂⢄⣄... ``` - Uses existing `BrailleSparkline()` for single-series rendering - `+` prefix for additions, `-` prefix for deletions - Returns two lines: one for additions, one for deletions - Empty window returns `+ Additions no data\n- Deletions no data` ### Completed | # | Task | Status | |---|------|--------| | #204 | Core Braille renderer | ✓ PR #300 | | #207 | PR sparkline | ✓ PR #302 | | #210 | Issue sparkline | ✓ PR #302 | | #214 | Contribution sparkline | ✓ This PR | **Phase 3 is now fully complete.** Next: Phase 4 (Activity View Coordinator). References: #214, #211, #212, #213 ## Testing - [x] 2 new subtests: empty window, two-day data (both lines checked separately) - [x] 33 total subtests in activity package - [x] `golangci-lint run ./internal/activity/` — 0 issues - [x] `go test ./...` — all pass
feat(activity): implement Contribution sparkline with + and - labels
All checks were successful
Test and Release / test (pull_request) Successful in 3m39s
Test and Release / lint (pull_request) Successful in 4m27s
5b6478e585
- ContributionSparkline(): renders additions and deletions as two
  separate Braille sparkline lines with + Additions / - Deletions
  labels, using + and - symbols for differentiation
- 2 new tests: empty window, two-day data with both lines verified

This completes Phase 3 (all sparkline types implemented).

Ref: #214, #211, #212, #213
fuzzy added this to the Steeper project 2026-07-07 10:08:26 +00:00
fuzzy self-assigned this 2026-07-07 10:08:28 +00:00
fuzzy scheduled this pull request to auto merge when all checks succeed 2026-07-07 10:14:16 +00:00
the.auditor left a comment

Review

Result: Approved — no blocking issues.

Summary: Adds ContributionSparkline() completing Phase 3. Returns two-line sparkline (+ Additions / - Deletions) using existing single-series BrailleSparkline. Empty window returns "no data" for both lines. ROADMAP2.md updated — Phase 3 fully complete.

Non-blocking:

  • #305 — Add godoc for exported ContributionSparkline

Checklist:

  • Correctness: Correctly uses BrailleSparkline for each series, format matches spec
  • Completeness: Closes #214 — all 3 sparkline types now implemented (PR, Issue, Contribution)
  • Test coverage: 2 subtests (empty window, two-day data with both lines checked)
  • Maintainability: 11 lines, reuses existing extractValues + BrailleSparkline
## Review **Result: Approved** — no blocking issues. **Summary:** Adds `ContributionSparkline()` completing Phase 3. Returns two-line sparkline (`+ Additions` / `- Deletions`) using existing single-series `BrailleSparkline`. Empty window returns `"no data"` for both lines. ROADMAP2.md updated — Phase 3 fully complete. **Non-blocking:** - #305 — Add godoc for exported `ContributionSparkline` **Checklist:** - Correctness: ✅ Correctly uses BrailleSparkline for each series, format matches spec - Completeness: ✅ Closes #214 — all 3 sparkline types now implemented (PR, Issue, Contribution) - Test coverage: ✅ 2 subtests (empty window, two-day data with both lines checked) - Maintainability: ✅ 11 lines, reuses existing extractValues + BrailleSparkline
fuzzy merged commit 5b6478e585 into main 2026-07-07 10:14:45 +00:00
fuzzy deleted branch phase03-contribution-sparkline 2026-07-07 10:14:45 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/steeper!304
No description provided.