Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/Analysis/BroadcastAnalysis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1227,6 +1227,7 @@ export const BroadcastAnalysis: React.FC<Props> = ({
<MovesByRating
moves={analysisController.movesByRating}
colorSanMapping={analysisController.colorSanMapping}
positionKey={analysisController.currentNode?.fen}
/>
</div>
</div>
Expand Down
15 changes: 12 additions & 3 deletions src/pages/broadcast/[broadcastId]/[roundId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,21 @@ const BroadcastAnalysisPage: NextPage = () => {
undefined,
false,
)
const defaultModelAppliedForGameId = useRef<string | null>(null)

useEffect(() => {
if (analysisController.currentMaiaModel !== 'maia_kdd_2600') {
analysisController.setCurrentMaiaModel('maia_kdd_2600')
}
const gameId = broadcastController.currentGame?.id
if (!gameId) return

if (defaultModelAppliedForGameId.current === gameId) return

defaultModelAppliedForGameId.current = gameId

if (analysisController.currentMaiaModel === 'maia_kdd_2600') return

analysisController.setCurrentMaiaModel('maia_kdd_2600')
}, [
broadcastController.currentGame?.id,
analysisController.currentMaiaModel,
analysisController.setCurrentMaiaModel,
])
Expand Down
10 changes: 10 additions & 0 deletions src/pages/candidates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
import { GameTree } from 'src/types'

const CANDIDATES_COMPLETED_STORAGE_KEY = 'maia-candidates-completed'
const CANDIDATES_BROADCAST_HREF = '/broadcast/BLA70Vds/uLCZwqAK'

const readCompletedChallenges = (): string[] => {
if (typeof window === 'undefined') return []
Expand Down Expand Up @@ -241,6 +242,15 @@ export default function CandidatesPage() {
<p className="mt-2 text-sm uppercase tracking-[0.2em] text-white/45">
Round 1
</p>
<Link
href={CANDIDATES_BROADCAST_HREF}
className="mt-4 inline-flex items-center gap-2 rounded-full border border-sky-300/25 bg-sky-500/10 px-4 py-2 text-sm font-medium text-sky-100 transition hover:border-sky-200/40 hover:bg-sky-500/15"
>
<span className="material-symbols-outlined !text-[18px]">
live_tv
</span>
Watch Candidates Broadcast
</Link>
</header>
{positions.map((position) => (
<PositionPill
Expand Down
Loading