web: run-detail polish — bigger graph, artifact counts, tighter stage pane

- 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.
This commit is contained in:
2026-10-19 20:05:47 +01:00
parent 23809051e9
commit ff70b3796f
7 changed files with 19 additions and 27 deletions
+3
View File
@@ -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;
+4 -4
View File
@@ -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 {
-13
View File
@@ -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
+5 -1
View File
@@ -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 });
}
+6 -5
View File
@@ -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 }));
-3
View File
@@ -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");
+1 -1
View File
@@ -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",