Merge branch 'worktree-agent-a82ec5e9fdf8ca159' into integrate/gaps-e

# Conflicts:
#	app/test/features/search/search_bar_layout_test.dart
This commit is contained in:
2026-10-31 04:31:13 +00:00
31 changed files with 1348 additions and 395 deletions
@@ -5,6 +5,7 @@ import 'package:pipelines_app/features/search/search_screen.dart';
import 'package:pipelines_app/features/search/ui/search_bar_controls.dart';
import 'package:pipelines_app/features/search/ui/search_bounds_note.dart';
import 'package:pipelines_app/features/search/ui/search_layout.dart';
import 'package:pipelines_app/ui/adaptive/glass_pill.dart';
import 'package:pipelines_app/ui/layout/app_list_row.dart';
import 'package:pipelines_app/ui/adaptive/segmented_bar.dart';
@@ -155,5 +156,54 @@ void main() {
lessThanOrEqualTo(kSearchPillMaxWidth),
);
});
for (final width in [390.0, 1200.0]) {
testWidgets('$host: at $width the field takes the title\'s place and '
'the results line up with it', (tester) async {
_size(tester, width);
final gateway = ImmediateGateway((_, _) => response([pipeline]));
await tester.pumpWidget(
_app(
cupertino,
SearchScreen(
gateway: gateway,
onOpen: (_) {},
cupertino: cupertino,
),
),
);
await _search(tester, 'release');
final bar = find.byType(SegmentedBar);
// No Search title pill: the field's pill is the bar's only piece.
expect(
find.descendant(of: bar, matching: find.text('Search')),
findsNothing,
);
expect(
find.descendant(of: bar, matching: find.byType(GlassPill)),
findsOneWidget,
);
final pill = tester.getRect(
find.descendant(of: bar, matching: find.byType(GlassPill)),
);
expect(pill.left, kSearchContentInset);
expect(
pill.width,
width - 2 * kSearchContentInset < kSearchPillMaxWidth
? width - 2 * kSearchContentInset
: kSearchPillMaxWidth,
);
// The field fills the pill beside Kind and the help.
final field = tester.getRect(find.byKey(searchFieldKey));
expect(field.width, greaterThan(pill.width * 0.6));
// The result column shares the pill's edges.
final row = tester.getRect(
find.byKey(const ValueKey('search.result.pipeline:7')),
);
expect(row.left, pill.left);
expect(row.right, pill.right);
});
}
}
}