feat(activity): implement PR and Issue sparklines with dual-series Braille #302

Merged
fuzzy merged 1 commit from phase03-pr-sparkline into main 2026-07-07 09:55:27 +00:00
Owner

What

Add dual-series Braille sparkline rendering for PR and Issue activity, building on the core Braille renderer from #204.

New API

  • DualBrailleSparkline(opens, closes) — renders two value series as a single sparkline string using left/right Braille column encoding (5 levels per column, 25 combinations)
  • brailleDualChar(left, right) — maps (0-4, 0-4) to a UTF-8 Braille character
  • PRSparkline(window) — formats PRs ⡇⠿... from PrsOpened/PrsClosed
  • IssueSparkline(window) — formats Issues ⡇⠿... from IssuesOpened/IssuesClosed

How it works

Each Braille character encodes two metrics simultaneously:

  • Left column (dots 1,2,3,7) → opens value (0-4)
  • Right column (dots 4,5,6,8) → closes value (0-4)

References: #207, #210, #208, #206, #209

Testing

  • 10 new subtests: DualBrailleSparkline empty/mismatched, flat data, rising; PRSparkline empty/valid; IssueSparkline empty/valid
  • 31 total subtests in activity package
  • golangci-lint run ./internal/activity/ — 0 issues
  • go test ./internal/activity/ — all pass
## What Add dual-series Braille sparkline rendering for PR and Issue activity, building on the core Braille renderer from #204. ### New API - **DualBrailleSparkline(opens, closes)** — renders two value series as a single sparkline string using left/right Braille column encoding (5 levels per column, 25 combinations) - **brailleDualChar(left, right)** — maps (0-4, 0-4) to a UTF-8 Braille character - **PRSparkline(window)** — formats `PRs ⡇⠿...` from PrsOpened/PrsClosed - **IssueSparkline(window)** — formats `Issues ⡇⠿...` from IssuesOpened/IssuesClosed ### How it works Each Braille character encodes two metrics simultaneously: - Left column (dots 1,2,3,7) → opens value (0-4) - Right column (dots 4,5,6,8) → closes value (0-4) References: #207, #210, #208, #206, #209 ## Testing - [x] 10 new subtests: DualBrailleSparkline empty/mismatched, flat data, rising; PRSparkline empty/valid; IssueSparkline empty/valid - [x] 31 total subtests in activity package - [x] `golangci-lint run ./internal/activity/` — 0 issues - [x] `go test ./internal/activity/` — all pass
feat(activity): implement PR and Issue sparklines with dual-series Braille
All checks were successful
Test and Release / test (pull_request) Successful in 2m48s
Test and Release / lint (pull_request) Successful in 13m42s
c323e3d1c3
- DualBrailleSparkline(): renders two value series (opens, closes) as
  a single Braille sparkline using left/right column dot encoding
- brailleDualChar(): maps (left_level, right_level) in 0-4 range to
  a combined Braille character (U+2800-U+28FF)
- PRSparkline(): formats PR opens/closes as 'PRs ⡇⠿...'
- IssueSparkline(): formats issue opens/closes as 'Issues ⡇⠿...'
- extractValues(): helper to pull a metric from ActivityWindow
- 10 new tests across DualBrailleSparkline, PRSparkline, IssueSparkline

Ref: #207, #210, #208, #206, #209
fuzzy scheduled this pull request to auto merge when all checks succeed 2026-07-07 09:41:49 +00:00
the.auditor left a comment

Review

Result: Approved — no blocking issues.

Summary: Adds dual-series Braille sparkline rendering to renderer.go. DualBrailleSparkline encodes two metrics per Braille char (left column = opens, right column = closes). PRSparkline and IssueSparkline wrap it with PR/issue open/close data from ActivityWindow. brailleDualChar maps (0-4,0-4) to Braille patterns via dot-position bit arithmetic. ROADMAP2.md updated.

Non-blocking:

  • #303 — Add godocs for exported functions + note dead level-4 code in brailleDualChar

Checklist:

  • Correctness: Braille dot arithmetic correct, left/right column encoding works
  • Completeness: PR and Issue sparklines implemented (#207, #210), labeled with "PRs"/"Issues"
  • Test coverage: 10 subtests (empty, mismatch, flat, rising, PR/Issue empty+valid)
  • Maintainability: Clean pattern — extractValues helper avoids duplication
## Review **Result: Approved** — no blocking issues. **Summary:** Adds dual-series Braille sparkline rendering to `renderer.go`. `DualBrailleSparkline` encodes two metrics per Braille char (left column = opens, right column = closes). `PRSparkline` and `IssueSparkline` wrap it with PR/issue open/close data from `ActivityWindow`. `brailleDualChar` maps (0-4,0-4) to Braille patterns via dot-position bit arithmetic. ROADMAP2.md updated. **Non-blocking:** - #303 — Add godocs for exported functions + note dead level-4 code in `brailleDualChar` **Checklist:** - Correctness: ✅ Braille dot arithmetic correct, left/right column encoding works - Completeness: ✅ PR and Issue sparklines implemented (#207, #210), labeled with "PRs"/"Issues" - Test coverage: ✅ 10 subtests (empty, mismatch, flat, rising, PR/Issue empty+valid) - Maintainability: ✅ Clean pattern — extractValues helper avoids duplication
fuzzy added this to the Steeper project 2026-07-07 09:42:49 +00:00
fuzzy self-assigned this 2026-07-07 09:42:51 +00:00
fuzzy merged commit c323e3d1c3 into main 2026-07-07 09:55:27 +00:00
fuzzy deleted branch phase03-pr-sparkline 2026-07-07 09:55:27 +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!302
No description provided.