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.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
Polish current Harness entry and restore full desktop checks
dee67c20f4c4b74
diff --git a/desktop/lib/screens/swarm_screen.dart b/desktop/lib/screens/swarm_screen.dartindex 210e693ae..79da65ca1 100644--- a/desktop/lib/screens/swarm_screen.dart+++ b/desktop/lib/screens/swarm_screen.dart@@ -1460,18 +1460,45 @@ class _SwarmScreenState extends State<SwarmScreen> {onPressed: app.swarms.length < AppNotifier.maxSwarms ? _newTab : null,icon: const Icon(Icons.add, size: 18),),- TextButton(- key: const ValueKey('swarm-new-harness-button'),- onPressed: _newAgent,- child: const Text('New Harness'),- ),- TextButton(- key: const ValueKey('swarm-open-harness-button'),- onPressed: _addAgent,- child: const Text('Open Harness'),- ),+ _harnessButton(create: true),+ const SizedBox(width: 8),+ _harnessButton(create: false),const SizedBox(width: 6),],),);++ Widget _harnessButton({required bool create}) {+ final label = create ? 'New Harness' : 'Open Harness';+ return Tooltip(+ message: withEffectiveShortcutHint(+ context,+ label,+ create ? ShortcutAction.newAgent : ShortcutAction.addAgent,+ ),+ child: TextButton(+ key: ValueKey(+ create ? 'swarm-new-harness-button' : 'swarm-open-harness-button',+ ),+ onPressed: create ? _newAgent : _addAgent,+ style: TextButton.styleFrom(+ minimumSize: Size(create ? 106 : 108, 28),+ padding: const EdgeInsets.symmetric(horizontal: 12),+ tapTargetSize: MaterialTapTargetSize.shrinkWrap,+ textStyle: Theme.of(context).textTheme.labelLarge?.copyWith(+ fontSize: 12,+ fontWeight: FontWeight.w500,+ ),+ backgroundColor: create+ ? grid.AppPalette.swarmAccent+ : grid.AppPalette.swarmSearchSurface,+ foregroundColor: create+ ? grid.AppPalette.swarmTabBar+ : grid.AppPalette.swarmAccent,+ shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(6)),+ ),+ child: Text(label),+ ),+ );+ }}diff --git a/desktop/lib/widgets/harness_start_page.dart b/desktop/lib/widgets/harness_start_page.dartindex 4b8d03e32..5b916eab0 100644--- a/desktop/lib/widgets/harness_start_page.dart+++ b/desktop/lib/widgets/harness_start_page.dart@@ -217,12 +217,23 @@ class _HarnessStartPageState extends State<HarnessStartPage> {),),const SizedBox(height: 16),- const Text(- 'Meet Harness Device ↗',- style: TextStyle(- fontSize: 13,- color: Colors.white70,- ),+ 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(diff --git a/desktop/test/agent_events_test.dart b/desktop/test/agent_events_test.dartindex 0c65ccd3e..99fbe4ee6 100644--- a/desktop/test/agent_events_test.dart+++ b/desktop/test/agent_events_test.dart@@ -7,6 +7,7 @@// a dialog says it was opened by, and that the first message is reported once// per SESSION rather than per agent, and never with any of what was typed.import 'package:flutter/material.dart';+import 'package:flutter/services.dart';import 'package:flutter_test/flutter_test.dart';import 'package:harness/analytics/analytics.dart';import 'package:harness/analytics/analytics_sink.dart';@@ -125,7 +126,7 @@ void main() {// call site: a door added later cannot forget.for (final source in ['machine_row', 'pane_empty', 'shortcut']) {await openFrom(tester, source);- await tester.tap(find.text('Cancel'));+ await tester.sendKeyEvent(LogicalKeyboardKey.escape);await tester.pumpAndSettle();}@@ -169,7 +170,7 @@ void main() {await tester.pumpAndSettle();await tester.tap(find.widgetWithText(FilledButton, 'Select this folder'));await tester.pumpAndSettle();- await tester.tap(find.widgetWithText(FilledButton, 'Create Harness'));+ await tester.tap(find.widgetWithText(FilledButton, 'New Harness'));await tester.pumpAndSettle();}diff --git a/desktop/test/boot_flow_widget_test.dart b/desktop/test/boot_flow_widget_test.dartindex a6851d7dd..8516f4f13 100644--- a/desktop/test/boot_flow_widget_test.dart+++ b/desktop/test/boot_flow_widget_test.dart@@ -819,7 +819,7 @@ void main() {});testWidgets(- 'authenticated with no machines opens Swarm welcome and linking',+ 'authenticated with no machines starts idle and New opens linking',(tester) async {final app = makeNotifier(AppStatus.authenticated);await tester.pumpWidget(@@ -830,10 +830,17 @@ void main() {);await tester.pumpAndSettle();expect(find.text('New Harness'), findsWidgets);- expect(find.text('Create Harness'), findsNothing);- expect(find.text('Add project'), findsNothing);- await tester.ensureVisible(find.text('Link a machine'));- await tester.tap(find.text('Link a machine'));+ expect(+ tester+ .widget<TextField>(+ find.byKey(const ValueKey('harness-start-search')),+ )+ .focusNode!+ .hasFocus,+ isFalse,+ );+ expect(find.byKey(const ValueKey('harness-start-open')), findsOneWidget);+ await tester.tap(find.byKey(const ValueKey('harness-start-new')));await tester.pumpAndSettle();expect(find.text('harness login\nharness start'), findsOneWidget);await tester.tap(find.text('Done'));diff --git a/desktop/test/remote_folder_picker_test.dart b/desktop/test/remote_folder_picker_test.dartindex e4fe1c7d6..2e487af55 100644--- a/desktop/test/remote_folder_picker_test.dart+++ b/desktop/test/remote_folder_picker_test.dart@@ -359,7 +359,7 @@ void main() {);testWidgets(- 'remote selection returns to New agent without launching or losing choices',+ 'remote selection returns to New Harness without launching or losing choices',(tester) async {final app = _Folders();addTearDown(app.dispose);@@ -414,7 +414,7 @@ void main() {expect(find.byType(AlertDialog), findsOneWidget);expect(find.text('/home/dev/target'), findsOneWidget);expect(app.launches, isEmpty);- await tester.tap(find.widgetWithText(FilledButton, 'Create Harness'));+ await tester.tap(find.widgetWithText(FilledButton, 'New Harness'));await tester.pumpAndSettle();expect(app.launches, [(machine: 'remote', engine: 'codex', folder: '/home/dev/target'),diff --git a/desktop/test/swarm_search_preview_test.dart b/desktop/test/swarm_search_preview_test.dartindex a02cb611b..f8511c88b 100644--- a/desktop/test/swarm_search_preview_test.dart+++ b/desktop/test/swarm_search_preview_test.dart@@ -10,7 +10,7 @@ import 'swarm_state_test.dart' show createApp;void main() {for (final inline in [false, true]) {testWidgets(- 'agent and group results use a single list without previews (reopened=$inline)',+ 'agent and group results use a single list without previews (inline=$inline)',(tester) async {final app = createApp();app.adoptSessionForTest(@@ -18,8 +18,14 @@ void main() {);app.newSwarm();await mount(tester, app);- final field = find.byKey(ValueKey('swarm-search-input'));- if (!inline) await chord(tester, LogicalKeyboardKey.keyO);+ final field = find.byKey(+ ValueKey(inline ? 'harness-start-search' : 'swarm-search-input'),+ );+ if (inline) {+ await tester.tap(field);+ } else {+ await chord(tester, LogicalKeyboardKey.keyO);+ }for (final query in ['Agent 0', 'Test host']) {await tester.enterText(field, query);await tester.pump();@@ -39,7 +45,11 @@ void main() {find.byKey(const ValueKey('swarm-search-result-list')),);final surface = tester.getRect(- find.byKey(ValueKey('swarm-search-results')),+ find.byKey(+ ValueKey(+ inline ? 'harness-start-results' : 'swarm-search-results',+ ),+ ),);expect(list.width, closeTo(surface.width, 2));}diff --git a/desktop/test/welcome_entry_layout_test.dart b/desktop/test/welcome_entry_layout_test.dartindex 4f0fd7a12..3d308f2a1 100644--- a/desktop/test/welcome_entry_layout_test.dart+++ b/desktop/test/welcome_entry_layout_test.dart@@ -28,7 +28,7 @@ void main() {(600.0, 900.0, 1.7),]) {testWidgets(- 'shared entry picker remains usable at $width with text scale $scale',+ 'start page and inline search remain usable at $width with text scale $scale',(tester) async {tester.view.devicePixelRatio = 1;tester.view.physicalSize = Size(width, height);@@ -63,6 +63,7 @@ void main() {RepaintBoundary(key: boundaryKey,child: MaterialApp(+ debugShowCheckedModeBanner: false,theme: grid.buildAppTheme(brightness: Brightness.dark),builder: (context, child) => MediaQuery(data: MediaQuery.of(context)@@ -77,36 +78,35 @@ void main() {if (Platform.environment['HARNESS_ENTRY_CAPTURE_DIR'] != null) {await tester.runAsync(() => precacheImage(- const AssetImage('assets/engine-icons/codex.png'),+ const AssetImage('assets/harness_device.webp'),tester.element(find.byType(SwarmScreen)),),);await tester.pump();}- final field = find.byKey(const ValueKey('swarm-search-input'));- final create = find.byKey(const ValueKey('swarm-search-new-agent'));- expect(find.text('Find a harness'), findsOneWidget);- expect(- find.descendant(of: create, matching: find.text('New Harness')),- findsOneWidget,- );- expect(find.text('Harness'), findsNothing);- expect(find.text('> Commands'), findsNothing);- expect(find.text('or'), findsOneWidget);- expect(find.byType(Checkbox), findsNothing);- final card = tester.getRect(- find.byKey(const ValueKey('swarm-search-results')),- );+ final field = find.byKey(const ValueKey('harness-start-search'));+ final create = find.byKey(const ValueKey('harness-start-new'));+ final open = find.byKey(const ValueKey('harness-start-open'));+ final device = find.byKey(const ValueKey('harness-device-link'));+ expect(find.text('Harness'), findsOneWidget);+ expect(tester.widget<TextField>(field).decoration!.hintText, isEmpty);+ expect(tester.widget<TextField>(field).focusNode!.hasFocus, isFalse);+ expect(find.byType(ListTile), findsNothing);final fieldRect = tester.getRect(field);final createRect = tester.getRect(create);- final dividerRect = tester.getRect(find.text('or'));- expect(createRect.top, greaterThan(dividerRect.bottom + 24));- expect(dividerRect.top, greaterThan(card.bottom + 24));+ final openRect = tester.getRect(open);+ expect(createRect.top, greaterThanOrEqualTo(fieldRect.bottom + 16));+ expect(openRect.top, greaterThanOrEqualTo(fieldRect.bottom + 16));expect(fieldRect.center.dx, closeTo(width / 2, 1));- expect(fieldRect.width, closeTo((width - 64).clamp(280, 720), 1));+ expect(fieldRect.width, closeTo((width - 48).clamp(0, 640), 1));expect(create.hitTestable(), findsOneWidget);+ expect(open.hitTestable(), findsOneWidget);expect(createRect.bottom, lessThanOrEqualTo(height));- expect(tester.takeException(), isNull);+ expect(openRect.bottom, lessThanOrEqualTo(height));+ expect(+ tester.getRect(device).top,+ greaterThan(createRect.bottom + 150),+ );final output = Platform.environment['HARNESS_ENTRY_CAPTURE_DIR'];if (output != null) {final boundary =@@ -124,19 +124,28 @@ void main() {image.dispose();});}+ expect(tester.takeException(), isNull);+ await tester.tap(field);await tester.enterText(field, 'Test host');await tester.pump();- final results = find.byKey(const ValueKey('swarm-search-results'));+ final results = find.byKey(const ValueKey('harness-start-results'));expect(results, findsOneWidget);expect(tester.getRect(results).height, greaterThan(140));expect(tester.getRect(results).width, tester.getRect(field).width);- expect(- find.byKey(const ValueKey('swarm-search-preview')),- findsNothing,- );- await tester.ensureVisible(- find.byKey(const ValueKey('swarm-search-new-agent')),- );+ await tester.ensureVisible(create);+ expect(create.hitTestable(), findsOneWidget);+ await tester.tap(create);+ await tester.pumpAndSettle();+ expect(find.byType(AlertDialog), findsOneWidget);+ expect(results, findsNothing);+ expect(tester.takeException(), isNull);+ await tester.sendKeyEvent(LogicalKeyboardKey.escape);+ await tester.pumpAndSettle();+ expect(find.byType(AlertDialog), findsNothing);+ expect(tester.widget<TextField>(field).focusNode!.hasFocus, isFalse);+ await tester.ensureVisible(device);+ await tester.pumpAndSettle();+ expect(device.hitTestable(), findsOneWidget);expect(tester.takeException(), isNull);await tester.pumpWidget(const SizedBox());app.dispose();diff --git a/docs/harness-agent-first-tabs.md b/docs/harness-agent-first-tabs.mdindex e45ae2a52..6169b25eb 100644--- a/docs/harness-agent-first-tabs.md+++ b/docs/harness-agent-first-tabs.md@@ -30,6 +30,8 @@ plus. Explicit **New Harness** and **Open Harness** buttons sit on the right.There is no floating +. Cmd-N opens creation directly; Cmd-O opens existing-worksearch. Each has its own popup, with no creation CTA or “or” divider in search,no Back to Search button in creation, and no stacked dialog on dismissal.+The Flutter titlebar uses the same compact accent/secondary button treatment as+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; Escapeand clicking outside dismiss it. Launch-in-progress and uncertain-outcome statesretain their existing safeguards and recovery actions.@@ -50,7 +52,7 @@ split position; dismissing creation still returns directly to the terminal.Native New Harness and Search Commands actions use the focused search field'sactions too. Command search stays in that field, and creation closes its dropdownbefore opening the form. Native actions wait for the destination focus tree before-handing keyboard ownership back to Flutter and preserve in-progress composition.+handing keyboard ownership back to Flutter and preserve in-progress search composition.## Tabs and menusdiff --git a/docs/harness-v2-handoff.md b/docs/harness-v2-handoff.mdindex 00667b84f..6f8e7852f 100644--- a/docs/harness-v2-handoff.md+++ b/docs/harness-v2-handoff.md@@ -1,10 +1,26 @@# Harness v2: goal, plan, and continuation handoff-**Native entry correction:** Actual AppKit `commands` and `newAgent` messages+**Current desktop regression checkpoint:** All **1,416 unit/widget checks** pass+in `/private/tmp/harness-current-full-suite-after.log`. The one optional remote+media integration placeholder is skipped without its CLI environment; that+isolated test is being checked separately. The preceding run's ten failures were+retired control/label expectations in boot, remote folders, analytics, results and+responsive entry fixtures. They now test the current UI. All seven changed files+analyze cleanly in `/private/tmp/harness-current-ui-analyze.log`.++Current start-page renders were inspected at 1280×800, 760×900, 880×560 and+600×900 with 1.7× text in `/private/tmp/harness-current-entry-captures/`.+The Flutter titlebar now matches AppKit's compact New/Open colors and retains+the app's font family. The device-link arrow is an icon instead of a font glyph.+The **33 affected keyboard/first-use/layout checks** pass in+`/private/tmp/harness-entry-visual-after.log`. These are widget renders with real+metric-compatible fonts, not native macOS or Linux qualification.++**Native entry correction:** `a64ab4e` is pushed. Actual AppKit `commands` and `newAgent` messagesbypassed the focused inline picker. Regression checks reproduced a second searchoverlay and an inline result list left underneath creation. Native actions nowuse the same focused-region callbacks as keyboard input, wait for their focus-handoff, and preserve active IME composition. The keyboard runtime fixture now+handoff, and preserve active search IME composition. The keyboard runtime fixture nowuses the current idle start page and separate dialogs. All **90 affected checks**pass in `/private/tmp/harness-native-search-after.log`; the **13 keyboard checks**also pass with explicit composition coverage in@@ -32,8 +48,8 @@ brace-style infos inunchanged `app_state.dart` lines (2264 and 2932), with no errors or warnings;see `/private/tmp/harness-current-creation-recovery-analyze.log`.The prepared Release bundle includes these changes through `581d0a4`; the console-remains locked and the running preview is unchanged. A full current-suite pass is still needed-before claiming release readiness.+remains locked and the running preview is unchanged. The full current suite is+now green; native first-use, latency and Linux-host qualification remain open.**Keyboard creation checkpoint:** `98fc760` makes New Harness immediately usablefrom the keyboard. The folder control receives focus when the dialog mounts;