fix(app): keep the session export out of the per-visit stage drill-down

This commit is contained in:
2026-10-22 03:30:09 +01:00
parent 51e626bf14
commit 379872b94a
@@ -84,7 +84,20 @@ class _ArtifactGalleryPageState extends State<ArtifactGalleryPage> {
// that visit, not only its recorded files.
for (final enriched in galleryGroups(widget.steps)) {
if (enriched.stageKey == group.stageKey && enriched.visit == group.visit) {
return <ArtifactGroup>[enriched];
// The visit pane's own Session section opens session.html, so the
// per-visit Artifacts drill-down keeps only stage output and the other
// turn documents; the run-wide gallery still shows every document.
final documents = enriched.documents
.where((doc) => doc.record?.name != sessionExportDocumentName)
.toList(growable: false);
return <ArtifactGroup>[
ArtifactGroup(
stageKey: enriched.stageKey,
visit: enriched.visit,
artifacts: enriched.artifacts,
documents: documents,
),
];
}
}
return <ArtifactGroup>[group];