Keep live dashboard usable through failed refreshes #149

Closed
opened 2026-08-06 23:48:21 +00:00 by timmy · 0 comments
Owner

Problem

After a healthy live snapshot becomes stale, a failed background refresh can discard usable sections and each later request immediately starts another Gitea fan-out. The API also continues to report revalidating: true after that refresh has failed, so the mobile dashboard hides the actual degraded state.

Product slice

  • Retain last-known-good data per live section when refreshes partially fail.
  • Track refresh failures and apply bounded retry cooldown so repeated clients do not amplify a Gitea outage.
  • Return honest sanitized freshness metadata (degraded, last_refresh_failed, retry_in_seconds).
  • Render a clear degraded status while keeping existing panels usable.

Acceptance tests

  • A failed refresh after a healthy snapshot keeps prior usable section data and reports stale/degraded, not revalidating.
  • Requests during cooldown trigger no new upstream build.
  • One refresh starts when retry becomes eligible; recovery resets failure state.
  • Partial refresh updates successful sections and retains only failed sections.
  • The UI distinguishes active refresh from failed refresh without exposing exception details.
  • Focused and full test suites pass.

Non-duplication evidence

Issue/PR/release history through v0.1.0-rc.229 was reviewed. #139/#140 added stale-while-revalidate and #137/#138 added cancellation safety, but neither handles failed revalidation state, outage backoff, or section-level last-known-good retention.

## Problem After a healthy live snapshot becomes stale, a failed background refresh can discard usable sections and each later request immediately starts another Gitea fan-out. The API also continues to report `revalidating: true` after that refresh has failed, so the mobile dashboard hides the actual degraded state. ## Product slice - Retain last-known-good data per live section when refreshes partially fail. - Track refresh failures and apply bounded retry cooldown so repeated clients do not amplify a Gitea outage. - Return honest sanitized freshness metadata (`degraded`, `last_refresh_failed`, `retry_in_seconds`). - Render a clear degraded status while keeping existing panels usable. ## Acceptance tests - A failed refresh after a healthy snapshot keeps prior usable section data and reports stale/degraded, not revalidating. - Requests during cooldown trigger no new upstream build. - One refresh starts when retry becomes eligible; recovery resets failure state. - Partial refresh updates successful sections and retains only failed sections. - The UI distinguishes active refresh from failed refresh without exposing exception details. - Focused and full test suites pass. ## Non-duplication evidence Issue/PR/release history through v0.1.0-rc.229 was reviewed. #139/#140 added stale-while-revalidate and #137/#138 added cancellation safety, but neither handles failed revalidation state, outage backoff, or section-level last-known-good retention.
timmy self-assigned this 2026-08-06 23:48:21 +00:00
timmy closed this issue 2026-08-06 23:55:39 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 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: stackchain/stackchain-dashboard#149
No description provided.