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
Keep search result focus within the picker keyboard flow
dee0c240ddbbadf
diff --git a/desktop/lib/screens/swarm_screen.dart b/desktop/lib/screens/swarm_screen.dartindex 79da65ca1..ea9953652 100644--- a/desktop/lib/screens/swarm_screen.dart+++ b/desktop/lib/screens/swarm_screen.dart@@ -868,78 +868,84 @@ class _SwarmScreenState extends State<SwarmScreen> {final commandsOnly = search.commandsOnly;return KeymapProvider(keymap: _keymap,- child: LayoutBuilder(- builder: (context, constraints) => Stack(- children: [- Positioned.fill(- child: GestureDetector(- behavior: HitTestBehavior.opaque,- onTap: _dismissSearch,- child: const ColoredBox(color: kDialogVeilTint),+ child: SwarmSearchKeys(+ search: search,+ editing: _searchText,+ onChoose: _chooseSearch,+ onClose: _dismissSearch,+ onNewAgent: () => _runShortcut('agent.new'),+ onRefocus: _focusSearch,+ child: LayoutBuilder(+ builder: (context, constraints) => Stack(+ children: [+ Positioned.fill(+ child: GestureDetector(+ behavior: HitTestBehavior.opaque,+ onTap: _dismissSearch,+ child: const ColoredBox(color: kDialogVeilTint),+ ),),- ),- Align(- alignment: const Alignment(0, -0.12),- child: SizedBox(- width: (constraints.maxWidth - 64).clamp(280.0, 720.0),- height: (constraints.maxHeight - 96).clamp(220.0, 540.0),- child: Column(- children: [- Expanded(- child: Material(- key: const ValueKey('swarm-search-results'),- elevation: 16,- shadowColor: Colors.black54,- color: grid.AppPalette.swarmSearchSurface,- shape: RoundedRectangleBorder(- borderRadius: BorderRadius.circular(12),- side: const BorderSide(color: Colors.white24),- ),- clipBehavior: Clip.antiAlias,- child: Column(- children: [- if (commandsOnly)- const Padding(- padding: EdgeInsets.fromLTRB(20, 16, 20, 12),- child: Align(- alignment: Alignment.centerLeft,- child: Text(- 'Commands',- style: TextStyle(- fontSize: 16,- fontWeight: FontWeight.w600,+ Align(+ alignment: const Alignment(0, -0.12),+ child: SizedBox(+ width: (constraints.maxWidth - 64).clamp(280.0, 720.0),+ height: (constraints.maxHeight - 96).clamp(220.0, 540.0),+ child: Column(+ children: [+ Expanded(+ child: Material(+ key: const ValueKey('swarm-search-results'),+ elevation: 16,+ shadowColor: Colors.black54,+ color: grid.AppPalette.swarmSearchSurface,+ shape: RoundedRectangleBorder(+ borderRadius: BorderRadius.circular(12),+ side: const BorderSide(color: Colors.white24),+ ),+ clipBehavior: Clip.antiAlias,+ child: Column(+ children: [+ if (commandsOnly)+ const Padding(+ padding: EdgeInsets.fromLTRB(20, 16, 20, 12),+ child: Align(+ alignment: Alignment.centerLeft,+ child: Text(+ 'Commands',+ style: TextStyle(+ fontSize: 16,+ fontWeight: FontWeight.w600,+ ),),),),- ),- SwarmSearchInput(- inputKey: const ValueKey('swarm-search-input'),- controller: _searchText,- focusNode: _searchFocus,- search: search,- onChoose: _chooseSearch,- onClose: _dismissSearch,- onChanged: search.setQuery,- showClose: _canDismissSearch || commandsOnly,- onNewAgent: () => _runShortcut('agent.new'),- ),- const Divider(height: 1, color: Colors.white12),- Expanded(- child: SwarmSearchResults(+ SwarmSearchInput(+ inputKey: const ValueKey('swarm-search-input'),+ controller: _searchText,+ focusNode: _searchFocus,search: search,- onChoose: _chooseSearch,- onRefocus: _focusSearch,+ onClose: _dismissSearch,+ onChanged: search.setQuery,+ showClose: _canDismissSearch || commandsOnly,),- ),- ],+ const Divider(height: 1, color: Colors.white12),+ Expanded(+ child: SwarmSearchResults(+ search: search,+ onChoose: _chooseSearch,+ onRefocus: _focusSearch,+ ),+ ),+ ],+ ),),),- ),- ],+ ],+ ),),),- ),- ],+ ],+ ),),),);@@ -1485,10 +1491,8 @@ class _SwarmScreenState extends State<SwarmScreen> {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,- ),+ textStyle: Theme.of(context).textTheme.labelLarge+ ?.copyWith(fontSize: 12, fontWeight: FontWeight.w500),backgroundColor: create? grid.AppPalette.swarmAccent: grid.AppPalette.swarmSearchSurface,diff --git a/desktop/lib/widgets/harness_start_page.dart b/desktop/lib/widgets/harness_start_page.dartindex 5b916eab0..16306d30e 100644--- a/desktop/lib/widgets/harness_start_page.dart+++ b/desktop/lib/widgets/harness_start_page.dart@@ -26,6 +26,10 @@ class HarnessStartPage extends StatefulWidget {class _HarnessStartPageState extends State<HarnessStartPage> {final _query = TextEditingController();final _focus = FocusNode(debugLabel: 'Start page search');+ final _pickerFocus = FocusNode(+ debugLabel: 'Start page picker',+ canRequestFocus: false,+ );final _searchGroup = Object();SwarmSearchController? _search;SwarmSearchDraft? _draft;@@ -52,7 +56,7 @@ class _HarnessStartPageState extends State<HarnessStartPage> {setState(() => _search = null);search.dispose();}- _focus.unfocus();+ _pickerFocus.unfocus();}void _choose(SwarmSearchSelection selection) {@@ -70,6 +74,7 @@ class _HarnessStartPageState extends State<HarnessStartPage> {_search?.dispose();_query.dispose();_focus.dispose();+ _pickerFocus.dispose();super.dispose();}@@ -101,59 +106,73 @@ class _HarnessStartPageState extends State<HarnessStartPage> {const SizedBox(height: 32),TextFieldTapRegion(groupId: _searchGroup,- child: Material(- 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,- ),- clipBehavior: Clip.antiAlias,- child: Column(- children: [- Semantics(- label: 'Find a harness',- child: SwarmSearchInput(- inputKey: const ValueKey('harness-start-search'),- controller: _query,- focusNode: _focus,- search: _search,- onChoose: _choose,- onClose: _close,- onChanged: (_) => _open(),- onOpen: _open,- onNewAgent: _new,- onTapOutside: _close,- groupId: _searchGroup,- autofocus: false,- showClose: _showResults,- hintText: '',- rounded: true,- ),+ 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,),- if (_showResults) ...[- const Divider(height: 1, color: Colors.white12),- SizedBox(- height: (constraints.maxHeight * 0.4).clamp(- 168,- 336,- ),- child: SwarmSearchResults(- key: const ValueKey('harness-start-results'),- search: _search!,- onChoose: _choose,- onRefocus: _focus.requestFocus,+ 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',+ ),+ 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,+ ),+ child: SwarmSearchResults(+ key: const ValueKey(+ 'harness-start-results',+ ),+ search: _search!,+ onChoose: _choose,+ onRefocus: _focus.requestFocus,+ ),+ ),+ ],+ ],+ ),+ ),),),),diff --git a/desktop/lib/widgets/swarm_search_input.dart b/desktop/lib/widgets/swarm_search_input.dartindex 8ceb35358..2440add22 100644--- a/desktop/lib/widgets/swarm_search_input.dart+++ b/desktop/lib/widgets/swarm_search_input.dart@@ -2,8 +2,6 @@ import 'package:flutter/material.dart';import '../shared/theme/app_theme.dart' as grid;import '../state/swarm_search.dart';-import '../state/swarm_navigation.dart';-import 'swarm_switcher.dart';/// The shared input for the start page, Open Harness and split searches./// Flutter owns the caret and result navigation; native chrome only opens it.@@ -14,11 +12,9 @@ class SwarmSearchInput extends StatelessWidget {required this.controller,required this.focusNode,required this.search,- required this.onChoose,required this.onClose,required this.onChanged,this.onOpen,- this.onNewAgent,this.groupId,this.onTapOutside,this.showClose = false,@@ -31,11 +27,9 @@ class SwarmSearchInput extends StatelessWidget {final TextEditingController controller;final FocusNode focusNode;final SwarmSearchController? search;- final ValueChanged<SwarmSearchSelection> onChoose;final VoidCallback onClose;final ValueChanged<String> onChanged;final VoidCallback? onOpen;- final VoidCallback? onNewAgent;final Object? groupId;final VoidCallback? onTapOutside;final bool showClose, autofocus;@@ -65,62 +59,54 @@ class SwarmSearchInput extends StatelessWidget {),borderSide: BorderSide(color: open ? Colors.transparent : Colors.white24),);- return SwarmSearchKeys(- search: search,- editing: controller,- onChoose: onChoose,- onClose: onClose,- onOpen: onOpen,- onNewAgent: onNewAgent,- child: TextField(- key: inputKey,- groupId: groupId ?? EditableText,- controller: controller,- focusNode: focusNode,- autofocus: autofocus,- onTap: onOpen,- onTapAlwaysCalled: true,- onTapOutside: onTapOutside == null ? null : (_) => onTapOutside!(),- onChanged: onChanged,- style: const TextStyle(fontSize: 16, color: Colors.white),- cursorColor: grid.AppPalette.swarmAccent,- textAlignVertical: TextAlignVertical.center,- decoration: InputDecoration(- hintText: search?.isCommandMode == true- ? search!.hint- : hintText ?? search?.hint ?? 'Find a harness',- hintStyle: const TextStyle(fontSize: 16, color: Colors.white60),- prefixIcon: const Icon(Icons.search, size: 20, color: Colors.white60),- prefixIconConstraints: const BoxConstraints(- minWidth: 52,- minHeight: 56,- ),- suffixIcon: showClose- ? Padding(- padding: const EdgeInsets.only(right: 12),- child: TextButton(- onPressed: onClose,- style: TextButton.styleFrom(- foregroundColor: Colors.white60,- minimumSize: const Size(36, 28),- ),- child: const Text('esc', style: TextStyle(fontSize: 11)),+ return TextField(+ key: inputKey,+ groupId: groupId ?? EditableText,+ controller: controller,+ focusNode: focusNode,+ autofocus: autofocus,+ onTap: onOpen,+ onTapAlwaysCalled: true,+ onTapOutside: onTapOutside == null ? null : (_) => onTapOutside!(),+ onChanged: onChanged,+ style: const TextStyle(fontSize: 16, color: Colors.white),+ cursorColor: grid.AppPalette.swarmAccent,+ textAlignVertical: TextAlignVertical.center,+ decoration: InputDecoration(+ hintText: search?.isCommandMode == true+ ? search!.hint+ : hintText ?? search?.hint ?? 'Find a harness',+ hintStyle: const TextStyle(fontSize: 16, color: Colors.white60),+ prefixIcon: const Icon(Icons.search, size: 20, color: Colors.white60),+ prefixIconConstraints: const BoxConstraints(+ minWidth: 52,+ minHeight: 56,+ ),+ suffixIcon: showClose+ ? Padding(+ padding: const EdgeInsets.only(right: 12),+ child: TextButton(+ onPressed: onClose,+ style: TextButton.styleFrom(+ foregroundColor: Colors.white60,+ minimumSize: const Size(36, 28),),- )- : null,- filled: true,- fillColor: open- ? grid.AppPalette.swarmSearchSurface- : const Color(0xa6111521),- contentPadding: const EdgeInsets.symmetric(- horizontal: 18,- vertical: 18,- ),- isDense: true,- border: border,- enabledBorder: border,- focusedBorder: border,+ child: const Text('esc', style: TextStyle(fontSize: 11)),+ ),+ )+ : null,+ filled: true,+ fillColor: open+ ? grid.AppPalette.swarmSearchSurface+ : const Color(0xa6111521),+ contentPadding: const EdgeInsets.symmetric(+ horizontal: 18,+ vertical: 18,),+ isDense: true,+ border: border,+ enabledBorder: border,+ focusedBorder: border,),);}diff --git a/desktop/lib/widgets/swarm_switcher.dart b/desktop/lib/widgets/swarm_switcher.dartindex b96132706..54e7c3309 100644--- a/desktop/lib/widgets/swarm_switcher.dart+++ b/desktop/lib/widgets/swarm_switcher.dart@@ -60,44 +60,45 @@ class _SwarmHistoryState extends State<_SwarmHistory> {height: 480,child: Padding(padding: const EdgeInsets.all(16),- child: Column(- children: [- const Row(- children: [- Text(- 'History',- style: TextStyle(fontSize: 20, fontWeight: FontWeight.w500),- ),- Spacer(),- Text(- 'This session',- style: TextStyle(fontSize: 11, color: Colors.white54),- ),- ],- ),- const SizedBox(height: 16),- SwarmSearchKeys(- search: widget.search,- editing: _query,- onChoose: _choose,- onClose: () => Navigator.pop(context),- child: SwarmSearchField(+ child: SwarmSearchKeys(+ search: widget.search,+ editing: _query,+ onChoose: _choose,+ onClose: () => Navigator.pop(context),+ onRefocus: _focus.requestFocus,+ child: Column(+ children: [+ const Row(+ children: [+ Text(+ 'History',+ style: TextStyle(fontSize: 20, fontWeight: FontWeight.w500),+ ),+ Spacer(),+ Text(+ 'This session',+ style: TextStyle(fontSize: 11, color: Colors.white54),+ ),+ ],+ ),+ const SizedBox(height: 16),+ SwarmSearchField(controller: _query,focusNode: _focus,autofocus: true,hintText: 'Search history…',onChanged: widget.search.setQuery,),- ),- const SizedBox(height: 8),- Expanded(- child: SwarmSearchResults(- search: widget.search,- onChoose: _choose,- onRefocus: _focus.requestFocus,+ const SizedBox(height: 8),+ Expanded(+ child: SwarmSearchResults(+ search: widget.search,+ onChoose: _choose,+ onRefocus: _focus.requestFocus,+ ),),- ),- ],+ ],+ ),),),),@@ -114,6 +115,7 @@ class SwarmSearchKeys extends StatelessWidget {required this.onClose,this.onOpen,this.onNewAgent,+ this.onRefocus,required this.child,});final SwarmSearchController? search;@@ -125,6 +127,7 @@ class SwarmSearchKeys extends StatelessWidget {/// The first navigation/accept key reveals them without choosing unseen work.final VoidCallback? onOpen;final VoidCallback? onNewAgent;+ final VoidCallback? onRefocus;final Widget child;@override@@ -149,6 +152,7 @@ class SwarmSearchKeys extends StatelessWidget {onOpen?.call();} else {search.move(delta);+ onRefocus?.call();}});if (KeymapTheme.of(context) != null) {@@ -173,6 +177,7 @@ class SwarmSearchKeys extends StatelessWidget {onOpen?.call();} else {search.setQuery('> ');+ onRefocus?.call();}},},@@ -271,7 +276,7 @@ double swarmSearchResultsHeight(swarmSearchRowHeight(scale, commands: search.isCommandMode) +(search.selected != null && !search.canAccept ? 48 : 0);-/// Shared Add agent results, also used for commands and History.+/// Shared harness search results, also used for commands and History.class SwarmSearchResults extends StatefulWidget {const SwarmSearchResults({super.key,@@ -334,6 +339,15 @@ class _SwarmSearchResultsState extends State<SwarmSearchResults> {}}+ void _focusResult(String id) {+ // Tab focus must highlight the same row Enter will open.+ // Look up the current position because cached rows can move after discovery.+ final index = search.rows.indexWhere((row) => row.id == id);+ if (index >= 0 && index != search.cursor) {+ search.move(index - search.cursor);+ }+ }+@overridevoid dispose() {search.removeListener(_changed);@@ -354,7 +368,7 @@ class _SwarmSearchResultsState extends State<SwarmSearchResults> {);return LayoutBuilder(builder: (context, constraints) {- return Semantics(+ final results = Semantics(container: true,label: 'Search results',child: Column(@@ -410,6 +424,9 @@ class _SwarmSearchResultsState extends State<SwarmSearchResults> {key: ValueKey(row.id),minTileHeight: _rowHeight,enabled: canSubmit,+ onFocusChange: (focused) {+ if (focused) _focusResult(row.id);+ },selected: highlighted,selectedColor: Colors.white,hoverColor: Colors.transparent,@@ -543,6 +560,19 @@ class _SwarmSearchResultsState extends State<SwarmSearchResults> {],),);+ if (KeymapTheme.of(context) == null) return results;+ // The early keymap handler owns these keys across the whole picker.+ // If unbound, do not fall through to ListTile's default activation or+ // directional focus traversal and silently perform the removed action.+ return Shortcuts(+ shortcuts: const {+ SingleActivator(LogicalKeyboardKey.enter): DoNothingIntent(),+ SingleActivator(LogicalKeyboardKey.numpadEnter): DoNothingIntent(),+ SingleActivator(LogicalKeyboardKey.arrowDown): DoNothingIntent(),+ SingleActivator(LogicalKeyboardKey.arrowUp): DoNothingIntent(),+ },+ child: results,+ );},);}diff --git a/desktop/test/keymap_runtime_test.dart b/desktop/test/keymap_runtime_test.dartindex 4da0cb8d5..d9a320dd9 100644--- a/desktop/test/keymap_runtime_test.dart+++ b/desktop/test/keymap_runtime_test.dart@@ -57,6 +57,18 @@ Future<void> native(WidgetTester tester, String method, [Object? arguments]) {return done.future;}+Future<void> tabToResult(WidgetTester tester, {String? id}) async {+ ListTile? focusedResult() => FocusManager.instance.primaryFocus?.context+ ?.findAncestorWidgetOfExactType<ListTile>();+ bool reached() => id == null+ ? focusedResult() != null+ : focusedResult()?.key == ValueKey(id);+ for (var i = 0; i < 16 && !reached(); i++) {+ await key(tester, LogicalKeyboardKey.tab);+ }+ expect(reached(), isTrue, reason: 'The result is reachable with Tab');+}+void main() {testWidgets('Command-T opens New Tab and Command-S opens Layout', (tester,@@ -419,6 +431,7 @@ void main() {editing.clearComposing();await tester.enterText(field, 'Agent');await tester.pump();+ await tabToResult(tester);calls.clear();final opening = native(tester, 'commands');await tester.pump();@@ -434,6 +447,10 @@ void main() {);expect(find.byKey(const ValueKey('swarm-search-input')), findsNothing);expect(tester.widget<TextField>(field).controller!.text, '> ');+ expect(+ tester.widget<TextField>(field).focusNode!.hasPrimaryFocus,+ isTrue,+ );expect(tester.widget<TextField>(field).decoration!.hintText,'Search commands…',@@ -450,9 +467,14 @@ void main() {},);- for (final fromMenu in [false, true]) {+ for (final (fromMenu, resultFocused) in [+ (false, false),+ (true, false),+ (false, true),+ (true, true),+ ]) {testWidgets(- 'New closes inline search before opening its form (native=$fromMenu)',+ 'New closes inline search before opening its form (native=$fromMenu, result focused=$resultFocused)',(tester) async {tester.binding.defaultBinaryMessenger.setMockMethodCallHandler(nativeChannel,@@ -472,6 +494,9 @@ void main() {await tester.enterText(field, 'Agent 12');await tester.pump();expect(find.byType(SwarmSearchResults), findsOneWidget);+ if (resultFocused) {+ await tabToResult(tester);+ }if (fromMenu) {final opening = native(tester, 'newAgent');await tester.pump();@@ -504,6 +529,73 @@ void main() {);}+ for (final inline in [false, true]) {+ testWidgets(+ 'focused results share picker selection and configured keys (inline=$inline)',+ (tester) async {+ final app = createApp();+ app.machineStates['m']!.nodeOnline = true;+ final firstInput = <TerminalBinaryFrame>[];+ final secondInput = <TerminalBinaryFrame>[];+ app.adoptSessionForTest(terminal('a0', firstInput));+ final second = app.adoptSessionForTest(terminal('a1', secondInput));+ app.newSwarm();+ final target = app.activeSwarmId;+ final map = MemoryKeymap()+ ..apply('''{"bindings":[+ {"keys":"down","command":null,"when":"picker"},+ {"keys":"ctrl+g","command":"picker.next","when":"picker"},+ {"keys":"enter","command":null,"when":"picker"},+ {"keys":"alt+enter","command":"picker.accept","when":"picker"}+ ]}''');+ await mount(tester, app, map);+ final field = find.byKey(+ ValueKey(inline ? 'harness-start-search' : 'swarm-search-input'),+ );+ if (inline) {+ await tester.tap(field);+ } else {+ await key(tester, LogicalKeyboardKey.keyO, cmd: true);+ }+ await tester.enterText(field, 'Agent');+ await tester.pump();+ final search = tester+ .widget<SwarmSearchResults>(find.byType(SwarmSearchResults))+ .search;+ final secondRow = search.rows.firstWhere((row) => row.agentId == 'a1');+ await tabToResult(tester, id: secondRow.id);+ expect(search.selected, same(secondRow));+ final next = search.rows[(search.cursor + 1) % search.rows.length];+ await key(tester, LogicalKeyboardKey.arrowDown);+ expect(search.selected, same(secondRow));+ await key(tester, LogicalKeyboardKey.keyG, ctrl: true);+ expect(search.selected, same(next));+ expect(+ tester.widget<TextField>(field).focusNode!.hasPrimaryFocus,+ isTrue,+ );+ await tabToResult(tester, id: secondRow.id);+ expect(search.selected, same(secondRow));+ await key(tester, LogicalKeyboardKey.enter);+ expect(find.byType(SwarmSearchResults), findsOneWidget);+ expect(app.activeSwarm.panes, isEmpty);+ await key(tester, LogicalKeyboardKey.enter, alt: true);+ expect(find.byType(SwarmSearchResults), findsNothing);+ expect(app.activeSwarmId, target);+ expect(app.focusedPane, same(second));+ expect(firstInput, isEmpty);+ expect(secondInput, isEmpty);+ await key(tester, LogicalKeyboardKey.arrowLeft);+ expect(firstInput, isEmpty);+ expect(secondInput.single.bytes, [27, 91, 68]);+ expect(tester.takeException(), isNull);+ await tester.pumpWidget(const SizedBox());+ app.dispose();+ map.dispose();+ },+ );+ }+testWidgets('terminal IME composition keeps its keys before workspace dispatch',(tester) async {diff --git a/docs/harness-agent-first-tabs.md b/docs/harness-agent-first-tabs.mdindex 6169b25eb..ea00f7ead 100644--- a/docs/harness-agent-first-tabs.md+++ b/docs/harness-agent-first-tabs.md@@ -49,8 +49,13 @@ and the containing workspace name is not repeated.The Commands footer stays removed; Shift-Cmd-P and typing `>` expose commands.An explicit Cmd-N while choosing a split replaces search with creation in thatsplit position; dismissing creation still returns directly to the terminal.-Native New Harness and Search Commands actions use the focused search field's-actions too. Command search stays in that field, and creation closes its dropdown+The input and result rows share one picker shortcut scope. Tab focus highlights+the row that Enter will open. Arrow navigation and command-mode entry return+focus to the input for continued typing; remapped or unbound navigation/Enter+keys keep their meaning on a focused row. Closing the inline picker releases+focus from the entire surface, so dismissing New Harness cannot restore a caret.+Native New Harness and Search Commands actions use the focused picker's+actions too. Command search stays in its field, and creation closes its dropdownbefore opening the form. Native actions wait for the destination focus tree beforehanding keyboard ownership back to Flutter and preserve in-progress search composition.diff --git a/docs/harness-v2-handoff.md b/docs/harness-v2-handoff.mdindex 22e04cd4f..fbf337572 100644--- a/docs/harness-v2-handoff.md+++ b/docs/harness-v2-handoff.md@@ -1,6 +1,20 @@# Harness v2: goal, plan, and continuation handoff-**Current desktop regression checkpoint:** `67c20f4` is pushed. All **1,416 unit/widget checks** pass+**Picker focus correction:** Tab could move from the search field into a result,+outside its shortcut scope. Both Cmd-N and the native New Harness action then+left the inline results underneath creation. The whole input/results surface now+shares its keymap region, highlights the Tab-focused row, returns arrows/command+entry to the editor, and clears picker focus on dismissal. A focused row can no+longer bypass an unbound Enter or arrow with Flutter's default tile action.+All **47 affected keyboard/search/history checks** pass in+`/private/tmp/harness-picker-scope-after.log`, including the existing no-extra-editor+rebuild checks. All five changed source/test files analyze cleanly in+`/private/tmp/harness-picker-scope-analyze.log`. The full desktop suite passes+**1,420 checks**, with the optional CLI-media placeholder skipped, in+`/private/tmp/harness-picker-scope-full.log`. The prepared and running previews+below still predate this correction until the next build refresh.++**Previous desktop regression checkpoint:** `67c20f4` is pushed. All **1,416 unit/widget checks** passin `/private/tmp/harness-current-full-suite-after.log`. The one optional remotemedia integration placeholder is skipped without its CLI environment. With thecurrent CLI enabled, all **four media integration checks** also pass in