diff --git a/README.md b/README.md index fdcd140f..7cb05703 100644 --- a/README.md +++ b/README.md @@ -1058,8 +1058,11 @@ A board shows one season at a time, or a range: the **Showing** menu above it li WARDOGS seasons, the organisation's own, and the 7, 30 and 90-day and all-time ranges. A season is a name and a start, and runs until the next season of its kind starts. The official ones ship with Warcon, each from the moment it launched: Season 1 from the early-access release on -10 September 2026, Season 2 from 15 October 2026 at 16:00 UTC. A new one is added when Bulkhead -announces it, and starts on its real date even when it is added late. An org owner adds the +10 September 2026, Season 2 from 15 October 2026 at 16:00 UTC, and Season 3 from its scheduled +start on 12 November 2026 at 15:00 UTC, after the maintenance window in +[Bulkhead's Season 3 announcement](https://steamcommunity.com/gid/103582791475494490/announcements/detail/688648135317127222). +A new one is added when Bulkhead announces it, and starts on its real date even when it is added +late. An org owner adds the organisation's own on its **Seasons** tab, each from midnight UTC on a day still to come; a season that has started can be renamed but not moved or deleted, so its standings stay put, and to end one early you start the next. Nothing is reset or deleted: a season's board is a window diff --git a/src/lib/seasons.test.ts b/src/lib/seasons.test.ts index 349db893..9fef6948 100644 --- a/src/lib/seasons.test.ts +++ b/src/lib/seasons.test.ts @@ -9,7 +9,7 @@ import { seasonSpan } from './seasons'; import { boardQueryParams, DEFAULT_BOARD_QUERY, parseBoardQuery } from './leaderboard'; -import { resolveWindow, type OrgSeasons } from './server/seasons'; +import { pickable, resolveWindow, type OrgSeasons } from './server/seasons'; const SEP = '2026-09-01T00:00:00.000Z'; const OCT = '2026-10-01T00:00:00.000Z'; @@ -95,6 +95,49 @@ describe('a board’s range', () => { }); }); +describe('Season 3 boards', () => { + const start = at('2026-11-12T15:00:00.000Z'); + const os: OrgSeasons = { + seasons: chainSeasons('official', OFFICIAL_SEASONS), + opens: 'official', + hidden: [] + }; + + test('the default board and picker switch at the scheduled start, never before', () => { + for (const range of ['current', 's:wardogs-3'] as const) { + expect(resolveWindow(range, os, start - 1)).toMatchObject({ + range: 's:wardogs-2', + to: null, + finished: false + }); + expect(resolveWindow(range, os, start)).toMatchObject({ + range: 's:wardogs-3', + from: new Date(start), + to: null, + finished: false + }); + } + expect(pickable(os, start - 1).map((s) => s.key)).not.toContain('wardogs-3'); + expect(pickable(os, start)[0]?.key).toBe('wardogs-3'); + }); + + test('a later update still closes Season 2 and reads Season 3 from the scheduled boundary', () => { + const later = start + 7 * 86_400_000; + expect(resolveWindow('s:wardogs-2', os, later)).toMatchObject({ + range: 's:wardogs-2', + from: new Date('2026-10-15T16:00:00.000Z'), + to: new Date(start), + finished: true + }); + expect(resolveWindow('current', os, later)).toMatchObject({ + range: 's:wardogs-3', + from: new Date(start), + to: null, + finished: false + }); + }); +}); + describe('resolveWindow', () => { const official = chainSeasons('official', [ { key: 'o1', name: 'Season 1', startsAt: '2026-09-10T00:00:00.000Z' }, diff --git a/src/lib/seasons.ts b/src/lib/seasons.ts index 8158b057..5352bdd0 100644 --- a/src/lib/seasons.ts +++ b/src/lib/seasons.ts @@ -18,12 +18,14 @@ export interface Season { /** * WARDOGS's seasons, from the moment each began. Season 1 is the early-access release - * (10 September 2026); Season 2 launches on 15 October 2026 at 9:00 Pacific (16:00 UTC). A season - * added here after it began still starts on its real date: the boards read the kept history. + * (10 September 2026); Season 2 launches on 15 October 2026 at 9:00 Pacific (16:00 UTC). + * Season 3 is scheduled for 12 November 2026 at 15:00 UTC, after the announced maintenance. + * A season added here after it began still starts on its real date: the boards read the kept history. */ export const OFFICIAL_SEASONS: readonly { key: string; name: string; startsAt: string }[] = [ { key: 'wardogs-1', name: 'Season 1', startsAt: '2026-09-10T00:00:00.000Z' }, - { key: 'wardogs-2', name: 'Season 2', startsAt: '2026-10-15T16:00:00.000Z' } + { key: 'wardogs-2', name: 'Season 2', startsAt: '2026-10-15T16:00:00.000Z' }, + { key: 'wardogs-3', name: 'Season 3', startsAt: '2026-11-12T15:00:00.000Z' } ]; /** How a season is named in a board's range: `s:`. */