From ff70b3796f2fa21279c2deaff9cfe7f62a70024d Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Mon, 19 Oct 2026 20:05:47 +0100 Subject: [PATCH] =?UTF-8?q?web:=20run-detail=20polish=20=E2=80=94=20bigger?= =?UTF-8?q?=20graph,=20artifact=20counts,=20tighter=20stage=20pane?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - the run Graph tab drops the guidance paragraph and the graph fills ~70vh; - the Artifacts collapsible carries the visit's count in its title (the body keeps the reason line only when there is nothing to show); - the stage panel's section padding and gaps are reduced. --- web/graph.css | 3 +++ web/run-detail.css | 8 ++++---- web/src/graph.js | 13 ------------- web/src/runDetail.js | 6 +++++- web/src/views/runDetail.js | 11 ++++++----- web/test/graph.test.mjs | 3 --- web/test/runDetail.test.mjs | 2 +- 7 files changed, 19 insertions(+), 27 deletions(-) diff --git a/web/graph.css b/web/graph.css index 6a93e94e..bc20af98 100644 --- a/web/graph.css +++ b/web/graph.css @@ -5,6 +5,9 @@ .graph-panel { display: grid; gap: 12px; } .graph-panel.expanded .graph-viewport { height: 78vh; } +/* The run detail's Graph tab is the page: give the graph most of the body. */ +.run-graph .graph-host { min-height: 0; } +.run-graph .graph-viewport { height: min(70vh, 900px); } .graph-viewport { position: relative; diff --git a/web/run-detail.css b/web/run-detail.css index ad7daa16..e8aeec36 100644 --- a/web/run-detail.css +++ b/web/run-detail.css @@ -14,10 +14,10 @@ .run-empty { padding: 14px 4px; } .collapsible .section-title { flex: 1; } -.collapsible > .section-body { padding: 8px 4px 4px; } +.collapsible > .section-body { padding: 6px 2px 2px; } .field-block { margin: 0; - padding: 10px; + padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); @@ -138,8 +138,8 @@ border-left: 1px solid var(--border); box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45); } -.stage-pane-body { flex: 1; overflow-y: auto; padding: 14px; display: grid; gap: 10px; align-content: start; } -.stage-section > .section-body { padding-top: 6px; } +.stage-pane-body { flex: 1; overflow-y: auto; padding: 10px 12px; display: grid; gap: 6px; align-content: start; } +.stage-section > .section-body { padding-top: 4px; } /* The verdict block leads the pane. */ .verdict { diff --git a/web/src/graph.js b/web/src/graph.js index 059a8173..8642a6cd 100644 --- a/web/src/graph.js +++ b/web/src/graph.js @@ -62,19 +62,6 @@ const DRAG_THRESHOLD = 4; /** The run tab's empty state when the server omitted the run graph (R5). */ export const RUN_GRAPH_MISSING = "This server did not include the run graph."; -/** - * The run tab's guidance note: the browser adaptation of RunGraphTab's own - * sentence, so the app's pinch/tap become mouse wheel/click while everything - * else (the live pulse, the settled finish, the executed/not-executed shapes) - * stays verbatim. - */ -export const RUN_GRAPH_NOTE = - "The running stage pulses with its elapsed time and executed routes flow; " + - "a finished run settles, and with animations off the running stage stays marked. " + - "Solid means executed, dashed and outlined not executed; executed success and " + - "failure routes are drawn thickest. Mouse wheel to zoom, drag to pan, " + - "click a stage for details."; - /** * The pipeline detail's empty state when the parsed definition declares no * stages. The template gallery has its own Android-authored analogue diff --git a/web/src/runDetail.js b/web/src/runDetail.js index 3ccd8b35..83779ea8 100644 --- a/web/src/runDetail.js +++ b/web/src/runDetail.js @@ -601,7 +601,11 @@ export function stageSectionSpecs(stageKey, graph, runSteps, visitIndex, runCont if (runContext && selectedStep != null) { const runFields = runStepFields(selectedStep); const session = sessionExportArtifact(selectedStep) != null; - specs.push({ key: "artifacts", title: STAGE_ARTIFACTS_TITLE, fields: [], artifacts: true, session: false }); + // The collapsible's title carries the count so the operator sees how many + // artifacts this visit recorded without expanding it. + const presented = presentedArtifacts(selectedStep).length; + const artifactsTitle = `${STAGE_ARTIFACTS_TITLE} · ${presented} recorded`; + specs.push({ key: "artifacts", title: artifactsTitle, fields: [], artifacts: true, session: false }); if (session) { specs.push({ key: "session", title: STAGE_SESSION_TITLE, fields: [], artifacts: false, session: true }); } diff --git a/web/src/views/runDetail.js b/web/src/views/runDetail.js index 78d14c59..f8908a3b 100644 --- a/web/src/views/runDetail.js +++ b/web/src/views/runDetail.js @@ -8,7 +8,7 @@ import { isExecuting, changeKindTone, describeError } from "../format.js"; import { liveBadgeState } from "../connection.js"; import { resolveArtifactUrl } from "../serverUrl.js"; import { runStateOf } from "../runs.js"; -import { PIPELINE_GRAPH_EMPTY, RUN_GRAPH_MISSING, RUN_GRAPH_NOTE, mount as mountGraph } from "../graph.js"; +import { PIPELINE_GRAPH_EMPTY, RUN_GRAPH_MISSING, mount as mountGraph } from "../graph.js"; import { RENDERED_RUN_TABS, EMPTY_INPUT_MESSAGE, @@ -170,13 +170,12 @@ function renderRunDetail(now = Date.now()) { * listeners and the elapsed timer. */ function renderRunGraphTab(d) { - const wrap = h("div", { class: "run-tab-body" }); + const wrap = h("div", { class: "run-tab-body run-graph" }); const stages = d.graph?.stages ?? []; if (!stages.length) { wrap.append(h("div", { class: "run-empty muted", text: RUN_GRAPH_MISSING })); return wrap; } - wrap.append(h("p", { class: "graph-note muted", text: RUN_GRAPH_NOTE })); const host = h("div", { class: "graph-host" }); wrap.append(host); state.runGraph = mountGraph(host, d.graph, { @@ -818,11 +817,13 @@ function renderArtifactGallery(steps) { */ function renderVisitArtifacts(step) { const wrap = h("div", { class: "artifacts" }); - wrap.append(h("div", { class: "artifacts-summary", text: artifactsSummary(step) })); + const artifacts = presentedArtifacts(step); + // The section title already carries the count, so the body repeats it only when + // there is nothing to show and the reason itself is the useful part. + if (artifacts.length === 0) wrap.append(h("div", { class: "artifacts-summary", text: artifactsSummary(step) })); for (const note of artifactCaptureNotes(step)) { wrap.append(h("div", { class: "artifacts-note muted", text: note })); } - const artifacts = presentedArtifacts(step); if (artifacts.length) { if (!artifactsResolvable()) { wrap.append(h("div", { class: "muted artifact-hint", text: ARTIFACT_SERVER_HINT })); diff --git a/web/test/graph.test.mjs b/web/test/graph.test.mjs index 8b957ec2..30ad9ced 100644 --- a/web/test/graph.test.mjs +++ b/web/test/graph.test.mjs @@ -14,7 +14,6 @@ import { MAX_SCALE, PIPELINE_GRAPH_EMPTY, RUN_GRAPH_MISSING, - RUN_GRAPH_NOTE, NO_NODE_DETAILS, STAGE_DEFINITION_TITLE, configLabel, @@ -485,8 +484,6 @@ test("runGraphState falls back to the last visit's stage, else null", () => { test("the empty-state and pane wording matches the app's sentences", () => { assert.equal(RUN_GRAPH_MISSING, "This server did not include the run graph."); - assert.ok(RUN_GRAPH_NOTE.includes("pulses")); - assert.ok(RUN_GRAPH_NOTE.includes("Mouse wheel to zoom")); assert.equal(PIPELINE_GRAPH_EMPTY, "This pipeline has no stages."); assert.equal(NO_NODE_DETAILS, "No details recorded for this node."); assert.equal(STAGE_DEFINITION_TITLE, "Stage definition"); diff --git a/web/test/runDetail.test.mjs b/web/test/runDetail.test.mjs index 290e4085..aa8d1300 100644 --- a/web/test/runDetail.test.mjs +++ b/web/test/runDetail.test.mjs @@ -412,7 +412,7 @@ test("stageSectionSpecs orders the run sections and puts the definition last", ( const specs = stageSectionSpecs("implementer", graph, [step1], 0, true); assert.deepEqual(specs.map((spec) => spec.key), ["artifacts", "output", "input", "run", "definition"]); assert.deepEqual(specs.map((spec) => spec.title), [ - "Artifacts", + "Artifacts · 0 recorded", "Output", "Input", "This run",