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:
+22
-27
@@ -27,8 +27,8 @@ import {
|
||||
formatLocalTimestamp,
|
||||
runStateOf,
|
||||
} from "./runs.js";
|
||||
import { presentedArtifacts, sessionExportArtifact, displayVisit } from "./artifacts.js";
|
||||
import { changeStat, parseUnifiedPatch } from "./changes.js";
|
||||
import { presentedArtifacts, sessionExportArtifact, stageArtifacts, visitArtifacts, displayVisit } from "./artifacts.js";
|
||||
import { changeStat, parseUnifiedPatch, runChanges, runChangesHeader } from "./changes.js";
|
||||
import { effectiveStageType } from "./templates.js";
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -49,8 +49,16 @@ export const RUN_DETAIL_TABS = [
|
||||
{ key: "steps", label: "Timeline" },
|
||||
];
|
||||
|
||||
/** The tabs the browser renders: all of them, including the Graph body (R5). */
|
||||
export const RENDERED_RUN_TABS = RUN_DETAIL_TABS;
|
||||
/**
|
||||
* The tabs the browser renders. Input and Output are run Summary sections now
|
||||
* (alongside Artifacts and Files changed), not separate tabs; the stable keys
|
||||
* `input`/`output` remain in RUN_DETAIL_TABS for Android parity and old routes.
|
||||
*/
|
||||
export const RENDERED_RUN_TABS = [
|
||||
{ key: "summary", label: "Summary" },
|
||||
{ key: "graph", label: "Graph" },
|
||||
{ key: "steps", label: "Timeline" },
|
||||
];
|
||||
|
||||
// The empty-state sentences, exactly as the app spells them.
|
||||
export const EMPTY_INPUT_MESSAGE = "No input recorded.";
|
||||
@@ -640,34 +648,21 @@ export function looksLikeMarkdown(value) {
|
||||
return /^#{1,6}\s/m.test(text) || /```/.test(text) || /^\s*(?:[-*]|\d+\.)\s+/m.test(text) || /^\|.+\|/m.test(text);
|
||||
}
|
||||
|
||||
export function stageSectionSpecs(stageKey, graph, runSteps, visitIndex, runContext) {
|
||||
/**
|
||||
* The stage pane's body sections for one visit: what the stage produced (its
|
||||
* non-system artifacts) and what it changed. The turn files, session export and
|
||||
* stage definition live behind Audit & debug, so the pane stays about the work.
|
||||
*/
|
||||
export function stageSectionSpecs(stageKey, graph, runSteps, visitIndex, runContext, allSteps = null) {
|
||||
const specs = [];
|
||||
const stage = (graph?.stages ?? []).find((candidate) => candidate?.key === stageKey);
|
||||
const definition = stage ? stageDefinitionFields(stage) : terminalFields(graph, stageKey);
|
||||
const steps = runSteps ?? [];
|
||||
const selectedStep = steps[clampVisitIndex(visitIndex, steps.length)];
|
||||
if (runContext && selectedStep != null) {
|
||||
const runFields = runStepFields(selectedStep);
|
||||
const session = sessionExportArtifact(selectedStep) != null;
|
||||
// The collapsible's title carries the count so the operator sees how many
|
||||
// artifacts this visit recorded without expanding it.
|
||||
const presented = presentedArtifacts(selectedStep).length;
|
||||
const artifactsTitle = `${STAGE_ARTIFACTS_TITLE} · ${presented} recorded`;
|
||||
specs.push({ key: "artifacts", title: artifactsTitle, fields: [], artifacts: true, session: false });
|
||||
if (session) {
|
||||
specs.push({ key: "session", title: STAGE_SESSION_TITLE, fields: [], artifacts: false, session: true });
|
||||
const used = visitArtifacts(selectedStep, allSteps ?? steps).length;
|
||||
specs.push({ key: "artifacts", title: `${STAGE_ARTIFACTS_TITLE} · ${used} recorded`, artifacts: true });
|
||||
if (selectedStep.file_changes != null) {
|
||||
specs.push({ key: "changes", title: runChangesHeader(runChanges([selectedStep])), changes: true });
|
||||
}
|
||||
const output = runFields.filter((entry) => entry.label === "Output");
|
||||
if (output.length > 0) specs.push({ key: "output", title: "Output", fields: output, artifacts: false, session: false });
|
||||
const input = runFields.filter((entry) => entry.label === "Input");
|
||||
if (input.length > 0) specs.push({ key: "input", title: "Input", fields: input, artifacts: false, session: false });
|
||||
const evidence = evidenceFields(runFields);
|
||||
if (evidence.length > 0) {
|
||||
specs.push({ key: "run", title: STAGE_EVIDENCE_TITLE, fields: evidence, artifacts: false, session: false });
|
||||
}
|
||||
}
|
||||
if (definition.length > 0) {
|
||||
specs.push({ key: "definition", title: STAGE_DEFINITION_TITLE, fields: definition, artifacts: false, session: false });
|
||||
}
|
||||
return specs;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user