feat(activity): handle offline with cached data staleness #315
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/steeper!315
Loading…
Reference in a new issue
No description provided.
Delete branch "phase06-offline"
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 explicit offline/stale state tracking to the View, completing #242.
Changes
lastError != nil && loaded)"offline - cached data"instead of"stale data"for clearer stateRefreshContextgraceful degradation (returns cached data on fetch failure).Window()even when offlineReferences: #242, #239, #240, #241
Testing
go test -race ./...— all pass (0 races)- IsStale() method: returns true when View has cached data but last fetch failed (lastError != nil && loaded) - statusLine shows 'offline - cached data' instead of 'stale data' for clearer state indication - Existing functionality preserved: - RefreshContext returns cached data on fetch errors (graceful degradation) - Last successful fetch timestamp shown in header - Navigation/cached data access works even when offline - Tests: IsStale after failed refresh (fresh), IsStale after success, navigation with cached data Ref: #242, #239, #240, #241Review
Result: Approved — no blocking issues.
Summary: Adds offline/stale state tracking to
View.IsStale()method returnstruewhenlastError != nil && loaded(cached data exists but fetch failed). Status line indicator changed from "stale data" to "offline - cached data" for clarity. Window data remains accessible viaWindow()andRender()even when offline. ROADMAP2.md updated.Non-blocking:
IsStaleChecklist:
go test -racepasses