web: unify mobile back and audit controls and link pipeline run history

This commit is contained in:
2026-10-20 16:25:07 +01:00
parent 4e35da7473
commit 6841cdd2a4
16 changed files with 239 additions and 36 deletions
+5 -4
View File
@@ -2,7 +2,7 @@
// the rendered/raw diff viewer, the artifact viewer, the human-decision sheet,
// the shared cancel/retry confirm and the shared Action-failed report.
import { h, canCopyLink, canShare, copyArtifactLink, copyText, shareArtifact } from "../dom.js";
import { backChevronIcon, h, canCopyLink, canShare, copyArtifactLink, copyText, shareArtifact } from "../dom.js";
import { changeKindTone, describeError } from "../format.js";
import {
BINARY_DIFF_MESSAGE,
@@ -856,6 +856,7 @@ function openStageAudit({ title = "Audit", subtitle = "", tabs = [], trigger = n
h(
"div",
{ class: "audit-head" },
h("button", { class: "ghost back-button audit-back", type: "button", "aria-label": "Back to stage", title: "Back to stage", onclick: close }, backChevronIcon()),
h(
"div",
{ class: "audit-titles" },
@@ -868,7 +869,7 @@ function openStageAudit({ title = "Audit", subtitle = "", tabs = [], trigger = n
const nav = h("nav", {
class: "audit-tabs",
role: "tablist",
"aria-orientation": "vertical",
"aria-orientation": window.matchMedia("(max-width: 599px)").matches ? "horizontal" : "vertical",
"aria-label": "Audit sections",
});
const body = h("div", {
@@ -901,8 +902,8 @@ function openStageAudit({ title = "Audit", subtitle = "", tabs = [], trigger = n
onkeydown: (event) => {
const index = available.findIndex((entry) => entry.key === tab.key);
let next = -1;
if (event.key === "ArrowDown") next = (index + 1) % available.length;
else if (event.key === "ArrowUp") next = (index - 1 + available.length) % available.length;
if (event.key === "ArrowDown" || event.key === "ArrowRight") next = (index + 1) % available.length;
else if (event.key === "ArrowUp" || event.key === "ArrowLeft") next = (index - 1 + available.length) % available.length;
else if (event.key === "Home") next = 0;
else if (event.key === "End") next = available.length - 1;
if (next < 0) return;