Artifacts: badge counts deliverables only; debugging files as a secondary section

The Artifacts badge counted every recorded turn document (input, memory,
output, session.html) while the tab lists only deliverables, so a run whose
visits recorded only debugging files (the Caplens ticket runs) badged dozens
of artifacts and opened to an empty tab. The badge and the header now count
deliverables only; the tab stays reachable when only debugging files exist
and ends with a collapsed 'Show debugging files' entry naming their count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 17:23:33 +00:00
parent 1dc992bc27
commit 0791a4702d
10 changed files with 289 additions and 38 deletions
@@ -243,7 +243,7 @@ void main() {
expect(galleryGroups(steps), isEmpty);
});
test('the header counts recorded documents and stage artifacts', () {
test('the header counts deliverables, never debugging documents', () {
final steps = <Map<String, dynamic>>[
step(
stage: 'review',
@@ -256,10 +256,7 @@ void main() {
],
),
];
expect(
artifactsHeader(steps, executing: false),
'Artifacts · 3 recorded',
);
expect(artifactsHeader(steps, executing: false), 'Artifact · 1 recorded');
});
test(