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
-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 }));