Skip to content

bug: tournaments index grows a section at a time while it loads - #589

Merged
lukepolo merged 1 commit into
mainfrom
fix/tournaments-index-reveal
Sep 19, 2026
Merged

lukepolo merged 1 commit into
mainfrom
fix/tournaments-index-reveal

Conversation

@lukepolo

@lukepolo lukepolo commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

The curated view is fed by four independent sources — the live and registration-open subscriptions, and the two RecentTournaments fetches — and each revealed itself as it reported in. The page changed height four times on the way up.

Gates all of them behind a single curatedReady, so everything lands on one tick.

Two things that made the naive version of this worse rather than better:

  • The websocket loses the race against the HTTP fetches by a wide margin, and if it never connects it never loses it. A gate that only waits would park a skeleton above sections that had already painted real cards, so there's a 2.5s deadline after which the page reveals regardless and stragglers fade in on their own.
  • RecentTournaments only fetches once mounted, and it's one of the things being waited on. The sections stay mounted behind the skeleton, clipped to zero height rather than display:none, so their banners are decoded before they're shown. inert and aria-hidden keep the hidden copy out of reach of the keyboard and screen readers.

Skeletons now carry TournamentFeatureCard's exact height and radius — a wrong-sized skeleton just moves the jump from "content appears" to "content resizes".

Also folds the drilldown's three states into one PageTransition with swap, so re-filtering cross-fades in place instead of the outgoing list sliding up past the incoming one, and moves the leftover Options API block into the existing <script setup> (the subscriptions become useSubscription, paused while a filter is active).

Tests pass (111). The prettier warning on this file is pre-existing on main and left alone.

The curated view had four independent sources -- two subscriptions and
two RecentTournaments fetches -- each revealing itself as it reported
in, so the page changed height four times on the way up.

Gates all of them behind one reveal, with a 2.5s deadline so a
websocket that is slow or never connects cannot hold the page back.
@lukepolo
lukepolo merged commit b50129f into main Sep 19, 2026
2 checks passed
@lukepolo
lukepolo deleted the fix/tournaments-index-reveal branch September 19, 2026 20:25
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