Merge branch 'main' into web-decide-live

This commit is contained in:
2026-10-19 16:35:01 +01:00
5 changed files with 2099 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
// Capture the L2–L4 layout prototype through the repository's zero-dependency
// Chrome DevTools driver. Read-only import: web/test/browser.mjs is not modified.
//
// node web/design/layout/capture.mjs
//
// Writes PNGs into web/design/layout/captures/ (gitignored by the root
// `captures/` rule). No server is started; the prototype is a local file.
import { mkdir } from "node:fs/promises";
import { dirname, join } from "node:path";
import { fileURLToPath, pathToFileURL } from "node:url";
import { launchChrome } from "../../test/browser.mjs";
const here = dirname(fileURLToPath(import.meta.url));
const outDir = join(here, "captures");
const prototype = pathToFileURL(join(here, "prototype.html"));
const shots = [
{ hash: "wide", width: 1440, height: 900, name: "wide-pipelines-1440x900.png" },
{ hash: "runs", width: 420, height: 900, name: "narrow-runs-420x900.png" },
{ hash: "detail", width: 420, height: 900, name: "narrow-run-detail-420x900.png" },
];
await mkdir(outDir, { recursive: true });
const browser = await launchChrome({ width: 1440, height: 900 });
try {
for (const shot of shots) {
const page = await browser.openPage(`${prototype.href}#${shot.hash}`, {
width: shot.width,
height: shot.height,
});
await page.waitForSelector(`#${shot.hash}`);
await page.evaluate("document.fonts.ready.then(() => true)");
await new Promise((resolve) => setTimeout(resolve, 150));
const box = await page.evaluate(`(() => {
const node = document.querySelector("#${shot.hash} .app-shell");
const rect = node.getBoundingClientRect();
return { width: Math.round(rect.width), height: Math.round(rect.height) };
})()`);
const path = join(outDir, shot.name);
await page.screenshot(path);
console.log(`${shot.name}: viewport ${shot.width}x${shot.height}, shell ${box.width}x${box.height}`);
await page.close();
}
} finally {
await browser.close();
}
+801
View File
@@ -0,0 +1,801 @@
/* ───────────────────────────────────────────────────────────────────────────
Pipelines web — L2–L4 layout prototype
The app palette below is copied verbatim from web/styles.css :root.
The rules from "App shell" to "Reduced motion" are the reference layout;
everything under "Prototype chrome" is for this static mock only.
─────────────────────────────────────────────────────────────────────────── */
/* App palette — verbatim from web/styles.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;
}
/* Named layout tokens, mirroring android/app/src/main/java/net/awan/pipelines/
ui/theme/Dimens.kt (WIDE_RAIL_WIDTH_DP = 200, SPACING_* = 4/8/12/16). */
:root {
--rail-width: 200px;
--list-min-width: 200px;
--list-max-width: 360px;
--dock-height: 60px;
--hairline: 1px;
--dock-clearance: calc(var(--dock-height) + env(safe-area-inset-bottom, 0px));
--radius-s: 8px;
--radius-m: 10px;
--radius-l: 12px;
--space-xs: 4px;
--space-s: 8px;
--space-m: 12px;
--space-l: 16px;
--font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
margin: 0;
background: var(--bg);
color: var(--text);
font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
-webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.icon {
width: 20px;
height: 20px;
flex: 0 0 auto;
}
.icon-sprite {
position: absolute;
width: 0;
height: 0;
overflow: hidden;
}
:where(a, button, [tabindex]):focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.skip-link {
position: absolute;
top: -80px;
left: var(--space-l);
z-index: 100;
padding: var(--space-s) var(--space-m);
border-radius: var(--radius-s);
background: var(--surface-2);
color: var(--text);
text-decoration: none;
}
.skip-link:focus { top: var(--space-l); }
/* ── App shell ──────────────────────────────────────────────────────────────
Narrow is the default: one grid cell, one pane at a time, and clearance for
the fixed destination bar. The wide media query at exactly 600px turns the
same shell into the 200px rail + two panes. No other breakpoint is used. */
.screen {
display: none;
height: 100dvh;
min-height: 0;
}
.screen:target { display: block; }
body:not(:has(.screen:target)) #wide { display: block; }
body:has(.screen:target) .proto-nav { display: none; }
.app-shell {
position: relative;
height: 100dvh;
min-height: 0;
overflow: hidden;
display: grid;
grid-template-columns: minmax(0, 1fr);
grid-template-rows: minmax(0, 1fr);
grid-template-areas: "workspace";
padding-top: env(safe-area-inset-top, 0px);
padding-bottom: var(--dock-clearance);
background: var(--bg);
}
.workspace {
grid-area: workspace;
min-width: 0;
min-height: 0;
display: grid;
grid-template-columns: minmax(0, 1fr);
grid-template-rows: minmax(0, 1fr);
grid-template-areas: "main";
}
/* The 200px rail is the wide-only destination and section index. */
.app-rail { display: none; }
.list-pane,
.detail-pane {
grid-area: main;
min-width: 0;
min-height: 0;
overflow: hidden;
display: none;
flex-direction: column;
background: var(--bg);
}
.app-shell[data-active-pane="list"] .list-pane { display: flex; }
.app-shell[data-active-pane="detail"] .detail-pane { display: flex; }
/* ── Wide: left rail + list/detail panes ────────────────────────────────────
The single breakpoint. widthDp >= 600 is isWideLayout() in WindowSize.kt;
in the browser the same predicate is (min-width: 600px). */
@media (min-width: 600px) {
.app-shell:not(.app-shell--phone) {
grid-template-columns: var(--rail-width) minmax(0, 1fr);
grid-template-areas: "rail workspace";
padding-bottom: 0;
}
.app-shell:not(.app-shell--phone) .app-rail { display: flex; }
.app-shell:not(.app-shell--phone) .workspace {
grid-template-columns: minmax(var(--list-min-width), var(--list-max-width)) minmax(0, 1fr);
grid-template-areas: "list detail";
}
.app-shell:not(.app-shell--phone) .list-pane {
grid-area: list;
display: flex;
border-right: var(--hairline) solid var(--border);
}
.app-shell:not(.app-shell--phone) .detail-pane {
grid-area: detail;
display: flex;
}
/* Wide windows use the rail for sections; the strip is a narrow affordance. */
.app-shell:not(.app-shell--phone) .section-strip { display: none; }
/* Wide windows use the rail for destinations; no bottom bar is in flow or
drawn. The bar never gets a grid row in either layout. */
.app-shell:not(.app-shell--phone) .destination-dock { display: none; }
}
/* ── Left rail ──────────────────────────────────────────────────────────────
Width is owned by the grid (200px), never by the rail's contents. */
.app-rail {
flex-direction: column;
min-width: 0;
min-height: 0;
padding: var(--space-m) var(--space-s);
background: var(--surface);
border-right: var(--hairline) solid var(--border);
}
.rail-brand {
display: flex;
align-items: center;
gap: var(--space-s);
min-height: 44px;
padding: 0 var(--space-m);
margin-bottom: var(--space-m);
font-size: 15px;
font-weight: 650;
letter-spacing: -0.01em;
}
.brand-mark {
width: 18px;
height: 18px;
border-radius: 6px;
background: linear-gradient(135deg, var(--accent), var(--ok));
box-shadow: 0 0 0 4px rgba(127, 209, 187, 0.10);
}
.rail-destinations {
display: flex;
flex-direction: column;
gap: 2px;
}
.rail-item,
.rail-tab {
min-height: 44px;
display: flex;
align-items: center;
gap: var(--space-m);
padding: 0 var(--space-m);
border: 0;
border-radius: var(--radius-s);
background: transparent;
color: var(--muted);
text-align: left;
text-decoration: none;
cursor: pointer;
}
.rail-item:hover,
.rail-tab:hover {
background: var(--surface-2);
color: var(--text);
}
.rail-item[aria-current="page"],
.rail-tab[aria-selected="true"] {
color: var(--text);
background: rgba(127, 209, 187, 0.12);
box-shadow: inset 2px 0 0 var(--accent);
font-weight: 600;
}
.rail-divider {
height: var(--hairline);
margin: var(--space-m) var(--space-s);
background: var(--border);
}
.rail-heading {
margin: 0 0 var(--space-s);
padding: 0 var(--space-m);
color: var(--muted);
font-size: 11px;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.rail-tablist {
display: flex;
flex-direction: column;
gap: 2px;
}
.rail-footer {
margin-top: auto;
display: flex;
align-items: center;
gap: var(--space-s);
min-height: 44px;
padding: 0 var(--space-m);
color: var(--muted);
font-size: 12px;
}
/* ── Panes ──────────────────────────────────────────────────────────────── */
.pane-header {
flex: 0 0 auto;
min-height: 64px;
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-m);
padding: var(--space-s) var(--space-l);
border-bottom: var(--hairline) solid var(--border);
background: var(--bg);
}
.eyebrow {
margin: 0 0 2px;
color: var(--muted);
font-size: 11px;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.pane-header h1 {
margin: 0;
font-size: 18px;
line-height: 1.2;
letter-spacing: -0.01em;
}
.count-chip {
min-width: 30px;
padding: 2px 9px;
border: var(--hairline) solid var(--border);
border-radius: 999px;
color: var(--muted);
font-size: 12px;
text-align: center;
}
.list-tools {
flex: 0 0 auto;
display: flex;
align-items: center;
gap: var(--space-xs);
padding: var(--space-s) var(--space-m);
border-bottom: var(--hairline) solid var(--border);
}
.tool-button {
min-height: 32px;
padding: 0 10px;
border: var(--hairline) solid var(--border);
border-radius: var(--radius-s);
background: var(--surface-2);
color: var(--text);
font-size: 12px;
cursor: pointer;
}
.tool-button:hover { border-color: var(--accent); }
.tool-spacer { flex: 1 1 auto; }
.live-badge {
display: inline-flex;
align-items: center;
gap: 6px;
color: var(--ok);
font-size: 11px;
font-weight: 600;
}
.status-dot {
width: 7px;
height: 7px;
flex: 0 0 auto;
border-radius: 50%;
background: var(--ok);
box-shadow: 0 0 0 3px rgba(107, 211, 154, 0.12);
}
.status-dot--ok { background: var(--ok); }
.list-scroll,
.pane-scroll {
flex: 1 1 auto;
min-height: 0;
overflow: auto;
overscroll-behavior: contain;
scrollbar-gutter: stable;
}
.list-scroll { padding: var(--space-s); }
.pane-scroll { padding: var(--space-l); }
.day-heading {
margin: var(--space-s) var(--space-s) var(--space-xs);
color: var(--muted);
font-size: 11px;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.row-list {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 2px;
}
.row {
width: 100%;
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
grid-template-areas:
"title chip"
"meta meta"
"last last";
gap: 3px var(--space-s);
padding: 10px var(--space-m);
border: var(--hairline) solid transparent;
border-radius: var(--radius-m);
background: transparent;
color: var(--text);
text-align: left;
cursor: pointer;
}
.row:hover {
background: var(--surface);
border-color: var(--border);
}
.row.is-selected,
.row[aria-current="true"] {
background: var(--surface-2);
border-color: var(--border);
box-shadow: inset 2px 0 0 var(--accent);
}
.row-title {
grid-area: title;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 600;
}
.row .chip { grid-area: chip; align-self: start; }
.row-meta,
.row-last {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--muted);
font-size: 12px;
font-variant-numeric: tabular-nums;
}
.row-meta { grid-area: meta; }
.row-last { grid-area: last; }
.chip {
display: inline-flex;
align-items: center;
gap: 5px;
min-height: 22px;
padding: 1px 8px;
border: var(--hairline) solid var(--border);
border-radius: 999px;
background: var(--surface-2);
color: var(--muted);
font-size: 11px;
font-weight: 600;
line-height: 1.2;
white-space: nowrap;
}
.chip::before {
content: "";
width: 6px;
height: 6px;
border-radius: 50%;
background: currentColor;
}
.chip--ok { color: var(--ok); border-color: rgba(107, 211, 154, 0.30); background: rgba(107, 211, 154, 0.10); }
.chip--bad { color: var(--bad); border-color: rgba(239, 138, 138, 0.32); background: rgba(239, 138, 138, 0.10); }
.chip--warn { color: var(--warn); border-color: rgba(230, 194, 104, 0.30); background: rgba(230, 194, 104, 0.10); }
/* ── Detail ─────────────────────────────────────────────────────────────── */
.detail-header {
align-items: flex-start;
flex-wrap: wrap;
padding-top: var(--space-m);
padding-bottom: var(--space-m);
}
.detail-heading { min-width: 0; }
.detail-title-row {
display: flex;
align-items: center;
gap: var(--space-s);
flex-wrap: wrap;
}
.detail-subtitle {
margin: 4px 0 0;
color: var(--muted);
font-size: 12px;
font-variant-numeric: tabular-nums;
}
.detail-actions {
display: flex;
gap: var(--space-xs);
margin-left: auto;
}
.card {
padding: var(--space-m) var(--space-l);
border: var(--hairline) solid var(--border);
border-radius: var(--radius-l);
background: var(--surface);
}
.card + .card { margin-top: var(--space-m); }
.card h2 {
margin: 0 0 var(--space-m);
color: var(--muted);
font-size: 11px;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.kv {
display: grid;
grid-template-columns: minmax(92px, 140px) minmax(0, 1fr);
gap: 8px var(--space-m);
margin: 0;
}
.kv div { display: contents; }
.kv dt { color: var(--muted); font-size: 12px; }
.kv dd {
margin: 0;
min-width: 0;
overflow-wrap: anywhere;
font-size: 13px;
font-variant-numeric: tabular-nums;
}
code {
font-family: var(--font-mono);
font-size: 12px;
color: var(--text);
}
.inline-status {
display: inline-flex;
align-items: center;
gap: 6px;
}
.stage-list,
.version-list {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 2px;
}
.stage-list li,
.version-list li {
display: flex;
align-items: center;
gap: var(--space-m);
min-height: 34px;
padding: 0 var(--space-s);
border-radius: var(--radius-s);
}
.stage-list li:hover,
.version-list li:hover { background: var(--surface-2); }
.stage-index {
width: 22px;
height: 22px;
display: grid;
place-items: center;
border-radius: 50%;
background: var(--surface-2);
color: var(--muted);
font-size: 11px;
font-variant-numeric: tabular-nums;
}
.stage-name { flex: 1 1 auto; font-weight: 550; }
.stage-type,
.muted { color: var(--muted); }
.stage-type { font-size: 12px; }
.version-tag {
min-width: 38px;
color: var(--accent);
font-family: var(--font-mono);
font-size: 12px;
}
.version-list .muted { margin-left: auto; font-size: 12px; }
.small { font-size: 12px; }
.mobile-header {
gap: var(--space-s);
justify-content: flex-start;
}
.icon-button {
width: 44px;
height: 44px;
flex: 0 0 auto;
display: grid;
place-items: center;
border: var(--hairline) solid transparent;
border-radius: var(--radius-m);
background: transparent;
color: var(--muted);
cursor: pointer;
}
.icon-button:hover {
background: var(--surface-2);
border-color: var(--border);
color: var(--text);
}
.disclosure {
width: 100%;
min-height: 44px;
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-m);
padding: 0 var(--space-s);
border: 0;
border-radius: var(--radius-s);
background: var(--surface-2);
color: var(--text);
text-align: left;
cursor: pointer;
}
.disclosure:hover { box-shadow: inset 0 0 0 1px var(--border); }
.disclosure-chevron { width: 16px; height: 16px; color: var(--muted); }
/* ── Narrow section strip ─────────────────────────────────────────────────
Sits in normal flow at the foot of the detail pane, directly above the
fixed destination bar's reserved clearance. The entries are the same
DetailTab keys the wide rail renders, so section state is not duplicated. */
.section-strip {
flex: 0 0 auto;
display: flex;
align-items: center;
min-width: 0;
padding: 6px var(--space-s);
background: var(--surface);
border-top: var(--hairline) solid var(--border);
overflow-x: auto;
overflow-y: hidden;
overscroll-behavior-x: contain;
scrollbar-width: none;
}
.section-strip::-webkit-scrollbar { display: none; }
.strip-tablist {
display: flex;
align-items: center;
gap: 2px;
min-width: 0;
}
.strip-tab {
flex: 0 0 auto;
min-height: 44px;
display: inline-flex;
align-items: center;
gap: 4px;
padding: 0 var(--space-s);
border: var(--hairline) solid transparent;
border-radius: var(--radius-s);
background: transparent;
color: var(--muted);
font-size: 12px;
white-space: nowrap;
cursor: pointer;
}
.strip-tab .icon { width: 17px; height: 17px; }
.strip-tab:hover {
background: var(--surface-2);
color: var(--text);
}
.strip-tab[aria-selected="true"] {
background: var(--surface-2);
border-color: var(--border);
box-shadow: inset 0 -2px 0 var(--accent);
color: var(--text);
font-weight: 600;
}
/* ── Bottom destination bar ───────────────────────────────────────────────
A true overlay: position fixed, no grid row, no layout height. The shell
reserves --dock-clearance as padding so the strip and pane end above it. */
.destination-dock {
position: fixed;
inset: auto 0 0 0;
z-index: 30;
height: calc(var(--dock-height) + env(safe-area-inset-bottom, 0px));
display: flex;
align-items: stretch;
gap: var(--space-xs);
padding: var(--space-xs) var(--space-s)
calc(var(--space-xs) + env(safe-area-inset-bottom, 0px));
background: var(--surface);
border-top: var(--hairline) solid var(--border);
}
.dock-item {
flex: 1 1 0;
min-width: 0;
min-height: 48px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 2px;
padding: 2px 0;
border-radius: var(--radius-s);
color: var(--muted);
font-size: 11px;
text-decoration: none;
}
.dock-item .icon { width: 21px; height: 21px; }
.dock-item:hover { background: var(--surface-2); color: var(--text); }
.dock-item[aria-current="page"] {
color: var(--accent);
background: rgba(127, 209, 187, 0.10);
}
/* ── Reduced motion ───────────────────────────────────────────────────────
The wide/narrow switch is instant. If a transition is added to the rail,
strip, dock or pane entry, it collapses here; no lateral slide, scale or
smooth scrolling is allowed. */
@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;
}
}
/* ── Prototype chrome (not part of the implementation) ─────────────────── */
.proto-nav {
position: fixed;
top: 12px;
left: 50%;
transform: translateX(-50%);
z-index: 90;
display: flex;
align-items: center;
gap: 6px;
padding: 6px;
border: var(--hairline) solid var(--border);
border-radius: 999px;
background: rgba(23, 31, 29, 0.92);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
backdrop-filter: blur(8px);
font-size: 12px;
}
.proto-nav a {
padding: 5px 10px;
border-radius: 999px;
color: var(--muted);
text-decoration: none;
}
.proto-nav a:hover { background: var(--surface-2); color: var(--text); }
.proto-title {
padding: 0 8px;
color: var(--text);
font-weight: 650;
}
.proto-hint {
padding: 0 8px 0 4px;
color: var(--muted);
}
/* The two narrow states are phone-width states. This class keeps them at
420px while the page is previewed on a desktop; it is not part of the
responsive rule (the real shell has no such class). */
.app-shell--phone {
position: relative;
width: 100%;
max-width: 420px;
margin-inline: auto;
box-shadow: 0 0 0 1px var(--border), 0 30px 90px rgba(0, 0, 0, 0.55);
}
@media (min-width: 600px) {
.app-shell--phone .destination-dock { position: absolute; }
}
+470
View File
@@ -0,0 +1,470 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Pipelines web — L2–L4 layout prototype</title>
<link rel="stylesheet" href="prototype.css">
</head>
<body>
<!-- Prototype-only state switcher. It is hidden whenever a screen is targeted,
so captures are full-bleed. -->
<nav class="proto-nav" aria-label="Prototype states">
<span class="proto-title">Layout prototype</span>
<a href="#wide">Wide · 1440</a>
<a href="#runs">Narrow runs · 420</a>
<a href="#detail">Narrow run detail · 420</a>
<span class="proto-hint">load a hash and size the viewport to match</span>
</nav>
<svg class="icon-sprite" aria-hidden="true" focusable="false" width="0" height="0">
<symbol id="i-branch" viewBox="0 0 24 24">
<circle cx="6" cy="5" r="2" fill="currentColor" stroke="none"></circle>
<circle cx="6" cy="19" r="2" fill="currentColor" stroke="none"></circle>
<circle cx="18" cy="12" r="2" fill="currentColor" stroke="none"></circle>
<path d="M6 7v10M8 12h8" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path>
</symbol>
<symbol id="i-clock" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="8" fill="none" stroke="currentColor" stroke-width="1.8"></circle>
<path d="M12 8v4l3 2" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"></path>
</symbol>
<symbol id="i-chat" viewBox="0 0 24 24">
<path d="M4 6.5A2.5 2.5 0 0 1 6.5 4h11A2.5 2.5 0 0 1 20 6.5v7a2.5 2.5 0 0 1-2.5 2.5H10l-6 4V6.5Z" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linejoin="round"></path>
</symbol>
<symbol id="i-settings" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="3" fill="none" stroke="currentColor" stroke-width="1.8"></circle>
<path d="M12 3v2M12 19v2M3 12h2M19 12h2M5.6 5.6 7 7M17 17l1.4 1.4M18.4 5.6 17 7M7 17l-1.4 1.4" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path>
</symbol>
<symbol id="i-info" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="8" fill="none" stroke="currentColor" stroke-width="1.8"></circle>
<path d="M12 11v5M12 8h.01" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path>
</symbol>
<symbol id="i-graph" viewBox="0 0 24 24">
<circle cx="6" cy="6" r="2" fill="none" stroke="currentColor" stroke-width="1.8"></circle>
<circle cx="18" cy="9" r="2" fill="none" stroke="currentColor" stroke-width="1.8"></circle>
<circle cx="10" cy="18" r="2" fill="none" stroke="currentColor" stroke-width="1.8"></circle>
<path d="m8 7 8 1M8 8l1 8M16 11l-5 6" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path>
</symbol>
<symbol id="i-code" viewBox="0 0 24 24">
<path d="m8 8-4 4 4 4M16 8l4 4-4 4M13 5l-2 14" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"></path>
</symbol>
<symbol id="i-input" viewBox="0 0 24 24">
<path d="M12 4v10M8 10l4 4 4-4M5 19h14" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"></path>
</symbol>
<symbol id="i-output" viewBox="0 0 24 24">
<path d="M12 20V10M8 14l4-4 4 4M5 5h14" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"></path>
</symbol>
<symbol id="i-list" viewBox="0 0 24 24">
<path d="M8 6h12M8 12h12M8 18h12M4 6h.01M4 12h.01M4 18h.01" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path>
</symbol>
<symbol id="i-back" viewBox="0 0 24 24">
<path d="M15 5l-7 7 7 7" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"></path>
</symbol>
<symbol id="i-chevron" viewBox="0 0 24 24">
<path d="M9 5l7 7-7 7" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"></path>
</symbol>
</svg>
<!-- ─────────────────────────────────────────────────────────────────────
Wide state: 200px left rail + pipeline list + pipeline detail.
Captured at 1440 × 900.
───────────────────────────────────────────────────────────────────── -->
<section class="screen" id="wide" aria-label="Wide pipelines layout">
<a class="skip-link" href="#wide-main">Skip to content</a>
<div class="app-shell" data-active-pane="detail">
<aside class="app-rail" aria-label="Pipelines navigation">
<div class="rail-brand">
<span class="brand-mark" aria-hidden="true"></span>
<span>Pipelines</span>
</div>
<nav class="rail-destinations" aria-label="Destinations">
<a class="rail-item" href="#wide" aria-current="page">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-branch"></use></svg>
<span>Pipelines</span>
</a>
<a class="rail-item" href="#runs">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-clock"></use></svg>
<span>Runs</span>
</a>
<a class="rail-item" href="#runs">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-chat"></use></svg>
<span>Chat</span>
</a>
<a class="rail-item" href="#wide">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-settings"></use></svg>
<span>Settings</span>
</a>
</nav>
<div class="rail-divider" role="presentation"></div>
<div class="rail-sections">
<p class="rail-heading" id="wide-sections-label">Sections</p>
<div class="rail-tablist" role="tablist" aria-labelledby="wide-sections-label" aria-orientation="vertical">
<button class="rail-tab" id="wide-rail-tab-summary" type="button" role="tab"
aria-selected="true" aria-controls="wide-panel" tabindex="0">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-info"></use></svg>
<span>Summary</span>
</button>
<button class="rail-tab" id="wide-rail-tab-graph" type="button" role="tab"
aria-selected="false" aria-controls="wide-panel" tabindex="-1">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-graph"></use></svg>
<span>Graph</span>
</button>
<button class="rail-tab" id="wide-rail-tab-source" type="button" role="tab"
aria-selected="false" aria-controls="wide-panel" tabindex="-1">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-code"></use></svg>
<span>Source</span>
</button>
</div>
</div>
<div class="rail-footer">
<span class="status-dot" aria-hidden="true"></span>
<span>Connected</span>
</div>
</aside>
<main class="workspace" id="wide-main" tabindex="-1">
<section class="list-pane" aria-label="Pipelines list">
<header class="pane-header">
<div>
<p class="eyebrow">Workspace</p>
<h1>Pipelines</h1>
</div>
<span class="count-chip" aria-label="12 pipelines">12</span>
</header>
<div class="list-tools">
<button class="tool-button" type="button">Filter</button>
<button class="tool-button" type="button">Sort</button>
<span class="tool-spacer"></span>
<span class="live-badge"><span class="status-dot" aria-hidden="true"></span> live</span>
</div>
<div class="list-scroll">
<ul class="row-list">
<li>
<button class="row is-selected" type="button" aria-current="true">
<span class="row-title">Plan and land</span>
<span class="chip chip--ok">succeeded</span>
<span class="row-meta">id 24 · v5 · 6 stages</span>
<span class="row-last">updated 19 Oct 14:32 · run 458 · 12m</span>
</button>
</li>
<li>
<button class="row" type="button">
<span class="row-title">Server</span>
<span class="chip chip--bad">failed</span>
<span class="row-meta">id 22 · v6 · 4 stages</span>
<span class="row-last">updated 19 Oct 13:05 · run 457 · 2m 08s</span>
</button>
</li>
<li>
<button class="row" type="button">
<span class="row-title">Docs site</span>
<span class="chip">no runs</span>
<span class="row-meta">id 18 · v3 · 3 stages</span>
<span class="row-last">updated 18 Oct 09:41 · no runs recorded</span>
</button>
</li>
<li>
<button class="row" type="button">
<span class="row-title">Nightly audit</span>
<span class="chip chip--warn">running</span>
<span class="row-meta">id 12 · v9 · 5 stages</span>
<span class="row-last">updated 19 Oct 14:20 · run 456 · 00:42</span>
</button>
</li>
<li>
<button class="row" type="button">
<span class="row-title">Release notes</span>
<span class="chip chip--ok">succeeded</span>
<span class="row-meta">id 09 · v2 · 3 stages</span>
<span class="row-last">updated 17 Oct 18:02 · run 449 · 4m 10s</span>
</button>
</li>
</ul>
</div>
</section>
<section class="detail-pane" aria-label="Pipeline detail">
<header class="pane-header detail-header">
<div class="detail-heading">
<p class="eyebrow">Pipeline</p>
<div class="detail-title-row">
<h1>Plan and land</h1>
<span class="chip chip--ok">succeeded</span>
</div>
<p class="detail-subtitle">id 24 · v5 · 6 stages · latest version v5</p>
</div>
<div class="detail-actions">
<button class="tool-button" type="button">Run</button>
<button class="tool-button" type="button">Refresh</button>
</div>
</header>
<div class="pane-scroll" id="wide-panel" role="tabpanel"
aria-labelledby="wide-rail-tab-summary" tabindex="0">
<section class="card">
<h2>Summary</h2>
<dl class="kv">
<div><dt>Latest version</dt><dd>v5</dd></div>
<div><dt>Content hash</dt><dd><code>sha256:9f2c41e8a7</code></dd></div>
<div><dt>Created</dt><dd>12 Oct 2026 09:14</dd></div>
<div><dt>Updated</dt><dd>19 Oct 2026 14:32</dd></div>
<div><dt>Last run</dt><dd><span class="inline-status"><span class="status-dot status-dot--ok" aria-hidden="true"></span>succeeded · run 458 · 12m</span></dd></div>
</dl>
</section>
<section class="card">
<h2>Stages</h2>
<ol class="stage-list">
<li><span class="stage-index">1</span><span class="stage-name">plan</span><span class="stage-type">agent</span></li>
<li><span class="stage-index">2</span><span class="stage-name">implement</span><span class="stage-type">agent</span></li>
<li><span class="stage-index">3</span><span class="stage-name">review</span><span class="stage-type">agent</span></li>
<li><span class="stage-index">4</span><span class="stage-name">land</span><span class="stage-type">shell</span></li>
</ol>
</section>
<section class="card">
<h2>Versions</h2>
<ul class="version-list">
<li><span class="version-tag">v5</span><span>19 Oct 14:31</span><span class="muted">latest</span></li>
<li><span class="version-tag">v4</span><span>18 Oct 16:08</span><span class="muted">6 stages</span></li>
<li><span class="version-tag">v3</span><span>16 Oct 11:22</span><span class="muted">5 stages</span></li>
</ul>
</section>
</div>
</section>
</main>
<nav class="destination-dock" aria-label="Destinations">
<a class="dock-item" href="#wide" aria-current="page">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-branch"></use></svg>
<span>Pipelines</span>
</a>
<a class="dock-item" href="#runs">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-clock"></use></svg>
<span>Runs</span>
</a>
<a class="dock-item" href="#runs">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-chat"></use></svg>
<span>Chat</span>
</a>
<a class="dock-item" href="#wide">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-settings"></use></svg>
<span>Settings</span>
</a>
</nav>
</div>
</section>
<!-- ─────────────────────────────────────────────────────────────────────
Narrow state: one pane, no section strip on a list. Captured at 420 × 900.
───────────────────────────────────────────────────────────────────── -->
<section class="screen" id="runs" aria-label="Narrow runs layout">
<a class="skip-link" href="#runs-main">Skip to content</a>
<div class="app-shell app-shell--phone" data-active-pane="list">
<main class="workspace" id="runs-main" tabindex="-1">
<section class="list-pane" aria-label="Runs list">
<header class="pane-header mobile-header">
<div>
<p class="eyebrow">Workspace</p>
<h1>Runs</h1>
</div>
<span class="live-badge"><span class="status-dot" aria-hidden="true"></span> live</span>
</header>
<div class="list-tools">
<button class="tool-button" type="button">Filter</button>
<button class="tool-button" type="button">Sort</button>
<span class="tool-spacer"></span>
<span class="muted small">12 runs</span>
</div>
<div class="list-scroll">
<p class="day-heading">Today</p>
<ul class="row-list">
<li>
<button class="row" type="button">
<span class="row-title">Plan and land</span>
<span class="chip chip--ok">succeeded</span>
<span class="row-meta">run 458 · v5 · 12m</span>
<span class="row-last">14:32 · implementer · 6 stages</span>
</button>
</li>
<li>
<button class="row" type="button">
<span class="row-title">Server</span>
<span class="chip chip--bad">failed</span>
<span class="row-meta">run 457 · v6 · 2m 08s</span>
<span class="row-last">13:05 · planner · needs you</span>
</button>
</li>
<li>
<button class="row" type="button">
<span class="row-title">Nightly audit</span>
<span class="chip chip--warn">running</span>
<span class="row-meta">run 456 · v9 · 00:42</span>
<span class="row-last">14:20 · auditor · 5 stages</span>
</button>
</li>
</ul>
<p class="day-heading">Yesterday</p>
<ul class="row-list">
<li>
<button class="row" type="button">
<span class="row-title">Release notes</span>
<span class="chip chip--ok">succeeded</span>
<span class="row-meta">run 449 · v2 · 4m 10s</span>
<span class="row-last">18:02 · writer · 3 stages</span>
</button>
</li>
<li>
<button class="row" type="button">
<span class="row-title">Docs site</span>
<span class="chip chip--bad">failed</span>
<span class="row-meta">run 448 · v3 · 1m 31s</span>
<span class="row-last">17:40 · builder · 3 stages</span>
</button>
</li>
</ul>
</div>
</section>
</main>
<nav class="destination-dock" aria-label="Destinations">
<a class="dock-item" href="#wide">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-branch"></use></svg>
<span>Pipelines</span>
</a>
<a class="dock-item" href="#runs" aria-current="page">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-clock"></use></svg>
<span>Runs</span>
</a>
<a class="dock-item" href="#runs">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-chat"></use></svg>
<span>Chat</span>
</a>
<a class="dock-item" href="#runs">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-settings"></use></svg>
<span>Settings</span>
</a>
</nav>
</div>
</section>
<!-- ─────────────────────────────────────────────────────────────────────
Narrow run detail: section strip above the destination bar.
Captured at 420 × 900.
───────────────────────────────────────────────────────────────────── -->
<section class="screen" id="detail" aria-label="Narrow run detail layout">
<a class="skip-link" href="#detail-main">Skip to content</a>
<div class="app-shell app-shell--phone" data-active-pane="detail">
<main class="workspace" id="detail-main" tabindex="-1">
<section class="list-pane" aria-label="Runs list" aria-hidden="true"></section>
<section class="detail-pane" aria-label="Run detail">
<header class="pane-header detail-header mobile-header">
<button class="icon-button" type="button" aria-label="Back to Runs">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-back"></use></svg>
</button>
<div class="detail-heading">
<p class="eyebrow">Run</p>
<div class="detail-title-row">
<h1>Plan and land</h1>
<span class="chip chip--ok">succeeded</span>
</div>
<p class="detail-subtitle">run 458 · v5 · 12m</p>
</div>
</header>
<div class="pane-scroll" id="run-panel" role="tabpanel"
aria-labelledby="run-strip-tab-summary" tabindex="0">
<section class="card">
<h2>Status</h2>
<dl class="kv">
<div><dt>Status</dt><dd><span class="inline-status"><span class="status-dot status-dot--ok" aria-hidden="true"></span>succeeded</span></dd></div>
<div><dt>Started</dt><dd>19 Oct 2026 14:20</dd></div>
<div><dt>Finished</dt><dd>19 Oct 2026 14:32</dd></div>
<div><dt>Duration</dt><dd>12m</dd></div>
</dl>
</section>
<section class="card">
<h2>Run</h2>
<dl class="kv">
<div><dt>Pipeline</dt><dd>24 · v5</dd></div>
<div><dt>Stage</dt><dd>land</dd></div>
<div><dt>Visits</dt><dd>6 recorded</dd></div>
<div><dt>Workspace</dt><dd><code>/Users/alan/repos/pipelines</code></dd></div>
<div><dt>Content hash</dt><dd><code>sha256:9f2c41e8a7</code></dd></div>
</dl>
</section>
<section class="card">
<h2>Changes</h2>
<button class="disclosure" type="button" aria-expanded="false">
<span>4 files changed · +86 −21</span>
<svg class="icon disclosure-chevron" aria-hidden="true" focusable="false"><use href="#i-chevron"></use></svg>
</button>
</section>
</div>
<nav class="section-strip" aria-label="Run sections">
<div class="strip-tablist" role="tablist" aria-label="Run sections">
<button class="strip-tab" id="run-strip-tab-summary" type="button" role="tab"
aria-selected="true" aria-controls="run-panel" tabindex="0">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-info"></use></svg>
<span>Summary</span>
</button>
<button class="strip-tab" id="run-strip-tab-graph" type="button" role="tab"
aria-selected="false" aria-controls="run-panel" tabindex="-1">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-graph"></use></svg>
<span>Graph</span>
</button>
<button class="strip-tab" id="run-strip-tab-input" type="button" role="tab"
aria-selected="false" aria-controls="run-panel" tabindex="-1">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-input"></use></svg>
<span>Input</span>
</button>
<button class="strip-tab" id="run-strip-tab-output" type="button" role="tab"
aria-selected="false" aria-controls="run-panel" tabindex="-1">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-output"></use></svg>
<span>Output</span>
</button>
<button class="strip-tab" id="run-strip-tab-timeline" type="button" role="tab"
aria-selected="false" aria-controls="run-panel" tabindex="-1">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-list"></use></svg>
<span>Timeline</span>
</button>
</div>
</nav>
</section>
</main>
<nav class="destination-dock" aria-label="Destinations">
<a class="dock-item" href="#wide">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-branch"></use></svg>
<span>Pipelines</span>
</a>
<a class="dock-item" href="#runs" aria-current="page">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-clock"></use></svg>
<span>Runs</span>
</a>
<a class="dock-item" href="#runs">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-chat"></use></svg>
<span>Chat</span>
</a>
<a class="dock-item" href="#runs">
<svg class="icon" aria-hidden="true" focusable="false"><use href="#i-settings"></use></svg>
<span>Settings</span>
</a>
</nav>
</div>
</section>
</body>
</html>
+206
View File
@@ -0,0 +1,206 @@
# Pipelines web client — accessibility audit
**Date:** 2026-10-19
**Scope:** the browser client in `web/` (L7 in `web/PARITY.md`), against the live
server on `127.0.0.1:8080`.
**Status:** audit only. This audit adds only this report; no product source, test,
style or config file was changed.
## What was driven
The page was served by `web/serve.mjs` on `127.0.0.1:8097` against the live
Pipelines server on `127.0.0.1:8080`, then driven in headless Chrome 1440×900
through the read-only `web/test/browser.mjs` driver plus the Chrome DevTools
Protocol for real key events, the accessibility tree and reduced-motion
emulation.
Screens exercised: Pipelines list + filter/sort; Runs list + filter/sort; all
five run-detail tabs; the Timeline stage pane; the Changes diff viewer
(run 438); the artifact gallery and full-screen image viewer (run 430); Chat
list, transcript, composer, actions menu and Rename dialog; Search; the Needs
you sheet (182 entries at capture time); Settings; and URL deep links
(`/runs/:id`, `/runs/:id/stage/:key`, `/pipelines/:id`, `/pipelines/:id/:version`,
`/settings/templates`, `/templates`, and a malformed run id).
### Screen coverage
| Screen | What was driven | Checks that were exercised | Findings |
| --- | --- | --- | --- |
| Pipelines list + filters | list load, Filter panel, Sort panel, trigger toggles | names, tab order, Escape, outside click, headings, contrast | M3, M4, M8, S1, S2 |
| Runs list + filters | 438 runs, Filter and Sort panels, row selection | names, 458-control tab walk, Escape, outside click, headings | M3, M4, M8, S1, S2 |
| Run detail tabs | Summary / Graph / Input / Output / Timeline | tab role/selected, names, ArrowRight, headings | M3, M8 |
| Run decision sheet | not reachable (no `waiting` run); source reviewed | dialogue/radio/groups, keyboard, error announcement | S9 |
| Stage pane | opened from a Timeline row, focus walk, Escape | dialog name, initial focus, trap, background inertness, Escape return | M1, M2 |
| Changes viewer | run 438 Summary → expand Changes → open diff | dialog name, initial focus, trap, Escape return, contrast | M1, M2, N1 |
| Artifacts viewer | run 430 gallery → image tile → full-screen viewer | tile semantics, keyboard, viewer focus/trap/Escape, names | M5, S10, N11 |
| Chat | list, menu, Rename dialog, transcript, composer, palette; approval card unavailable (no pending request) | row/menu names, keyboard, Shift+Enter, empty Enter, live semantics | M6, S5, S7, S8, N4, N7 |
| Search | query `plan`, kind/sort controls, results, Escape | names, live region, focus return | M2, S6, N13 |
| Attention sheet | bell → 182-entry sheet, focus walk, Escape | names, duplicate Dismiss, trap, background, Escape return | M1, M7 |
| Settings | Connection, Workspace, Notifications, Templates sections | names, duplicate Disconnect, headings, status | M8, S11, N13 |
| Deep links | 7 paths including a malformed id | route resolution, stage-pane link, fallback | N5 |
Read-only guarantees observed:
- No run was started, cancelled, retried or decided. The Retry **confirm** was
opened and dismissed with Escape; no `retry_run`/`cancel_run`/`decide_run`
was sent.
- No chat was created, closed or hidden. The existing operator session was
opened read-only (subscription only); the Rename dialog was opened and
dismissed without saving. The composer draft was exercised and restored.
- No filter was applied, no attention entry was dismissed, no settings were
saved.
## Summary
**9 must-fix, 12 should-fix, 15 notes.** The status palette and the rest of the
dark palette pass AA contrast; status is never colour-only. The largest
problems are structural: modal dialogs do not trap focus or hide the
background, tabs are anonymous buttons, and the detail pane sits after hundreds
of list rows in the tab order. Artifact tiles cannot be opened by keyboard, and
several lists expose identical accessible names for different actions.
## Must-fix (do these in one later item, in this order)
| # | Finding | Screen(s) | Severity | Evidence | Exact element + file:line | Suggested fix |
| --- | --- | --- | --- | --- | --- | --- |
| M1 | **No modal focus trap; the background stays tabbable.** Tab from the last control goes to `body` or a background row; Shift+Tab from the first goes back into the page. `document.querySelectorAll("[inert]").length === 0` while each measured dialog was open. | Attention sheet, stage pane, Changes viewer, artifact viewer, confirm dialogs, decision sheet, chat Rename/Close, template create | must-fix | DOM + AX (attention, stage, changes, artifact, confirm measured; others structurally identical) | `div.attention-sheet` `src/app.js:1010-1049`; `div.stage-pane` `3244-3282`; `div.change-viewer` `2983-3107`; `div.artifact-viewer` `4047-4160`; `div.confirm-dialog` `3662-3703`; `div.decision-sheet` `3515-3594`; `div.confirm-chat-rename` `5894-5900`; `div.confirm-chat-close` `6946-7005`; `div.template-create-dialog` `2153-2210` | Add one shared dialog controller: record the trigger, move focus to the first control (or the panel), trap Tab/Shift+Tab inside the panel, set `inert` (or `aria-hidden`) on `#content`, `.topbar` and the banner, close on Escape/backdrop, then restore the trigger. Apply it to every `role="dialog"`. |
| M2 | **Some dialogs open with no focus at all, and several never return focus.** Changes viewer and artifact viewer opened with focus still outside the dialog (`document.activeElement === body` in the automated capture, `dialog.contains(activeElement) === false`); confirm also opened on `body` after its trigger was replaced. After Escape, the artifact viewer, confirm, chat actions menu, chat Rename and Search leave focus on `body`. | Changes viewer, artifact viewer, confirm, Action failed, chat menu, chat Rename/Close, template create, Search | must-fix | DOM for changes/artifact/confirm/menu/rename/search; code for Action failed/chat Close/template create | `openChangeViewer` `src/app.js:2978-3107`; `openArtifactViewer` `4043-4160`; `renderConfirmDialog` `3639-3704`; `dismissConfirm` `3628-3631`; `dismissActionError` `3750-3753`; `dismissChatRename` `4890-4893`; `dismissChatClose` `4766-4769`; `closeTemplateCreateDialog` `2137-2144`; chat menu close `8634-8639`; `closeSearch` `7124-7138` | Give each opener an explicit return target and call `.focus()` after render. The same shared controller as M1 should cover this; for the menu, return to its `button.chat-menu-button`; for Search, return to `#searchToggle`. |
| M3 | **The "tabs" are plain buttons: no tablist/tab/tabpanel, no selected state, no arrow-key operation.** Chrome's AX tree reports `role=button` for every top-level and detail tab; `aria-selected`/`aria-current` are absent; the active state exists only as `.active` CSS. ArrowRight on the active detail tab does nothing. | Top nav, pipeline detail tabs, run detail tabs | must-fix | DOM + AX | `tabButton` `src/app.js:1301-1313`; pipeline tab strip `1938-1950`; run tab strip `2686-2701`; `nav.tabs` `1244-1257` | Use `role="tablist"` on the strip, `role="tab"` + `aria-selected` + `aria-controls` on each tab, `role="tabpanel"` + `aria-labelledby` on the body; roving `tabindex` and ArrowLeft/ArrowRight/Home/End. If the top nav stays navigation, at minimum add `aria-current="page"` and `aria-label="Primary"`. |
| M4 | **The detail pane comes after the entire list in tab order; there is no skip link.** From the selected run row to the first detail tab is **351 tab stops** (458 focusables on screen). Pipelines: **29** stops; Chat: **43** stops. No skip link exists on any route. | Runs, Pipelines, Chat | must-fix | DOM (real Tab order / focusable indices) | `renderContent` split order `src/app.js:1265-1277` (list appended before detail); `renderPipelineList` `1695-1701`; `renderRunList` `2362-2406`; `index.html:9-15` (no skip link) | Add a "Skip to detail" link as the first focusable, and after a row is activated move focus to the detail's `h1`/`h2` (and announce it). Alternatively make each list a roving-tabindex listbox so it contributes one stop. |
| M5 | **Artifact tiles are click-only generic divs.** Chrome reports `role=generic`, name `""` for `div.artifact-tile.clickable`; it has no `tabindex`, no key handler and no control role. An image/video tile opens the viewer; a file tile opens a new tab — both only by mouse. | Artifacts gallery and visit artifacts | must-fix | DOM + AX | `renderArtifactTile` `src/app.js:3904-3936`; click handlers `3921`, `3925`, `3932` | Make the tile itself a `<button>` (or `role="button" tabindex="0"` with Enter/Space) named `Open {artifact name}`; move the viewer/tab action there. Keep Copy link/Share as sibling buttons and stop propagation. Mark the video poster glyph decorative. |
| M6 | **A chat row is a `role=button` containing another real button, and its name absorbs "Chat actions".** AX name of the row is e.g. `New chat Operator Open Idle · … Chat actions`; the inner action button is also a tab stop. 19–21 rows expose the identical `Chat actions` name, and many rows share identical `New chat …` names. | Chat list | must-fix | DOM + AX | `renderChatRow` `src/app.js:5514-5552` (row `role=button` at `5516`, menu appended at `5550`); `renderChatActionsMenu` `5672-5736` | Make the title/meta area the session button and render the actions button as its sibling, not a child. Name the actions control `Chat actions for {title}` (include session id or directory when titles repeat). Drop `role=button` from the row container. |
| M7 | **Every attention-row dismiss control is named exactly "Dismiss".** The captured sheet had 181–182 identical names; a screen-reader user cannot tell which run each one dismisses. | Needs you sheet | must-fix | DOM + AX | `renderAttentionRow` `src/app.js:1053-1089` (`aria-label: "Dismiss"` at `1079`) | Use `aria-label="Dismiss {run label}"` (optionally `— {pipeline}`/kind); keep the visible ✕ and `title`. |
| M8 | **No `h1` on any route, and the list routes have no headings at all.** `document.querySelectorAll("h1").length === 0` on `/pipelines`, `/runs`, `/chat`, `/settings`, `/templates`. Pipeline/Runs list views have zero headings; details begin at `h2`; Settings has four `h2`s; Chat has an `h2` and markdown `h4`/`h5`. | All screens | must-fix | DOM | `renderContent` `src/app.js:1244-1257`; pipeline list `1695-1701`; run list `2362-2406`; `renderSettingsView` `1326-1335`; chat title `5759`; `index.html` (no server-rendered heading) | Render one `h1` per route ("Pipelines", the run/pipeline title, "Chat", "Settings", "Templates") and an `h2` for each list. Keep Settings sections at `h2`; ensure markdown headings start below the transcript heading. |
| M9 | **Timeline rows have no visible focus ring.** `.timeline-row:focus-visible` removes the outline and changes only the background from `--surface` to `--surface-2` (≈1.2:1). The row's other focus styling is absent. | Run detail → Timeline | must-fix | DOM/CSS (`outline: none`, `:focus-visible` true) | `styles.css:790` (`.timeline-row:hover, .timeline-row:focus-visible { background: var(--surface-2); outline: none; }`) | Add `outline: 2px solid var(--accent); outline-offset: -2px;` (matching `.chat-row`/`.change-row`) or another ≥3:1 ring. |
## Should-fix
| # | Finding | Screen(s) | Severity | Evidence | Exact element + file:line | Suggested fix |
| --- | --- | --- | --- | --- | --- | --- |
| S1 | **Selection is not exposed.** Selected pipeline, run and chat rows are marked only by `.selected` (background + inset bar); no `aria-current`/`aria-selected` reaches the AX tree. | Pipelines, Runs, Chat | should-fix | DOM + AX | `renderPipelineRow` `src/app.js:1920-1924`; `renderRunRow` `2450-2453`; `renderChatRow` `5514-5529` | Add `aria-current="true"` to the selected row, or implement the lists as listboxes with `option` + `aria-selected`. |
| S2 | **Pipeline/run Filter and Sort popovers ignore Escape and outside clicks, and their triggers do not expose expanded state.** Escape left `#runFilterMenu`/`#sortPanel` open; clicking the detail pane did not close it. Triggers have no `aria-expanded`; the menus have no role. | Pipelines list, Runs list | should-fix | DOM | Triggers `src/app.js:1721-1741` and `2506-2525`; panels `1756-1823`, `2544-2601`; global Escape `8591-8643` (no filter/sort branch) | Add `aria-expanded`/`aria-controls` on both triggers, close on Escape and outside pointerdown, and give the panels `role="group"`/`role="menu"` with a label. Return focus to the trigger. |
| S3 | **The header server-URL field is named by its placeholder.** AX name is `ws://HOST:PORT/connect`, not "Server URL"; it is the only form field in the header with no label. (Settings' field is correctly named "Server URL".) | Global header | should-fix | AX | `#url` `src/app.js:815-824` | Add a visually hidden or visible `<label for="url">Server URL</label>` (or `aria-label="Server URL"`), and keep the placeholder as an example. |
| S4 | **The document title never changes per route.** Every route reports `Pipelines — web spike`; deep links and SPA navigation do not update it. | All screens / deep links | should-fix | DOM | `index.html:6`; no `document.title` assignment in `src/app.js` (verified by grep) | Set `document.title` from the current route/detail ("Pipelines", "Runs — {run}", "Chat — {title}", "Settings", "Templates — {template}"). |
| S5 | **The chat actions menu advertises `role="menu"` but does not support menu keys, and Escape loses focus.** ArrowDown leaves focus on `Rename…`; Escape closes the menu but focus lands on `body`. | Chat list → Chat actions | should-fix | DOM | Menu `src/app.js:5691-5734`; open/focus `4861-4878`; Escape `8634-8639` | Implement roving focus with ArrowUp/ArrowDown/Home/End (and optional typeahead), and return focus to the `Chat actions for …` trigger on Escape/selection. |
| S6 | **The Search panel is an unlabelled generic div.** `#searchPanel` has no role or accessible name; it is a disclosure rather than a landmark. Its Escape focus loss is covered by M2. | Search | should-fix | DOM | Panel `src/app.js:7311`; open/close `7108-7138` | Give the panel `role="search"`/`role="dialog"` + `aria-label="Search"`, and keep the field labelled. |
| S7 | **The slash-command highlight is visual only.** The textarea has no `aria-controls`/`aria-activedescendant`; ArrowDown changes `aria-selected` on the option but the AX tree gets no active-descendant change, so screen readers do not hear the highlighted command. | Chat composer | should-fix | DOM | Textarea `src/app.js:6780-6790`; palette `6741-6747`, 6815-6839; key handler `5085-5100` | Give options ids and set `aria-controls="chatPalette"` + `aria-activedescendant` on `#chatInput` as the highlight moves (and `aria-expanded`). |
| S8 | **Live updates are not announced.** `#chatTranscript` has no `role="log"`/`aria-live`/label, so streamed answer text and the approval card are silent; the approval card has no `role="alert"`; run status updates have no live region either. | Chat transcript/approval, Runs list/detail | should-fix | DOM for transcript (no attributes); code for approval/run updates | Transcript `src/app.js:6072-6123`; approval card `6152-6188`; approval jump `6126-6142` | Make the transcript a labelled `role="log"` with `aria-live="polite"` (avoid announcing every delta: announce turn boundaries); give a newly actionable approval `role="alert"`/`aria-live="assertive"`; add a polite live region for run status changes. |
| S9 | **The decision sheet's radiogroup does not behave like one** (code-read; no `waiting` run was live). All options are tab stops with `role="radio"`, arrow keys are not handled, and selecting an option calls `renderContent()`, which replaces the button and drops focus. The error line is not `role="alert"`. | Run decision sheet | should-fix | Code | Options `src/app.js:3532-3553`; select handler `3541-3544`; error `3570` | Roving `tabindex` (selected option = 0, others -1), ArrowUp/ArrowDown/ArrowLeft/ArrowRight selection, restore focus to the chosen option after render, and `role="alert"` on the error. |
| S10 | **Artifact action names are duplicated without context.** In run 430's gallery: `Copy link` ×8 and `Share` ×18, with no artifact name in the accessible name. | Artifacts gallery / visit artifacts | should-fix | DOM + AX | `renderTileActions` `src/app.js:3938-3966` | Use `aria-label="Copy link to {name}"` / `"Share {name}"`. |
| S11 | **Two different "Disconnect" buttons on Settings.** The header `#connectBtn` and the Settings primary `#settingsPrimary` are both named `Disconnect`, with no distinguishing context. | Settings | should-fix | AX | Header `src/app.js:833-838`; Settings primary `1381-1395` | Name them by scope ("Disconnect server" / "Disconnect (header)") or hide the header connection controls while Settings is open. |
| S12 | **`prefers-reduced-motion` does not stop the spinner.** Under emulated `prefers-reduced-motion: reduce`, `.spinner` still reports `animation-name: spin; animation-duration: 0.8s`. The graph halo and search progress do stop. | All screens with loading/spinners | should-fix | DOM (CDP media emulation) | `styles.css:390-400`; existing media blocks `662-664` and `1296-1298` | Add `.spinner { animation: none; }` (or a non-rotating loading treatment) to the reduced-motion block. |
## Notes, passes and limits
| # | Observation | Screen(s) | Severity | Evidence | Element + file:line |
| --- | --- | --- | --- | --- | --- |
| N1 | **Status palette contrast passes.** On `--surface` (#171f1d): running 7.62, waiting 11.22, succeeded 9.13, failed 6.94, canceled 5.30, interrupted 9.82, queued 6.68, blocked 8.08, skipped 8.28, unknown 9.88. On `--surface-2`: all ≥4.67 (worst: canceled #889391). Flow-outcome colours are 7.25–12.5. `--muted` is 7.38/6.51. No low-contrast text was found on any audited screen (`lowContrastCount: 0`). | All | note (pass) | DOM (computed colours + WCAG formula) | `styles.css:2-14`, `211-219`, `809-827` |
| N2 | **Status is not colour-only.** Every chip carries its status word; the live badge carries its word; decorative dots are `aria-hidden="true"`. The only state that is still visual-only is the active/selected row/tab, covered by M3/S1. | All | note (pass) | DOM | `styles.css:208-231`; `src/app.js:2535-2542` |
| N3 | **No unnamed controls.** Across the audited screens every focusable control had a non-empty accessible name (447–484 controls on Runs across states, 50–88 in Chat). Icon-only controls (Send, Stop, Attach file, Chat actions, notification bell, remove attachment, Close) all carry `aria-label`. The one unnamed interactive element is the non-focusable artifact tile (M5). | All | note (pass) | DOM + AX | `src/app.js:6867-6881` (Send/Stop), `6765-6777` (Attach), `1076-1088` (Dismiss) |
| N4 | **Composer keyboard works.** Shift+Enter inserted a newline (`"line one\n"`); Enter on an empty draft sent nothing and did not change the transcript. Code confirms Enter submits only through `composerSubmit`. Enter-with-text was **not** sent live (to avoid writing to the operator's chat). | Chat composer | note (pass) | DOM for Shift+Enter/empty Enter; code for Enter-with-text | `onComposerKeydown` `src/app.js:5085-5100` |
| N5 | **URL deep links route correctly.** `/runs/438` and `/runs/438/stage/implementer` opened the run and stage pane; `/pipelines/20` and `/pipelines/20/10` opened the detail; `/settings/templates` and `/templates` are aliases; `/runs/not-a-number` fell back to `/pipelines`. The stage pane opened with its dialog label and Escape returned to `/runs/438`. | Deep links | note (pass) | DOM | `src/routes.js`; `src/app.js:7539-7551` |
| N6 | **Reduced motion is partial.** The graph halo and search progress both become `animation: none` under emulation; only the spinner is missed (S12). | Graph, Search, spinners | note | DOM (emulation) | `styles.css:662-664`, `1296-1298` |
| N7 | **The approval card was not reachable live.** No permission was pending on the live server, so its findings (S8) are code-read; its controls are labelled text buttons and the risk panel is not colour-only. | Chat approval | note (limit) | Code | `src/app.js:6152-6220` |
| N8 | **The decision sheet was not reachable live.** No `waiting` run existed, so S9 is code-read. | Run decision sheet | note (limit) | Code | `src/app.js:3487-3620` |
| N9 | **Focus rings are otherwise visible.** Every other tabbed control showed Chrome's `outline: auto 1px rgb(153, 200, 255)`; chat/change rows show a 2px accent ring. Timeline is the sole missing ring (M9). The inputs that set `outline: none` (decision feedback, template name, rename) still change their border to `--accent`. | All | note | DOM (real Tab walk) | `styles.css:790`, `1334`, `1408`, `1430`, `1526`, `2046` |
| N10 | **Markdown headings inside Chat start at `h4`/`h5` under the `h2` chat title**, so the in-transcript outline skips levels. This is content-generated, but the page outline fix (M8) should account for it. | Chat transcript | note | DOM | `renderMarkdownBlock` `src/app.js:6590-6595` |
| N11 | **The video artifact poster's `▶` is plain text, not `aria-hidden`.** The tile has no accessible name anyway (M5); after M5 the glyph should be decorative. | Artifacts | note | DOM | `src/app.js:3922-3925` |
| N12 | `html lang="en"` is present, and there is one `main` landmark. The single `nav` has no `aria-label` (minor; M3 adds one). | All | note | DOM | `index.html:2`; `src/app.js:1244-1257` |
| N13 | Search results use `aria-live="polite"` and the Settings notification state uses `role="status"`; both are present and correctly scoped. The Settings URL error sets `aria-invalid` + `role="alert"`; the workspace field sets `aria-invalid` and a described helper, but that helper is not a live region (minor). | Search, Settings | note (pass) | DOM | `src/app.js:7309`, `1544`, `1564-1565`, `1573-1582` |
| N14 | Dialogs do expose a name: every `role="dialog"` had an `aria-label` (or a titled heading). The gap is focus management, not naming. The stage pane's name is only the stage key (`implementer`), so "Stage: implementer, run 438" would be clearer. | All dialogs | note | AX | `src/app.js:1014`, `3248`, `3520`, `3666` |
| N15 | The `Dismiss`, `Chat actions`, `Copy link` and `Share` name collisions are real AX-tree duplicates, not just visual repeats. They are listed as M6/M7/S10; `Disconnect` is S11. | Runs/Chat/Artifacts/Settings | note | AX | see M6/M7/S10/S11 |
## Escape and focus-return matrix
| Overlay | Escape closes it? | Where focus goes afterwards | Evidence |
| --- | --- | --- | --- |
| Needs you sheet | yes | `#attentionBell` (correct) | DOM |
| Stage pane | yes | the originating timeline row (correct) | DOM |
| Changes viewer | yes | the originating change row (correct) | DOM |
| Artifact viewer | yes | `body` — no restore | DOM |
| Confirm (Retry/Cancel/Restart) | yes | `body` — no restore | DOM |
| Chat actions menu | yes | `body` — no restore | DOM |
| Chat Rename dialog | yes | `body` — no restore | DOM |
| Search panel | yes | `body` — no restore | DOM |
| Pipelines Filter / Sort | **no — stays open** | focus remains wherever it was (`body` in the test) | DOM |
| Runs Filter / Sort | **no — stays open** | focus remains wherever it was (`body` in the test) | DOM |
| Decision sheet | yes (code) | `Decide` card button (code) | code |
| Chat Close confirm | yes (code) | no explicit restore (code) | code |
| Action failed | yes (code) | no explicit restore (code) | code |
| Template create | yes (code) | no explicit restore (code) | code |
## Evidence and method
### Real DOM / accessibility-tree checks
- **Accessible names:** 7 controls queried with `Accessibility.getPartialAXTree`
on `/runs/438`; chat row, menu button, composer, Send, attention row/dismiss,
settings fields, search row and input queried in follow-up runs. This is how
the header URL placeholder name, the nested "Chat actions" name, the empty
artifact-tile name and the duplicate Dismiss names were confirmed.
- **Tab order and focus rings:** real CDP `Input.dispatchKeyEvent` Tab presses
with computed outline/background comparison against each element's unfocused
style. The focus-distance numbers (351/29/43) come from the actual focusable
order.
- **Dialogs:** opened the attention sheet, stage pane, Changes viewer, artifact
viewer, confirm, chat menu and Rename dialog; focused their first/last
controls and pressed Tab/Shift+Tab; measured `[inert]`, `aria-hidden`, active
element and post-Escape active element.
- **Composer:** Shift+Enter and empty-Enter were sent through CDP with real key
events; the draft was restored.
- **Reduced motion:** `Emulation.setEmulatedMedia` with
`prefers-reduced-motion: reduce`; `matchMedia` confirmed true and computed
animation names were read.
- **Contrast:** computed colours from the live page and the WCAG relative
luminance formula; `--surface`, `--surface-2` and `--bg` were all checked.
### Code-read only (unreachable or deliberately not exercised)
- **Decision sheet (S9):** no `waiting` run on the live server.
- **Approval card (N7/S8):** no pending `chat_permission`.
- **Chat Close confirm / Action failed / template create:** read from source and
not opened/confirmed, to avoid a state change and because the dialogs are not
on the required screen list. Their focus behaviour follows the same pattern
as the measured dialogs.
- **Enter-with-text in the composer (N4):** intentionally not sent; the handler
is read from source.
- **Artifact tile keyboard failure (M5):** confirmed by DOM/AX (`role=generic`,
no tabindex, no key handler), not by attempting a keyboard activation.
### Commands run
```sh
cd /Users/alan/repos/pipelines/web
node serve.mjs --host 127.0.0.1 --port 8097 --pipelines 127.0.0.1:8080
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8097/
# Read-only audit scripts (outside the repo) importing web/test/browser.mjs
node /tmp/a11y/explore.mjs
node /tmp/a11y/audit.mjs
node /tmp/a11y/targeted.mjs
node /tmp/a11y/targeted2.mjs
node /tmp/a11y/targeted3.mjs
```
The audit scripts imported `web/test/browser.mjs` without modifying it. They
launched the installed Chrome headless at 1440×900 and used a fresh profile.
Raw capture files: `/tmp/a11y/audit.json`, `/tmp/a11y/targeted.json`,
`/tmp/a11y/targeted2.json`.
## One-item must-fix checklist
1. Add the shared dialog controller (M1/M2) and convert every `role="dialog"`
to use it: focus entry, Tab trap, `inert` background, Escape/backdrop,
focus return.
2. Convert top-level and detail tabs to `tablist`/`tab`/`tabpanel` with
`aria-selected`, roving `tabindex` and arrow keys (M3).
3. Add the skip link and move focus to the detail heading after a list row is
activated (M4).
4. Turn artifact tiles into real buttons with `Open {name}` names (M5).
5. Restructure the chat row so the session and its actions are siblings; give
every actions and Dismiss control a unique name (M6/M7).
6. Add one `h1` per route and an `h2` for each list view (M8).
7. Restore a visible focus ring on `.timeline-row` (M9).
8. Re-run `node --test test/`, `node test/ui-smoke.mjs` and a short AX/Tab
spot-check on the changed screens; add regression assertions for the
dialog trap, tab roles and artifact-tile keyboard activation.
+574
View File
@@ -0,0 +1,574 @@
# Pipelines web client — L2–L4 layout specification
Design-only deliverable for **L2 (wide: left rail + list/detail panes)**, **L3
(narrow: bottom section strip above the bottom destination bar)** and **L4
(responsive switch by viewport width)**. It does not change `web/src/app.js`,
`web/styles.css`, `web/index.html`, `web/test/**` or the Android app.
Read with:
- `web/design/layout/prototype.html` and `prototype.css` — the rendered mock and
the reference CSS.
- `web/design/layout/capture.mjs` — headless-Chrome capture of the mock.
- Android sources that define the same structure:
`ui/WindowSize.kt` (600dp predicate), `ui/components/DetailTabs.kt`
(200dp section rail, narrow strip), `ui/components/SelectorStrip.kt`
(bottom strip), `ui/DestinationBar.kt` (destinations) and
`ui/PipelinesApp.kt` (`pillVisible`, overlay, strip clearance).
Palette: copied verbatim from `web/styles.css` `:root` (`--bg`, `--surface`,
`--surface-2`, `--border`, `--text`, `--muted`, `--accent`, `--ok`, `--warn`,
`--bad`).
---
## 1. Layout contract
| | Narrow (viewport < 600 CSS px) | Wide (viewport ≥ 600 CSS px) |
| --- | --- | --- |
| Shell | one pane at a time | 200px left rail + list pane + detail pane |
| Section index | bottom strip inside the detail pane | vertical group in the left rail |
| Destinations | fixed bottom destination bar | left rail destination group |
| Detail strip | visible only on a detail pane, above the bar | hidden (the rail is the selector) |
| Bottom bar | `position: fixed`, out of flow | hidden |
| Pane scroll | `overflow: auto` inside the pane | same, per pane |
One breakpoint only: **600 CSS px**, expressed as
`@media (min-width: 600px)`. It is the web analogue of
`isWideLayout(widthDp) = widthDp >= WIDE_LAYOUT_MIN_WIDTH_DP` with
`WIDE_LAYOUT_MIN_WIDTH_DP = 600`. Do not add a second breakpoint, device
sniffing, `screen.width`, user-agent checks or a fixed device width.
At exactly 600px the columns are `200px | minmax(200px, 360px) | 1fr`; the
detail gets the remaining 200px. The rail never shrinks and never scrolls
horizontally; the list may use its 200–360px range.
`widthDp` and CSS px are both logical units. Browser zoom changes the CSS-px
viewport and therefore switches the layout, which is the intended analogue of a
window-size change.
---
## 2. DOM structure
Render one shell per app; the router fills the panes. The wide rail mount and
the narrow strip mount are alternate presentations of the **same** section tab
model (`DetailTab.key`), so the selected key must not change when the viewport
crosses 600px.
```html
<a class="skip-link" href="#pane-main">Skip to content</a>
<div class="app-root"> <!-- existing topbar + banner stay here -->
<header class="topbar">…</header> <!-- unchanged -->
<div class="connbar">…</div> <!-- existing connection banner, unchanged -->
<div class="app-shell" data-active-pane="detail">
<!-- Wide-only. Hidden by the base rules; display:flex from the 600px query. -->
<aside class="app-rail" aria-label="Pipelines navigation">
<div class="rail-brand">Pipelines</div>
<nav class="rail-destinations" aria-label="Destinations">
<a class="rail-item" href="/pipelines" aria-current="page">Pipelines</a>
<a class="rail-item" href="/runs">Runs</a>
<a class="rail-item" href="/chat">Chat</a>
<a class="rail-item" href="/settings">Settings</a>
</nav>
<div class="rail-divider" role="presentation"></div>
<div class="rail-sections">
<p class="rail-heading" id="rail-sections-label">Sections</p>
<div class="rail-tablist" role="tablist"
aria-labelledby="rail-sections-label" aria-orientation="vertical">
<button class="rail-tab" id="rail-tab-summary" type="button" role="tab"
aria-selected="true" aria-controls="detail-panel" tabindex="0">Summary</button>
<button class="rail-tab" id="rail-tab-graph" type="button" role="tab"
aria-selected="false" aria-controls="detail-panel" tabindex="-1">Graph</button>
<!-- Input, Output, Timeline for a run; Source for a pipeline. -->
</div>
</div>
<div class="rail-footer"><span class="status-dot"></span> Connected</div>
</aside>
<main class="workspace" id="pane-main" tabindex="-1">
<!-- List pane. Both panes exist; narrow shows exactly one. -->
<section class="list-pane" aria-label="Runs list">…</section>
<!-- Detail pane. Its section strip is narrow-only. -->
<section class="detail-pane" aria-label="Run detail">
<header class="pane-header detail-header">…</header>
<div class="pane-scroll" id="detail-panel" role="tabpanel"
aria-labelledby="rail-tab-summary" tabindex="0">…</div>
<nav class="section-strip" aria-label="Run sections">
<div class="strip-tablist" role="tablist" aria-label="Run sections">
<button class="strip-tab" id="strip-tab-summary" type="button" role="tab"
aria-selected="true" aria-controls="detail-panel" tabindex="0">Summary</button>
<button class="strip-tab" id="strip-tab-graph" type="button" role="tab"
aria-selected="false" aria-controls="detail-panel" tabindex="-1">Graph</button>
<button class="strip-tab" id="strip-tab-input" type="button" role="tab"
aria-selected="false" aria-controls="detail-panel" tabindex="-1">Input</button>
<button class="strip-tab" id="strip-tab-output" type="button" role="tab"
aria-selected="false" aria-controls="detail-panel" tabindex="-1">Output</button>
<button class="strip-tab" id="strip-tab-timeline" type="button" role="tab"
aria-selected="false" aria-controls="detail-panel" tabindex="-1">Timeline</button>
</div>
</nav>
</section>
</main>
<!-- Fixed overlay, narrow-only. No grid area. -->
<nav class="destination-dock" aria-label="Destinations">
<a class="dock-item" href="/pipelines">Pipelines</a>
<a class="dock-item" href="/runs" aria-current="page">Runs</a>
<a class="dock-item" href="/chat">Chat</a>
<a class="dock-item" href="/settings">Settings</a>
</nav>
</div>
</div>
```
Rules for the two section mounts:
- Render only the mount appropriate to the current width, **or** render both and
give each unique ids. In the latter case the hidden mount must be
`display: none` (not merely transparent), so only one tablist is in the
accessibility tree. Never leave two visible tablists.
- `aria-controls` always names the one panel id (`detail-panel`).
- The panel's `aria-labelledby` names the tab id of the **visible** mount.
- A pipeline detail has `Summary`, `Graph`, `Source`; a run detail has
`Summary`, `Graph`, `Input`, `Output`, `Timeline`. Order is the Android
`runDetailTabs` / `pipelineDetailTabs` order; Summary is the default.
- The strip is rendered only when the detail has more than one section
(`selectorStripShown(entryCount) = entryCount > 1`). A list-only screen has
no strip.
Pane selection:
- `data-active-pane="list" | "detail"` is the narrow single-pane switch.
- On wide both panes are shown and the attribute is ignored.
- On narrow the inactive pane is `display: none`; if it is kept mounted for a
transition, also set `inert` and `aria-hidden="true"` while covered.
- Selecting a row sets `detail`; Back sets `list` and restores focus to the
originating row. `open`/`close` also updates the URL route, not a local-only
class.
---
## 3. CSS the implementer should produce
The rules below are the layout contract. Visual finish (tones, radii, chip
styles, icon sizing) can follow `prototype.css`; the grid/flex and overflow
rules should be kept as written.
```css
.app-root {
display: flex;
flex-direction: column;
height: 100vh;
height: 100dvh;
min-height: 0;
}
/* Narrow is the default layout. */
.app-shell {
position: relative;
flex: 1 1 auto;
min-height: 0;
overflow: hidden;
display: grid;
grid-template-columns: minmax(0, 1fr);
grid-template-rows: minmax(0, 1fr);
grid-template-areas: "workspace";
padding-top: env(safe-area-inset-top, 0px);
padding-bottom: var(--dock-clearance);
background: var(--bg);
}
.workspace {
grid-area: workspace;
min-width: 0;
min-height: 0;
display: grid;
grid-template-columns: minmax(0, 1fr);
grid-template-rows: minmax(0, 1fr);
grid-template-areas: "main";
}
.list-pane,
.detail-pane {
grid-area: main;
min-width: 0;
min-height: 0;
overflow: hidden;
display: none;
flex-direction: column;
background: var(--bg);
}
.app-shell[data-active-pane="list"] .list-pane,
.app-shell[data-active-pane="detail"] .detail-pane {
display: flex;
}
/* The one breakpoint: 600px. WindowSize.kt's isWideLayout(600) is true. */
@media (min-width: 600px) {
.app-shell {
grid-template-columns: var(--rail-width) minmax(0, 1fr);
grid-template-rows: minmax(0, 1fr);
grid-template-areas: "rail workspace";
padding-bottom: 0;
}
.app-shell .app-rail { display: flex; }
.app-shell .workspace {
grid-template-columns: minmax(var(--list-min-width), var(--list-max-width)) minmax(0, 1fr);
grid-template-areas: "list detail";
}
.app-shell .list-pane {
grid-area: list;
display: flex;
border-right: var(--hairline) solid var(--border);
}
.app-shell .detail-pane {
grid-area: detail;
display: flex;
}
.app-shell .section-strip { display: none; }
.app-shell .destination-dock { display: none; }
}
```
```css
:root {
--rail-width: 200px; /* WIDE_RAIL_WIDTH_DP */
--list-min-width: 200px;
--list-max-width: 360px;
--dock-height: 60px;
--hairline: 1px;
--dock-clearance: calc(var(--dock-height) + env(safe-area-inset-bottom, 0px));
}
```
Rail:
```css
.app-rail {
display: none; /* narrow: destinations live in the dock */
flex-direction: column;
min-width: 0;
min-height: 0;
padding: 12px 8px;
background: var(--surface);
border-right: var(--hairline) solid var(--border);
}
.rail-destinations,
.rail-tablist { display: flex; flex-direction: column; gap: 2px; }
.rail-item,
.rail-tab {
min-height: 44px;
display: flex;
align-items: center;
gap: 12px;
padding: 0 12px;
border: 0;
border-radius: 8px;
background: transparent;
color: var(--muted);
text-align: left;
text-decoration: none;
}
.rail-item[aria-current="page"],
.rail-tab[aria-selected="true"] {
color: var(--text);
background: rgba(127, 209, 187, 0.12);
box-shadow: inset 2px 0 0 var(--accent);
font-weight: 600;
}
.rail-footer { margin-top: auto; }
```
The rail's **width comes from the grid track** (`grid-template-columns:
var(--rail-width) …`), never from its contents. No collapse control, no hover
peek, no master-pane width constant.
Panes and scroll:
```css
.pane-header,
.list-tools,
.section-strip { flex: 0 0 auto; }
.list-scroll,
.pane-scroll {
flex: 1 1 auto;
min-height: 0;
overflow: auto;
overscroll-behavior: contain;
scrollbar-gutter: stable;
}
```
Every grid/flex ancestor of a scroll container needs `min-height: 0`; without it
the pane pushes the socket shell taller instead of scrolling internally.
Exactly one layer owns the top safe area. The prototype has no topbar, so the
shell owns it with `padding-top`; if the existing `.topbar` already applies
`safe-area-inset-top`, omit that padding from `.app-shell` so the inset is not
counted twice — the same rule Android's shell follows.
Narrow section strip:
```css
.section-strip {
display: flex;
align-items: center;
min-width: 0;
padding: 6px 8px;
background: var(--surface);
border-top: var(--hairline) solid var(--border);
overflow-x: auto;
overflow-y: hidden;
overscroll-behavior-x: contain;
scrollbar-width: none;
}
.section-strip::-webkit-scrollbar { display: none; }
.strip-tablist { display: flex; align-items: center; gap: 2px; min-width: 0; }
.strip-tab {
flex: 0 0 auto;
min-height: 44px;
display: inline-flex;
align-items: center;
gap: 4px;
padding: 0 8px;
border: 1px solid transparent;
border-radius: 8px;
background: transparent;
color: var(--muted);
font-size: 12px;
white-space: nowrap;
}
.strip-tab[aria-selected="true"] {
color: var(--text);
background: var(--surface-2);
border-color: var(--border);
box-shadow: inset 0 -2px 0 var(--accent);
font-weight: 600;
}
```
The strip is in flow at the foot of the detail pane. It scrolls horizontally
when the labels do not fit, never wraps and never hides a label. Five labels
fit at 420px in the prototype at this padding; a longer localisation must scroll
rather than truncate.
Bottom destination bar:
```css
.destination-dock {
position: fixed;
inset: auto 0 0 0;
z-index: 30;
height: calc(var(--dock-height) + env(safe-area-inset-bottom, 0px));
display: flex;
gap: 4px;
padding: 4px 8px calc(4px + env(safe-area-inset-bottom, 0px));
background: var(--surface);
border-top: var(--hairline) solid var(--border);
}
.dock-item {
flex: 1 1 0;
min-width: 0;
min-height: 48px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 2px;
border-radius: 8px;
color: var(--muted);
text-decoration: none;
}
.dock-item[aria-current="page"] {
color: var(--accent);
background: rgba(127, 209, 187, 0.10);
}
```
The bar has **no grid area and no reserved row**. It is fixed to the viewport
bottom, painted above the pane with `z-index`. The shell reserves its height as
`padding-bottom: var(--dock-clearance)`, so the strip and the last scrollable
row end above it. That padding is the only space the bar influences. On wide the
bar is `display: none`.
If a future change lets the bar hide (for example during an open chat
conversation), set `--dock-clearance: 0px` at the same time; do not leave a
reserved band behind a hidden bar.
---
## 4. Focus and ARIA
- **Skip link** first in the shell, pointing at `#pane-main`. It is the first
tab stop and becomes visible on focus.
- **Landmarks**: rail `aside aria-label="Pipelines navigation"`, workspace
`main id="pane-main" tabindex="-1"`, destinations
`nav aria-label="Destinations"`, strip `nav aria-label="Run sections"`.
- **Destinations** are links (`<a>`), not tabs. The current one carries
`aria-current="page"`. Set it in both the rail and the dock; the hidden mount
is not exposed.
- **Section tabs** are `role="tab"` inside `role="tablist"`; the rail tablist is
`aria-orientation="vertical"`, the strip is horizontal. Selected tab has
`aria-selected="true"` and `tabindex="0"`; the rest have `tabindex="-1"`
(roving tabindex). Implement Left/Right/Up/Down/Home/End in JS. Selection is
conveyed by `aria-selected` and the container colour/inset underline, never
by colour alone.
- **Panels** are `role="tabpanel"`, `tabindex="0"`,
`aria-labelledby="<visible tab id>"`, and are the only scrolling body of a
detail. Changing a section keeps each section's saved scroll under its stable
key.
- **Pane focus**: after opening a detail, move focus to the detail's `<h1>`
(`tabindex="-1"`) or to `#pane-main`; on Back, return it to the row that
opened it. When narrow, the covered pane is `display:none` and, while
animating, `inert` + `aria-hidden="true"`.
- **Rows**: the whole row is a `<button>` or `<a>`; selected row in wide carries
`aria-current="true"`. Nested status chips are text, not controls.
- **Touch targets**: 44px minimum (`min-height`) for rail items, tabs, dock
items and row actions; 48px for the dock item itself, matching the Android
platform minimum.
- Do not put `aria-hidden="true"` on focusable content that remains in flow.
- Preserve the existing search/attention/dialog focus traps; the layout rails
add no focusable content behind an open modal.
---
## 5. Reduced motion
The wide/narrow switch is instantaneous: no animated rail width, no sliding
list, no strip collapse. Section changes may cross-fade in place; they never
slide laterally (Android's `DetailTabs` is a tab swap, not a pager).
```css
@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;
}
}
```
Under reduced motion a pane navigation becomes an immediate swap, the active
indicator jumps rather than travels, and `scrollIntoView` uses `behavior:
"auto"`. Do not disable the selected state or the focus ring.
---
## 6. What moves into the bottom strip
Only the **detail section index**:
| Detail | Strip entries (in order) |
| --- | --- |
| Run | `Summary`, `Graph`, `Input`, `Output`, `Timeline` |
| Pipeline | `Summary`, `Graph`, `Source` |
Not in the strip: destinations, the back control, `Run`/`Refresh` actions, run
filters/sort, the attention bell, or chat composer controls. The top-level
destinations never share the strip; they are the rail on wide and the fixed bar
on narrow.
On wide the same entries render as the rail's `Sections` group. The active key
(`summary`, `graph`, `input`, `output`, `steps`, `source`) is the single source
of truth across both mounts.
---
## 7. Captures
Captured with `node web/design/layout/capture.mjs` through the repository's
read-only `web/test/browser.mjs` driver at device scale 1.
### Wide — 1440 × 900
![Wide pipelines: 200px rail, pipeline list, pipeline detail](../design/layout/captures/wide-pipelines-1440x900.png)
`web/design/layout/captures/wide-pipelines-1440x900.png`
### Narrow run detail — 420 × 900
![Narrow run detail: Summary/Graph/Input/Output/Timeline strip above the Pipelines/Runs/Chat/Settings bar](../design/layout/captures/narrow-run-detail-420x900.png)
`web/design/layout/captures/narrow-run-detail-420x900.png`
### Narrow runs list — 420 × 900
The list has no section selector, so no strip; the destination bar is still a
fixed overlay.
![Narrow runs list](../design/layout/captures/narrow-runs-420x900.png)
`web/design/layout/captures/narrow-runs-420x900.png`
Capture paths are gitignored by the repository's root `captures/` rule; the
PNGs are review evidence, not tracked source.
---
## 8. Android rules this layout cannot express in CSS alone
1. **Covered-pane compact geometry** (`SlidingPaneStack.kt`). Android measures
the compact identity (icon + shortest label + the live leading gesture inset)
and folds older levels into an edge's `"N more"` count; the active pane's
left edge is that measured region at every depth. CSS cannot measure text or
fold levels. This design avoids the peek entirely (wide shows the full list
beside the detail), as L2 asks. If covered peek strips are added later, JS
must measure and publish the width and the folded count.
2. **Destination visibility is route/state-dependent**
(`destinationPillVisible`). Android hides the pill on an open chat
conversation, an open run detail and an open pipeline detail; CSS cannot know
whether a conversation or detail is open. The brief explicitly asks for the
bar on the narrow run detail, so this design keeps it. Implementers who want
Android's exact predicate must compute it in JS (and clear
`--dock-clearance` with it).
3. **Measured strip height → bar offset** (`pillBottomOffset(stripHeight) =
SPACING_L + stripHeight`). With a fixed-height bar the CSS token is enough.
If the strip can grow (localisation, wrapping, a marker row), a
`ResizeObserver` must write its height into `--dock-clearance`; CSS alone
cannot feed a measured value back into the shell.
4. **Roving tabindex, focus restoration and `inert` on a covered pane** are DOM
behaviours; CSS expresses the visual selected state but not the keyboard
model or focus return.
5. **On-screen keyboard geometry**: Android reads `WindowInsets.ime`; the
browser should use `env(safe-area-inset-*)` plus
`<meta name="viewport" content="interactive-widget=resizes-content">` so the
shell shortens above the keyboard. This is a document/meta and viewport
concern, not a layout-grid rule.
6. **Device-width breakpoint semantics**: Android reads `screenWidthDp` from the
configuration; the browser uses the CSS viewport. At browser zoom, or with a
foldable's app-window width different from the physical screen, the two can
disagree. The CSS query is the correct web equivalent; do not substitute
`screen.width` or a user-agent check.
Two deliberate, documented deltas from the current Android shell:
- On wide, destinations live in the rail rather than in a floating bottom-right
pill. This is the L2 reading of “left rail + list/detail panes”.
- The wide layout shows the full list pane beside the detail rather than
Android's covered compact edge, per the same L2 wording. The destination bar
remains an overlay on narrow, so hiding/showing it never changes a grid
track.
No app code, stylesheet, markup or test was changed by this design item.