Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

Keep harness choices visible at larger text sizes

deef25e5a20867f
diff --git a/desktop/lib/widgets/agent_picker.dart b/desktop/lib/widgets/agent_picker.dart
index 2d0e84a4c..d283c87e3 100644
--- a/desktop/lib/widgets/agent_picker.dart
+++ b/desktop/lib/widgets/agent_picker.dart
@@ -16,75 +16,105 @@ class AgentPicker extends StatelessWidget {
final ValueChanged<String> onChanged;
static const quickAgents = ['codex', 'claude', 'cursor'];
+ static String _label(String id) =>
+ id == 'claude' ? 'Claude Code' : engineIdentity(id).label;
+
@override
Widget build(BuildContext context) {
final other = !quickAgents.contains(value);
+ final textStyle = TextStyle(
+ fontFamily: grid.AppFont.sans,
+ fontFamilyFallback: grid.AppFont.sansFallback,
+ fontSize: 13,
+ fontWeight: FontWeight.w500,
+ );
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- Row(
- children: [
- for (final id in quickAgents) ...[
- Expanded(
- child: Semantics(
- selected: value == id,
- child: TextButton.icon(
- key: ValueKey('new-agent-quick-$id'),
- onPressed: () => onChanged(id),
- icon: EngineMark(engine: id, size: 18),
- label: Text(
- id == 'claude' ? 'Claude Code' : engineIdentity(id).label,
- maxLines: 1,
- overflow: TextOverflow.ellipsis,
- ),
- style: TextButton.styleFrom(
- foregroundColor: grid.AppPalette.textPrimary,
- backgroundColor: value == id
- ? grid.AppSurface.recessHover
- : grid.AppSurface.recess,
- minimumSize: const Size(0, 38),
- padding: const EdgeInsets.symmetric(horizontal: 8),
- textStyle: TextStyle(
- fontFamily: grid.AppFont.sans,
- fontFamilyFallback: grid.AppFont.sansFallback,
- fontSize: 13,
- fontWeight: FontWeight.w500,
- ),
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(8),
- side: BorderSide(
- color: value == id
- ? grid.AppPalette.accentOnSurface
- : Colors.transparent,
+ LayoutBuilder(
+ builder: (context, constraints) {
+ final painter = TextPainter(
+ textDirection: Directionality.of(context),
+ textScaler: MediaQuery.textScalerOf(context),
+ );
+ var minimumWidth = 0.0;
+ for (final id in quickAgents) {
+ painter.text = TextSpan(text: _label(id), style: textStyle);
+ painter.layout();
+ // Icon, label gap and horizontal button padding.
+ final width = painter.width + 18 + 8 + 16;
+ if (width > minimumWidth) minimumWidth = width;
+ }
+ painter.dispose();
+ final compactWidth = (constraints.maxWidth - 42 - 24) / 3;
+ final pairWidth = (constraints.maxWidth - 8) / 2;
+ final buttonWidth = compactWidth >= minimumWidth
+ ? compactWidth
+ : pairWidth >= minimumWidth
+ ? pairWidth
+ : constraints.maxWidth;
+ return Wrap(
+ spacing: 8,
+ runSpacing: 8,
+ children: [
+ for (final id in quickAgents) ...[
+ SizedBox(
+ width: buttonWidth,
+ child: Semantics(
+ selected: value == id,
+ child: TextButton.icon(
+ key: ValueKey('new-agent-quick-$id'),
+ onPressed: () => onChanged(id),
+ icon: EngineMark(engine: id, size: 18),
+ label: Text(
+ _label(id),
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ ),
+ style: TextButton.styleFrom(
+ foregroundColor: grid.AppPalette.textPrimary,
+ backgroundColor: value == id
+ ? grid.AppSurface.recessHover
+ : grid.AppSurface.recess,
+ minimumSize: const Size(0, 38),
+ padding: const EdgeInsets.symmetric(horizontal: 8),
+ textStyle: textStyle,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(8),
+ side: BorderSide(
+ color: value == id
+ ? grid.AppPalette.accentOnSurface
+ : Colors.transparent,
+ ),
+ ),
),
),
),
),
+ ],
+ Tooltip(
+ message: other
+ ? '${engineIdentity(value).label} selected · More agents'
+ : 'More agents',
+ child: AppSelectField<String>(
+ key: const Key('new-agent-engine-field'),
+ value: value,
+ options: options,
+ onChanged: onChanged,
+ width: 42,
+ height: 38,
+ trigger: Icon(
+ Icons.more_horiz,
+ size: 20,
+ color: other
+ ? grid.AppPalette.accentOnSurface
+ : grid.AppPalette.textSecondary,
+ ),
+ ),
),
- ),
- const SizedBox(width: 8),
- ],
- Tooltip(
- message: other
- ? '${engineIdentity(value).label} selected · More agents'
- : 'More agents',
- child: AppSelectField<String>(
- key: const Key('new-agent-engine-field'),
- value: value,
- options: options,
- onChanged: onChanged,
- width: 42,
- height: 38,
- trigger: Icon(
- Icons.more_horiz,
- size: 20,
- color: other
- ? grid.AppPalette.accentOnSurface
- : grid.AppPalette.textSecondary,
- ),
- ),
- ),
- ],
+ ],
+ );
+ },
),
if (other)
Padding(
diff --git a/desktop/lib/widgets/harness_start_page.dart b/desktop/lib/widgets/harness_start_page.dart
index 16306d30e..9cdd9b03d 100644
--- a/desktop/lib/widgets/harness_start_page.dart
+++ b/desktop/lib/widgets/harness_start_page.dart
@@ -31,10 +31,27 @@ class _HarnessStartPageState extends State<HarnessStartPage> {
canRequestFocus: false,
);
final _searchGroup = Object();
+ final _searchArea = GlobalKey();
+ bool _revealScheduled = false;
SwarmSearchController? _search;
SwarmSearchDraft? _draft;
bool get _showResults => _search != null;
+ void _revealResults() {
+ if (_revealScheduled) return;
+ _revealScheduled = true;
+ WidgetsBinding.instance.addPostFrameCallback((_) {
+ _revealScheduled = false;
+ if (!mounted || !_showResults || !_pickerFocus.hasFocus) return;
+ // The list also scrolls internally. Keep its whole viewport visible so
+ // arrow navigation cannot highlight a row below the window edge.
+ Scrollable.ensureVisible(
+ _searchArea.currentContext!,
+ alignmentPolicy: ScrollPositionAlignmentPolicy.keepVisibleAtEnd,
+ );
+ });
+ }
+
void _open() {
// Commands can replace the editor value without a TextField onChanged.
// Reveal results for the visible text, including on keyboard-only entry.
@@ -82,198 +99,205 @@ class _HarnessStartPageState extends State<HarnessStartPage> {
Widget build(BuildContext context) {
grid.AppTheme.watch(context);
return LayoutBuilder(
- builder: (context, constraints) => SingleChildScrollView(
- child: Padding(
- padding: EdgeInsets.fromLTRB(
- 24,
- (constraints.maxHeight * 0.21).clamp(72, 220),
- 24,
- 64,
- ),
- child: Center(
- child: ConstrainedBox(
- constraints: const BoxConstraints(maxWidth: 640),
- child: Column(
- children: [
- const Text(
- 'Harness',
- style: TextStyle(
- fontSize: 48,
- fontWeight: FontWeight.w600,
- letterSpacing: -1.5,
+ builder: (context, constraints) {
+ if (_showResults) _revealResults();
+ return SingleChildScrollView(
+ child: Padding(
+ padding: EdgeInsets.fromLTRB(
+ 24,
+ (constraints.maxHeight * 0.21).clamp(72, 220),
+ 24,
+ 64,
+ ),
+ child: Center(
+ child: ConstrainedBox(
+ constraints: const BoxConstraints(maxWidth: 640),
+ child: Column(
+ children: [
+ const Text(
+ 'Harness',
+ style: TextStyle(
+ fontSize: 48,
+ fontWeight: FontWeight.w600,
+ letterSpacing: -1.5,
+ ),
),
- ),
- const SizedBox(height: 32),
- TextFieldTapRegion(
- groupId: _searchGroup,
- child: Focus(
- focusNode: _pickerFocus,
- child: Material(
- color: _showResults
- ? grid.AppPalette.swarmSearchSurface
- : Colors.transparent,
- elevation: _showResults ? 12 : 0,
- shadowColor: Colors.black54,
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(
- _showResults ? 12 : 30,
+ const SizedBox(height: 32),
+ TextFieldTapRegion(
+ groupId: _searchGroup,
+ child: Focus(
+ focusNode: _pickerFocus,
+ child: Material(
+ key: _searchArea,
+ color: _showResults
+ ? grid.AppPalette.swarmSearchSurface
+ : Colors.transparent,
+ elevation: _showResults ? 12 : 0,
+ shadowColor: Colors.black54,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(
+ _showResults ? 12 : 30,
+ ),
+ side: _showResults
+ ? const BorderSide(color: Colors.white24)
+ : BorderSide.none,
),
- side: _showResults
- ? const BorderSide(color: Colors.white24)
- : BorderSide.none,
- ),
- clipBehavior: Clip.antiAlias,
- child: SwarmSearchKeys(
- search: _search,
- editing: _query,
- onChoose: _choose,
- onClose: _close,
- onOpen: _open,
- onNewAgent: _new,
- onRefocus: _focus.requestFocus,
- child: Column(
- children: [
- Semantics(
- label: 'Find a harness',
- child: SwarmSearchInput(
- inputKey: const ValueKey(
- 'harness-start-search',
+ clipBehavior: Clip.antiAlias,
+ child: SwarmSearchKeys(
+ search: _search,
+ editing: _query,
+ onChoose: _choose,
+ onClose: _close,
+ onOpen: _open,
+ onNewAgent: _new,
+ onRefocus: _focus.requestFocus,
+ child: Column(
+ children: [
+ Semantics(
+ label: 'Find a harness',
+ child: SwarmSearchInput(
+ inputKey: const ValueKey(
+ 'harness-start-search',
+ ),
+ controller: _query,
+ focusNode: _focus,
+ search: _search,
+ onClose: _close,
+ onChanged: (_) => _open(),
+ onOpen: _open,
+ onTapOutside: _close,
+ groupId: _searchGroup,
+ autofocus: false,
+ showClose: _showResults,
+ hintText: '',
+ rounded: true,
),
- controller: _query,
- focusNode: _focus,
- search: _search,
- onClose: _close,
- onChanged: (_) => _open(),
- onOpen: _open,
- onTapOutside: _close,
- groupId: _searchGroup,
- autofocus: false,
- showClose: _showResults,
- hintText: '',
- rounded: true,
),
- ),
- if (_showResults) ...[
- const Divider(height: 1, color: Colors.white12),
- SizedBox(
- height: (constraints.maxHeight * 0.4).clamp(
- 168,
- 336,
+ if (_showResults) ...[
+ const Divider(
+ height: 1,
+ color: Colors.white12,
),
- child: SwarmSearchResults(
- key: const ValueKey(
- 'harness-start-results',
+ SizedBox(
+ height: (constraints.maxHeight * 0.4).clamp(
+ 168,
+ 336,
+ ),
+ child: SwarmSearchResults(
+ key: const ValueKey(
+ 'harness-start-results',
+ ),
+ search: _search!,
+ onChoose: _choose,
+ onRefocus: _focus.requestFocus,
),
- search: _search!,
- onChoose: _choose,
- onRefocus: _focus.requestFocus,
),
- ),
+ ],
],
- ],
+ ),
),
),
),
),
- ),
- const SizedBox(height: 20),
- Wrap(
- alignment: WrapAlignment.center,
- spacing: 12,
- runSpacing: 12,
- children: [
- FilledButton(
- key: const ValueKey('harness-start-open'),
- onPressed: _open,
- style: FilledButton.styleFrom(
- minimumSize: const Size(160, 44),
- backgroundColor: grid.AppPalette.swarmSearchSurface,
- foregroundColor: Colors.white,
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(8),
+ const SizedBox(height: 20),
+ Wrap(
+ alignment: WrapAlignment.center,
+ spacing: 12,
+ runSpacing: 12,
+ children: [
+ FilledButton(
+ key: const ValueKey('harness-start-open'),
+ onPressed: _open,
+ style: FilledButton.styleFrom(
+ minimumSize: const Size(160, 44),
+ backgroundColor: grid.AppPalette.swarmSearchSurface,
+ foregroundColor: Colors.white,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(8),
+ ),
),
+ child: const Text('Open Harness'),
),
- child: const Text('Open Harness'),
- ),
- FilledButton.icon(
- key: const ValueKey('harness-start-new'),
- onPressed: _new,
- icon: const Icon(Icons.add, size: 18),
- label: const Text('New Harness'),
- style: FilledButton.styleFrom(
- minimumSize: const Size(160, 44),
- backgroundColor: grid.AppPalette.swarmAccent,
- foregroundColor: grid.AppPalette.swarmTabBar,
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(8),
+ FilledButton.icon(
+ key: const ValueKey('harness-start-new'),
+ onPressed: _new,
+ icon: const Icon(Icons.add, size: 18),
+ label: const Text('New Harness'),
+ style: FilledButton.styleFrom(
+ minimumSize: const Size(160, 44),
+ backgroundColor: grid.AppPalette.swarmAccent,
+ foregroundColor: grid.AppPalette.swarmTabBar,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(8),
+ ),
),
),
- ),
- ],
- ),
- const SizedBox(height: 160),
- Semantics(
- link: true,
- child: InkWell(
- key: const ValueKey('harness-device-link'),
- onTap: () => launchUrl(
- Uri.parse('https://www.autonomous.ai/harness-device'),
- mode: LaunchMode.externalApplication,
- ),
- borderRadius: BorderRadius.circular(12),
- child: Padding(
- padding: const EdgeInsets.all(12),
- child: Column(
- children: [
- ClipRRect(
- borderRadius: BorderRadius.circular(10),
- child: Image.asset(
- 'assets/harness_device.webp',
- width: 192,
- height: 120,
- fit: BoxFit.cover,
- semanticLabel: 'Harness Device',
+ ],
+ ),
+ const SizedBox(height: 160),
+ Semantics(
+ link: true,
+ child: InkWell(
+ key: const ValueKey('harness-device-link'),
+ onTap: () => launchUrl(
+ Uri.parse('https://www.autonomous.ai/harness-device'),
+ mode: LaunchMode.externalApplication,
+ ),
+ borderRadius: BorderRadius.circular(12),
+ child: Padding(
+ padding: const EdgeInsets.all(12),
+ child: Column(
+ children: [
+ ClipRRect(
+ borderRadius: BorderRadius.circular(10),
+ child: Image.asset(
+ 'assets/harness_device.webp',
+ width: 192,
+ height: 120,
+ fit: BoxFit.cover,
+ semanticLabel: 'Harness Device',
+ ),
),
- ),
- const SizedBox(height: 16),
- const Row(
- mainAxisSize: MainAxisSize.min,
- children: [
- Text(
- 'Meet Harness Device',
- style: TextStyle(
- fontSize: 13,
+ const SizedBox(height: 16),
+ const Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Text(
+ 'Meet Harness Device',
+ style: TextStyle(
+ fontSize: 13,
+ color: Colors.white70,
+ ),
+ ),
+ SizedBox(width: 4),
+ Icon(
+ Icons.arrow_outward,
+ size: 12,
color: Colors.white70,
),
+ ],
+ ),
+ const SizedBox(height: 6),
+ const Text(
+ 'Voice control for your agents, right on your desk.',
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ fontSize: 12,
+ color: Colors.white54,
),
- SizedBox(width: 4),
- Icon(
- Icons.arrow_outward,
- size: 12,
- color: Colors.white70,
- ),
- ],
- ),
- const SizedBox(height: 6),
- const Text(
- 'Voice control for your agents, right on your desk.',
- textAlign: TextAlign.center,
- style: TextStyle(
- fontSize: 12,
- color: Colors.white54,
),
- ),
- ],
+ ],
+ ),
),
),
),
- ),
- ],
+ ],
+ ),
),
),
),
- ),
- ),
+ );
+ },
);
}
}
diff --git a/desktop/lib/widgets/swarm_switcher.dart b/desktop/lib/widgets/swarm_switcher.dart
index 54e7c3309..335fe32a2 100644
--- a/desktop/lib/widgets/swarm_switcher.dart
+++ b/desktop/lib/widgets/swarm_switcher.dart
@@ -298,6 +298,7 @@ class _SwarmSearchResultsState extends State<SwarmSearchResults> {
final _scroll = ScrollController();
double _rowHeight = 56;
bool _revealScheduled = false;
+ (Size, double)? _geometry;
SwarmSearchController get search => widget.search;
@override
void initState() {
@@ -308,6 +309,10 @@ class _SwarmSearchResultsState extends State<SwarmSearchResults> {
void _changed() {
setState(() {});
_scrollToSelection();
+ _revealSelection();
+ }
+
+ void _revealSelection() {
if (_revealScheduled) return;
_revealScheduled = true;
WidgetsBinding.instance.addPostFrameCallback((_) {
@@ -368,6 +373,11 @@ class _SwarmSearchResultsState extends State<SwarmSearchResults> {
);
return LayoutBuilder(
builder: (context, constraints) {
+ final geometry = (constraints.biggest, _rowHeight);
+ if (_geometry != geometry) {
+ _geometry = geometry;
+ _revealSelection();
+ }
final results = Semantics(
container: true,
label: 'Search results',
diff --git a/desktop/test/entry_surfaces_render_test.dart b/desktop/test/entry_surfaces_render_test.dart
new file mode 100644
index 000000000..ee06d0d8d
--- /dev/null
+++ b/desktop/test/entry_surfaces_render_test.dart
@@ -0,0 +1,209 @@
+import 'dart:io';
+import 'dart:ui' as ui;
+
+import 'package:flutter/material.dart';
+import 'package:flutter/rendering.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_test/flutter_test.dart';
+import 'package:harness/auth/auth_session.dart';
+import 'package:harness/core/config.dart';
+import 'package:harness/core/engine_availability.dart';
+import 'package:harness/core/models.dart';
+import 'package:harness/screens/swarm_screen.dart';
+import 'package:harness/shared/theme/app_theme.dart' as grid;
+import 'package:harness/shared/theme/color_palette.dart';
+import 'package:harness/state/app_state.dart';
+
+import 'support/real_fonts.dart';
+import 'swarm_interactions_test.dart' show chord;
+
+class _RenderApp extends AppNotifier {
+ _RenderApp()
+ : super(
+ config: AppConfig.dev,
+ authSession: AuthSession(),
+ configStore: null,
+ ) {
+ hasNavigationRail = false;
+ for (final id in ['local', 'remote']) {
+ final machine = Machine(
+ machineId: id,
+ name: id == 'local' ? 'MacBook Pro' : 'Workshop',
+ authMode: MachineAuthMode.remote,
+ );
+ machines.add(machine);
+ machineStates[id] = MachineState(machine)
+ ..localOnly = id == 'local'
+ ..nodeOnline = true
+ ..agentLoadStatus = AgentLoadStatus.loaded
+ ..agents = [
+ for (var i = 0; i < 10; i++)
+ Agent(
+ id: '$id-$i',
+ name: 'Workshop: building the next version $i',
+ engine: 'claude',
+ terminalAvailable: true,
+ ),
+ ];
+ machineStates[id]!.engines.replace(const [
+ EngineAvailability(engine: 'claude', installed: true),
+ ]);
+ }
+ }
+
+ @override
+ Future<void> probeEngines(String machineId, {bool force = false}) async {}
+}
+
+void main() {
+ setUpAll(() async {
+ await loadRealFonts();
+ await (FontLoader(
+ 'MaterialIcons',
+ )..addFont(rootBundle.load('fonts/MaterialIcons-Regular.otf'))).load();
+ await (FontLoader('packages/lucide_icons_flutter/Lucide')..addFont(
+ rootBundle.load('packages/lucide_icons_flutter/assets/lucide.ttf'),
+ ))
+ .load();
+ await (FontLoader('packages/cupertino_icons/CupertinoIcons')..addFont(
+ rootBundle.load('packages/cupertino_icons/assets/CupertinoIcons.ttf'),
+ ))
+ .load();
+ });
+ for (final palette in HarnessPalette.values) {
+ for (final scale in [1.0, 2.0]) {
+ testWidgets('entry surfaces ${palette.name} at text scale $scale', (
+ tester,
+ ) async {
+ tester.view.devicePixelRatio = 1;
+ tester.view.physicalSize = const Size(880, 560);
+ addTearDown(tester.view.reset);
+ const nativeTabs = MethodChannel('harness/swarm_tabs');
+ tester.binding.defaultBinaryMessenger.setMockMethodCallHandler(
+ nativeTabs,
+ (_) async => true,
+ );
+ addTearDown(
+ () => tester.binding.defaultBinaryMessenger.setMockMethodCallHandler(
+ nativeTabs,
+ null,
+ ),
+ );
+ final previousPalette = grid.AppTheme.palette.value;
+ grid.AppTheme.palette.value = palette;
+ addTearDown(() => grid.AppTheme.palette.value = previousPalette);
+ final app = _RenderApp();
+ addTearDown(() async {
+ await tester.pumpWidget(const SizedBox());
+ app.dispose();
+ });
+ final boundaryKey = GlobalKey();
+ await tester.pumpWidget(
+ RepaintBoundary(
+ key: boundaryKey,
+ child: MaterialApp(
+ debugShowCheckedModeBanner: false,
+ theme: grid.buildAppTheme(brightness: Brightness.dark),
+ builder: (context, child) => MediaQuery(
+ data: MediaQuery.of(context)
+ .copyWith(textScaler: TextScaler.linear(scale)),
+ child: child!,
+ ),
+ home: SwarmScreen(notifier: app, nativeTabs: true),
+ ),
+ ),
+ );
+ await tester.pumpAndSettle();
+
+ Future<void> capture(String surface) async {
+ final output = Platform.environment['HARNESS_ENTRY_CAPTURE_DIR'];
+ if (output == null) return;
+ await tester.runAsync(() async {
+ for (final asset in [
+ 'assets/engine-icons/codex.png',
+ 'assets/engine-icons/cursor.png',
+ 'assets/harness_device.webp',
+ ]) {
+ await precacheImage(
+ AssetImage(asset),
+ boundaryKey.currentContext!,
+ );
+ }
+ });
+ await tester.pumpAndSettle();
+ final boundary =
+ boundaryKey.currentContext!.findRenderObject()!
+ as RenderRepaintBoundary;
+ await tester.runAsync(() async {
+ final image = await boundary.toImage(pixelRatio: 1);
+ final bytes = await image.toByteData(
+ format: ui.ImageByteFormat.png,
+ );
+ await Directory(output).create(recursive: true);
+ await File('$output/${palette.name}-$scale-$surface.png')
+ .writeAsBytes(bytes!.buffer.asUint8List());
+ image.dispose();
+ });
+ }
+
+ await capture('start');
+ await tester.tap(find.byKey(const ValueKey('harness-start-search')));
+ await tester.pumpAndSettle();
+ await capture('inline');
+ for (var i = 0; i < 5; i++) {
+ await tester.sendKeyEvent(LogicalKeyboardKey.arrowDown);
+ await tester.pump();
+ }
+ await capture('inline-selected');
+ final selected = find.byWidgetPredicate(
+ (widget) => widget is ListTile && widget.selected,
+ );
+ final selectedRect = tester.getRect(selected);
+ final issues = <String>[
+ if (selectedRect.bottom > 560 || selectedRect.top < 0)
+ 'Selected result is outside the window: $selectedRect',
+ ];
+ tester.view.physicalSize = const Size(1280, 800);
+ await tester.pumpAndSettle();
+ for (var i = 0; i < 5; i++) {
+ await tester.sendKeyEvent(LogicalKeyboardKey.arrowDown);
+ await tester.pump();
+ }
+ tester.view.physicalSize = const Size(880, 560);
+ await tester.pumpAndSettle();
+ await capture('inline-resized');
+ final resultsRect = tester.getRect(
+ find.byKey(const ValueKey('harness-start-results')),
+ );
+ if (selected.evaluate().isEmpty) {
+ issues.add('Resize moves the selected result outside the built list');
+ } else {
+ final resizedRect = tester.getRect(selected);
+ if (resizedRect.bottom > resultsRect.bottom ||
+ resizedRect.top < resultsRect.top) {
+ issues.add(
+ 'Resize hides the selection: $resizedRect in $resultsRect',
+ );
+ }
+ }
+ await tester.sendKeyEvent(LogicalKeyboardKey.escape);
+ await chord(tester, LogicalKeyboardKey.keyO);
+ await tester.pumpAndSettle();
+ await capture('open');
+ await tester.sendKeyEvent(LogicalKeyboardKey.escape);
+ await chord(tester, LogicalKeyboardKey.keyN);
+ await tester.pumpAndSettle();
+ await capture('new');
+ expect(tester.takeException(), isNull);
+ for (final label in ['Codex', 'Claude Code', 'Cursor']) {
+ if (tester
+ .renderObject<RenderParagraph>(find.text(label))
+ .didExceedMaxLines) {
+ issues.add('$label is truncated when choosing an agent');
+ }
+ }
+ expect(issues, isEmpty);
+ });
+ }
+ }
+}
diff --git a/docs/harness-agent-first-tabs.md b/docs/harness-agent-first-tabs.md
index ccfac30af..6ae83a9b7 100644
--- a/docs/harness-agent-first-tabs.md
+++ b/docs/harness-agent-first-tabs.md
@@ -20,6 +20,8 @@ The closed page retains only search text and selection: it does not keep a live
search subscription or build a catalog when an unused page closes. Reopening
refreshes results against current app state. Command-mode shortcuts synchronize
the field and results without adding editor rebuilds to arrow navigation.
+Opening the dropdown keeps its whole list viewport inside the window. Resizing
+or changing text size reveals the highlighted row without changing the selection.
A small product image and introduction sit well below the controls and link to
https://www.autonomous.ai/harness-device. The bundled image is the official
product photo from https://cdn.autonomous.ai/production/ecm/260731/2.webp.
@@ -35,6 +37,8 @@ AppKit, inherits the app's font, and exposes current shortcut hints on hover.
The creation dialog title and CTA are **New Harness**. Cancel is removed; Escape
and clicking outside dismiss it. Launch-in-progress and uncertain-outcome states
retain their existing safeguards and recovery actions.
+Quick agent choices retain their compact row when labels fit, and wrap into
+additional rows at larger text sizes so their names remain readable.
The folder control receives initial keyboard focus, so Enter opens its chooser.
A successful keyboard folder choice focuses the enabled New Harness action;
cancellation or failure returns focus to the folder control. If a required Codex