web: put the work first and the audit evidence behind a door

- Turn files (input/memory/output/session) are system artifacts now: they are
  never tiles in the run or stage galleries. Shared public files are attributed
  to the visit that first recorded them, so a run counts 3 stage artifacts, not
  one copy of each per later stage.
- Audit & debug opens a dialog with vertical Input / Output / Memory / Session /
  Definition tabs, for a visit from the stage pane or the run Summary.
- Run tabs are Summary / Graph / Timeline; Input and Output are Summary sections
  with Artifacts, Files changed and Audit. Each stage pane gains Files changed.
- Artifacts gain a gallery/list switch (remembered) and full-name wrapping; the
  copy/share actions are hover-or-focus icon buttons.
- Status badge above the run title; no live badges on the run surfaces. The runs
  list leads with the pipeline name and the stored task title beneath it.
- Chat rows: title + coloured status word only, then directory, then model; no
  operator or closed chips, no dot. The more/star cluster is a hover/focus
  overlay so the title uses the row's width, and an open menu stacks above rows.
  Closed chats collapse behind a chevron. Sessions can be starred locally and
  sort in a Starred group. The chat header no longer repeats status/dir/model.
- A visible rail divider separates Search from the destinations; the page has a
  real favicon/apple-touch icon and the rail brand wears it.
- Smoke updated: no live badges, 3 detail tabs, field hits open Summary sections,
  closed chats expand for checks, the fixture viewer uses shot.png/missing.txt
  and the audit for markdown.
This commit is contained in:
2026-10-20 01:00:01 +01:00
parent ca28d08269
commit d130615fae
25 changed files with 1167 additions and 366 deletions
+45
View File
@@ -7,6 +7,10 @@ import assert from "node:assert/strict";
import {
ArtifactKind,
isSystemArtifact,
stageArtifacts,
systemArtifacts,
visitArtifacts,
ARTIFACT_CAPTURE_PENDING,
LEGACY_SESSION_MARKDOWN_ARTIFACT,
artifactCaptureNotes,
@@ -43,6 +47,29 @@ function step(stage, sequence, { visit = 1, status = "completed", artifacts, ski
return s;
}
test("the turn's own files are system evidence, not stage artifacts", () => {
const step = {
artifacts: [
{ name: "input.md", url: "/1" },
{ name: "memory.md", url: "/2" },
{ name: "output.md", url: "/3" },
{ name: "session.html", url: "/4" },
{ name: "public/notes.md", url: "/5" },
{ name: "screenshot.png", url: "/6" },
],
};
assert.deepEqual(
stageArtifacts(step).map((artifact) => artifact.name),
["public/notes.md", "screenshot.png"],
);
assert.deepEqual(
systemArtifacts(step).map((artifact) => artifact.name),
["input.md", "memory.md", "output.md", "session.html"],
);
assert.equal(isSystemArtifact({ name: "output.md" }), true);
assert.equal(isSystemArtifact({ name: "public/input.md" }), false);
});
test("presentedArtifacts hides the retired session.md and keeps everything else", () => {
const artifacts = [art("shot.png"), art(LEGACY_SESSION_MARKDOWN_ARTIFACT), art("session.html")];
const presented = presentedArtifacts({ artifacts });
@@ -92,6 +119,24 @@ test("duplicate names are kept, not deduped", () => {
]);
});
test("a shared public file is attributed to the visit that first recorded it", () => {
const steps = [
{ sequence: 1, stage: "a", artifacts: [{ name: "input.md" }, { name: "public/a.txt" }] },
{
sequence: 2,
stage: "b",
artifacts: [{ name: "output.md" }, { name: "public/a.txt" }, { name: "public/b.txt" }],
},
];
const groups = artifactGroups(steps);
assert.deepEqual(groups.map((g) => g.artifacts.map((a) => a.name)), [["public/a.txt"], ["public/b.txt"]]);
assert.equal(
visitArtifacts(steps[1], steps).map((a) => a.name).join(","),
"public/b.txt",
);
assert.equal(artifactsHeader(steps, false), "Artifacts · 2 recorded");
});
test("empty/null artifact visits and an empty run produce no group", () => {
assert.deepEqual(artifactGroups([]), []);
assert.deepEqual(artifactGroups(undefined), []);