From 57a4844d4f1f869c6071ccaa94e1f0593f2c0f7b Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Fri, 23 Oct 2026 13:32:22 +0100 Subject: [PATCH] fix(app): pipeline Run and Runs share one action row, as the web --- .../widgets/pipeline_detail_panel.dart | 54 ++++++++++--------- .../pipelines/pipelines_screen_test.dart | 5 ++ 2 files changed, 34 insertions(+), 25 deletions(-) diff --git a/app/lib/features/pipelines/widgets/pipeline_detail_panel.dart b/app/lib/features/pipelines/widgets/pipeline_detail_panel.dart index 351cea2c..ef2dacc8 100644 --- a/app/lib/features/pipelines/widgets/pipeline_detail_panel.dart +++ b/app/lib/features/pipelines/widgets/pipeline_detail_panel.dart @@ -330,33 +330,37 @@ class _PipelineDetailPanelState extends State { children: [ heading, const SizedBox(height: 4), - Align( - alignment: AlignmentDirectional.centerStart, - child: RunPipelineAction( - controller: _controller, - detail: detail, - gateway: widget.gateway, - onRunStarted: widget.onRunStarted, - ), - ), - Align( - alignment: AlignmentDirectional.centerStart, - child: Semantics( - button: true, - label: detail.name.trim().isEmpty - ? 'View runs of this pipeline' - : 'View runs of ${detail.name}', - child: ExcludeSemantics( - child: TextButton.icon( - onPressed: widget.onViewPipelineRuns == null - ? null - : () => widget.onViewPipelineRuns!(detail.id), - icon: const Icon(Icons.list_alt), - label: const Text('Runs'), - key: const Key('pipeline-view-runs'), + // One action row, as the web's `.pipeline-actions`: the primary Run, + // then the secondary Runs, 8 apart. + Wrap( + key: const Key('pipeline-actions'), + spacing: 8, + runSpacing: 4, + crossAxisAlignment: WrapCrossAlignment.center, + children: [ + RunPipelineAction( + controller: _controller, + detail: detail, + gateway: widget.gateway, + onRunStarted: widget.onRunStarted, + ), + Semantics( + button: true, + label: detail.name.trim().isEmpty + ? 'View runs of this pipeline' + : 'View runs of ${detail.name}', + child: ExcludeSemantics( + child: OutlinedButton.icon( + onPressed: widget.onViewPipelineRuns == null + ? null + : () => widget.onViewPipelineRuns!(detail.id), + icon: const Icon(Icons.list_alt), + label: const Text('Runs'), + key: const Key('pipeline-view-runs'), + ), ), ), - ), + ], ), ], ), diff --git a/app/test/features/pipelines/pipelines_screen_test.dart b/app/test/features/pipelines/pipelines_screen_test.dart index c563040e..d00cfba8 100644 --- a/app/test/features/pipelines/pipelines_screen_test.dart +++ b/app/test/features/pipelines/pipelines_screen_test.dart @@ -106,6 +106,11 @@ void main() { await tester.pumpAndSettle(); expect(find.bySemanticsLabel('View runs of Alpha review'), findsOneWidget); + // Run and Runs share one action row, as the web's pipeline actions. + final runs = tester.getCenter(find.byKey(const Key('pipeline-view-runs'))); + final actions = tester.getRect(find.byKey(const Key('pipeline-actions'))); + expect(actions.height, lessThan(56)); + expect(runs.dx, greaterThan(actions.left + 40)); await tester.tap(find.byKey(const Key('pipeline-view-runs'))); expect(opened, [1]); });