Files
golfgame/tests/soak/dashboard/dashboard.css
adlee-was-taken a35e789eb9 feat(soak): dashboard status grid UI
Static HTML page served by DashboardServer. Renders the 2×2 room
grid with progress bars and player tiles, subscribes to WS events,
updates tiles live. Click-to-watch modal is wired but receives
frames once the CDP screencaster ships in Task 22.

Adds escapeHtml() on all user-controlled strings (roomId, player
key) — not strictly needed for our trusted bot traffic but cheap
XSS hardening against future scenarios that accept user input.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 18:55:21 -04:00

174 lines
3.7 KiB
CSS

:root {
--bg: #0a0e16;
--panel: #0e1420;
--border: #1a2230;
--text: #c8d4e4;
--accent: #7fbaff;
--good: #6fd08f;
--warn: #ffb84d;
--err: #ff5c6c;
--muted: #556577;
}
* { box-sizing: border-box; }
body {
margin: 0;
font-family: -apple-system, system-ui, 'SF Mono', Consolas, monospace;
background: var(--bg);
color: var(--text);
}
.dash-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 20px;
background: linear-gradient(135deg, #0f1823, #0a1018);
border-bottom: 1px solid var(--border);
}
.dash-header h1 { margin: 0; font-size: 16px; color: var(--accent); }
.dash-header .meta { font-size: 11px; color: var(--muted); }
.dash-header .meta span + span { margin-left: 12px; }
.meta-bar {
display: flex;
gap: 24px;
padding: 10px 20px;
background: #0c131d;
border-bottom: 1px solid var(--border);
font-size: 12px;
}
.meta-bar .stat .label { color: var(--muted); margin-right: 6px; }
.meta-bar .stat span:last-child { color: #fff; font-weight: 600; }
.rooms {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1px;
background: var(--border);
}
.room {
background: var(--panel);
padding: 14px 18px;
min-height: 180px;
}
.room-title {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}
.room-title .name { font-size: 13px; color: var(--accent); font-weight: 600; }
.room-title .phase {
font-size: 10px;
padding: 2px 8px;
border-radius: 10px;
background: #1a3a2a;
color: var(--good);
}
.room-title .phase.lobby { background: #3a2a1a; color: var(--warn); }
.room-title .phase.err { background: #3a1a1a; color: var(--err); }
.players {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 4px;
font-size: 11px;
margin-bottom: 8px;
}
.player {
display: flex;
justify-content: space-between;
padding: 4px 8px;
background: #0a0f18;
border-radius: 3px;
cursor: pointer;
border: 1px solid transparent;
}
.player:hover { border-color: var(--accent); }
.player.active {
background: #1a2a40;
border-left: 2px solid var(--accent);
}
.player .score { color: var(--muted); }
.progress-bar {
height: 4px;
background: var(--border);
border-radius: 2px;
overflow: hidden;
margin-top: 6px;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, var(--accent), var(--good));
transition: width 0.3s;
}
.room-meta {
font-size: 10px;
color: var(--muted);
display: flex;
gap: 12px;
margin-top: 6px;
}
.log {
border-top: 1px solid var(--border);
background: #080c13;
max-height: 160px;
overflow-y: auto;
}
.log .log-header {
padding: 6px 20px;
font-size: 10px;
text-transform: uppercase;
color: var(--muted);
border-bottom: 1px solid var(--border);
}
.log ul { list-style: none; margin: 0; padding: 4px 20px; font-size: 10px; }
.log li { line-height: 1.5; font-family: monospace; color: var(--muted); }
.log li.warn { color: var(--warn); }
.log li.error { color: var(--err); }
.video-modal {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.85);
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
}
.video-modal.hidden { display: none; }
.video-modal-content {
background: var(--panel);
border: 1px solid var(--border);
border-radius: 6px;
padding: 16px;
max-width: 90vw;
max-height: 90vh;
}
.video-modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
color: var(--accent);
font-size: 13px;
}
.video-modal-header button {
background: var(--border);
color: var(--text);
border: none;
padding: 4px 12px;
border-radius: 3px;
cursor: pointer;
}
#video-frame {
display: block;
max-width: 100%;
max-height: 70vh;
border: 1px solid var(--border);
}