Repository navigation
fix(network): never send an empty day list, and settle failed daily reads - #569
Merged
Merged
Conversation
…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>
There was a problem hiding this comment.
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."
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
chunksForlisted no days and sentday_start_date_in_values=''. The generated client's zod validator rejects that before sending, and with the app-wideretry: Infinitythe read never settled, socensus.isLoadingheld the whole page.chunksForreturns no chunks when there is no complete day (regression test fails on master, passes here).useDailyByClientretries 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 withBACKEND=production: every section renders on mainnet at 1280 and 390 px, the Goodbyes section shows its empty state, no app console errors.