web: run history list, filter and sort (R1/R2)
Day-grouped run list with sticky day headers (Today / Yesterday / d MMM yyyy / Unknown date), a usage roll-up block, the app's row hierarchy and a bounded filter/sort menu — mirroring RunHistoryScreen.kt, ListFilter.kt and ListSort.kt. New pure helpers live in src/runs.js with focused unit tests; app.js keeps the wiring and sets server strings with textContent. R1 done, R2 partial: no per-row "needs you" mark exists in the Android app; its wording is deferred to R15 (separate attention surface).
This commit is contained in:
+181
-4
@@ -95,9 +95,6 @@ button.ghost { background: transparent; }
|
||||
.row-head { display: flex; gap: 8px; justify-content: space-between; align-items: center; }
|
||||
.row-title { font-weight: 600; }
|
||||
.row-meta { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
|
||||
.row-diag { display: block; color: var(--warn); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
|
||||
.usage { display: flex; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 12px; }
|
||||
|
||||
.detail { padding: 16px; }
|
||||
.detail h2 { margin: 0 0 12px; display: flex; gap: 10px; align-items: center; }
|
||||
@@ -120,9 +117,17 @@ button.ghost { background: transparent; }
|
||||
.artifacts a { color: var(--accent); margin-right: 10px; }
|
||||
|
||||
.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; border: 1px solid var(--border); color: var(--muted); }
|
||||
.chip-running, .chip-queued { color: var(--warn); border-color: var(--warn); }
|
||||
/* The app-owned status hues (RunStatusPalette): status is never colour-only,
|
||||
every chip still carries its own label. */
|
||||
.chip-running, .chip-active { color: #7fb2f0; border-color: #7fb2f0; }
|
||||
.chip-waiting { color: #8edff5; border-color: #8edff5; }
|
||||
.chip-succeeded { color: var(--ok); border-color: var(--ok); }
|
||||
.chip-failed { color: var(--bad); border-color: var(--bad); }
|
||||
.chip-canceled { color: #889391; border-color: #889391; }
|
||||
.chip-interrupted { color: var(--warn); border-color: var(--warn); }
|
||||
.chip-queued { color: #9aa6a2; border-color: #9aa6a2; }
|
||||
.chip-blocked { color: #f0a35e; border-color: #f0a35e; }
|
||||
.chip-skipped { color: #a8b8c8; border-color: #a8b8c8; }
|
||||
|
||||
.dot::before { content: "●"; margin-right: 6px; }
|
||||
.dot.ok::before { color: var(--ok); }
|
||||
@@ -142,3 +147,175 @@ button.ghost { background: transparent; }
|
||||
.banner.error { background: #2c1616; color: var(--bad); }
|
||||
|
||||
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 12px; }
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
Runs history: toolbar, filter/sort menus, usage roll-up, sticky day headers
|
||||
and the run rows. Hand-written, dark palette, no framework.
|
||||
--------------------------------------------------------------------------- */
|
||||
|
||||
.list.runs {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* The filter/sort menus hang below the toolbar; keep them unclipped so their
|
||||
bounded, scrollable box can be reached over the rows beneath. */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.run-toolbar {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
padding: 8px 12px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.run-toolbar .spacer { flex: 1; }
|
||||
.run-toolbar button.ghost { padding: 4px 10px; font-size: 12px; }
|
||||
.filter-btn.active { border-color: var(--accent); color: var(--accent); }
|
||||
|
||||
.menu-anchor { position: relative; }
|
||||
.menu {
|
||||
position: absolute;
|
||||
top: calc(100% + 4px);
|
||||
left: 0;
|
||||
z-index: 6;
|
||||
min-width: 210px;
|
||||
/* The filter menu lists every pipeline, so with a busy history it is taller
|
||||
than the viewport. Bound it to the viewport and scroll it in place: every
|
||||
section (Status, Pipeline, Time range) and the Clear filters/Done actions
|
||||
stay reachable instead of being clipped off-screen. */
|
||||
max-height: min(70vh, 600px);
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
padding: 6px;
|
||||
background: var(--surface-2);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
|
||||
display: grid;
|
||||
gap: 2px;
|
||||
}
|
||||
.menu-section {
|
||||
font-size: 11px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
color: var(--muted);
|
||||
padding: 6px 8px 2px;
|
||||
}
|
||||
.menu-divider { height: 1px; background: var(--border); margin: 6px 0; }
|
||||
.menu-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; }
|
||||
.menu-actions button { padding: 4px 8px; font-size: 12px; }
|
||||
.menu-item {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
padding: 6px 8px;
|
||||
border-radius: 6px;
|
||||
font-size: 13px;
|
||||
}
|
||||
.menu-item:hover { background: var(--surface); }
|
||||
.menu-item.selected { color: var(--accent); }
|
||||
|
||||
.filter-check {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
padding: 4px 8px;
|
||||
border-radius: 6px;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
}
|
||||
/* Pipeline names can be long; keep each option on one line inside the bounded
|
||||
menu width rather than wrapping to two or three lines. */
|
||||
.filter-check span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.filter-check:hover { background: var(--surface); }
|
||||
.filter-check input { accent-color: var(--accent); }
|
||||
.filter-menu { min-width: 240px; max-width: 340px; grid-template-columns: minmax(0, 1fr); }
|
||||
|
||||
/* The list body is the scroll container so the day headers can stick to its top
|
||||
without depending on the (wrapping) top bar's height. */
|
||||
.run-scroll {
|
||||
max-height: calc(100vh - 210px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.metrics {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.metric { display: flex; flex-direction: column; min-width: 56px; }
|
||||
.metric-value { font-size: 18px; font-weight: 600; line-height: 1.2; }
|
||||
.metric-label { font-size: 11px; color: var(--muted); }
|
||||
.metric-succeeded .metric-value { color: var(--ok); }
|
||||
.metric-failed .metric-value { color: var(--bad); }
|
||||
.metric-canceled .metric-value { color: #889391; }
|
||||
.metric-interrupted .metric-value { color: var(--warn); }
|
||||
.metric-active .metric-value { color: #7fb2f0; }
|
||||
|
||||
.day-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
padding: 7px 16px;
|
||||
background: var(--surface);
|
||||
border-bottom: 1px solid var(--border);
|
||||
font-size: 11px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.run-row { display: block; padding: 10px 14px; }
|
||||
.run-row-head { display: flex; align-items: center; gap: 8px; }
|
||||
.run-row-title { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.run-row-pipeline { display: flex; align-items: center; gap: 8px; margin-top: 2px; color: var(--muted); font-size: 12px; }
|
||||
.run-row-pipeline-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.run-row-progress,
|
||||
.run-row-meta,
|
||||
.run-row-diag {
|
||||
display: block;
|
||||
margin-top: 2px;
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.run-row-diag.error { color: var(--bad); }
|
||||
|
||||
.version-chip {
|
||||
flex: none;
|
||||
padding: 0 7px;
|
||||
border-radius: 999px;
|
||||
border: 1px solid var(--border);
|
||||
background: var(--surface-2);
|
||||
color: var(--muted);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
flex: none;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border: 2px solid var(--border);
|
||||
border-top-color: #7fb2f0;
|
||||
border-radius: 50%;
|
||||
display: inline-block;
|
||||
animation: spin 0.8s linear infinite;
|
||||
}
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
|
||||
.empty-state {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
padding: 16px;
|
||||
color: var(--muted);
|
||||
}
|
||||
.run-list-error { padding: 12px 16px; color: var(--bad); }
|
||||
|
||||
Reference in New Issue
Block a user