feat(web-ui): improve navigation and session UX

This commit is contained in:
William Valentin
2026-04-21 13:07:05 -07:00
parent 8f766b4019
commit 43113f6241
6 changed files with 2056 additions and 46 deletions
+375
View File
@@ -150,6 +150,35 @@ header nav a.active::after {
border-radius: 1px;
}
/* ── Error Notification Badge ─────────────────────────────── */
nav a { position: relative; }
.nav-badge {
display: none;
position: absolute;
top: -2px;
right: -8px;
min-width: 16px;
height: 16px;
padding: 0 4px;
background: var(--error);
color: #fff;
font-size: 0.6rem;
font-weight: 600;
border-radius: 8px;
text-align: center;
line-height: 16px;
animation: badgePop 300ms ease;
}
.nav-badge.visible { display: block; }
@keyframes badgePop {
0% { transform: scale(0); }
60% { transform: scale(1.3); }
100% { transform: scale(1); }
}
/* ── Header Search ────────────────────────────────────────── */
.header-search {
position: relative;
@@ -458,6 +487,43 @@ tr.tr-error .id-cell {
100% { transform: translateX(100%); }
}
/* ── Content-Aware Skeletons ──────────────────────────────── */
.skeleton-card {
background: var(--card);
border: 1px solid var(--border-soft);
border-radius: var(--radius-lg);
padding: 1.25rem;
min-height: 120px;
}
.skeleton-card .skeleton-line { margin-bottom: 0.5rem; }
.skeleton-summary-row {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 1rem;
margin-bottom: 1.5rem;
}
.skeleton-timeline-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem;
border-radius: var(--radius);
background: var(--card);
margin-bottom: 0.5rem;
}
.skeleton-circle {
width: 24px;
height: 24px;
border-radius: 50%;
background: var(--surface-2);
animation: skeletonPulse 1.5s ease-in-out infinite;
flex-shrink: 0;
}
/* ── Status badges ─────────────────────────────────────────── */
.status-badge {
display: inline-flex;
@@ -570,6 +636,141 @@ tr:hover .copy-btn,
.toast-error { border-left: 3px solid var(--error); }
.toast-info { border-left: 3px solid var(--accent); }
/* ── Command Palette ──────────────────────────────────────── */
.cmd-palette-backdrop {
position: fixed;
inset: 0;
z-index: 200;
background: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(4px);
display: flex;
justify-content: center;
padding-top: 20vh;
animation: fadeIn 150ms ease;
}
.cmd-palette {
width: min(520px, 90vw);
max-height: 400px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius-xl);
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
overflow: hidden;
display: flex;
flex-direction: column;
animation: slideDown 150ms ease;
}
.cmd-palette-input-wrap {
display: flex;
align-items: center;
padding: 0.75rem 1rem;
border-bottom: 1px solid var(--border);
gap: 0.5rem;
}
.cmd-palette-input-wrap svg { color: var(--text-dim); flex-shrink: 0; }
.cmd-palette-input {
flex: 1;
background: none;
border: none;
color: var(--text-bright);
font-family: var(--font-body);
font-size: 0.95rem;
outline: none;
}
.cmd-palette-input::placeholder { color: var(--text-dim); }
.cmd-palette-results {
overflow-y: auto;
padding: 0.5rem;
flex: 1;
}
.cmd-palette-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.5rem 0.75rem;
border-radius: var(--radius);
cursor: pointer;
transition: background 100ms;
}
.cmd-palette-item:hover,
.cmd-palette-item.selected {
background: var(--accent-dim);
}
.cmd-palette-item.selected {
outline: 1px solid var(--accent-glow);
}
.cmd-palette-icon {
width: 28px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
border-radius: var(--radius);
background: var(--surface-2);
color: var(--text-dim);
font-size: 0.8rem;
flex-shrink: 0;
}
.cmd-palette-item.selected .cmd-palette-icon,
.cmd-palette-item:hover .cmd-palette-icon {
color: var(--accent);
background: var(--accent-dim);
}
.cmd-palette-label {
flex: 1;
font-size: 0.85rem;
color: var(--text);
}
.cmd-palette-label strong {
color: var(--text-bright);
font-weight: 500;
}
.cmd-palette-kbd {
font-family: var(--font-mono);
font-size: 0.7rem;
color: var(--text-dim);
background: var(--surface-2);
padding: 0.15rem 0.4rem;
border-radius: 3px;
border: 1px solid var(--border-soft);
}
.cmd-palette-footer {
display: flex;
align-items: center;
gap: 1rem;
padding: 0.5rem 1rem;
border-top: 1px solid var(--border-soft);
font-size: 0.7rem;
color: var(--text-dim);
}
.cmd-palette-footer kbd {
font-family: var(--font-mono);
font-size: 0.65rem;
background: var(--surface-2);
padding: 0.1rem 0.3rem;
border-radius: 2px;
border: 1px solid var(--border-soft);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
/* ── Load more ─────────────────────────────────────────────── */
.load-more {
display: block;
@@ -752,6 +953,8 @@ tr.expandable:hover .expand-icon::before {
.vm-card:hover {
border-color: rgba(34, 211, 238, 0.18);
transform: translateY(-2px);
transition: transform 200ms ease, box-shadow 200ms ease;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.vm-card:hover::before { opacity: 1; }
@@ -1299,6 +1502,8 @@ tr.expandable:hover .expand-icon::before {
border-radius: var(--radius-lg);
padding: 1.125rem 1.25rem;
transition: border-color 0.2s, border-left-color 0.2s;
position: relative;
overflow: hidden;
}
.summary-card:hover {
@@ -1336,6 +1541,21 @@ tr.expandable:hover .expand-icon::before {
color: var(--error);
}
/* ── Counter Animations ───────────────────────────────────── */
.summary-card-value.bumped {
animation: counterBump 400ms ease;
}
@keyframes counterBump {
0% { transform: scale(1); }
30% { transform: scale(1.15); color: var(--card-accent, var(--accent)); }
100% { transform: scale(1); }
}
.metric-pill-value.bumped {
animation: counterBump 400ms ease;
}
.summary-card-sub {
font-size: 0.72rem;
color: var(--text-dim);
@@ -1343,6 +1563,17 @@ tr.expandable:hover .expand-icon::before {
font-family: var(--font-mono);
}
/* ── Dashboard Sparklines ─────────────────────────────────── */
.summary-card-sparkline {
position: absolute;
bottom: 0;
right: 0;
width: 60%;
height: 40px;
opacity: 0.3;
pointer-events: none;
}
.charts-row {
display: grid;
grid-template-columns: 1fr 320px;
@@ -1998,6 +2229,12 @@ tr.expandable:hover .expand-icon::before {
cursor: pointer;
}
.agent-lane:hover {
transform: translateY(-2px);
transition: transform 200ms ease, box-shadow 200ms ease;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.agent-lane-header {
display: flex;
align-items: center;
@@ -2025,6 +2262,23 @@ tr.expandable:hover .expand-icon::before {
color: var(--text-dim);
}
/* ── Agent Lane Sparklines ────────────────────────────────── */
.agent-lane-sparkline {
display: flex;
align-items: flex-end;
gap: 1px;
height: 20px;
margin-top: 0.25rem;
}
.agent-lane-sparkline-bar {
flex: 1;
background: var(--accent);
border-radius: 1px 1px 0 0;
opacity: 0.5;
min-height: 1px;
}
.agent-lane-dot {
width: 7px;
height: 7px;
@@ -2491,6 +2745,9 @@ tr.expandable:hover .expand-icon::before {
.service-card:hover {
border-color: rgba(34, 211, 238, 0.15);
transform: translateY(-2px);
transition: transform 200ms ease, box-shadow 200ms ease;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.service-card-header {
@@ -2650,6 +2907,65 @@ tr.session-date-group:first-child > td {
padding-top: 0.5rem;
}
/* ── Session Filter Pills ─────────────────────────────────── */
.filter-pills {
display: flex;
gap: 0.5rem;
margin-bottom: 1rem;
}
.filter-pill {
padding: 0.35rem 0.85rem;
border: 1px solid var(--border);
border-radius: 20px;
background: transparent;
color: var(--text-dim);
font-family: var(--font-body);
font-size: 0.78rem;
cursor: pointer;
transition: all 150ms;
}
.filter-pill:hover {
border-color: var(--accent-glow);
color: var(--text);
}
.filter-pill.active {
background: var(--accent-dim);
border-color: var(--accent);
color: var(--accent);
}
.filter-pill .pill-count {
margin-left: 0.35rem;
font-family: var(--font-mono);
font-size: 0.7rem;
opacity: 0.7;
}
/* ── Session Duration Bars ────────────────────────────────── */
tr.clickable.active-session td {
background: var(--accent-dim);
}
tr.clickable.active-session td:first-child {
border-left: 2px solid var(--accent);
padding-left: calc(1.25rem - 2px);
}
.session-duration-bar {
display: inline-block;
height: 4px;
background: var(--accent);
border-radius: 2px;
min-width: 4px;
max-width: 80px;
opacity: 0.6;
margin-left: 0.5rem;
vertical-align: middle;
}
/* ── Span kind badge ──────────────────────────────────────── */
.span-kind-badge {
display: inline-flex;
@@ -3315,6 +3631,26 @@ tr.session-date-group:first-child > td {
margin-bottom: 1.5rem;
}
/* ── Infrastructure Uptime & Freshness ────────────────────────────────── */
.uptime-badge {
display: inline-block;
padding: 0.15rem 0.5rem;
border-radius: 10px;
font-family: var(--font-mono);
font-size: 0.7rem;
font-weight: 500;
}
.uptime-badge.good { background: rgba(52, 211, 153, 0.15); color: var(--success); }
.uptime-badge.warn { background: rgba(251, 191, 36, 0.15); color: var(--warning); }
.uptime-badge.bad { background: rgba(248, 113, 113, 0.15); color: var(--error); }
.freshness-timer {
font-family: var(--font-mono);
font-size: 0.7rem;
color: var(--text-dim);
}
/* ── Skeleton loading ─────────────────────────────────── */
.skeleton-line {
height: 0.85rem;
@@ -3350,3 +3686,42 @@ tr.run-span-row[tabindex="0"]:focus-visible {
outline: 2px solid var(--accent);
outline-offset: -2px;
}
/* ── Page Transitions ─────────────────────────────────────── */
#app {
transition: opacity 120ms ease, transform 120ms ease;
}
#app.transitioning {
opacity: 0;
transform: translateY(4px);
}
/* ── Polish: Cmd+K Hint ──────────────────────────────────── */
.cmd-k-hint {
display: flex;
align-items: center;
background: var(--surface-2);
border: 1px solid var(--border-soft);
border-radius: var(--radius);
padding: 0.2rem 0.5rem;
color: var(--text-dim);
font-family: var(--font-mono);
font-size: 0.7rem;
cursor: pointer;
transition: all 150ms;
}
.cmd-k-hint:hover {
border-color: var(--accent);
color: var(--accent);
}
/* ── Polish: Focus Rings ─────────────────────────────────── */
a:focus-visible,
button:focus-visible,
tr.clickable:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
border-radius: var(--radius);
}