From ea0f22dfc74fba2002da93cb1fde5bb14e5417de Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Sat, 31 Oct 2026 02:19:02 +0000 Subject: [PATCH] fix(app): keep round-3 run rows within narrow large-text widths The trailing relative time could not shrink, so a 320px row at 2x text overflowed; it now keeps at most 40% of the title line and ellipsises. Update the pipelines screen test for rows that no longer show the run number or a no-runs line. --- app/lib/features/runs/ui/runs_list.dart | 43 +++++++++++++------ .../pipelines/pipelines_screen_test.dart | 11 +++-- 2 files changed, 35 insertions(+), 19 deletions(-) diff --git a/app/lib/features/runs/ui/runs_list.dart b/app/lib/features/runs/ui/runs_list.dart index 79c30b4b..b4870e11 100644 --- a/app/lib/features/runs/ui/runs_list.dart +++ b/app/lib/features/runs/ui/runs_list.dart @@ -370,21 +370,38 @@ class RunListRow extends StatelessWidget { ), ] : [ - Row( - children: [ - Expanded( - child: Text( - title, - style: titleStyle, - maxLines: 1, - overflow: TextOverflow.ellipsis, + // The time keeps at most 40% of the line, so very large + // text in a narrow row ellipsises instead of overflowing. + LayoutBuilder( + builder: (context, constraints) => Row( + children: [ + Expanded( + child: Text( + title, + style: titleStyle, + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), ), - ), - if (relativeTime != null) ...[ - const SizedBox(width: 8), - Text(relativeTime, style: small, maxLines: 1), + if (relativeTime != null) + ConstrainedBox( + constraints: BoxConstraints( + maxWidth: constraints.maxWidth * 0.4, + ), + child: Padding( + padding: const EdgeInsetsDirectional.only( + start: 8, + ), + child: Text( + relativeTime, + style: small, + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + ), + ), ], - ], + ), ), const SizedBox(height: 2), Text( diff --git a/app/test/features/pipelines/pipelines_screen_test.dart b/app/test/features/pipelines/pipelines_screen_test.dart index 3164ad57..7e25ce91 100644 --- a/app/test/features/pipelines/pipelines_screen_test.dart +++ b/app/test/features/pipelines/pipelines_screen_test.dart @@ -19,12 +19,11 @@ void main() { expect(find.text('Pipelines'), findsOneWidget); expect(find.text('Alpha review'), findsOneWidget); - expect( - find.text('2 stages · 1 schedule'), - findsOneWidget, - ); - expect(find.textContaining('run 42'), findsOneWidget); - expect(find.text('no runs recorded'), findsOneWidget); + expect(find.text('2 stages · 1 schedule'), findsOneWidget); + // The row shows the last run's state and age; its number is in the detail. + expect(find.textContaining('run 42'), findsNothing); + // A pipeline that never ran shows its summary alone, with no status dot. + expect(find.text('no runs recorded'), findsNothing); expect(find.text('Select a pipeline.'), findsOneWidget); await tester.tap(find.byKey(const Key('pipeline-row-1')));