fix(app): collapse the summary sections and correct the visit index for search hits

This commit is contained in:
2026-10-22 18:54:27 +01:00
parent 76d3ac040c
commit afc7b88366
2 changed files with 8 additions and 2 deletions
+4 -1
View File
@@ -268,9 +268,12 @@ class _PipelinesAppState extends State<PipelinesApp>
case SearchRunTarget(:final runId):
route = AppRoute.run(runId);
case SearchStepTarget(:final runId, :final stage, :final visit):
// The server records a 1-based visit number; the route's `visit` is the
// zero-based index into the recorded timeline.
final index = visit == null || visit < 1 ? null : visit - 1;
route = stage == null
? AppRoute.run(runId)
: AppRoute.run.stage(runId, stage, visit: visit);
: AppRoute.run.stage(runId, stage, visit: index);
case SearchFieldTarget(:final runId, :final sequence, :final field):
selection = RunSearchSelection(
runId: runId,