web: show the turn files in the audit, with raw and rendered views

- The audit Input/Output/Memory tabs fetch the actual input.md/output.md/
  memory.md, so the outcome section is visible and each document has a
  Rendered/Raw switch plus an Open raw file link. The Session tab renders the
  exported HTML in place with the same link.
- The audit's selected tab uses the normal selected surface, not the accent tint.
- The run Summary no longer carries an Audit & debug section; the stage pane's
  Audit & debug button is the one door.
- Search results all lead with one 56px tile: image thumbnails, artifact type
  tiles, or a kind glyph (pipeline/version/run/step/field); no text kind labels.
- Chat star and more sit on the row's top-right and bottom-right corners, revealed
  on hover/focus, and the row menu opens below them without losing clicks.
- The chat spinner starts at the wall-clock animation phase, so frequent
  streaming re-renders no longer snap it back to the animation start.
This commit is contained in:
2026-10-20 01:15:09 +01:00
parent d130615fae
commit 2a8a5bf334
5 changed files with 232 additions and 88 deletions
+52 -2
View File
@@ -397,6 +397,54 @@ function fillSearchResults(area) {
area.replaceChildren(...nodes);
}
/** The inline glyph for a non-artifact search result's kind. */
function searchKindGlyph(kind) {
const ns = "http://www.w3.org/2000/svg";
const svg = document.createElementNS(ns, "svg");
svg.setAttribute("viewBox", "0 0 24 24");
svg.setAttribute("aria-hidden", "true");
svg.setAttribute("focusable", "false");
const paths = {
pipeline: "M7 12h5V6h4M12 12v6h4",
version: "M12 3l9 5-9 5-9-5 9-5ZM3 12l9 5 9-5",
run: "M8 5l11 7-11 7V5Z",
step: "M5 12h10M13 8l4 4-4 4",
field: "M5 7h14M5 12h14M5 17h9",
unknown: "M12 8v8M8 12h8",
};
const path = document.createElementNS(ns, "path");
path.setAttribute("d", paths[kind] ?? paths.unknown);
path.setAttribute("fill", "none");
path.setAttribute("stroke", "currentColor");
path.setAttribute("stroke-width", "1.8");
path.setAttribute("stroke-linecap", "round");
path.setAttribute("stroke-linejoin", "round");
svg.append(path);
if (kind === "pipeline") {
for (const [cx, cy] of [[4, 12], [19, 6], [19, 18]]) {
const dot = document.createElementNS(ns, "circle");
dot.setAttribute("cx", String(cx));
dot.setAttribute("cy", String(cy));
dot.setAttribute("r", "2");
dot.setAttribute("fill", "currentColor");
svg.append(dot);
}
}
return svg;
}
/** The fixed-size leading tile for a non-artifact result: a kind glyph only. */
function searchKindTile(hit) {
const label = searchResultKindLabel(hit);
const tile = h("span", {
class: "search-type search-type-kind",
title: label,
"aria-label": label,
});
tile.append(searchKindGlyph(String(hit?.kind ?? "unknown")));
return tile;
}
/** The short caption on a non-image artifact's type tile. */
function artifactTypeBadge(kind, artifact) {
const name = String(artifact?.name ?? "").toLowerCase();
@@ -460,7 +508,7 @@ function renderSearchResultRow(hit) {
const target = searchTarget(hit);
const artifactHit = hit?.kind === "artifact" && hit.artifact ? hit.artifact : null;
const element = h("div", {
class: `search-row${target ? " clickable" : " readonly"}${artifactHit ? " search-row-artifact" : ""}`,
class: `search-row${target ? " clickable" : " readonly"} search-row-with-icon${artifactHit ? " search-row-artifact" : ""}`,
"data-kind": String(hit?.kind ?? ""),
});
if (target) {
@@ -506,7 +554,9 @@ function renderSearchResultRow(hit) {
);
}
} else {
element.append(h("span", { class: "search-kind muted", text: searchResultKindLabel(hit) }));
// Every row leads with the same fixed-size tile; kinds are symbols, never
// words like "PIPELINE" that make one row look different from another.
element.append(searchKindTile(hit));
}
const main = h("div", { class: "search-row-main" });
main.append(h("div", { class: "search-row-title", text: row.title }));