Keep turn documents out of the artifact viewer unless Debug is on

Opening a stage artifact paged through every visit's turn documents too,
although the list hides them; the viewer now pages through what the list
shows.
This commit is contained in:
2026-11-01 08:32:10 +00:00
parent ea134b38f2
commit 2808378823
2 changed files with 38 additions and 1 deletions
@@ -216,7 +216,19 @@ class _ArtifactGalleryPageState extends State<ArtifactGalleryPage> {
],
),
]
: _groups;
// A stage artifact pages through what the list shows: turn
// documents only while Debug reveals them.
: _showTurnDocuments
? _groups
: [
for (final group in _groups)
if (group.artifacts.isNotEmpty)
ArtifactGroup(
stageKey: group.stageKey,
visit: group.visit,
artifacts: group.artifacts,
),
];
final previousFocus = FocusManager.instance.primaryFocus;
await Navigator.of(context).push<void>(
usesCupertinoHost(context)