Merge branch 'main' into web-layout

Take main's newer smoke behaviour where they met: the binary capture is run 449
(opened through openRunDetail), and a running run must show no aggregate Changes
section. Keep the layout's shell-aware checks and its L2-L4 rows; L7 stays todo
with the view-level fixes recorded.
This commit is contained in:
2026-10-19 20:06:25 +01:00
14 changed files with 709 additions and 150 deletions
+27 -10
View File
@@ -71,6 +71,7 @@ import {
runChanges,
runChangesHeader,
runChangesNote,
showRunChangesSummary,
} from "../changes.js";
import {
DECISION_ACTION,
@@ -217,12 +218,15 @@ function renderRunSummaryTab(d, now) {
);
// The run-level Changes (parity R4), collapsed by default like the Android
// summary: the observed workspace diff. Its header alone states the file count
// and aggregate stat until expanded, and every file row opens the diff viewer.
const changes = runChanges(d.steps ?? []);
wrap.append(
renderCollapsible("summary-changes", runChangesHeader(changes), () => renderChangesBody(changes)),
);
// summary: the observed final-state workspace diff. Only a succeeded run has a
// settled final state to present; a failed run keeps its evidence in each
// visit's own capture (a deliberate divergence from Android, see PARITY R4).
if (showRunChangesSummary(d.status)) {
const changes = runChanges(d.steps ?? []);
wrap.append(
renderCollapsible("summary-changes", runChangesHeader(changes), () => renderChangesBody(changes)),
);
}
return wrap;
}
@@ -841,7 +845,14 @@ function renderArtifactTile(artifact, viewable, viewerIndexOf) {
const kind = artifactKind(artifact.content_type, artifact.name);
const media = kind === ArtifactKind.Image || kind === ArtifactKind.Video;
const name = artifact.name || "(unnamed artifact)";
const tile = h("div", { class: "artifact-tile clickable" });
// The tile is the native control (M5): Enter/Space activate it for free, and
// the Copy link / Share buttons are siblings in the wrapper, never children.
const wrap = h("div", { class: "artifact-tile-wrap" });
const tile = h("button", {
class: "artifact-tile clickable",
type: "button",
"aria-label": `Open ${name}`,
});
const openViewer = () => {
const at = viewerIndexOf.get(artifact.url);
if (at != null) openArtifactViewer(viewable, at);
@@ -855,7 +866,13 @@ function renderArtifactTile(artifact, viewable, viewerIndexOf) {
tile.append(img);
tile.addEventListener("click", openViewer);
} else if (kind === ArtifactKind.Video) {
tile.append(h("div", { class: "artifact-poster" }, h("span", { class: "artifact-play", text: "▶" })));
tile.append(
h(
"div",
{ class: "artifact-poster" },
h("span", { class: "artifact-play", "aria-hidden": "true", text: "▶" }),
),
);
tile.append(h("div", { class: "artifact-name", text: name }));
tile.addEventListener("click", openViewer);
} else {
@@ -866,8 +883,8 @@ function renderArtifactTile(artifact, viewable, viewerIndexOf) {
);
tile.addEventListener("click", openTab);
}
tile.append(renderTileActions(resolved, media));
return tile;
wrap.append(tile, renderTileActions(resolved, media));
return wrap;
}
/** The compact per-tile actions: copy-link (non-media tiles) and share. */