Skip to content

fix(webapp): tolerate partial leaderboard data in users page static props - #6395

Open
tsahimatsliah wants to merge 3 commits into
mainfrom
claude/determined-swartz-34bc29
Open

fix(webapp): tolerate partial leaderboard data in users page static props#6395
tsahimatsliah wants to merge 3 commits into
mainfrom
claude/determined-swartz-34bc29

Conversation

@tsahimatsliah

@tsahimatsliah tsahimatsliah commented Jul 30, 2026

Copy link
Copy Markdown
Member

Changes

  • getStaticProps on /users no longer fails the whole Vercel build when LEADERBOARD_QUERY returns partial data with an errors array (observed 2026-07-29: mostAchievementPoints: null from a transient resolver blip killed the static export of feat(layout-v2): sidebar rail rework + Slack-style add rows #6240's preview deploy).
  • graphql-request throws on any errors array even when response.data carries the other fields; we now recover that partial payload when at least one leaderboard list came back, and each field falls back to [].
  • Genuine total failures (no data at all, or every field nulled) still rethrow and fail the build; the existing NotFound/Forbidden empty-props path is unchanged. With hourly ISR an empty section beats a failed deploy.
  • Sub-queries (POPULAR_HOT_TAKES_QUERY, HIGHEST_LEVEL_QUERY) keep their schema-missing-only tolerance.

Tests

3 new cases in UsersLeaderboardStaticProps.spec.ts: partial data tolerated with the failed field empty, no-data error still rejects, all-fields-errored still rejects. Suite passes (8/8), lint and strict changed-file typecheck clean.

🤖 Generated with Claude Code

Preview domain

https://claude-determined-swartz-34bc29.preview.app.daily.dev

…rops

A single flaky resolver returning partial data plus an errors array made
graphql-request throw and fail the whole Vercel static export. Recover
the partial payload when at least one leaderboard list is present and
render the failed field as an empty list under hourly ISR; total
failures (no data at all) still fail the build.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tsahimatsliah
tsahimatsliah requested a review from rebelchris July 30, 2026 06:56
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview Jul 30, 2026 1:23pm

Request Review

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