Skip to content

fix(network): never send an empty day list, and settle failed daily reads - #569

Merged
samcm merged 1 commit into
masterfrom
fix/network-empty-day-list
Nov 11, 2026
Merged

samcm merged 1 commit into
masterfrom
fix/network-empty-day-list

Conversation

@samcm

@samcm samcm commented Nov 11, 2026

Copy link
Copy Markdown
Member

The network overview has been stuck on its skeleton in production since the goodbye tables got bounds. Their data starts at 2026-11-11 06:57, after the last complete day, so chunksFor listed no days and sent day_start_date_in_values=''. The generated client's zod validator rejects that before sending, and with the app-wide retry: Infinity the read never settled, so census.isLoading held the whole page.

  • chunksFor returns no chunks when there is no complete day (regression test fails on master, passes here).
  • useDailyByClient retries a failed chunk 3 times and never retries a request the client rejected, so a broken table settles as empty instead of blocking every section.

Checked: pnpm lint, tsc, pnpm test:unit (926 passed), and a production build served with BACKEND=production: every section renders on mainnet at 1280 and 390 px, the Goodbyes section shows its empty state, no app console errors.

…eads

The goodbye tables' data starts today, after the last complete day, so
chunksFor listed no days and sent day_start_date_in_values="", which the
API client rejects before sending. With the app's retry-forever default the
read never settled, census.isLoading stayed true and the whole network
overview sat on its skeleton.

- chunksFor returns no chunks when there is no complete day to read.
- useDailyByClient retries a failed chunk three times, and never a request
  the API client rejected, so one broken table settles as empty instead of
  holding back every section.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1c912-2d49-710d-b746-bda9e576453d
Co-authored-by: Sam Calder-Mason <samcaldermason@gmail.com>
@samcm
samcm requested a review from Savid as a code owner November 11, 2026 14:32

@redpandabot redpandabot 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.

The change stops chunksFor from emitting a chunk with an empty day_start_date_in_values when a table's data begins after the last complete UTC day, and gives useDailyByClient's chunk queries a bounded retry policy that skips deterministic zod rejections. The guard mirrors the day-listing loop's own boundary exactly, is covered by regression tests, and the $ZodError check matches the error class actually thrown by the generated zod/mini request validators, so I found nothing that needs fixing.


Reviewed 3 changed file(s) @ 3748316c — no blocking issues found.
"Good enough is good enough."

@samcm
samcm merged commit f776ef9 into master Nov 11, 2026
3 of 5 checks passed
@samcm
samcm deleted the fix/network-empty-day-list branch November 11, 2026 14:40
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.

2 participants