Skip to content

Fix empty leaderboard state after resetting filters#71

Open
kevinfosterNG wants to merge 1 commit into
sculptdotfun:mainfrom
kevinfosterNG:codex/fix-empty-leaderboard-state
Open

Fix empty leaderboard state after resetting filters#71
kevinfosterNG wants to merge 1 commit into
sculptdotfun:mainfrom
kevinfosterNG:codex/fix-empty-leaderboard-state

Conversation

@kevinfosterNG

Copy link
Copy Markdown

What changed

  • make the homepage reuse the server-seeded leaderboard rows only on the first render
  • allow the default cost view to refetch after a user changes filters and returns to the default state

Why

The homepage can fall into an empty-table state after users switch away from the default leaderboard view and then reset back to it.

Root cause

The default view was treated as "seeded" any time the filter state returned to the original cost/no-filter combination, even after hydration. Once the filter-reset effect cleared the current rows, the board skipped fetching because it incorrectly assumed the server-seeded rows were still active.

Impact

Returning to the default homepage leaderboard view now restores rows correctly instead of showing an empty table.

Validation

  • pnpm build
  • pnpm exec tsc --noEmit
    Fails in the current repo due to pre-existing type/config issues unrelated to this change.
  • pnpm lint
    Fails in the current repo because the script still uses next lint, which is invalid under the current Next.js setup.
  • pnpm test
    Fails in the current repo because the script runs node directly on test/ccusage.test.mts.

@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

@kevinfosterNG is attempting to deploy a commit to the sculpt Team on Vercel.

A member of the Team first needs to authorize it.

@kevinfosterNG kevinfosterNG marked this pull request as ready for review June 17, 2026 15:41
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