Skip to content

Retry transient leaderboard loads - #654

Draft
zacjones93 wants to merge 1 commit into
mainfrom
codex/retry-transient-leaderboard-loads
Draft

Retry transient leaderboard loads#654
zacjones93 wants to merge 1 commit into
mainfrom
codex/retry-transient-leaderboard-loads

Conversation

@zacjones93

@zacjones93 zacjones93 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • retry recognized transient leaderboard fetch failures twice with short backoff
  • keep application and authorization errors immediate
  • stop retry work when the component request is cancelled
  • add a regression test and document the recovery behavior

Root cause

The PostHog stack for issue 019fa481-8312-7bd1-a196-4cf75428890c resolves to the TanStack Start server-function transport used by the public leaderboard. When the route loader returned no initial data, the component fallback made a single request; a transient mobile Safari TypeError: Load failed immediately replaced the leaderboard with a blocking error state.

The fallback now retries only browser network TypeError messages (Load failed, Failed to fetch, and Firefox's equivalent) after 300ms and 900ms. Other errors retain the existing immediate failure behavior.

Validation

  • pnpm --filter wodsmith-start exec vitest run test/components/leaderboard-page-content.test.tsx — 21 passed
  • pnpm --filter wodsmith-start type-check — passed
  • Biome check on the changed source and test — passed
  • npx lat.md check — passed

The full suite completed with 2,913 tests passing and 11 unrelated existing failures/timeouts in competition-invite and Stripe webhook tests.


Summary by cubic

Add transient retry to leaderboard loads to prevent a blocking error when a browser fetch fails. Non-network errors still fail fast.

  • Bug Fixes
    • Retry browser TypeError network failures (“Failed to fetch”, “Load failed”, Firefox equivalent) after 300ms and 900ms when the route loader returns no data.
    • Stop retrying if the component request is cancelled.
    • Keep application and authorization errors immediate.
    • Add a regression test that verifies recovery after a transient first failure.
    • Document the behavior in lat.md/architecture.md under “Transient leaderboard recovery”.

Written for commit 12cbcec. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d320a692-8225-4584-8045-e7ed59216104

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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