fix(home): restore error propagation from async Load or store errors #366

Closed
opened 2026-07-08 10:07:21 +00:00 by the.auditor · 0 comments
Owner

PR #365 changed HomeView.Load from synchronous error-returning to async goroutine that swallows all errors. loadAsync silently returns on any API failure (getUser, getHeatmap, fetchActivities). Callers checking err != nil from hv.Load(ctx) will never see errors — home tab failures go undetected.

Options:

  1. Store error on HomeView struct and expose via a method
  2. Keep Load synchronous and move async logic elsewhere
  3. Use a callback/channel to propagate errors to the caller

Also: concurrent Load calls could race on v.activities/v.heatmap/v.username writes. Consider a mutex or guard.

Ref: PR #365

PR #365 changed `HomeView.Load` from synchronous error-returning to async goroutine that swallows all errors. `loadAsync` silently returns on any API failure (getUser, getHeatmap, fetchActivities). Callers checking `err != nil` from `hv.Load(ctx)` will never see errors — home tab failures go undetected. Options: 1. Store error on `HomeView` struct and expose via a method 2. Keep Load synchronous and move async logic elsewhere 3. Use a callback/channel to propagate errors to the caller Also: concurrent `Load` calls could race on `v.activities`/`v.heatmap`/`v.username` writes. Consider a mutex or guard. Ref: PR #365
fuzzy closed this issue 2026-07-08 10:33:32 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#366
No description provided.