Merge branch 'main' into web-connection

Integrate main's run-detail Changes (R4) and Graph (R5) work with the
connection banner/reconnect/foreground-recovery/live-badge work (T3/T4/T5).

Conflicts resolved by keeping both independent additions:
- web/styles.css: the .conn-*/.live-* rules and the .change-*/.diff-* rules
  are separate blocks; both retained under their own comment headers.
- web/test/ui-smoke.mjs: both capture sequences retained (T3/T4/T5 writes
  28-connected-banner/29-disconnected-banner/30-reconnect-recovered; R4/R5
  writes its own distinct 28-34 run-change captures), so no filename collides.

Checks after the merge: node --check on all touched JS/MJS; node --test test/
225 pass / 0 fail; node test/ui-smoke.mjs --out <worktree>/captures UI SMOKE
PASS against ws://127.0.0.1:8080/connect, including the connected banner +
build line + live badge, the disconnected retry banner, the online-event
recovery, and main's R4/R5 captures.
This commit is contained in:
2026-10-19 04:11:50 +01:00
10 changed files with 2381 additions and 37 deletions
+166
View File
@@ -610,6 +610,74 @@ code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-
}
.graph-control:hover { border-color: var(--accent); color: var(--accent); }
/* The run-mode legend (R5), pinned top-start opposite the Fit/expand controls.
A solid, arrowed swatch means "executed"; a dashed, arrowless one "not
executed". Never shown for the definition-only view. */
.graph-legend {
position: absolute;
top: 8px;
left: 8px;
z-index: 2;
display: flex;
gap: 12px;
align-items: center;
padding: 4px 8px;
border: 1px solid var(--border);
border-radius: 8px;
background: color-mix(in srgb, var(--surface) 85%, transparent);
font-size: 12px;
color: var(--muted);
}
.graph-legend-entry { display: inline-flex; gap: 6px; align-items: center; }
.graph-legend-swatch {
position: relative;
width: 26px;
border-top: 3px solid var(--muted);
}
.graph-legend-swatch.executed { border-top-color: var(--text); }
/* A small filled arrowhead on the executed swatch, matching the drawn head. */
.graph-legend-swatch.executed::after {
content: "";
position: absolute;
top: -6px;
right: -1px;
border-left: 7px solid var(--text);
border-top: 4px solid transparent;
border-bottom: 4px solid transparent;
}
.graph-legend-swatch.not-executed { border-top-style: dashed; }
/* The live active stage (R5): a ring around the node plus a soft glow, pulsing
while the run executes and static when the user prefers reduced motion. */
.graph-node.active {
border-color: var(--accent);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent);
}
.graph-node.active.pulsing { animation: graph-halo-pulse 1.6s ease-in-out infinite; }
@keyframes graph-halo-pulse {
0%,
100% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent); }
50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 20%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
.graph-node.active.pulsing { animation: none; }
}
/* The live elapsed-time badge on the active node. */
.graph-elapsed {
position: absolute;
bottom: -9px;
right: 6px;
padding: 0 5px;
border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
border-radius: 999px;
background: var(--surface);
color: var(--accent);
font-size: 10px;
font-weight: 600;
line-height: 16px;
}
/* The definition pane opened from a node click. */
.graph-pane {
display: grid;
@@ -862,3 +930,101 @@ code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-
.live-reconnecting .live-dot { opacity: 0.4; }
.live-not-live { color: var(--muted); }
.live-not-live .live-dot { opacity: 0.4; }
/* ---------------------------------------------------------------------------
Run summary Changes (parity R4): the observed-file list and the full-screen
rendered/raw diff viewer. Hand-written, the app's dark palette.
--------------------------------------------------------------------------- */
.changes { display: grid; gap: 8px; }
.changes-summary { color: var(--accent); font-weight: 600; font-size: 13px; }
.changes-note { font-size: 12px; }
.changes-empty { font-size: 13px; }
.changes-list { display: grid; gap: 4px; }
.change-row {
display: flex;
gap: 10px;
align-items: flex-start;
padding: 6px 8px;
border-radius: 8px;
cursor: pointer;
}
.change-row:hover { background: var(--surface-2); }
.change-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.change-kind { font-weight: 600; font-size: 12px; min-width: 62px; }
.change-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.change-path { overflow-wrap: anywhere; }
.change-meta { font-size: 12px; }
.change-stat { display: flex; gap: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.stat-add { color: var(--ok); }
.stat-del { color: var(--bad); }
/* Full-screen diff viewer overlay (the artifact-viewer idiom). */
.change-viewer {
position: fixed;
inset: 0;
z-index: 30;
display: flex;
flex-direction: column;
gap: 12px;
padding: 20px;
background: rgba(0, 0, 0, 0.86);
}
.change-viewer-head { display: flex; gap: 12px; align-items: flex-start; }
.change-viewer-titles { flex: 1; min-width: 0; display: grid; gap: 2px; }
.change-viewer-title-row { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.change-viewer-stat { font-size: 13px; }
.change-viewer-path { overflow-wrap: anywhere; }
.change-viewer-position { font-size: 12px; }
.change-viewer-controls { display: flex; gap: 8px; align-items: center; }
.change-viewer-spacer { flex: 1; }
.change-form { font-size: 12px; }
.change-form.active { border-color: var(--accent); color: var(--accent); }
.change-form:disabled { opacity: 0.45; }
.change-page:disabled { opacity: 0.4; cursor: not-allowed; }
.change-viewer-body { flex: 1; min-height: 0; overflow: auto; display: grid; gap: 16px; align-content: start; }
.change-honest {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
padding: 32px;
text-align: center;
}
.change-raw {
margin: 0;
padding: 12px;
border: 1px solid var(--border);
border-radius: 10px;
background: var(--surface-2);
font-size: 12px;
white-space: pre;
overflow: auto;
}
.change-diff { display: grid; gap: 12px; align-content: start; }
.change-diff-stat { display: flex; gap: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.change-diff-note { font-size: 12px; }
.change-hunk { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.change-hunk-head {
padding: 4px 8px;
background: var(--surface-2);
color: var(--accent);
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 12px;
}
.change-hunk-lines { overflow-x: auto; background: var(--surface); padding: 6px 0; }
.change-line {
display: flex;
gap: 10px;
padding: 0 8px;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 12px;
white-space: pre;
}
.change-gutter { color: var(--muted); user-select: none; }
.diff-add { color: var(--ok); }
.diff-remove { color: var(--bad); }
.diff-context { color: var(--muted); }