diff --git a/app/lib/application/pipelines_app.dart b/app/lib/application/pipelines_app.dart index 4bc7fa8c..b6350c2d 100644 --- a/app/lib/application/pipelines_app.dart +++ b/app/lib/application/pipelines_app.dart @@ -268,9 +268,12 @@ class _PipelinesAppState extends State 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, diff --git a/app/lib/features/runs/ui/run_detail_tabs.dart b/app/lib/features/runs/ui/run_detail_tabs.dart index c7a1627e..1b2f2f70 100644 --- a/app/lib/features/runs/ui/run_detail_tabs.dart +++ b/app/lib/features/runs/ui/run_detail_tabs.dart @@ -209,7 +209,10 @@ class _RunDetailTabsState extends State { case RunSummarySection.output: _outputSection.expand(); case null: - break; + // A hit that names no section must not leave a previously expanded + // one open; the Summary panel starts collapsed. + _inputSection.collapse(); + _outputSection.collapse(); } case RunVisitTarget(:final stageKey, :final timelineIndex): if (detailVisitStepAt(widget.run, timelineIndex) == null) return;