Games tab: a coming-soon card stops carrying its soon object once the opening day arrives (SpellWheel's button read '[object Object]' on 2026-10-10); SpellWheel card art switches to the game's live OG image

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-10 06:16:15 -05:00
parent f7c4d34a35
commit d8a31ddd40
+4 -2
View File
@@ -1551,7 +1551,7 @@ function GAMES() {
// coming soon (2026-10-04, Marty: "build some anticipation... show that it's coming soon and put the date"): every member sees
// the card with its date and no Play button until `soon.opens` (Central); from then it is an ordinary card, live via gamesLive
{ slug: 'spellwheel', name: 'SpellWheel', tag: 'Word game', blurb: 'Swipe the letter wheel to fill the crossword, travel through six cozy places, and solve a new daily puzzle with everyone. Clear levels and chapters to earn POL.',
art: '/assets/games/spellwheel-soon.jpg?v=1', play: '/api/my/spellwheel', pays: 'POL for levels, chapters and daily puzzles', soon: { opens: '2026-10-10', label: 'Opens Saturday, Oct 10' } },
art: SW_URL() + '/og-spellwheel.jpg?v=1', play: '/api/my/spellwheel', pays: 'POL for levels, chapters and daily puzzles', soon: { opens: '2026-10-10', label: 'Opens Saturday, Oct 10' } },
// PolyWarriors (Marty 2026-10-05: "put Poly Warriors there as well, saying that it's coming next Monday")
{ slug: 'polywarriors', name: 'PolyWarriors', tag: 'Cyberpunk fighting', blurb: 'Turn-based fights with collectible low-poly warriors. Recruit fighters born with rare traits, climb the arena, challenge other members, and mint your warriors as NFTs.',
art: '/assets/games/polywarriors-soon.jpg?v=1', play: '/api/my/polywarriors', pays: 'POL for first wins over arena rivals', soon: { opens: '2026-10-12', label: 'Opens Monday, Oct 12' } },
@@ -3441,7 +3441,9 @@ const server = http.createServer(async (req, res) => {
const ss = seasonState(g.season, day, admin); if (ss === 'hidden') continue;
const seasonPreview = ss === 'preview';
const isLive = live.has(g.slug); if (!isLive && !admin && !tester) continue;
const card = Object.assign({}, g, { live: isLive, preview: !isLive || seasonPreview });
// soon: null once the opening day arrives: the registry's {opens,label} object must not reach the client, which prints x.soon
// as the button label (SpellWheel showed "[object Object]" on the morning of 2026-10-10)
const card = Object.assign({}, g, { live: isLive, preview: !isLive || seasonPreview, soon: null });
if (g.season) { card.season = Object.assign({}, g.season, { opens: dayLabel(g.season.start), ends: dayLabel(g.season.end, true) }); if (seasonPreview) card.previewNote = 'preview, opens ' + card.season.opens; }
if (g.progress && (memberId || g.slug === 'passivedrip')) { try { card.progress = await g.progress(memberId, s.email); } catch (e) {} }
out.push(card);