Cover Alt slash search focus
Update the keyboard focus regression coverage so Alt+/ is verified as the shell Search destination shortcut while preserving the existing Ctrl+/ behavior. Record the expanded focused-check result in the implementation note.
This commit is contained in:
@@ -7,8 +7,9 @@
|
||||
- Search destination routing, focus, query retention, and composer drafts were
|
||||
left unchanged.
|
||||
- Focused checks: `tool/memwatch/full.sh 'test/shell/search_shortcuts_test.dart
|
||||
test/shell/destination_shortcuts_test.dart test/shell/list_shortcuts_test.dart'`
|
||||
— PASS (10 passed, 0 failed, 0 skipped).
|
||||
test/shell/destination_shortcuts_test.dart test/shell/list_shortcuts_test.dart
|
||||
test/features/chat/chat_keyboard_focus_test.dart'` — PASS (13 passed, 0
|
||||
failed, 0 skipped).
|
||||
- `tool/analyze.sh` — clean.
|
||||
- Browser capture was not run in this implementation stage; UI review owns
|
||||
full-app Alt+/ and Meta+/ interaction evidence.
|
||||
|
||||
@@ -5,6 +5,8 @@ import 'package:pipelines_app/core/api_gateway.dart';
|
||||
import 'package:pipelines_app/features/chat/screen.dart';
|
||||
import 'package:pipelines_app/features/chat/ui/sessions/session_actions.dart';
|
||||
import 'package:pipelines_app/features/chat/workspace/chat_workspace.dart';
|
||||
import 'package:pipelines_app/features/search/search_screen.dart';
|
||||
import 'package:pipelines_app/features/search/ui/search_bar_controls.dart';
|
||||
import 'package:pipelines_app/shell/adaptive_shell.dart';
|
||||
import 'package:pipelines_app/shell/destination.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
@@ -51,6 +53,11 @@ Future<void> _setup(WidgetTester tester) async {
|
||||
destination: AppDestination.chat,
|
||||
destinationBodies: {
|
||||
AppDestination.chat: (_) => ChatScreen(gateway: gateway),
|
||||
AppDestination.search: (_) => SearchScreen(
|
||||
gateway: gateway,
|
||||
onOpen: (_) {},
|
||||
embedded: true,
|
||||
),
|
||||
},
|
||||
),
|
||||
),
|
||||
@@ -104,8 +111,8 @@ void main() {
|
||||
expect(await _slash(tester), isFalse);
|
||||
expect(_editable(tester, 'a').focusNode.hasPrimaryFocus, isTrue);
|
||||
|
||||
// Shift+/ (a question mark) and Alt+/ are not the shortcut; Ctrl+/ is
|
||||
// the shell's own Search chord.
|
||||
// Shift+/ (a question mark) is not the shortcut. Alt+/ opens the Search
|
||||
// destination, while Ctrl+/ remains the shell's own Search chord.
|
||||
await _focusSidebar(tester);
|
||||
await tester.sendKeyDownEvent(LogicalKeyboardKey.shiftLeft);
|
||||
await tester.sendKeyEvent(LogicalKeyboardKey.slash, character: '?');
|
||||
@@ -114,7 +121,11 @@ void main() {
|
||||
await tester.sendKeyEvent(LogicalKeyboardKey.slash);
|
||||
await tester.sendKeyUpEvent(LogicalKeyboardKey.altLeft);
|
||||
await tester.pumpAndSettle();
|
||||
expect(_editable(tester, 'a').focusNode.hasPrimaryFocus, isFalse);
|
||||
expect(find.byKey(searchFieldKey), findsOneWidget);
|
||||
expect(
|
||||
tester.widget<TextField>(find.byKey(searchFieldKey)).focusNode!.hasFocus,
|
||||
isTrue,
|
||||
);
|
||||
await tester.pumpWidget(const SizedBox.shrink());
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user