Skip to content

Server Health: build ranges from the cached week, newest build wins - #1059

Merged
ivanfenenko merged 3 commits into
mainfrom
fix/1053-server-health-review-followup
Nov 16, 2026
Merged

ivanfenenko merged 3 commits into
mainfrom
fix/1053-server-health-review-followup

Conversation

@ivanfenenko

@ivanfenenko ivanfenenko commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #1055 for #1053. This addresses the review thread #1055 (comment) (Server Health report cache outlives a failed range reload) and the pr-review findings.

What changed

  • Android ServerHealthViewModel: reload caches the raw week of pings and events. selectRange now builds the new range from that cache and does not re-read the store, so a failed store read can no longer leave the previous range's chart under the new selector. iOS already worked this way. A build is dropped if the selected range changed while it ran, so a slow Day build can't overwrite Week.
  • iOS ServerHealthViewModel: a rebuild generation counter means only the newest rebuild applies. Before this, an older rebuild for the same range (for example, selectRange racing a revision reload) could land after a newer one.

Checks

  • New unit test selectRange_buildsTheNewRangeEvenWhenTheStoreFails. Local runs were slowed by machine load, so CI verifies this.
  • No UI change

Risks / Follow-ups


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

ivanfenenko and others added 2 commits November 16, 2026 00:08
…1053)

Android: selecting a range no longer re-reads the store. The week of pings
and events from the last reload is cached and every range is built from it,
so a failed store read can no longer leave the old range's chart under the
new selector. A build whose range changed while it ran is dropped.

iOS: a generation counter keeps an older rebuild for the same range from
overwriting a newer one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review: no finding that 2+ of 3 passes agreed on.

1 finding(s) from a single pass, not posted
  • android/app/src/main/java/dev/opencode/mobile/ui/serverhealth/ServerHealthViewModel.kt:165 medium: selectRange no longer retries the store when no record was ever cached (glm-5.3-flash)

opencode pr-review · passes: muse-spark-1.3-contributor, glm-5.3-flash, deepseek-v4.1-flash · $0.056 · 1 pass(es) stopped early

…1053)

If the first read failed there is no cached week to build from, so picking
a range reloads from the store, as it did before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ivanfenenko
ivanfenenko added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 17719d3 Nov 16, 2026
@ivanfenenko
ivanfenenko deleted the fix/1053-server-health-review-followup branch November 16, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant