From 379872b94ad38bdb83748e591344e8b7d595f689 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Thu, 22 Oct 2026 03:30:09 +0100 Subject: [PATCH] fix(app): keep the session export out of the per-visit stage drill-down --- .../artifacts/ui/artifact_gallery_page.dart | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/lib/features/artifacts/ui/artifact_gallery_page.dart b/app/lib/features/artifacts/ui/artifact_gallery_page.dart index b2a2087e..33e416e8 100644 --- a/app/lib/features/artifacts/ui/artifact_gallery_page.dart +++ b/app/lib/features/artifacts/ui/artifact_gallery_page.dart @@ -84,7 +84,20 @@ class _ArtifactGalleryPageState extends State { // that visit, not only its recorded files. for (final enriched in galleryGroups(widget.steps)) { if (enriched.stageKey == group.stageKey && enriched.visit == group.visit) { - return [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( + stageKey: enriched.stageKey, + visit: enriched.visit, + artifacts: enriched.artifacts, + documents: documents, + ), + ]; } } return [group];