feat(activity): implement refresh orchestration with auto-refresh #310
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/steeper!310
Loading…
Reference in a new issue
No description provided.
Delete branch "phase04-refresh-orchestration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Add auto-refresh infrastructure to the
Viewcoordinator, completing #229 and Phase 4.New API
RefreshOnOpen(ctx)StartAutoRefresh(ctx)RenderPass2when staleStopAutoRefresh()Auto-refresh goroutine
ticker,stopCh) so concurrentStart/Stopis safeneedsRefreshunder lock, callsRenderPass2without lock (non-blocking)ticker.Stop()on channel closerefreshIntervalis preserved if set beforeStartAutoRefresh(for testing)Phase 4 complete
References: #229, #225, #226, #227, #228
Testing
golangci-lint run ./internal/activity/— 0 issuesgo vet ./internal/activity/— 0 issuesgo test ./internal/activity/— all passReview
Result: Approved — no blocking issues.
Summary: Implements refresh orchestration on
View.RefreshOnOpen(ctx)handles initial load + current-day staleness check.StartAutoRefresh(ctx)launches a 5-minute background ticker; goroutine readsneedsRefreshunder lock, callsRenderPass2when stale.StopAutoRefresh()cleans up via channel close — safe for double-stop. Concurrency-safe start/stop via mutex. ROADMAP2.md updated — Phase 4 fully complete.Non-blocking:
needsRefresh/graphStaleChecklist:
9d2feb38c1448f282483New commits pushed, approval review dismissed automatically according to repository settings
Re-Review
Result: Approved — no blocking issues. Changes address previous feedback.
Changes since last review:
NeedsRefresh(),StaleGraphs(),RenderPass2()— fixes data race concern from #311-raceflag in.pre-commit-config.yaml(120s timeout)go test -raceRemaining minor note:
Render()writesneedsRefreshandgraphStalewithout holding the mutex. Not caught by race detector (no concurrent access in current tests). Worth adding for completeness.