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
+14 -4
View File
@@ -152,6 +152,12 @@ function renderAttentionSheet() {
);
const body = h("div", { class: "attention-sheet-body" });
// One count for the whole open sheet: only repeated labels need the run id
// appended, so dismissing stays unambiguous without noisy names elsewhere.
const labelCounts = new Map();
for (const entry of entries) {
labelCounts.set(entry.label, (labelCounts.get(entry.label) ?? 0) + 1);
}
if (entries.length === 0) {
body.append(h("p", { class: "attention-empty", text: "Nothing needs you right now." }));
} else {
@@ -163,7 +169,7 @@ function renderAttentionSheet() {
onclick: clearAttentionSheet,
}),
);
for (const entry of entries) body.append(renderAttentionRow(entry));
for (const entry of entries) body.append(renderAttentionRow(entry, labelCounts));
}
const sheet = h("div", { class: "attention-sheet-panel", tabindex: "-1" }, head, body);
@@ -172,8 +178,12 @@ function renderAttentionSheet() {
}
/** One attention row: status icon, the two text lines, and a trailing Dismiss. */
function renderAttentionRow(entry) {
function renderAttentionRow(entry, labelCounts = null) {
const glyphState = entry.kind === AttentionKind.Decision ? "waiting" : "failed";
const repeated = (labelCounts?.get(entry.label) ?? 0) > 1;
const dismissLabel = repeated
? `Dismiss ${entry.label} (run ${entry.runId})`
: `Dismiss ${entry.label}`;
const open = h(
"button",
{
@@ -198,8 +208,8 @@ function renderAttentionRow(entry) {
const dismiss = h("button", {
class: "attention-dismiss",
type: "button",
"aria-label": "Dismiss",
title: "Dismiss",
"aria-label": dismissLabel,
title: dismissLabel,
onclick: (event) => {
// The trailing control must never activate the row it sits in.
event.stopPropagation();