feat(home): paginate activity feed to fill screen height #365

Merged
fuzzy merged 2 commits from feat/354-home-paginate-activities into main 2026-07-08 10:23:45 +00:00
Owner

What

Load home activity feed now calculates pages needed based on screen height (h - 16 rows available, ceil(rows/50) pages). Fetches all needed pages in a loop, async via goroutine. Renders via QueueUpdateDraw.

Why

Previously only fetched page 1 (~30-50 events), leaving blank space at the bottom of large terminals. Subsequent loads benefit from per-page API cache (CachedClient).

Closes #354

## What Load home activity feed now calculates pages needed based on screen height (`h - 16` rows available, `ceil(rows/50)` pages). Fetches all needed pages in a loop, async via goroutine. Renders via `QueueUpdateDraw`. ## Why Previously only fetched page 1 (~30-50 events), leaving blank space at the bottom of large terminals. Subsequent loads benefit from per-page API cache (CachedClient). Closes #354
feat(home): paginate activity feed to fill screen height
Some checks failed
Test and Release / lint (pull_request) Has been cancelled
Test and Release / test (pull_request) Has been cancelled
4ee46f65ec
Fetch enough activity pages to fill the available screen rows
minus heatmap area. Runs async to avoid blocking the UI.
Subsequent loads benefit from per-page cache hits.
fuzzy scheduled this pull request to auto merge when all checks succeed 2026-07-08 10:06:58 +00:00
the.auditor approved these changes 2026-07-08 10:07:28 +00:00
Dismissed
the.auditor left a comment

Review

Result: Approved — no blocking issues.

Summary: Paginates home activity feed to fill screen height. Load now spawns async goroutine, calculates pages needed (h - 16 rows / ceil(row/50)), fetches up to 10 pages (500 events). Uses QueueUpdateDraw for goroutine-safe render.

Non-blocking:

  • #366 — Error propagation regression: loadAsync silently swallows all errors, Load always returns nil. Callers never see failures. Also potential data race on concurrent Load calls.

Checklist:

  • Correctness: Page calculation correct, pagination loop correct, goroutine-safe render via QueueUpdateDraw
  • Completeness: Fills available screen height with activity data
  • Error handling: ⚠️ Errors silently swallowed — no feedback to user or caller
## Review **Result: Approved** — no blocking issues. **Summary:** Paginates home activity feed to fill screen height. `Load` now spawns async goroutine, calculates pages needed (`h - 16` rows / `ceil(row/50)`), fetches up to 10 pages (500 events). Uses `QueueUpdateDraw` for goroutine-safe render. **Non-blocking:** - #366 — Error propagation regression: `loadAsync` silently swallows all errors, `Load` always returns nil. Callers never see failures. Also potential data race on concurrent `Load` calls. **Checklist:** - Correctness: ✅ Page calculation correct, pagination loop correct, goroutine-safe render via QueueUpdateDraw - Completeness: ✅ Fills available screen height with activity data - Error handling: ⚠️ Errors silently swallowed — no feedback to user or caller
fuzzy canceled auto merging this pull request when all checks succeed 2026-07-08 10:07:45 +00:00
fix(home): store async load errors, protect with mutex
All checks were successful
Test and Release / test (pull_request) Successful in 2m46s
Test and Release / lint (pull_request) Successful in 14m9s
94a9f07450
- Add loadErr field and LastError() method to HomeView
- loadAsync stores errors instead of silently returning
- fetchActivities returns data separately, error stored on struct
- Add sync.Mutex to guard concurrent writes to username/heatmap/activities
- Load() still returns nil (async), callers use LastError() for status
fuzzy dismissed the.auditor's review 2026-07-08 10:09:33 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

the.auditor left a comment

Re-Review

Result: Approved — no blocking issues. #366 addressed.

Changes since previous review:

  • Added loadErr error + mu sync.Mutex to HomeView
  • loadAsync now stores errors under lock for all API failures
  • loadErr cleared on success
  • LastError() method for callers to check async load status
  • fetchActivities takes username param and returns slice (avoids lock-ordering issues)

All concerns from #366 are resolved.

## Re-Review **Result: Approved** — no blocking issues. #366 addressed. **Changes since previous review:** - Added `loadErr error` + `mu sync.Mutex` to `HomeView` - `loadAsync` now stores errors under lock for all API failures - `loadErr` cleared on success - `LastError()` method for callers to check async load status - `fetchActivities` takes username param and returns slice (avoids lock-ordering issues) All concerns from #366 are resolved.
fuzzy scheduled this pull request to auto merge when all checks succeed 2026-07-08 10:10:46 +00:00
fuzzy merged commit 94a9f07450 into main 2026-07-08 10:23:45 +00:00
fuzzy deleted branch feat/354-home-paginate-activities 2026-07-08 10:23:46 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 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!365
No description provided.