feat: add swarm strip to dashboard

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
William Valentin
2026-03-18 10:14:48 -07:00
parent 7c043b78a4
commit 07c16653cd
2 changed files with 873 additions and 204 deletions
+380 -10
View File
@@ -30,6 +30,9 @@
--radius: 6px;
--radius-lg: 10px;
--radius-xl: 14px;
--header-bg: rgba(7, 9, 15, 0.82);
--code-text: #7a9ab5;
}
/* ── Reset ─────────────────────────────────────────────────── */
@@ -62,7 +65,7 @@ header {
justify-content: space-between;
padding: 0 2rem;
height: 54px;
background: rgba(7, 9, 15, 0.82);
background: var(--header-bg);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border-bottom: 1px solid var(--border);
@@ -301,7 +304,7 @@ main > * {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
overflow: hidden;
overflow-x: auto;
}
table {
@@ -394,6 +397,15 @@ tr.clickable:hover td:first-child {
letter-spacing: 0.02em;
}
.model-badge {
font-family: var(--font-mono);
font-size: 0.72rem;
background: var(--surface-2);
color: var(--text-dim);
padding: 2px 6px;
border-radius: 3px;
}
/* ── Load more ─────────────────────────────────────────────── */
.load-more {
display: block;
@@ -458,7 +470,7 @@ tr.expandable:hover .expand-icon::before {
font-size: 0.78rem;
white-space: pre-wrap;
word-break: break-all;
color: #7a9ab5;
color: var(--code-text);
line-height: 1.75;
border-top: 1px solid var(--border);
}
@@ -737,6 +749,22 @@ tr.expandable:hover .expand-icon::before {
letter-spacing: 0.06em;
}
/* ── Swarm strip ──────────────────────────────────────────── */
.swarm-strip {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
margin-bottom: 1.5rem;
}
.vm-pill.degraded {
border-color: rgba(251, 191, 36, 0.3);
}
.vm-pill.degraded .vm-pill-dot {
background: var(--warning);
}
.timeline {
display: flex;
flex-direction: column;
@@ -850,7 +878,7 @@ tr.expandable:hover .expand-icon::before {
border-radius: var(--radius);
font-family: var(--font-mono);
font-size: 0.75rem;
color: #7a9ab5;
color: var(--code-text);
white-space: pre-wrap;
word-break: break-all;
line-height: 1.65;
@@ -1068,9 +1096,9 @@ tr.expandable:hover .expand-icon::before {
}
.summary-card-value {
font-family: var(--font-display);
font-family: var(--font-body);
font-size: 2rem;
font-weight: 800;
font-weight: 600;
color: var(--text-bright);
letter-spacing: -0.02em;
line-height: 1;
@@ -1300,10 +1328,17 @@ tr.expandable:hover .expand-icon::before {
top: -1px;
}
.fw-dot.openclaw { background: var(--accent); }
.fw-dot.claude-code { background: var(--success); }
.fw-dot.opencode { background: var(--purple); }
.fw-dot.unknown { background: var(--text-dim); }
.fw-dot.openclaw { background: var(--accent); --fw-glow: var(--accent); }
.fw-dot.claude-code { background: var(--success); --fw-glow: var(--success); }
.fw-dot.opencode { background: var(--purple); --fw-glow: var(--purple); }
.fw-dot.unknown { background: var(--text-dim); --fw-glow: var(--text-dim); }
.fw-dot.ended { opacity: 0.3; }
.fw-dot.active { box-shadow: 0 0 6px var(--fw-glow); animation: fwPulse 2s ease-in-out infinite; }
@keyframes fwPulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
/* ── Meta tiles ───────────────────────────────────────────── */
.meta-tiles {
@@ -1350,3 +1385,338 @@ tr.expandable:hover .expand-icon::before {
letter-spacing: 0.08em;
margin-bottom: 0.5rem;
}
/* ── Light theme variables ────────────────────────────────── */
[data-theme="light"] {
--bg: #f5f7fa;
--surface: #ffffff;
--surface-2: #edf0f5;
--card: rgba(255, 255, 255, 0.9);
--border: rgba(200, 210, 225, 0.8);
--border-soft: rgba(200, 210, 225, 0.5);
--text: #3d4a5c;
--text-dim: #8b9ab0;
--text-bright: #1a2332;
--accent: #0891b2;
--accent-dim: rgba(8, 145, 178, 0.08);
--accent-glow: rgba(8, 145, 178, 0.15);
--success: #059669;
--error: #dc2626;
--warning: #d97706;
--purple: #7c3aed;
--header-bg: rgba(245, 247, 250, 0.92);
--code-text: #4a6580;
}
[data-theme="light"] body {
background-image:
radial-gradient(ellipse 80% 40% at 50% -20%, rgba(8, 145, 178, 0.04) 0%, transparent 70%),
radial-gradient(circle at 1px 1px, rgba(8, 145, 178, 0.025) 1px, transparent 0);
}
@media (prefers-color-scheme: light) {
html:not([data-theme]) {
--bg: #f5f7fa;
--surface: #ffffff;
--surface-2: #edf0f5;
--card: rgba(255, 255, 255, 0.9);
--border: rgba(200, 210, 225, 0.8);
--border-soft: rgba(200, 210, 225, 0.5);
--text: #3d4a5c;
--text-dim: #8b9ab0;
--text-bright: #1a2332;
--accent: #0891b2;
--accent-dim: rgba(8, 145, 178, 0.08);
--accent-glow: rgba(8, 145, 178, 0.15);
--success: #059669;
--error: #dc2626;
--warning: #d97706;
--purple: #7c3aed;
--header-bg: rgba(245, 247, 250, 0.92);
--code-text: #4a6580;
}
html:not([data-theme]) body {
background-image:
radial-gradient(ellipse 80% 40% at 50% -20%, rgba(8, 145, 178, 0.04) 0%, transparent 70%),
radial-gradient(circle at 1px 1px, rgba(8, 145, 178, 0.025) 1px, transparent 0);
}
}
/* ── Theme toggle button ──────────────────────────────────── */
.theme-toggle {
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
border: 1px solid var(--border);
border-radius: var(--radius);
background: transparent;
color: var(--text-dim);
cursor: pointer;
transition: color 0.15s, border-color 0.15s, background 0.15s;
margin-left: 0.75rem;
flex-shrink: 0;
}
.theme-toggle:hover {
color: var(--text-bright);
border-color: var(--accent);
background: var(--accent-dim);
}
/* ── Agent lanes ──────────────────────────────────────────── */
.agents-summary-row {
display: flex;
gap: 1.25rem;
margin-bottom: 1.25rem;
flex-wrap: wrap;
}
.agents-summary-stat {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 0.6rem 1rem;
font-family: var(--font-mono);
font-size: 0.78rem;
color: var(--text-dim);
display: flex;
align-items: center;
gap: 0.5rem;
}
.agents-summary-stat .value {
color: var(--text-bright);
font-weight: 600;
}
.agent-lanes {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1.25rem;
}
@media (max-width: 900px) {
.agent-lanes {
grid-template-columns: 1fr;
}
}
.agent-lane {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
display: flex;
flex-direction: column;
overflow: hidden;
}
.agent-lane-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.875rem 1.125rem;
border-bottom: 1px solid var(--border-soft);
}
.agent-lane-name {
display: flex;
align-items: center;
gap: 0.5rem;
font-family: var(--font-display);
font-size: 0.9rem;
font-weight: 700;
color: var(--text-bright);
text-transform: uppercase;
letter-spacing: 0.06em;
}
.agent-lane-dot {
width: 7px;
height: 7px;
border-radius: 50%;
flex-shrink: 0;
}
.agent-lane-dot.online {
background: var(--success);
box-shadow: 0 0 6px rgba(52, 211, 153, 0.5);
animation: livePulse 2s ease-in-out infinite;
}
.agent-lane-dot.offline {
background: var(--text-dim);
opacity: 0.5;
}
.agent-lane-status {
font-size: 0.7rem;
font-weight: 600;
color: var(--text-dim);
text-transform: uppercase;
letter-spacing: 0.06em;
}
.agent-lane-status.has-sessions {
color: var(--success);
}
/* ── Active operations ────────────────────────────────────── */
.active-ops {
padding: 0.625rem 1.125rem;
display: flex;
flex-direction: column;
gap: 0.375rem;
border-bottom: 1px solid var(--border-soft);
}
.active-op {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.35rem 0.625rem;
background: var(--accent-dim);
border: 1px solid rgba(34, 211, 238, 0.15);
border-radius: var(--radius);
font-size: 0.75rem;
animation: fadeUp 0.2s ease both;
}
[data-theme="light"] .active-op {
border-color: rgba(8, 145, 178, 0.2);
}
.active-op.stale {
opacity: 0.5;
}
.active-op-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--success);
box-shadow: 0 0 6px rgba(52, 211, 153, 0.5);
animation: livePulse 1.5s ease-in-out infinite;
flex-shrink: 0;
}
.active-op.stale .active-op-dot {
background: var(--warning);
box-shadow: none;
animation: none;
}
.active-op-name {
font-family: var(--font-mono);
color: var(--accent);
font-weight: 500;
}
.active-op-time {
font-family: var(--font-mono);
color: var(--text-dim);
font-size: 0.7rem;
margin-left: auto;
}
.active-op-stale {
color: var(--warning);
font-size: 0.65rem;
font-weight: 600;
}
/* ── Lane event feed ──────────────────────────────────────── */
.agent-lane-events {
flex: 1;
overflow-y: auto;
max-height: 520px;
padding: 0.625rem;
position: relative;
}
.agent-lane-events::after {
content: '';
position: sticky;
bottom: 0;
left: 0;
right: 0;
height: 32px;
background: linear-gradient(to bottom, transparent, var(--surface));
pointer-events: none;
display: block;
}
.agent-lane-events .timeline-event {
padding: 0.5rem 0.625rem;
border-radius: var(--radius);
margin-bottom: 0.25rem;
border: 1px solid var(--border-soft);
background: transparent;
font-size: 0.82rem;
}
.agent-lane-events .timeline-event-header {
margin-bottom: 0.2rem;
}
.agent-lane-events .timeline-event-time {
font-size: 0.6rem;
}
.agent-lane-events .empty-state {
padding: 2rem 1rem;
font-size: 0.78rem;
}
/* ── Mobile layout ────────────────────────────────────────── */
@media (max-width: 640px) {
main {
padding: 1.25rem 1rem;
}
header {
padding: 0 1rem;
}
header nav a {
padding: 0.375rem 0.5rem;
font-size: 0.75rem;
}
}
@media (max-width: 480px) {
header {
height: auto;
flex-wrap: wrap;
padding: 0.5rem 1rem;
gap: 0;
}
.header-logo {
flex: 1;
}
header nav {
width: 100%;
justify-content: flex-start;
border-top: 1px solid var(--border-soft);
padding: 0.375rem 0;
margin-top: 0.25rem;
gap: 0;
}
header nav a {
padding: 0.3rem 0.5rem;
font-size: 0.73rem;
}
}