From 4f2f87b445e3a85a3fd2ef34b2af596dbe433fe2 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Wed, 21 Oct 2026 22:44:40 +0100 Subject: [PATCH] test(app): verify the artifact gallery inside the real app run detail --- app/PARITY.md | 4 ++-- app/tool/runs_probe.mjs | 18 ++++++++++++++++++ app/tool/runs_probe_server.mjs | 16 ++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/app/PARITY.md b/app/PARITY.md index 9c5413b1..323155ac 100644 --- a/app/PARITY.md +++ b/app/PARITY.md @@ -36,8 +36,8 @@ or scratch servers only, never real operator sessions/runs/workflows. | Run graph | Source projection/visits; definition canvas and stage pane landed | executed/unvisited routes, live activity, graph clicks open latest RECORDED visit, no definition by default | | Timeline/recorded visit pane | Preview text rows only; authored definition pane landed | visit selection, status/outcome/duration/model/target/verdict, artifacts/session/input/output/definition tabs | | Changes/diffs | Preview via run detail | settled-run aggregate gate, recorded file/diff/close/back verified in the real app; per-visit capture entry and paging remain | -| Artifact groups | Source model/list | actual visit/run gallery integration and truthful unavailable capture facts | -| Artifact preview | Missing | image-primary in-app viewer, video/doc/text/markdown, paging, focus/back, authenticated fetch errors | +| Artifact groups | Preview: run detail → recorded groups, selection facts, external Open/Copy link | present the visit's turn documents (input.md/memory.md/output.md, session.html) as gallery entries; in-app viewer next | +| Artifact preview | Missing | image-primary in-app viewer, video/doc/text/markdown, paging, focus/back, authenticated fetch errors (gallery currently links out only) | | Artifact actions | Source safe URL resolution | separate external-open/copy/download; SHARE REAL NAMED MIME FILES, not links; slow activation/cancel/errors | | Session audit/export repair facts | Missing UI | session.html read-only open, partial/missing/skipped/repair choices without fabricating complete evidence | | Chat session management | Source | normal Chat destination, directory groups/history/search, shared rename/star/close/reopen/create, local hide/undo/seen state | diff --git a/app/tool/runs_probe.mjs b/app/tool/runs_probe.mjs index 4c2f5fcf..4727a42d 100644 --- a/app/tool/runs_probe.mjs +++ b/app/tool/runs_probe.mjs @@ -281,6 +281,24 @@ try { await clickText('Back', { contains: true }); await assertBody('Original prompt'); + // The recorded artifacts action lists each visit's own files, keeps a + // repeated filename distinct, and shows the selected record's facts. + await clickText('Artifacts'); + await assertBody('build · visit 1'); + await assertBody('test · visit 1'); + await assertBody('build-report.html'); + await assertBody('result.csv'); + captures.push(await capture('artifacts-phone-list')); + await delay(500); + await clickText('result.csv', { contains: true }); + await assertBody('text/csv'); + await assertBody('4.0'); + captures.push(await capture('artifacts-phone-selected')); + await clickText('Close'); + await delay(400); + await clickText('Back', { contains: true }); + await assertBody('Original prompt'); + await setSize(1280, 800); await assertBody('Original prompt'); const desktopDetail = await capture('i1-runs-desktop-detail'); diff --git a/app/tool/runs_probe_server.mjs b/app/tool/runs_probe_server.mjs index 2ae957f1..aa7d9d55 100644 --- a/app/tool/runs_probe_server.mjs +++ b/app/tool/runs_probe_server.mjs @@ -130,6 +130,14 @@ function detail(id, live, canceled = false) { omitted: 0, diagnostic: '', }, + artifacts: [ + { + name: 'build-report.html', + size_bytes: 2048, + content_type: 'text/html; charset=utf-8', + url: '/artifacts/1/3/build-report.html', + }, + ], }, { stage: 'test', @@ -137,6 +145,14 @@ function detail(id, live, canceled = false) { status: status === 'failed' ? 'failed' : 'completed', outcome: status === 'failed' ? 'failure' : 'success', target: status === 'failed' ? '#failure' : '#success', + artifacts: [ + { + name: 'result.csv', + size_bytes: 4096, + content_type: 'text/csv', + url: '/artifacts/1/4/result.csv', + }, + ], }, ], };