Skip to main content

Webv3 contest lists

Read this when you change a Webv3 contest list.

The tabs are Official, Community, Joined and Organizing. /contests/official, /contests/user-contests and, for Organizing, /contests/my-contests keep Webv2's paths, including an optional trailing page number such as /contests/official/2. Joined is new to Webv3 at /contests/joined/<page>. A missing or unreadable page is page 1, as on the leaderboards. Pages hold 25 contests in the API's order, newest first.

  • frontend/apps/webv3/src/lib/contests.ts owns the server functions, query options and route loader: which list a collection shows the viewer, one page of it, and whether the viewer may create a contest. frontend/apps/webv3/src/lib/contests.server.ts reads them through the generated client with the visitor's session cookies.
  • frontend/apps/webv3/src/components/ContestsPage.tsx composes the collection tabs, rows, pagination and the empty, failed, past-the-end and signed-out states.

The API decides which unlisted contests a list includes: a signed-in account's own, and every one for administrators. Lists are therefore read as the visitor and cached per viewer; a rejected session cookie falls back to the public list. Organizing lists the community contests the signed-in account organizes; Joined lists every contest it registered for, across all years, newest contest first. Both ask anonymous visitors to log in. As in Webv2, Community, Joined and Organizing name each community contest's languages and activities for signed-in visitors only, and the create action, which opens Webv3's contest form, appears when the API's create-permission check answers 200.

Each row shows the round's status (upcoming, live or ended), and an Unlisted tag for a link-only contest, beside its title. Muted lines follow with its dates, then the registration deadline while it is open and any language or activity restriction; status and deadline follow the UTC day the list was read. With more than one page, page links and the range summary appear below the list. Contest dates are UTC calendar days and the page says so. Rows link to the native contest page. Search and date filters are not available.

frontend/apps/webv3/e2e/contests.spec.ts compares the server-rendered lists with the API, follows tabs and page links, checks the signed-out prompt and containment at 390px and 1280px. With the Dev Admin credentials it gives that account more than one page of community contests in the selected tenant, then pages through its Organizing list; with Dev Reader it checks that the seeded unlisted contest appears for its owner only. With both accounts it gives Dev Reader more than one page of registrations, in contests Dev Admin creates over the next few years, then pages through Joined and checks it against the account's registrations.