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.

Unify agent search into a continuous surface

dee74674f5b867b
diff --git a/desktop/lib/screens/swarm_screen.dart b/desktop/lib/screens/swarm_screen.dart
index a3defcc9a..8d6acceb8 100644
--- a/desktop/lib/screens/swarm_screen.dart
+++ b/desktop/lib/screens/swarm_screen.dart
@@ -933,14 +933,13 @@ class _SwarmScreenState extends State<SwarmScreen> {
final commandsOnly = search.commandsOnly;
final panel = Material(
key: const ValueKey('swarm-search-results'),
- elevation: 16,
- shadowColor: Colors.black54,
- color: commandsOnly
- ? grid.AppPalette.swarmSearchSurface
- : grid.AppPalette.agentEntrySurface,
+ elevation: 10,
+ shadowColor: Colors.black38,
+ color: grid.AppPalette.swarmSearchSurface,
+ surfaceTintColor: Colors.transparent,
shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(commandsOnly ? 14 : 20),
- side: const BorderSide(color: Colors.white12),
+ borderRadius: BorderRadius.circular(commandsOnly ? 14 : 32),
+ side: BorderSide(color: Colors.white.withValues(alpha: .10)),
),
clipBehavior: Clip.antiAlias,
child: Column(
@@ -1006,13 +1005,9 @@ class _SwarmScreenState extends State<SwarmScreen> {
prominent: !commandsOnly,
hintText: commandsOnly ? null : '',
outlined: !commandsOnly,
- fillColor: commandsOnly
- ? null
- : grid.AppPalette.agentEntryField,
),
),
),
- const Divider(height: 1, color: Colors.white12),
Expanded(
child: SwarmSearchResults(
search: search,
diff --git a/desktop/lib/widgets/harness_start_page.dart b/desktop/lib/widgets/harness_start_page.dart
index d03fb3af6..287894767 100644
--- a/desktop/lib/widgets/harness_start_page.dart
+++ b/desktop/lib/widgets/harness_start_page.dart
@@ -92,16 +92,13 @@ class _HarnessStartPageState extends State<HarnessStartPage> {
child: Focus(
focusNode: _pickerFocus,
child: Material(
- color: _showResults
- ? grid.AppPalette.swarmSearchSurface
- : Colors.transparent,
- elevation: _showResults ? 12 : 0,
- shadowColor: Colors.black54,
+ color: grid.AppPalette.swarmSearchSurface,
+ surfaceTintColor: Colors.transparent,
+ elevation: _showResults ? 10 : 2,
+ shadowColor: Colors.black38,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(32),
- side: _showResults
- ? const BorderSide(color: Colors.white24)
- : BorderSide.none,
+ side: BorderSide(color: Colors.white.withValues(alpha: .10)),
),
clipBehavior: Clip.antiAlias,
child: SwarmSearchKeys(
@@ -135,16 +132,18 @@ class _HarnessStartPageState extends State<HarnessStartPage> {
),
),
if (_showResults) ...[
- const Divider(height: 1, color: Colors.white12),
Flexible(
- child: SizedBox(
- height: 480,
- child: SwarmSearchResults(
- key: const ValueKey('harness-start-results'),
- search: _search!,
- sideBySideMinWidth: 700,
- onChoose: _choose,
- onRefocus: _focus.requestFocus,
+ child: Padding(
+ padding: const EdgeInsets.only(bottom: 12),
+ child: SizedBox(
+ height: 480,
+ child: SwarmSearchResults(
+ key: const ValueKey('harness-start-results'),
+ search: _search!,
+ sideBySideMinWidth: 700,
+ onChoose: _choose,
+ onRefocus: _focus.requestFocus,
+ ),
),
),
),
diff --git a/desktop/lib/widgets/swarm_search_input.dart b/desktop/lib/widgets/swarm_search_input.dart
index b2a67d91f..f17528fc9 100644
--- a/desktop/lib/widgets/swarm_search_input.dart
+++ b/desktop/lib/widgets/swarm_search_input.dart
@@ -63,9 +63,9 @@ class SwarmSearchInput extends StatelessWidget {
: 12,
),
),
- borderSide: BorderSide(
- color: open && !outlined ? Colors.transparent : Colors.white24,
- ),
+ borderSide: outlined
+ ? BorderSide(color: Colors.white.withValues(alpha: .10))
+ : BorderSide.none,
);
return TextField(
key: inputKey,
@@ -104,11 +104,7 @@ class SwarmSearchInput extends StatelessWidget {
)
: null,
filled: true,
- fillColor:
- fillColor ??
- (open
- ? grid.AppPalette.swarmSearchSurface
- : const Color(0xa6111521)),
+ fillColor: fillColor ?? grid.AppPalette.swarmSearchSurface,
contentPadding: EdgeInsets.symmetric(
horizontal: 18,
vertical: prominent ? 22 : 18,
diff --git a/desktop/lib/widgets/swarm_search_preview.dart b/desktop/lib/widgets/swarm_search_preview.dart
index cc9bde752..68add7ba1 100644
--- a/desktop/lib/widgets/swarm_search_preview.dart
+++ b/desktop/lib/widgets/swarm_search_preview.dart
@@ -166,76 +166,67 @@ class _SwarmSearchPreviewState extends State<SwarmSearchPreview> {
return Semantics(
container: true,
label: 'Agent preview',
- child: ColoredBox(
- color: Colors.black.withValues(alpha: .10),
- child: Scrollbar(
- controller: _scroll,
- child: agents.length != 1
- ? ListView.builder(
- key: ValueKey('preview-content:${row.id}'),
- controller: _scroll,
- padding: EdgeInsets.all(widget.compactHeader ? 16 : 24),
- scrollCacheExtent: const ScrollCacheExtent.pixels(120),
- itemCount: agents.length + 1,
- itemBuilder: (context, index) => index == 0
- ? Padding(
- padding: const EdgeInsets.only(bottom: 24),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- row.title,
- style: const TextStyle(
- fontSize: 20,
- fontWeight: FontWeight.w600,
- ),
+ child: Scrollbar(
+ controller: _scroll,
+ child: agents.length != 1
+ ? ListView.builder(
+ key: ValueKey('preview-content:${row.id}'),
+ controller: _scroll,
+ padding: EdgeInsets.all(widget.compactHeader ? 16 : 24),
+ scrollCacheExtent: const ScrollCacheExtent.pixels(120),
+ itemCount: agents.length + 1,
+ itemBuilder: (context, index) => index == 0
+ ? Padding(
+ padding: const EdgeInsets.only(bottom: 24),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ row.title,
+ style: const TextStyle(
+ fontSize: 20,
+ fontWeight: FontWeight.w600,
),
- const SizedBox(height: 6),
- Text(row.detail, style: _muted),
- if (agents.isEmpty)
- const Padding(
- padding: EdgeInsets.only(top: 24),
- child: Text(
- 'No recent session text available.',
- style: _muted,
- ),
+ ),
+ const SizedBox(height: 6),
+ Text(row.detail, style: _muted),
+ if (agents.isEmpty)
+ const Padding(
+ padding: EdgeInsets.only(top: 24),
+ child: Text(
+ 'No recent session text available.',
+ style: _muted,
),
- ],
- ),
- )
- : Padding(
- padding: EdgeInsets.only(top: index > 1 ? 20 : 0),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- _AgentPreview(
- app: app,
- item: agents[index - 1],
- compact: true,
),
- if (index < agents.length)
- const Padding(
- padding: EdgeInsets.only(top: 20),
- child: Divider(
- height: 1,
- color: Colors.white10,
- ),
- ),
- ],
- ),
+ ],
),
- )
- : SingleChildScrollView(
- key: ValueKey('preview-content:${row.id}'),
- controller: _scroll,
- padding: EdgeInsets.all(widget.compactHeader ? 16 : 24),
- child: _AgentPreview(
- app: app,
- item: agents.single,
- dense: widget.compactHeader,
- ),
+ )
+ : Padding(
+ padding: EdgeInsets.only(top: index > 1 ? 20 : 0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ _AgentPreview(
+ app: app,
+ item: agents[index - 1],
+ compact: true,
+ ),
+ if (index < agents.length)
+ const SizedBox(height: 20),
+ ],
+ ),
+ ),
+ )
+ : SingleChildScrollView(
+ key: ValueKey('preview-content:${row.id}'),
+ controller: _scroll,
+ padding: EdgeInsets.all(widget.compactHeader ? 16 : 24),
+ child: _AgentPreview(
+ app: app,
+ item: agents.single,
+ dense: widget.compactHeader,
),
- ),
+ ),
),
);
},
@@ -468,8 +459,7 @@ class _AgentPreview extends StatelessWidget {
padding: EdgeInsets.only(bottom: 24),
child: Text('No recent session text available.', style: _muted),
),
- const Divider(height: 1, color: Colors.white10),
- const SizedBox(height: 16),
+ const SizedBox(height: 8),
if (project?.cwd case final cwd?) Text(cwd, style: _muted),
if (project?.branch case final branch?)
Padding(
diff --git a/desktop/lib/widgets/swarm_switcher.dart b/desktop/lib/widgets/swarm_switcher.dart
index 28d1575e1..f179f3d75 100644
--- a/desktop/lib/widgets/swarm_switcher.dart
+++ b/desktop/lib/widgets/swarm_switcher.dart
@@ -391,7 +391,7 @@ class _SwarmSearchResultsState extends State<SwarmSearchResults> {
final sideBySide = constraints.maxWidth >= widget.sideBySideMinWidth;
final compactAction =
(sideBySide ? constraints.maxWidth / 2 : constraints.maxWidth) <
- 380;
+ 380 * scale.scale(14) / 14;
final geometry = (constraints.biggest, _rowHeight);
if (_geometry != geometry) {
_geometry = geometry;
@@ -461,10 +461,10 @@ class _SwarmSearchResultsState extends State<SwarmSearchResults> {
selectedColor: Colors.white,
hoverColor: Colors.transparent,
selectedTileColor: Colors.white.withValues(
- alpha: .075,
+ alpha: .055,
),
shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(6),
+ borderRadius: BorderRadius.circular(12),
),
contentPadding: const EdgeInsets.symmetric(
horizontal: 12,
@@ -570,7 +570,6 @@ class _SwarmSearchResultsState extends State<SwarmSearchResults> {
),
),
if (unavailable) ...[
- const Divider(height: 1, color: Colors.white12),
SizedBox(
height: 48,
child: Padding(
@@ -616,14 +615,14 @@ class _SwarmSearchResultsState extends State<SwarmSearchResults> {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Expanded(flex: 5, child: results),
- const VerticalDivider(width: 1, color: Colors.white12),
+ const SizedBox(width: 8),
Expanded(flex: 5, child: preview),
],
)
: Column(
children: [
Expanded(flex: 5, child: results),
- const Divider(height: 1, color: Colors.white12),
+ const SizedBox(height: 8),
Expanded(flex: 6, child: preview),
],
);
diff --git a/desktop/test/entry_surfaces_render_test.dart b/desktop/test/entry_surfaces_render_test.dart
index 8e9f7691e..121cb0557 100644
--- a/desktop/test/entry_surfaces_render_test.dart
+++ b/desktop/test/entry_surfaces_render_test.dart
@@ -65,6 +65,12 @@ void main() {
rootBundle.load('packages/lucide_icons_flutter/assets/lucide.ttf'),
))
.load();
+ await (FontLoader('packages/lucide_icons_flutter/Lucide300')..addFont(
+ rootBundle.load(
+ 'packages/lucide_icons_flutter/assets/build_font/LucideVariable-w300.ttf',
+ ),
+ ))
+ .load();
await (FontLoader('packages/cupertino_icons/CupertinoIcons')..addFont(
rootBundle.load('packages/cupertino_icons/assets/CupertinoIcons.ttf'),
))
@@ -78,6 +84,9 @@ void main() {
tester.view.devicePixelRatio = 1;
tester.view.physicalSize = const Size(880, 560);
addTearDown(tester.view.reset);
+ final previousShadows = debugDisableShadows;
+ debugDisableShadows = false;
+ addTearDown(() => debugDisableShadows = previousShadows);
const nativeTabs = MethodChannel('harness/swarm_tabs');
tester.binding.defaultBinaryMessenger.setMockMethodCallHandler(
nativeTabs,
@@ -165,6 +174,7 @@ void main() {
];
tester.view.physicalSize = const Size(1280, 800);
await tester.pumpAndSettle();
+ await capture('inline-wide');
for (var i = 0; i < 5; i++) {
await tester.sendKeyEvent(LogicalKeyboardKey.arrowDown);
await tester.pump();
@@ -194,6 +204,7 @@ void main() {
await chord(tester, LogicalKeyboardKey.keyN);
await tester.pumpAndSettle();
await capture('new');
+ debugDisableShadows = previousShadows;
expect(tester.takeException(), isNull);
for (final label in ['Codex', 'Claude Code', 'Cursor']) {
if (tester
diff --git a/docs/harness-agent-first-tabs.md b/docs/harness-agent-first-tabs.md
index c0c7c7eaf..d807a5f61 100644
--- a/docs/harness-agent-first-tabs.md
+++ b/docs/harness-agent-first-tabs.md
@@ -58,13 +58,16 @@ and titlebar. Find fields keep the magnifying glass for search.
search field and **Open Agent / New Agent** buttons below it. The field is capped
at 1120 logical pixels, has a 64-pixel minimum height and shows **Find an agent**.
Its position, width and 32-pixel outer corners stay fixed when results open.
+The input, results and preview share one palette surface in both states, with
+a subtle outer edge and shadow. Soft rounded selection and whitespace separate
+content without internal dividing lines or a darker preview column.
Results and preview share the space above the fixed device footer. Typing,
clicking or pressing an arrow opens search; focus alone does not build its catalog.
Escape closes results and retains the query. The default background matches the selected tab, and the device
product strip stays above the customization button. New without a linked machine opens machine linking.
-Open Agent has a large **Find an agent** heading, a blank rounded input and an
-almost-black surface over a 90% black canvas veil. Results appear immediately;
+Open Agent has a large **Find an agent** heading, a blank rounded input and the
+same palette surface over a 90% black canvas veil. Results appear immediately;
arrows select and Enter or a row click opens the agent. There is no footer
button or New Agent form. Results and preview sit side by side from 700 logical
pixels; narrower windows stack them. Both scroll independently. Hover updates
diff --git a/docs/harness-v2-handoff.md b/docs/harness-v2-handoff.md
index 8fc3aac27..049b8de7d 100644
--- a/docs/harness-v2-handoff.md
+++ b/docs/harness-v2-handoff.md
@@ -34,7 +34,18 @@ user for a benchmark window.
## Current product contract
-### Latest: focused New Agent form
+### Latest: continuous search surface
+
+The compact New Harness input and expanded results use the same palette fill,
+32-pixel outer corners and a subtle edge. Internal search/preview dividers and
+the darker preview fill are removed; whitespace and soft rounded selection
+provide structure. Open Agent uses the same surface while retaining its heading
+and blank input. Keyboard, focus, preview and entry checks pass (64 tests) in
+`/private/tmp/harness-search-surface-tests.log`; captures are in
+`/private/tmp/harness-search-surface-captures` and
+`/private/tmp/harness-search-surface-previews`.
+
+### Focused New Agent form — pushed 2cdfa88
The creation dialog is now 600 pixels wide with compact Agent choices, Project
tabs, a prominent folder/repository control, and a quiet Run on machine row.