web: app shell — left destination rail, settings-hosted connection, viewport panes

The layout item's work plus the two defects its review found:
- the wide grid sized the list track from its MAX, so at 600-759px the detail pane
  was clipped to 40-199px; cap the list below 900px and narrow the rail there
  (measured now: detail 232px at 600, 332 at 700, 340 at 900, 880 at 1440);
- the shell said 'Not connected' on a fresh page because the prefilled proxy URL
  validated; the status now reflects a SAVED endpoint ('Not configured' until then)
  and refreshes as the draft changes.

Includes the rail + bottom dock, connection moved into Settings, viewport-only
scrolling with panes that scroll themselves, tab semantics, skip link, h1 per
route, and the design tokens.
This commit is contained in:
2026-10-19 20:03:56 +01:00
parent 321e046377
commit 84e136436c
26 changed files with 2619 additions and 830 deletions
+167 -178
View File
@@ -1,135 +1,124 @@
/* Throwaway spike styling. Dark-first, echoing the Android client's theme. */
/* Base layer: the dark palette comes from design/tokens/tokens.css (linked
first); this file only paints shared primitives. The shell grid lives in
shell.css, list/detail surfaces in lists.css. */
:root {
color-scheme: dark;
--bg: #0e1513;
--surface: #171f1d;
--surface-2: #1f2a27;
--border: #2c3a36;
--text: #e2e8e6;
--muted: #9db0ab;
--accent: #7fd1bb;
--ok: #6bd39a;
--warn: #e6c268;
--bad: #ef8a8a;
}
* { box-sizing: border-box; }
html,
body {
height: 100%;
}
body {
margin: 0;
background: var(--bg);
color: var(--text);
font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
overflow: hidden;
background: var(--color-bg);
color: var(--color-text);
font: var(--type-body);
-webkit-font-smoothing: antialiased;
}
.topbar {
display: flex;
gap: 16px;
align-items: center;
justify-content: space-between;
padding: 10px 16px;
background: var(--surface);
border-bottom: 1px solid var(--border);
position: sticky;
top: 0;
z-index: 2;
flex-wrap: wrap;
}
.brand { display: flex; gap: 8px; align-items: baseline; }
.brand strong { font-size: 16px; }
.connbar { display: flex; gap: 8px; align-items: center; flex: 1 1 420px; justify-content: flex-end; }
input[type="text"] {
flex: 1 1 260px;
min-width: 200px;
padding: 7px 10px;
background: var(--surface-2);
color: var(--text);
border: 1px solid var(--border);
border-radius: 8px;
button,
input,
select,
textarea {
font: inherit;
color: inherit;
}
button {
font: inherit;
padding: 7px 12px;
border-radius: 8px;
border: 1px solid var(--border);
background: var(--surface-2);
color: var(--text);
min-height: var(--density-control-height);
padding: 0 var(--space-control-pad-inline);
border-radius: var(--radius-control);
border: 1px solid var(--color-border);
background: var(--color-surface-2);
color: var(--color-text);
cursor: pointer;
transition: background var(--motion-fast) var(--ease-standard),
border-color var(--motion-fast) var(--ease-standard);
}
button:hover { border-color: var(--accent); }
button.ghost { background: transparent; }
button:hover { background: var(--color-elevated); }
button:active { background: var(--color-elevated-2); }
button.ghost { background: transparent; border-color: transparent; color: var(--color-muted); }
button.ghost:hover { background: var(--tint-hover); color: var(--color-text); }
button:disabled { opacity: var(--opacity-disabled); cursor: not-allowed; }
.tabs { display: flex; gap: 4px; align-items: center; padding: 10px 16px 0; }
.tabs .spacer { flex: 1; }
.tab { border-color: transparent; background: transparent; }
.tab.active { background: var(--surface-2); border-color: var(--border); color: var(--accent); }
.split { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 16px; padding: 16px; align-items: start; }
@media (max-width: 760px) {
.split { grid-template-columns: 1fr; }
.artifact-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
input[type="text"],
input[type="search"],
select,
textarea {
min-height: var(--density-control-height);
padding: 0 var(--space-s);
background: var(--color-surface-2);
color: var(--color-text);
border: 1px solid var(--color-border);
border-radius: var(--radius-control);
}
.list, .detail {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
:focus-visible {
outline: var(--focus-ring-width) solid var(--focus-ring-color);
outline-offset: var(--focus-ring-offset);
}
a { color: var(--color-accent); }
.list {
min-width: 0;
min-height: 0;
display: flex;
flex-direction: column;
overflow: hidden;
background: var(--color-surface);
}
.row {
display: block;
width: 100%;
min-height: 0;
text-align: left;
border: 0;
border-bottom: 1px solid var(--border);
border-bottom: 1px solid var(--color-divider);
border-radius: 0;
background: transparent;
padding: 10px 12px;
padding: var(--space-s) var(--space-m);
}
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--surface-2); }
.row.selected { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.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:hover { background: var(--tint-hover); }
.row.selected { background: var(--tint-selected); box-shadow: inset 3px 0 0 var(--color-accent); }
.row-head { display: flex; gap: var(--space-xs); justify-content: space-between; align-items: center; min-width: 0; }
.row-title { display: block; max-width: 100%; font-weight: var(--weight-semibold); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { display: block; color: var(--color-muted); font-size: 12px; line-height: 16px; margin-top: 2px; }
.detail { padding: 16px; }
.detail h2 { margin: 0 0 12px; display: flex; gap: 10px; align-items: center; }
.detail h3 { margin: 18px 0 8px; font-size: 14px; color: var(--muted); text-transform: none; }
.kv { display: grid; gap: 4px; }
.kv { display: grid; gap: var(--space-2xs); }
.kv.tight { margin-top: 6px; }
.kv-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
.kv-key { color: var(--muted); }
.kv-val { word-break: break-word; }
.kv-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: var(--space-s); }
.kv-key { color: var(--color-muted); }
.kv-val { word-break: break-word; min-width: 0; }
.stages { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.stages li { display: flex; gap: 8px; align-items: center; }
.stages { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2xs); }
.stages li { display: flex; gap: var(--space-xs); align-items: center; }
.steps { display: grid; gap: 8px; }
.step { border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.step-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.steps { display: grid; gap: var(--space-xs); }
.step { border-bottom: 1px solid var(--color-divider); padding: var(--space-s) 0; }
.step-head { display: flex; gap: var(--space-xs); align-items: center; flex-wrap: wrap; }
.artifacts { margin-top: 8px; font-size: 12px; }
.artifacts a { color: var(--accent); margin-right: 10px; }
.artifacts-summary { color: var(--accent); }
.artifacts { margin-top: var(--space-xs); font-size: 12px; }
.artifacts a { color: var(--color-accent); margin-right: 10px; }
.artifacts-summary { color: var(--color-accent); }
.artifacts-note { margin-top: 2px; }
.artifact-hint { margin: 4px 0; }
/* Run-level artifacts gallery: group headers + a fitting tile grid. */
.artifacts-header { margin-top: 18px; }
.artifact-gallery { display: grid; gap: 12px; }
.artifact-group-head { color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 4px; }
.artifacts-header { margin-top: var(--space-m); }
.artifact-gallery { display: grid; gap: var(--space-s); }
.artifact-group-head { color: var(--color-muted); font-size: 12px; font-weight: var(--weight-semibold); margin-top: 4px; }
.artifact-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
gap: 10px;
gap: var(--space-xs);
}
.artifact-tile {
@@ -140,15 +129,15 @@ button.ghost { background: transparent; }
justify-content: center;
gap: 4px;
min-height: 120px;
padding: 10px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: 10px;
padding: var(--space-xs);
background: var(--color-surface-2);
border: 1px solid var(--color-divider);
border-radius: var(--radius-card);
overflow: hidden;
text-align: center;
}
.artifact-tile.clickable { cursor: pointer; }
.artifact-tile.clickable:hover { border-color: var(--accent); }
.artifact-tile.clickable:hover { border-color: var(--color-accent); }
.artifact-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.artifact-poster {
display: flex;
@@ -159,22 +148,23 @@ button.ghost { background: transparent; }
border-radius: 50%;
background: rgba(0, 0, 0, 0.45);
}
.artifact-play { font-size: 18px; color: var(--text); }
.artifact-kind { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.artifact-name { font-size: 12px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artifact-size { color: var(--muted); font-size: 11px; }
.artifact-play { font-size: 18px; color: var(--color-text); }
.artifact-kind { color: var(--color-muted); font-size: 11px; text-transform: uppercase; letter-spacing: var(--tracking-eyebrow); }
.artifact-name { font-size: 12px; font-weight: var(--weight-semibold); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artifact-size { color: var(--color-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.artifact-actions { position: absolute; top: 8px; right: 6px; display: flex; gap: 4px; }
.artifact-action {
padding: 2px 6px;
min-height: 24px;
padding: 0 6px;
font-size: 10px;
border-radius: 6px;
border-radius: var(--radius-s);
background: rgba(14, 21, 19, 0.72);
}
.artifact-action:disabled { opacity: 0.4; cursor: not-allowed; }
/* The per-visit session export link / notice (parity R9). */
.session-export { margin-top: 6px; font-size: 12px; }
.session-link { color: var(--accent); }
.session-link { color: var(--color-accent); }
/* Full-screen artifact viewer overlay. */
.artifact-viewer {
@@ -183,106 +173,105 @@ button.ghost { background: transparent; }
z-index: 20;
display: flex;
flex-direction: column;
gap: 12px;
gap: var(--space-s);
padding: 20px;
background: rgba(0, 0, 0, 0.86);
}
.viewer-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.viewer-title { font-size: 15px; font-weight: 600; }
.viewer-position { font-size: 12px; }
.viewer-head { display: flex; align-items: baseline; gap: var(--space-s); flex-wrap: wrap; }
.viewer-title { font-size: 15px; font-weight: var(--weight-semibold); }
.viewer-position { font-size: 12px; font-variant-numeric: tabular-nums; }
.viewer-board { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.viewer-image { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-placeholder {
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
padding: 32px;
color: var(--muted);
gap: var(--space-s);
padding: var(--space-xl);
color: var(--color-muted);
}
.viewer-placeholder .artifact-play { font-size: 40px; }
.viewer-nav { display: flex; gap: 8px; justify-content: center; }
.viewer-nav { display: flex; gap: var(--space-xs); justify-content: center; }
.viewer-page:disabled { opacity: 0.4; cursor: not-allowed; }
.viewer-actions { display: flex; gap: 8px; justify-content: flex-end; }
.viewer-actions { display: flex; gap: var(--space-xs); justify-content: flex-end; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; border: 1px solid var(--border); color: var(--muted); }
.chip {
display: inline-block;
flex: none;
padding: 1px 8px;
border-radius: var(--radius-pill);
font-size: 11px;
line-height: 16px;
border: 1px solid var(--color-divider);
color: var(--color-muted);
font-variant-numeric: tabular-nums;
}
/* 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; }
.chip-running, .chip-active { color: var(--status-running); border-color: var(--status-running); }
.chip-waiting { color: var(--status-waiting); border-color: var(--status-waiting); }
.chip-succeeded { color: var(--status-succeeded); border-color: var(--status-succeeded); }
.chip-failed { color: var(--status-failed); border-color: var(--status-failed); }
.chip-canceled { color: var(--status-canceled); border-color: var(--status-canceled); }
.chip-interrupted { color: var(--status-interrupted); border-color: var(--status-interrupted); }
.chip-queued { color: var(--status-queued); border-color: var(--status-queued); }
.chip-blocked { color: var(--status-blocked); border-color: var(--status-blocked); }
.chip-skipped { color: var(--status-skipped); border-color: var(--status-skipped); }
.chip-unknown { color: var(--status-unknown); border-color: var(--status-unknown); }
.dot::before { content: "●"; margin-right: 6px; }
.dot.ok::before { color: var(--ok); }
.dot.warn::before { color: var(--warn); }
.dot.bad::before { color: var(--bad); }
.dot.idle::before { color: var(--muted); }
.state { color: var(--muted); white-space: nowrap; }
.dot::before { content: "\25cf"; margin-right: 6px; }
.dot.ok::before { color: var(--color-ok); }
.dot.warn::before { color: var(--color-warn); }
.dot.bad::before { color: var(--color-bad); }
.dot.idle::before { color: var(--color-muted); }
.state { color: var(--color-muted); white-space: nowrap; }
.muted { color: var(--muted); }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.bad { color: var(--bad); }
.pad { padding: 12px; }
.muted { color: var(--color-muted); }
.ok { color: var(--color-ok); }
.warn { color: var(--color-warn); }
.bad { color: var(--color-bad); }
.pad { padding: var(--space-s); }
.banner { padding: 8px 16px; }
.banner.warn { background: #2a2410; color: var(--warn); }
.banner.error { background: #2c1616; color: var(--bad); }
.banner { padding: var(--space-xs) var(--space-m); }
.banner.warn { background: var(--tint-warn-soft); color: var(--color-warn); }
.banner.error { background: var(--tint-bad-soft); color: var(--color-bad); }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 12px; }
Transport: the persistent connection banner (T5) and the live badge. The
banner is in normal flow directly under the header, so it can never cover the
content; its container colours follow ConnectionBanner.kt's Material roles
(surfaceVariant idle/connecting, errorContainer disconnected, primary
connected). Hand-written, on the app's dark palette.
--------------------------------------------------------------------------- */
.conn-banner {
display: flex;
gap: 10px;
align-items: center;
padding: 8px 16px;
font-size: 13px;
border-bottom: 1px solid var(--border);
background: var(--surface-2);
color: var(--text);
code {
background: var(--color-surface-2);
padding: 1px 6px;
border-radius: var(--radius-xs);
font: var(--type-code);
}
.conn-banner[hidden] { display: none; }
.conn-banner-dot::before { content: "\25cf"; }
.conn-banner-text { font-weight: 500; }
.conn-build { margin-left: auto; color: var(--muted); font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.conn-warning { color: var(--warn); font-weight: 600; }
/* Idle: surfaceVariant (never an error colour — nothing is wrong yet). */
.conn-idle { background: var(--surface-2); color: var(--muted); }
.conn-idle .conn-banner-dot::before { color: var(--muted); }
/* Connecting: surfaceVariant with a warm dot, matching the state badge. */
.conn-connecting { background: var(--surface-2); color: var(--muted); }
.conn-connecting .conn-banner-dot::before { color: var(--warn); }
/* Disconnected: errorContainer. */
.conn-error { background: #2c1616; color: var(--bad); }
.conn-error .conn-banner-dot::before { color: var(--bad); }
.conn-error .conn-build { color: var(--muted); }
/* Connected: an explicit green (primary) state, the page's one visible
difference from ConnectionBanner.kt, which renders nothing once connected. */
.conn-ok { background: #12251b; color: var(--ok); }
.conn-ok .conn-banner-dot::before { color: var(--ok); }
/* Live-stream badge (LiveBadge.kt): a dot plus the honest word, so colour is
never the only signal. */
.live-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--color-muted); white-space: nowrap; }
.live-badge .live-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.live-live { color: var(--ok); }
.live-reconnecting { color: var(--warn); }
.live-live { color: var(--color-ok); }
.live-reconnecting { color: var(--color-warn); }
.live-reconnecting .live-dot { opacity: 0.4; }
.live-not-live { color: var(--muted); }
.live-not-live { color: var(--color-muted); }
.live-not-live .live-dot { opacity: 0.4; }
/* One 8px-grid rhythm for every pane heading. */
.pane-head {
display: flex;
flex: 0 0 auto;
gap: var(--space-xs);
align-items: center;
justify-content: space-between;
min-width: 0;
padding: var(--space-s) var(--space-m);
border-bottom: 1px solid var(--color-divider);
}
.pane-title { margin: 0; min-width: 0; font: var(--type-title-small); letter-spacing: var(--tracking-tight); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane-subtitle { margin: 2px 0 0; color: var(--color-muted); font-size: 12px; }
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}