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.

Simplify the Harness start page and separate creation

dee2fcd1f4bb1a9
diff --git a/desktop/lib/widgets/swarm_inline_search.dart b/desktop/lib/widgets/swarm_inline_search.dart
index 1b78bf50d..25f25c6e4 100644
--- a/desktop/lib/widgets/swarm_inline_search.dart
+++ b/desktop/lib/widgets/swarm_inline_search.dart
@@ -182,7 +182,7 @@ class _SwarmInlineSearchState extends State<SwarmInlineSearch> {
);
},
child: SwarmSearchInput(
- hintText: 'Find a harness…',
+ hintText: 'Find a harness',
rounded: true,
inputKey: const ValueKey('swarm-welcome-search-input'),
controller: _text,
diff --git a/desktop/lib/widgets/swarm_welcome.dart b/desktop/lib/widgets/swarm_welcome.dart
index d6b977daf..6a27f211d 100644
--- a/desktop/lib/widgets/swarm_welcome.dart
+++ b/desktop/lib/widgets/swarm_welcome.dart
@@ -97,7 +97,7 @@ class _SwarmWelcomeState extends State<SwarmWelcome> {
icon: Icon(canCreate ? Icons.add : Icons.computer_outlined, size: 20),
label: Text(
canCreate
- ? 'Create harness'
+ ? 'Create a new harness'
: finding
? 'Finding computers…'
: needsLink
@@ -105,8 +105,8 @@ class _SwarmWelcomeState extends State<SwarmWelcome> {
: 'Reconnect',
),
style: FilledButton.styleFrom(
- minimumSize: const Size(180, 56),
- padding: const EdgeInsets.symmetric(horizontal: 22, vertical: 18),
+ minimumSize: const Size(220, 52),
+ padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
backgroundColor: grid.AppPalette.swarmAccent,
foregroundColor: grid.AppPalette.swarmTabBar,
textStyle: TextStyle(
@@ -139,7 +139,7 @@ class _SwarmWelcomeState extends State<SwarmWelcome> {
child: Padding(
padding: EdgeInsets.fromLTRB(
padding,
- (constraints.maxHeight * .16).clamp(40.0, 132.0),
+ (constraints.maxHeight * .12).clamp(32.0, 100.0),
padding,
40,
),
@@ -151,7 +151,7 @@ class _SwarmWelcomeState extends State<SwarmWelcome> {
mainAxisSize: MainAxisSize.min,
children: [
const Text(
- 'New Harness',
+ 'Harness',
key: ValueKey('welcome-title'),
textAlign: TextAlign.center,
style: TextStyle(
@@ -163,51 +163,9 @@ class _SwarmWelcomeState extends State<SwarmWelcome> {
),
),
const SizedBox(height: 32),
- LayoutBuilder(
- builder: (context, size) {
- if (size.maxWidth < 700 * textScale) {
- return Column(
- children: [
- widget.searchField,
- const SizedBox(height: 16),
- create,
- ],
- );
- }
- return Row(
- children: [
- Expanded(child: widget.searchField),
- const SizedBox(width: 14),
- create,
- ],
- );
- },
- ),
- if (!canCreate && !finding) ...[
- const SizedBox(height: 14),
- Text(
- needsLink
- ? 'Connect a computer to create your first harness.'
- : 'Your computers are offline. Reconnect to start something new.',
- textAlign: TextAlign.center,
- style: const TextStyle(
- fontSize: 13,
- height: 1.5,
- color: Colors.white60,
- ),
- ),
- ],
+ widget.searchField,
if (recent.isNotEmpty && widget.onRecent != null) ...[
- const SizedBox(height: 32),
- const Text(
- 'Recent harnesses',
- style: TextStyle(
- fontSize: 12,
- fontWeight: FontWeight.w500,
- color: Colors.white60,
- ),
- ),
- const SizedBox(height: 16),
+ const SizedBox(height: 24),
Wrap(
alignment: WrapAlignment.center,
spacing: 12,
@@ -225,6 +183,42 @@ class _SwarmWelcomeState extends State<SwarmWelcome> {
],
),
],
+ const SizedBox(height: 32),
+ const SizedBox(
+ width: 220,
+ child: Row(
+ children: [
+ Expanded(child: Divider(color: Colors.white12)),
+ Padding(
+ padding: EdgeInsets.symmetric(horizontal: 16),
+ child: Text(
+ 'or',
+ style: TextStyle(
+ fontSize: 12,
+ color: Colors.white38,
+ ),
+ ),
+ ),
+ Expanded(child: Divider(color: Colors.white12)),
+ ],
+ ),
+ ),
+ const SizedBox(height: 20),
+ create,
+ if (!canCreate && !finding) ...[
+ const SizedBox(height: 14),
+ Text(
+ needsLink
+ ? 'Connect a computer to create your first harness.'
+ : 'Your computers are offline. Reconnect to start something new.',
+ textAlign: TextAlign.center,
+ style: const TextStyle(
+ fontSize: 13,
+ height: 1.5,
+ color: Colors.white60,
+ ),
+ ),
+ ],
],
),
),
@@ -272,6 +266,14 @@ class _RecentHarness extends StatelessWidget {
child: EngineMark(engine: entry.engine, size: 28),
),
const SizedBox(height: 12),
+ Text(
+ entry.machineLabel,
+ textAlign: TextAlign.center,
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ style: const TextStyle(fontSize: 11, color: Colors.white54),
+ ),
+ const SizedBox(height: 4),
Text(
entry.title,
textAlign: TextAlign.center,
@@ -283,14 +285,6 @@ class _RecentHarness extends StatelessWidget {
color: Colors.white,
),
),
- const SizedBox(height: 4),
- Text(
- entry.machineLabel,
- textAlign: TextAlign.center,
- maxLines: 1,
- overflow: TextOverflow.ellipsis,
- style: const TextStyle(fontSize: 11, color: Colors.white54),
- ),
],
),
),
diff --git a/desktop/test/first_workspace_test.dart b/desktop/test/first_workspace_test.dart
index 7960f010e..ac90decff 100644
--- a/desktop/test/first_workspace_test.dart
+++ b/desktop/test/first_workspace_test.dart
@@ -117,8 +117,8 @@ void main() {
),
);
await mount(tester, app, projects: projects);
- expect(find.text('Find a harness…'), findsOneWidget);
- expect(find.text('Create harness'), findsOneWidget);
+ expect(find.text('Find a harness'), findsOneWidget);
+ expect(find.text('Create a new harness'), findsOneWidget);
expect(
find.byKey(const ValueKey('swarm-welcome-search-input')),
findsOneWidget,
@@ -135,7 +135,7 @@ void main() {
},
);
- testWidgets('first discovery enables the new-agent action beside search', (
+ testWidgets('first discovery enables the new-agent action below search', (
tester,
) async {
final app = _FirstUseApp();
@@ -150,11 +150,15 @@ void main() {
await tester.sendKeyEvent(LogicalKeyboardKey.enter);
await tester.pump();
expect(picker.opened, 0);
+ // Enter opened search. Dismiss its results before choosing the separate
+ // creation action beneath the search/recent-work area.
+ await tester.sendKeyEvent(LogicalKeyboardKey.escape);
+ await tester.pump();
app.machineStates['m'] = local;
app.machinesLoading = false;
app.dismissError();
await tester.pump();
- expect(find.text('Create harness'), findsOneWidget);
+ expect(find.text('Create a new harness'), findsOneWidget);
await tester.tap(find.byKey(const ValueKey('swarm-start-primary')));
await tester.pump();
expect(picker.opened, 1);
@@ -228,7 +232,7 @@ void main() {
FileSelectorPlatform.instance = picker;
addTearDown(() => FileSelectorPlatform.instance = oldPicker);
await mount(tester, app);
- expect(find.text('Create harness'), findsOneWidget);
+ expect(find.text('Create a new harness'), findsOneWidget);
expect(find.text('Machines'), findsNothing);
await tester.tap(find.byKey(const ValueKey('swarm-start-primary')));
await tester.pump();
@@ -644,7 +648,7 @@ void main() {
];
await mount(tester, app);
expect(app.panes, isEmpty);
- expect(find.text('Find a harness…'), findsOneWidget);
+ expect(find.text('Find a harness'), findsOneWidget);
expect(find.text('Go to an agent'), findsNothing);
await tester.enterText(
find.byKey(const ValueKey('swarm-welcome-search-input')),
@@ -658,8 +662,8 @@ void main() {
final pane = app.panes.single;
app.newSwarm();
await tester.pump();
- expect(find.text('Find a harness…'), findsOneWidget);
- expect(find.text('Create harness'), findsOneWidget);
+ expect(find.text('Find a harness'), findsOneWidget);
+ expect(find.text('Create a new harness'), findsOneWidget);
expect(find.text('Go to an agent'), findsNothing);
await tester.enterText(
find.byKey(const ValueKey('swarm-welcome-search-input')),
@@ -675,7 +679,7 @@ void main() {
app.newSwarm();
await tester.pump();
expect(app.closedHistory, isNotEmpty);
- expect(find.text('Find a harness…'), findsOneWidget);
+ expect(find.text('Find a harness'), findsOneWidget);
expect(app.launches, isEmpty);
expect(find.text('Go to an agent'), findsNothing);
expect(tester.takeException(), isNull);
@@ -693,9 +697,9 @@ void main() {
addTearDown(() => FileSelectorPlatform.instance = oldPicker);
await mount(tester, app);
- await tester.tap(find.text('Create harness'));
+ await tester.tap(find.text('Create a new harness'));
await tester.pump();
- await tester.tap(find.text('Create harness'));
+ await tester.tap(find.text('Create a new harness'));
await tester.pump();
expect(picker.opened, 1);
expect(app.probes, 1);
@@ -746,7 +750,7 @@ void main() {
FileSelectorPlatform.instance = picker;
addTearDown(() => FileSelectorPlatform.instance = oldPicker);
await mount(tester, app);
- await tester.tap(find.text('Create harness'));
+ await tester.tap(find.text('Create a new harness'));
await tester.pump();
switch (change) {
case 'swarm':
diff --git a/desktop/test/welcome_entry_layout_test.dart b/desktop/test/welcome_entry_layout_test.dart
index 8bd1cb469..3dc148deb 100644
--- a/desktop/test/welcome_entry_layout_test.dart
+++ b/desktop/test/welcome_entry_layout_test.dart
@@ -71,9 +71,11 @@ void main() {
await tester.pumpAndSettle();
final field = find.byKey(const ValueKey('swarm-welcome-search-input'));
final create = find.byKey(const ValueKey('swarm-start-primary'));
- expect(find.text('Find a harness…'), findsOneWidget);
- expect(find.text('Create harness'), findsOneWidget);
- expect(find.text('Recent harnesses'), findsOneWidget);
+ expect(find.text('Find a harness'), findsOneWidget);
+ expect(find.text('Create a new harness'), findsOneWidget);
+ expect(find.text('Recent harnesses'), findsNothing);
+ expect(find.text('Harness'), findsOneWidget);
+ expect(find.text('or'), findsOneWidget);
expect(find.byType(Checkbox), findsNothing);
expect(
find.byKey(const ValueKey('swarm-add-agent-button')),
@@ -81,13 +83,13 @@ void main() {
);
final findRect = tester.getRect(field);
final createRect = tester.getRect(create);
- if (width == 1280 || width == 880) {
- expect(createRect.left, greaterThan(findRect.right));
- expect(createRect.center.dy, closeTo(findRect.center.dy, 1));
- } else {
- expect(createRect.top, greaterThan(findRect.bottom));
+ expect(createRect.top, greaterThan(findRect.bottom));
+ expect(findRect.center.dx, closeTo(width / 2, 1));
+ expect(findRect.width, closeTo((width - 96).clamp(0, 920), 1));
+ if (scale == 1) {
+ expect(create.hitTestable(), findsOneWidget);
+ expect(createRect.bottom, lessThanOrEqualTo(height));
}
- expect(create.hitTestable(), findsOneWidget);
expect(tester.takeException(), isNull);
final output = Platform.environment['HARNESS_WELCOME_CAPTURE_DIR'];
if (output != null) {
diff --git a/docs/harness-agent-first-tabs.md b/docs/harness-agent-first-tabs.md
index 572f85e41..c7cdf6f81 100644
--- a/docs/harness-agent-first-tabs.md
+++ b/docs/harness-agent-first-tabs.md
@@ -8,9 +8,12 @@ proposals in the progress log.
## New Harness
The tab-bar plus and Cmd-T open **New Harness**. First launch and every empty tab
-use the same centered page: a **New Harness** heading, a **Find a harness…** search
-field, a prominent **Create harness** button, and up to six recent harnesses below.
-Search and Create sit together on desktop and stack on narrow or large-text layouts.
+use the same centered page: a **Harness** heading and a full-width **Find a harness**
+search field. Up to six recent shortcuts sit underneath without a section label;
+each shows its machine above its session name. After some space, a quiet **or**
+divider separates existing work from the centered **Create a new harness** button.
+The page scrolls when a narrow window or large text needs more room.
+
Recent shortcuts use existing navigation history, with open/restored sessions as
fallbacks. They are deduplicated by machine and agent, even across several tabs.
@@ -24,7 +27,7 @@ creation recovery remain available.
**Add Agent** and split right/down use the same single-choice search and prominent
**Create Agent** button. Canceling creation returns to the original query, text
selection, highlighted row and split target. Success opens the agent directly.
-The new-tab page calls its creation entry **Create harness**; the existing form
+The new-tab page calls its creation entry **Create a new harness**; the existing form
and pane operations still use agent terminology.
There is no Navigate action, compass button, or Cmd-P directory. Command search
diff --git a/docs/harness-v2-handoff.md b/docs/harness-v2-handoff.md
index 1f293965d..afdd16f94 100644
--- a/docs/harness-v2-handoff.md
+++ b/docs/harness-v2-handoff.md
@@ -1,8 +1,10 @@
# Harness v2: goal, plan, and continuation handoff
**Latest UI direction:** [Harness entry and pane controls](harness-agent-first-tabs.md)
-is the current contract. **New Harness** is a centered search with recent harnesses
-and a prominent creation button. Pick one result and open it immediately; multi-select
+is the current contract. The **New Harness** tab shows a centered **Harness**
+heading, a full-width **Find a harness** field and unlabeled recent shortcuts
+(machine above session name). An **or** divider leads to **Create a new harness**
+below. Pick one result and open it immediately; multi-select
is removed. **File** replaces Agent in the macOS menu, and **Machines** follows Models.
The latest header keeps icon/name left, folder/branch/machine right, swapping the
right side for muted actions on hover. **Cmd-1…Cmd-9** select tabs in visual order;