Skip to content

Commit 333d3f0

Browse files
Merge pull request #289 from CSSLab/codex/round3-candidates-challenges
Add round 3 candidates challenges
2 parents 5a88a09 + f1a35a8 commit 333d3f0

2 files changed

Lines changed: 74 additions & 5 deletions

File tree

src/constants/candidates.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,50 @@ export const CANDIDATES_EXTRA_IDEAS: CandidateIdea[] = [
7373

7474
// Drop live tournament moments here as PGN or FEN during the event.
7575
export const CANDIDATES_FEATURED_POSITIONS: CandidatePosition[] = [
76+
{
77+
id: 'rd3-convert-fabi-win',
78+
title: "Rd3 Challenge 1: Convert Fabi's Win",
79+
subtitle:
80+
"Black resigned here, but could you convert White's win if you had to?",
81+
summary:
82+
"Caruana's position is winning, but Black is still to move. Play White and convert it.",
83+
tag: 'Featured',
84+
accent: 'red',
85+
fen: '3q1rk1/p3ppb1/6pp/4r3/6P1/1Q5b/PP1PPP1P/R1BNK1R1 b Q - 1 19',
86+
playerColor: 'white',
87+
maiaVersion: 'maia_kdd_1900',
88+
targetMoveNumber: 8,
89+
},
90+
{
91+
id: 'rd3-take-down-pragg',
92+
title: 'Rd3 Challenge 2: Take Down Pragg',
93+
subtitle: 'Can you crash through like Sindarov did against Pragg?',
94+
summary:
95+
'Sindarov broke through against Praggnanandhaa. Black to move and press the attack.',
96+
tag: 'Featured',
97+
accent: 'amber',
98+
fen: 'r1br2k1/pp2q1pp/8/2b2p2/2P1p3/2Q1P1N1/2BNR1PP/R1K5 b - - 7 24',
99+
playerColor: 'black',
100+
maiaVersion: 'maia_kdd_1900',
101+
targetMoveNumber: 8,
102+
},
103+
{
104+
id: 'rd3-bibisara-attack',
105+
title: "Rd3 Challenge 3: Bibisara's Attack",
106+
subtitle:
107+
'Bibisara navigated the complications to take the full point. Try to win with Black!',
108+
summary:
109+
'A sharp attacking position for Black. Navigate the complications and win.',
110+
tag: 'Featured',
111+
accent: 'blue',
112+
fen: '2rqkb2/1p2pp2/p6p/n2PB3/2P3r1/Pp2R3/2bN1PP1/R1Q2BK1 b - - 4 22',
113+
playerColor: 'black',
114+
maiaVersion: 'maia_kdd_1900',
115+
targetMoveNumber: 8,
116+
},
117+
]
118+
119+
export const CANDIDATES_ROUND_TWO_POSITIONS: CandidatePosition[] = [
76120
{
77121
id: 'rd2-defend-like-hikaru',
78122
title: 'Rd2 Challenge 1: Defend like Hikaru',

src/pages/candidates.tsx

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { useEffect, useMemo, useState } from 'react'
66

77
import {
88
CANDIDATES_FEATURED_POSITIONS,
9+
CANDIDATES_ROUND_TWO_POSITIONS,
910
CANDIDATES_WARMUP_POSITIONS,
1011
CandidatePosition,
1112
} from 'src/constants/candidates'
@@ -115,7 +116,8 @@ const PositionBoard: React.FC<{
115116
const PositionPill: React.FC<{
116117
position: CandidatePosition
117118
completed?: boolean
118-
}> = ({ position, completed = false }) => {
119+
compactTitle?: boolean
120+
}> = ({ position, completed = false, compactTitle = false }) => {
119121
const playHref = buildPositionPlayLink({
120122
...position,
121123
challengeId: position.id,
@@ -131,8 +133,18 @@ const PositionPill: React.FC<{
131133
}`}
132134
>
133135
<div className="flex h-full flex-col gap-4">
134-
<div className="min-w-0 xl:min-h-[150px]">
135-
<h2 className="h-[3rem] overflow-hidden text-lg font-semibold leading-[1.5rem] text-primary md:h-[3.5rem] md:text-xl md:leading-[1.75rem]">
136+
<div
137+
className={`min-w-0 ${
138+
compactTitle ? 'xl:min-h-[132px]' : 'xl:min-h-[150px]'
139+
}`}
140+
>
141+
<h2
142+
className={`overflow-hidden text-lg font-semibold text-primary md:text-xl ${
143+
compactTitle
144+
? 'h-[1.5rem] leading-[1.5rem] md:h-[1.75rem] md:leading-[1.75rem]'
145+
: 'h-[3rem] leading-[1.5rem] md:h-[3.5rem] md:leading-[1.75rem]'
146+
}`}
147+
>
136148
{position.title}
137149
</h2>
138150
<p className="mt-2 text-sm leading-6 text-white/65">
@@ -244,7 +256,7 @@ export default function CandidatesPage() {
244256
FIDE Candidates Tournament 2026
245257
</h1>
246258
<p className="mt-2 text-sm uppercase tracking-[0.2em] text-white/45">
247-
Round 2
259+
Round 3
248260
</p>
249261
<div className="mt-4 flex flex-wrap gap-3">
250262
<Link
@@ -269,8 +281,21 @@ export default function CandidatesPage() {
269281
</header>
270282
{CANDIDATES_FEATURED_POSITIONS.length > 0 ? (
271283
<>
272-
<ChallengeSectionTitle title="Round 2 Challenges" />
284+
<ChallengeSectionTitle title="Round 3 Challenges" />
273285
{CANDIDATES_FEATURED_POSITIONS.map((position) => (
286+
<PositionPill
287+
key={position.id}
288+
position={position}
289+
completed={completedChallengeIds.includes(position.id)}
290+
compactTitle
291+
/>
292+
))}
293+
</>
294+
) : null}
295+
{CANDIDATES_ROUND_TWO_POSITIONS.length > 0 ? (
296+
<>
297+
<ChallengeSectionTitle title="Round 2 Challenges" />
298+
{CANDIDATES_ROUND_TWO_POSITIONS.map((position) => (
274299
<PositionPill
275300
key={position.id}
276301
position={position}

0 commit comments

Comments
 (0)