Core: cache, background refresh and stale-result protection #7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Problem
The UI must feel instant while browsing (
j/kthrough repos and boxes) and must not show the wrong data when results arrive late. The design calls for rendering from cache immediately, refreshing in the background, andrto force a refresh. Without a deliberate core layer, every view would reinvent this, and stale responses would land on whatever is now selected.Plan
internal/core, talking only toforge.Forge:tea.Cmdthat refreshes it. Results carry the request key so the UI can drop stale ones (go-development→ Bubble Tea rules).Opus settles the concurrency and cancellation design inside this ticket and records an ADR, since every view depends on it.
Plan-review additions (#17)
Context
docs/architecture.md→ "Caching and refresh".docs/design.md→ Open questions (interval polling vs manualris a pending product decision; build manual refresh now, in a way that allows a timer to be added later).Forgeinterface ticket.🤖 Merged in #28. Screens can show what's already loaded instantly and refresh in the background. Forge calls run at most four at a time, a failed refresh keeps the last good data, and host-wide scans report 'scanned X of Y' exactly. The UI owns the five-minute timer and r (#8).