more complete

This commit is contained in:
Theo Browne
2026-02-19 23:40:03 -08:00
parent ce1ef83926
commit c9d68d58eb
2 changed files with 239 additions and 304 deletions

View File

@@ -19,7 +19,7 @@ body {
font-family: 'Inter', -apple-system, sans-serif; font-family: 'Inter', -apple-system, sans-serif;
font-size: 15px; font-size: 15px;
line-height: 1.5; line-height: 1.5;
min-height: 100vh; height: 100vh;
overflow: hidden; overflow: hidden;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
} }
@@ -70,12 +70,12 @@ body {
.main { .main {
flex: 1; flex: 1;
overflow-y: auto; overflow: hidden;
padding: 48px 64px; padding: 32px 64px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center;
align-items: center; align-items: center;
scroll-behavior: smooth;
} }
/* ── Sidebar ──────────────────────────────────────────────────── */ /* ── Sidebar ──────────────────────────────────────────────────── */
@@ -86,33 +86,53 @@ body {
background: var(--surface); background: var(--surface);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow-y: auto; overflow: hidden;
flex-shrink: 0; flex-shrink: 0;
} }
.sidebar__section {
display: flex;
flex-direction: column;
flex-shrink: 0;
}
.sidebar__section--history {
flex: 1;
border-top: 1px solid var(--border);
min-height: 0;
}
.sidebar__header { .sidebar__header {
font-family: 'JetBrains Mono', monospace; font-family: 'JetBrains Mono', monospace;
font-size: 14px; font-size: 14px;
font-weight: 700; font-weight: 700;
letter-spacing: 1px; letter-spacing: 1px;
text-transform: uppercase; text-transform: uppercase;
padding: 32px 32px 16px; padding: 24px 32px 16px;
color: var(--text-dim); color: var(--text-dim);
} }
.sidebar__list { .sidebar__list {
flex: 1; padding: 0 16px 16px;
padding: 0 16px 32px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 4px; gap: 4px;
} }
.sidebar__history-list {
flex: 1;
overflow-y: auto;
padding: 0 16px 24px;
display: flex;
flex-direction: column;
gap: 8px;
}
.standing { .standing {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 16px; gap: 16px;
padding: 16px; padding: 12px 16px;
border-radius: 8px; border-radius: 8px;
transition: background 0.2s; transition: background 0.2s;
} }
@@ -162,7 +182,7 @@ body {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 12px; gap: 12px;
margin-top: 8px; margin-top: 6px;
} }
.standing__bar { .standing__bar {
@@ -189,7 +209,7 @@ body {
} }
.sidebar__legend { .sidebar__legend {
padding: 24px 32px; padding: 16px 32px;
border-top: 1px solid var(--border); border-top: 1px solid var(--border);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -199,23 +219,85 @@ body {
color: var(--text-muted); color: var(--text-muted);
} }
/* ── Past Rounds Mini ─────────────────────────────────────────── */
.past-round-mini {
background: var(--surface-2);
border: 1px solid var(--border);
padding: 12px;
border-radius: 8px;
display: flex;
flex-direction: column;
gap: 8px;
}
.past-round-mini__top {
display: flex;
gap: 12px;
align-items: flex-start;
}
.past-round-mini__num {
font-family: 'JetBrains Mono', monospace;
font-size: 12px;
font-weight: 700;
color: var(--text-muted);
flex-shrink: 0;
}
.past-round-mini__prompt {
font-family: 'Inter', sans-serif;
font-size: 13px;
color: var(--text);
line-height: 1.4;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.past-round-mini__winner {
font-size: 12px;
color: var(--text-muted);
display: flex;
align-items: center;
gap: 6px;
padding-left: 28px;
}
.small-model-name {
font-size: 12px;
}
.small-model-name .model-logo {
width: 14px;
height: 14px;
}
.past-round-mini__tie {
font-family: 'JetBrains Mono', monospace;
font-weight: 700;
color: var(--text-muted);
}
/* ── Arena ─────────────────────────────────────────────────────── */ /* ── Arena ─────────────────────────────────────────────────────── */
.arena { .arena {
width: 100%; width: 100%;
max-width: 1100px; max-width: 1100px;
margin: 0 auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
max-height: 100%;
} }
.arena__header-row { .arena__header-row {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: baseline; align-items: baseline;
margin-bottom: 48px; margin-bottom: 32px;
padding-bottom: 24px; padding-bottom: 16px;
border-bottom: 1px solid var(--border); border-bottom: 1px solid var(--border);
flex-shrink: 0;
} }
.arena__round-badge { .arena__round-badge {
@@ -241,14 +323,15 @@ body {
/* ── Prompt Card ──────────────────────────────────────────────── */ /* ── Prompt Card ──────────────────────────────────────────────── */
.prompt-card { .prompt-card {
margin-bottom: 64px; margin-bottom: 48px;
flex-shrink: 0;
} }
.prompt-card__by { .prompt-card__by {
font-family: 'JetBrains Mono', monospace; font-family: 'JetBrains Mono', monospace;
font-size: 12px; font-size: 12px;
color: var(--text-muted); color: var(--text-muted);
margin-bottom: 24px; margin-bottom: 16px;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 1px; letter-spacing: 1px;
display: flex; display: flex;
@@ -258,7 +341,7 @@ body {
.prompt-card__text { .prompt-card__text {
font-family: 'DM Serif Display', serif; font-family: 'DM Serif Display', serif;
font-size: 56px; font-size: 48px;
line-height: 1.1; line-height: 1.1;
color: var(--text); color: var(--text);
max-width: 95%; max-width: 95%;
@@ -275,7 +358,9 @@ body {
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
gap: 48px; gap: 48px;
margin-bottom: 64px; margin-bottom: 32px;
flex: 1;
min-height: 0;
} }
.contestant { .contestant {
@@ -285,15 +370,17 @@ body {
position: relative; position: relative;
border-top: 4px solid var(--border); border-top: 4px solid var(--border);
padding-top: 24px; padding-top: 24px;
overflow: hidden;
} }
.contestant__header { .contestant__header {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-bottom: 32px; margin-bottom: 24px;
padding-bottom: 24px; padding-bottom: 16px;
border-bottom: 1px solid var(--border); border-bottom: 1px solid var(--border);
flex-shrink: 0;
} }
.contestant__name { .contestant__name {
@@ -318,12 +405,13 @@ body {
.contestant__answer { .contestant__answer {
flex: 1; flex: 1;
min-height: 180px; overflow-y: auto;
min-height: 120px;
} }
.contestant__text { .contestant__text {
font-family: 'DM Serif Display', serif; font-family: 'DM Serif Display', serif;
font-size: 36px; font-size: 28px;
line-height: 1.3; line-height: 1.3;
color: var(--text-dim); color: var(--text-dim);
letter-spacing: -0.5px; letter-spacing: -0.5px;
@@ -336,7 +424,7 @@ body {
.contestant__thinking { .contestant__thinking {
color: var(--text-muted); color: var(--text-muted);
font-family: 'DM Serif Display', serif; font-family: 'DM Serif Display', serif;
font-size: 36px; font-size: 28px;
} }
.contestant__error { .contestant__error {
@@ -345,11 +433,15 @@ body {
font-size: 14px; font-size: 14px;
} }
.contestant__votes { /* ── Votes within Contestant ──────────────────────────────────── */
margin-top: 48px;
}
/* ── Vote Bar ─────────────────────────────────────────────────── */ .contestant__votes-container {
margin-top: 24px;
display: flex;
flex-direction: column;
gap: 16px;
flex-shrink: 0;
}
.vote-bar { .vote-bar {
height: 2px; height: 2px;
@@ -365,7 +457,7 @@ body {
.vote-bar__label { .vote-bar__label {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 16px; margin-top: 12px;
font-family: 'JetBrains Mono', monospace; font-family: 'JetBrains Mono', monospace;
font-size: 13px; font-size: 13px;
color: var(--text-dim); color: var(--text-dim);
@@ -377,73 +469,44 @@ body {
font-size: 18px; font-size: 18px;
} }
/* ── Vote Ticker ──────────────────────────────────────────────── */ .contestant__voters {
.vote-ticker {
border-top: 1px solid var(--border);
padding-top: 48px;
margin-bottom: 64px;
}
.vote-ticker__header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 32px;
}
.vote-ticker__title {
font-family: 'JetBrains Mono', monospace;
font-size: 13px;
font-weight: 700;
letter-spacing: 1px;
color: var(--text-dim);
}
.vote-ticker__status {
font-family: 'JetBrains Mono', monospace;
font-size: 13px;
color: var(--text-muted);
}
.vote-ticker__list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 16px; gap: 8px;
} }
.vote-entry { .voter-badge {
display: flex; display: inline-flex;
align-items: center; align-items: center;
gap: 12px; gap: 6px;
font-family: 'Inter', sans-serif; background: var(--surface-2);
font-size: 14px;
font-weight: 500;
padding: 12px 16px;
border-radius: 8px;
border: 1px solid var(--border); border: 1px solid var(--border);
background: var(--surface); padding: 6px 10px;
border-radius: 6px;
font-size: 12px;
font-family: 'Inter', sans-serif;
font-weight: 500;
} }
.vote-entry--pending { .voter-badge--pending {
opacity: 0.5; opacity: 0.5;
border-style: dashed; border-style: dashed;
} }
.vote-entry__arrow { .voter-badge--error {
opacity: 0.5;
color: var(--text-muted); color: var(--text-muted);
} }
.vote-entry__pending { .pending-votes {
color: var(--text-muted); display: flex;
font-style: italic; flex-wrap: wrap;
font-size: 13px; justify-content: center;
} gap: 8px;
margin-top: 16px;
.vote-entry__error { padding-top: 16px;
color: var(--text-muted); border-top: 1px solid var(--border);
font-style: italic; flex-shrink: 0;
font-size: 13px;
} }
/* ── Round Result (Tie) ───────────────────────────────────────── */ /* ── Round Result (Tie) ───────────────────────────────────────── */
@@ -454,10 +517,12 @@ body {
font-size: 16px; font-size: 16px;
font-weight: 700; font-weight: 700;
letter-spacing: 2px; letter-spacing: 2px;
padding: 32px; padding: 24px;
color: var(--text-dim); color: var(--text-dim);
border: 1px solid var(--border); border: 1px solid var(--border);
border-radius: 8px; border-radius: 8px;
margin-top: 24px;
flex-shrink: 0;
} }
/* ── Waiting State ────────────────────────────────────────────── */ /* ── Waiting State ────────────────────────────────────────────── */
@@ -473,102 +538,6 @@ body {
opacity: 0.5; opacity: 0.5;
} }
/* ── History ──────────────────────────────────────────────────── */
.history {
width: 100%;
max-width: 1100px;
margin: 80px auto 0;
}
.history__title {
font-family: 'JetBrains Mono', monospace;
font-size: 14px;
font-weight: 700;
letter-spacing: 1px;
color: var(--text-dim);
margin-bottom: 32px;
padding-bottom: 24px;
border-bottom: 1px solid var(--border);
}
.past-round {
padding: 32px 0;
border-bottom: 1px solid var(--border);
display: flex;
flex-direction: column;
gap: 24px;
}
.past-round__header {
display: flex;
gap: 24px;
align-items: baseline;
}
.past-round__num {
font-family: 'JetBrains Mono', monospace;
font-size: 14px;
color: var(--text-muted);
width: 32px;
}
.past-round__prompt {
font-family: 'Inter', sans-serif;
font-size: 18px;
font-weight: 600;
color: var(--text);
flex: 1;
}
.past-round__detail {
padding-left: 56px;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 48px;
}
.past-round__competitor {
display: flex;
flex-direction: column;
gap: 12px;
}
.past-round__competitor-header {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 14px;
}
.past-round__answer {
font-family: 'DM Serif Display', serif;
font-size: 20px;
color: var(--text-dim);
line-height: 1.4;
}
.past-round__competitor--winner .past-round__answer {
color: var(--text);
}
.past-round__score {
font-family: 'JetBrains Mono', monospace;
font-weight: 700;
color: var(--text-muted);
}
.past-round__winner-tag {
font-family: 'JetBrains Mono', monospace;
font-weight: 700;
font-size: 10px;
padding: 2px 6px;
background: var(--text);
color: var(--bg);
border-radius: 4px;
text-transform: uppercase;
}
/* ── Game Over ────────────────────────────────────────────────── */ /* ── Game Over ────────────────────────────────────────────────── */
.game-over { .game-over {
@@ -663,10 +632,6 @@ body {
object-fit: contain; object-fit: contain;
} }
.model-logo.invert-dark {
/* Some logos might need this if they are dark naturally, but SVG styling handles it or we'll assume they're visible. */
}
.timer { .timer {
color: var(--text-muted); color: var(--text-muted);
font-family: 'JetBrains Mono', monospace; font-family: 'JetBrains Mono', monospace;
@@ -700,7 +665,7 @@ body {
border-left: none; border-left: none;
border-top: 1px solid var(--border); border-top: 1px solid var(--border);
max-height: 300px; max-height: 300px;
overflow-y: auto;
} }
.showdown { grid-template-columns: 1fr; gap: 48px; } .showdown { grid-template-columns: 1fr; gap: 32px; }
.past-round__detail { grid-template-columns: 1fr; }
} }

View File

@@ -112,12 +112,14 @@ function ContestantPanel({
totalVotes, totalVotes,
isWinner, isWinner,
showVotes, showVotes,
voters,
}: { }: {
task: TaskInfo; task: TaskInfo;
voteCount: number; voteCount: number;
totalVotes: number; totalVotes: number;
isWinner: boolean; isWinner: boolean;
showVotes: boolean; showVotes: boolean;
voters: VoteInfo[];
}) { }) {
const color = getColor(task.model.name); const color = getColor(task.model.name);
const pct = totalVotes > 0 ? Math.round((voteCount / totalVotes) * 100) : 0; const pct = totalVotes > 0 ? Math.round((voteCount / totalVotes) * 100) : 0;
@@ -144,13 +146,22 @@ function ContestantPanel({
</div> </div>
{showVotes && ( {showVotes && (
<div className="contestant__votes"> <div className="contestant__votes-container">
<div className="vote-bar"> <div className="contestant__votes">
<div className="vote-bar__fill" style={{ width: `${pct}%`, background: color }} /> <div className="vote-bar">
<div className="vote-bar__fill" style={{ width: `${pct}%`, background: color }} />
</div>
<div className="vote-bar__label">
<span className="vote-bar__count" style={{ color }}>{voteCount}</span>
<span className="vote-bar__pct">{pct}%</span>
</div>
</div> </div>
<div className="vote-bar__label"> <div className="contestant__voters">
<span className="vote-bar__count" style={{ color }}>{voteCount}</span> {voters.map((v, i) => (
<span className="vote-bar__pct">{pct}%</span> <div key={i} className="voter-badge">
<ModelName model={v.voter} showLogo={true} />
</div>
))}
</div> </div>
</div> </div>
)} )}
@@ -158,37 +169,16 @@ function ContestantPanel({
); );
} }
function VoteTicker({ votes }: { votes: VoteInfo[] }) { function PendingVotes({ votes }: { votes: VoteInfo[] }) {
const finishedVotes = votes.filter((v) => v.finishedAt); if (votes.length === 0) return null;
const pendingVotes = votes.filter((v) => !v.finishedAt);
return ( return (
<div className="vote-ticker"> <div className="pending-votes">
<div className="vote-ticker__header"> {votes.map((v, i) => (
<span className="vote-ticker__title">JUDGES</span> <div key={i} className={`voter-badge ${!v.finishedAt ? 'voter-badge--pending' : 'voter-badge--error'}`}>
<span className="vote-ticker__status"> <ModelName model={v.voter} showLogo={true} />
{finishedVotes.length} / {votes.length} {!v.finishedAt ? " deliberating…" : " abstained"}
</span> </div>
</div> ))}
<div className="vote-ticker__list">
{finishedVotes.map((vote, i) => (
<div key={`f-${i}`} className="vote-entry vote-entry--in">
<ModelName model={vote.voter} showLogo={false} />
<span className="vote-entry__arrow"></span>
{vote.error || !vote.votedFor ? (
<span className="vote-entry__error">abstained</span>
) : (
<ModelName model={vote.votedFor} showLogo={false} />
)}
</div>
))}
{pendingVotes.map((vote, i) => (
<div key={`p-${i}`} className="vote-entry vote-entry--pending">
<ModelName model={vote.voter} showLogo={false} />
<span className="vote-entry__pending">deliberating</span>
</div>
))}
</div>
</div> </div>
); );
} }
@@ -206,6 +196,10 @@ function Arena({ round, total }: { round: RoundState; total: number }) {
} }
const totalVotes = votesA + votesB; const totalVotes = votesA + votesB;
const votersA = round.votes.filter(v => v.votedFor?.name === contA.name);
const votersB = round.votes.filter(v => v.votedFor?.name === contB.name);
const pendingOrAbstained = round.votes.filter(v => !v.finishedAt || v.error || !v.votedFor);
const phaseLabel = const phaseLabel =
round.phase === "prompting" round.phase === "prompting"
? "✍️ WRITING PROMPT" ? "✍️ WRITING PROMPT"
@@ -235,6 +229,7 @@ function Arena({ round, total }: { round: RoundState; total: number }) {
totalVotes={totalVotes} totalVotes={totalVotes}
isWinner={isDone && votesA > votesB} isWinner={isDone && votesA > votesB}
showVotes={showVotes} showVotes={showVotes}
voters={votersA}
/> />
<ContestantPanel <ContestantPanel
task={round.answerTasks[1]} task={round.answerTasks[1]}
@@ -242,10 +237,11 @@ function Arena({ round, total }: { round: RoundState; total: number }) {
totalVotes={totalVotes} totalVotes={totalVotes}
isWinner={isDone && votesB > votesA} isWinner={isDone && votesB > votesA}
showVotes={showVotes} showVotes={showVotes}
voters={votersB}
/> />
</div> </div>
{showVotes && <VoteTicker votes={round.votes} />} {showVotes && <PendingVotes votes={pendingOrAbstained} />}
{isDone && votesA === votesB && ( {isDone && votesA === votesB && (
<div className="round-result">IT&rsquo;S A TIE!</div> <div className="round-result">IT&rsquo;S A TIE!</div>
@@ -256,45 +252,23 @@ function Arena({ round, total }: { round: RoundState; total: number }) {
); );
} }
function PastRoundEntry({ round }: { round: RoundState }) { function PastRoundMini({ round }: { round: RoundState }) {
const [contA, contB] = round.contestants; const [contA, contB] = round.contestants;
let votesA = 0, let votesA = 0, votesB = 0;
votesB = 0;
for (const v of round.votes) { for (const v of round.votes) {
if (v.votedFor?.name === contA.name) votesA++; if (v.votedFor?.name === contA.name) votesA++;
else if (v.votedFor?.name === contB.name) votesB++; else if (v.votedFor?.name === contB.name) votesB++;
} }
const winner = votesA > votesB ? contA : votesB > votesA ? contB : null;
const isAWinner = votesA > votesB;
const isBWinner = votesB > votesA;
return ( return (
<div className="past-round"> <div className="past-round-mini">
<div className="past-round__header"> <div className="past-round-mini__top">
<span className="past-round__num">R{round.num}</span> <span className="past-round-mini__num">R{round.num}</span>
<span className="past-round__prompt">{round.prompt}</span> <span className="past-round-mini__prompt">"{round.prompt}"</span>
</div> </div>
<div className="past-round__detail"> <div className="past-round-mini__winner">
<div className={`past-round__competitor ${isAWinner ? 'past-round__competitor--winner' : ''}`}> {winner ? <><ModelName model={winner} showLogo={true} className="small-model-name" /> won</> : <span className="past-round-mini__tie">Tie</span>}
<div className="past-round__competitor-header">
<ModelName model={contA} />
<div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>
<span className="past-round__score">{votesA}</span>
{isAWinner && <span className="past-round__winner-tag">WINNER</span>}
</div>
</div>
<span className="past-round__answer">&ldquo;{round.answerTasks[0].result}&rdquo;</span>
</div>
<div className={`past-round__competitor ${isBWinner ? 'past-round__competitor--winner' : ''}`}>
<div className="past-round__competitor-header">
<ModelName model={contB} />
<div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>
<span className="past-round__score">{votesB}</span>
{isBWinner && <span className="past-round__winner-tag">WINNER</span>}
</div>
</div>
<span className="past-round__answer">&ldquo;{round.answerTasks[1].result}&rdquo;</span>
</div>
</div> </div>
</div> </div>
); );
@@ -321,7 +295,7 @@ function GameOver({ scores }: { scores: Record<string, number> }) {
); );
} }
function Sidebar({ scores, activeRound }: { scores: Record<string, number>; activeRound: RoundState | null }) { function Sidebar({ scores, activeRound, completed }: { scores: Record<string, number>; activeRound: RoundState | null; completed: RoundState[] }) {
const sorted = Object.entries(scores).sort((a, b) => b[1] - a[1]); const sorted = Object.entries(scores).sort((a, b) => b[1] - a[1]);
const maxScore = sorted[0]?.[1] || 1; const maxScore = sorted[0]?.[1] || 1;
@@ -333,44 +307,57 @@ function Sidebar({ scores, activeRound }: { scores: Record<string, number>; acti
return ( return (
<aside className="sidebar"> <aside className="sidebar">
<div className="sidebar__header">STANDINGS</div> <div className="sidebar__section">
<div className="sidebar__list"> <div className="sidebar__header">STANDINGS</div>
{sorted.map(([name, score], i) => { <div className="sidebar__list">
const pct = maxScore > 0 ? Math.round((score / maxScore) * 100) : 0; {sorted.map(([name, score], i) => {
const color = getColor(name); const pct = maxScore > 0 ? Math.round((score / maxScore) * 100) : 0;
const isActive = competing.has(name); const color = getColor(name);
const isJudging = judging.has(name); const isActive = competing.has(name);
const isPrompting = name === prompting; const isJudging = judging.has(name);
const isPrompting = name === prompting;
let role = ""; let role = "";
if (isActive) role = "⚔️"; if (isActive) role = "⚔️";
else if (isPrompting) role = "✍️"; else if (isPrompting) role = "✍️";
else if (isJudging) role = "🗳️"; else if (isJudging) role = "🗳️";
return ( return (
<div key={name} className={`standing ${isActive ? "standing--active" : ""}`}> <div key={name} className={`standing ${isActive ? "standing--active" : ""}`}>
<div className="standing__rank">{i === 0 && score > 0 ? "👑" : `${i + 1}.`}</div> <div className="standing__rank">{i === 0 && score > 0 ? "👑" : `${i + 1}.`}</div>
<div className="standing__info"> <div className="standing__info">
<div className="standing__name-row"> <div className="standing__name-row">
<ModelName model={{id: name, name}} /> <ModelName model={{id: name, name}} />
{role && <span className="standing__role">{role}</span>} {role && <span className="standing__role">{role}</span>}
</div> </div>
<div className="standing__bar-row"> <div className="standing__bar-row">
<div className="standing__bar"> <div className="standing__bar">
<div className="standing__bar-fill" style={{ width: `${pct}%`, background: color }} /> <div className="standing__bar-fill" style={{ width: `${pct}%`, background: color }} />
</div>
<span className="standing__score">{score}</span>
</div> </div>
<span className="standing__score">{score}</span>
</div> </div>
</div> </div>
</div> );
); })}
})} </div>
{activeRound && (
<div className="sidebar__legend">
<span> COMPETING</span>
<span> PROMPTING</span>
<span>🗳 JUDGING</span>
</div>
)}
</div> </div>
{activeRound && (
<div className="sidebar__legend"> {completed.length > 0 && (
<span> COMPETING</span> <div className="sidebar__section sidebar__section--history">
<span> PROMPTING</span> <div className="sidebar__header">PAST ROUNDS</div>
<span>🗳 JUDGING</span> <div className="sidebar__history-list">
{[...completed].reverse().map(round => (
<PastRoundMini key={round.num} round={round} />
))}
</div>
</div> </div>
)} )}
</aside> </aside>
@@ -422,14 +409,6 @@ function App() {
}; };
}, []); }, []);
useEffect(() => {
if (mainRef.current) {
// Don't auto-scroll aggressively if they are just reading past rounds
// but maybe scroll to top of arena when round changes?
// Leaving this simple for now.
}
}, [state?.active?.num]);
if (!connected || !state) { if (!connected || !state) {
return <ConnectingScreen />; return <ConnectingScreen />;
} }
@@ -458,18 +437,9 @@ function App() {
)} )}
{state.done && <GameOver scores={state.scores} />} {state.done && <GameOver scores={state.scores} />}
{state.completed.length > 0 && (
<div className="history">
<div className="history__title">PAST ROUNDS</div>
{[...state.completed].reverse().map((round) => (
<PastRoundEntry key={round.num} round={round} />
))}
</div>
)}
</main> </main>
<Sidebar scores={state.scores} activeRound={state.active} /> <Sidebar scores={state.scores} activeRound={state.active} completed={state.completed} />
</div> </div>
</div> </div>
); );