From aa8329460d42be9bcf6f92a2d49632dc0469004a Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Wed, 11 Nov 2026 19:33:17 +0000 Subject: [PATCH 1/7] Open Search with Alt slash shortcut Accept the physical slash key for exact Alt+/ delivery, including macOS Option dead-key values, while preserving existing Ctrl+/ and Command+/ behavior. Add focused regression coverage and document the verified checks. --- app/lib/shell/shell_list_shortcuts.dart | 11 +++++--- app/notes/open-search-alt-slash.md | 14 ++++++++++ app/test/shell/search_shortcuts_test.dart | 32 +++++++++++++++++++++++ 3 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 app/notes/open-search-alt-slash.md diff --git a/app/lib/shell/shell_list_shortcuts.dart b/app/lib/shell/shell_list_shortcuts.dart index 45751f3a..503c2e35 100644 --- a/app/lib/shell/shell_list_shortcuts.dart +++ b/app/lib/shell/shell_list_shortcuts.dart @@ -61,10 +61,13 @@ bool shellSearchShortcut( TargetPlatform? platform, }) => event is KeyDownEvent && - event.logicalKey == LogicalKeyboardKey.slash && - shellPrimaryModifier(keyboard, platform: platform) && - !keyboard.isAltPressed && - !keyboard.isShiftPressed; + !keyboard.isShiftPressed && + (shellPrimaryModifier(keyboard, platform: platform) + ? !keyboard.isAltPressed && event.logicalKey == LogicalKeyboardKey.slash + : keyboard.isAltPressed && + !keyboard.isControlPressed && + !keyboard.isMetaPressed && + event.physicalKey == PhysicalKeyboardKey.slash); const _digits = [ LogicalKeyboardKey.digit1, diff --git a/app/notes/open-search-alt-slash.md b/app/notes/open-search-alt-slash.md new file mode 100644 index 00000000..33729489 --- /dev/null +++ b/app/notes/open-search-alt-slash.md @@ -0,0 +1,14 @@ +# Open Search with Alt+/ and Command+/ + +- Updated `shellSearchShortcut` to accept an exact Alt+/ chord by physical + slash position, including macOS Option dead-key logical values. +- Existing Ctrl+/ and macOS Command+/ matching remains logical-slash based; + Shift and mixed/extra modifiers remain rejected. +- 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). +- `tool/analyze.sh` — clean. +- Browser capture was not run in this implementation stage; UI review owns + full-app Alt+/ and Meta+/ interaction evidence. diff --git a/app/test/shell/search_shortcuts_test.dart b/app/test/shell/search_shortcuts_test.dart index e788a6fa..8dcb31e7 100644 --- a/app/test/shell/search_shortcuts_test.dart +++ b/app/test/shell/search_shortcuts_test.dart @@ -75,6 +75,27 @@ void main() { }); } + test('Alt+/ uses the physical slash key for Option dead-key delivery', () { + const event = KeyDownEvent( + physicalKey: PhysicalKeyboardKey.slash, + logicalKey: LogicalKeyboardKey(0x00BF), + character: '¿', + timeStamp: Duration.zero, + ); + expect(shellSearchShortcut(event, _AltHeld()), isTrue); + expect( + shellSearchShortcut( + const KeyUpEvent( + physicalKey: PhysicalKeyboardKey.slash, + logicalKey: LogicalKeyboardKey(0x00BF), + timeStamp: Duration.zero, + ), + _AltHeld(), + ), + isFalse, + ); + }); + for (final platform in [TargetPlatform.macOS, TargetPlatform.windows]) { testWidgets( 'Search chord opens and refocuses retained query on $platform', @@ -130,3 +151,14 @@ void main() { ); } } + +class _AltHeld extends HardwareKeyboard { + @override + bool get isAltPressed => true; + @override + bool get isControlPressed => false; + @override + bool get isMetaPressed => false; + @override + bool get isShiftPressed => false; +} From 1850528ced1634c52842e1a37d304a5157fe7a36 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Wed, 11 Nov 2026 19:51:15 +0000 Subject: [PATCH 2/7] 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. --- app/notes/open-search-alt-slash.md | 5 +++-- .../features/chat/chat_keyboard_focus_test.dart | 17 ++++++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/app/notes/open-search-alt-slash.md b/app/notes/open-search-alt-slash.md index 33729489..d81858a6 100644 --- a/app/notes/open-search-alt-slash.md +++ b/app/notes/open-search-alt-slash.md @@ -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. diff --git a/app/test/features/chat/chat_keyboard_focus_test.dart b/app/test/features/chat/chat_keyboard_focus_test.dart index f5fbbce2..7532bb0f 100644 --- a/app/test/features/chat/chat_keyboard_focus_test.dart +++ b/app/test/features/chat/chat_keyboard_focus_test.dart @@ -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 _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(find.byKey(searchFieldKey)).focusNode!.hasFocus, + isTrue, + ); await tester.pumpWidget(const SizedBox.shrink()); }); From 21115f8e8f790209c5c7a8326d283a1022d5003d Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Wed, 11 Nov 2026 20:05:56 +0000 Subject: [PATCH 3/7] Add unified keyboard shortcut help Expose platform-aware shortcut help from Settings, keep narrow layouts scrollable, share Search tooltip labels, and document Terminal-to-chat composer focus. Integrate together with the separately reviewed Alt-slash handler. --- .../settings/keyboard_shortcuts_help.dart | 114 ++++++++++++++++++ .../settings/keyboard_shortcuts_registry.dart | 92 ++++++++++++++ .../settings_keyboard_shortcuts_section.dart | 19 +++ app/lib/features/settings/settings_keys.dart | 3 + .../features/settings/settings_screen.dart | 1 + .../settings/settings_topic_pages.dart | 5 + app/lib/shell/adaptive_shell.dart | 3 +- .../shell/shell_search_shortcut_labels.dart | 12 ++ app/notes/keyboard-shortcuts-help.md | 23 ++++ .../keyboard_shortcuts_help_test.dart | 92 ++++++++++++++ 10 files changed, 363 insertions(+), 1 deletion(-) create mode 100644 app/lib/features/settings/keyboard_shortcuts_help.dart create mode 100644 app/lib/features/settings/keyboard_shortcuts_registry.dart create mode 100644 app/lib/features/settings/settings_keyboard_shortcuts_section.dart create mode 100644 app/lib/shell/shell_search_shortcut_labels.dart create mode 100644 app/notes/keyboard-shortcuts-help.md create mode 100644 app/test/features/settings/keyboard_shortcuts_help_test.dart diff --git a/app/lib/features/settings/keyboard_shortcuts_help.dart b/app/lib/features/settings/keyboard_shortcuts_help.dart new file mode 100644 index 00000000..a0b99414 --- /dev/null +++ b/app/lib/features/settings/keyboard_shortcuts_help.dart @@ -0,0 +1,114 @@ +import 'package:flutter/material.dart'; + +import '../../ui/adaptive/app_popups.dart'; +import 'keyboard_shortcuts_registry.dart'; + +const keyboardShortcutsLabel = 'Keyboard shortcuts'; + +Future showKeyboardShortcutsHelp(BuildContext context) => + showAppDetails( + context, + maxWidth: 640, + builder: (_) => const KeyboardShortcutsHelp(), + ); + +class KeyboardShortcutsHelp extends StatelessWidget { + const KeyboardShortcutsHelp({super.key, this.registry}); + + final KeyboardShortcutRegistry? registry; + + @override + Widget build(BuildContext context) { + final entries = (registry ?? KeyboardShortcutRegistry.current()).entries; + final content = Semantics( + scopesRoute: true, + namesRoute: true, + explicitChildNodes: true, + label: 'Keyboard shortcuts help', + child: Padding( + padding: const EdgeInsets.fromLTRB(24, 8, 24, 24), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Row( + children: [ + const Expanded( + child: Text( + keyboardShortcutsLabel, + style: TextStyle(fontSize: 22, fontWeight: FontWeight.w600), + ), + ), + IconButton( + tooltip: 'Close keyboard shortcuts', + onPressed: () => Navigator.of(context).pop(), + icon: const Icon(Icons.close), + ), + ], + ), + const SizedBox(height: 8), + Text( + 'Shortcuts available in the current app and browser environment.', + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 16), + for (final (index, entry) in entries.indexed) ...[ + if (index > 0) const Divider(height: 1), + Padding( + padding: const EdgeInsets.symmetric(vertical: 12), + child: _ShortcutRow(entry: entry), + ), + ], + const SizedBox(height: 4), + Text( + 'On macOS, Option is shown for Alt. Browsers can reserve system or tab shortcuts.', + style: Theme.of(context).textTheme.bodySmall, + ), + ], + ), + ), + ); + // The desktop details dialog supplies its own bounded scroll view. The + // narrow details sheet does not, so keep the help readable at large text + // scales and on short phone screens there as well. + return usesDesktopPopups(context) + ? content + : SingleChildScrollView(child: content); + } +} + +class _ShortcutRow extends StatelessWidget { + const _ShortcutRow({required this.entry}); + + final KeyboardShortcutEntry entry; + + @override + Widget build(BuildContext context) => Semantics( + container: true, + label: + '${entry.action}: ${entry.keys}${entry.caveat == null ? '' : '. ${entry.caveat}'}', + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded(child: Text(entry.action)), + const SizedBox(width: 16), + Flexible( + child: Text( + entry.keys, + textAlign: TextAlign.end, + style: const TextStyle(fontWeight: FontWeight.w600), + ), + ), + ], + ), + if (entry.caveat case final caveat?) ...[ + const SizedBox(height: 4), + Text(caveat, style: Theme.of(context).textTheme.bodySmall), + ], + ], + ), + ); +} diff --git a/app/lib/features/settings/keyboard_shortcuts_registry.dart b/app/lib/features/settings/keyboard_shortcuts_registry.dart new file mode 100644 index 00000000..a4ce79f4 --- /dev/null +++ b/app/lib/features/settings/keyboard_shortcuts_registry.dart @@ -0,0 +1,92 @@ +import 'package:flutter/foundation.dart'; + +import '../chat/workspace/chat_center_stage_controller.dart'; +import '../chat/workspace/chat_float_shortcut.dart'; +import '../terminal/terminal_shortcuts.dart'; +import '../../shell/windows/window_shortcuts.dart'; +import '../../shell/shell_search_shortcut_labels.dart'; + +/// A shortcut entry shown in the in-app help. Keeping these entries together +/// prevents the help page from inventing chords that the handlers do not use. +class KeyboardShortcutEntry { + const KeyboardShortcutEntry({ + required this.action, + required this.keys, + this.caveat, + }); + + final String action; + final String keys; + final String? caveat; +} + +class KeyboardShortcutRegistry { + const KeyboardShortcutRegistry({required this.platform, required this.web}); + + factory KeyboardShortcutRegistry.current() => + KeyboardShortcutRegistry(platform: defaultTargetPlatform, web: kIsWeb); + + final TargetPlatform platform; + final bool web; + + bool get _apple => + platform == TargetPlatform.macOS || platform == TargetPlatform.iOS; + + bool get _macOS => platform == TargetPlatform.macOS; + + List get entries => [ + KeyboardShortcutEntry( + action: 'Show or hide terminal', + keys: TerminalShortcutLabels( + web: web, + platform: platform, + ).toggle.join(', '), + caveat: web + ? 'Browser tab shortcuts such as Cmd+T are not available to the app.' + : null, + ), + KeyboardShortcutEntry( + action: 'Show or hide floating chats', + keys: _apple + ? '${chatFloatShortcutLabel(platform)}, Ctrl+Y, Cmd+Y' + : '${chatFloatShortcutLabel(platform)}, Ctrl+Y', + caveat: + 'Brings a chat forward from Terminal and focuses its message input.', + ), + KeyboardShortcutEntry( + action: 'Toggle Center Stage', + keys: + '${chatCenterStageShortcutLabel(platform)}${_apple ? ', Cmd+E' : ', Ctrl+E'}', + ), + KeyboardShortcutEntry( + action: 'Open Search', + keys: shellSearchShortcutLabels(platform).join(', '), + caveat: web ? 'The browser may reserve some keyboard shortcuts.' : null, + ), + KeyboardShortcutEntry( + action: 'Cycle floating windows', + keys: + '${windowCycleShortcutLabel(platform)}, ${windowCycleShortcutLabel(platform)} with Shift', + ), + KeyboardShortcutEntry( + action: 'Open a chat list item', + keys: _macOS ? 'Cmd+1…9' : 'Ctrl+1…9', + caveat: + 'Available when the Chat list is mounted; numbers select its visible item.', + ), + KeyboardShortcutEntry( + action: 'Focus the active chat composer', + keys: '/', + caveat: 'Only outside text fields and other popup surfaces.', + ), + KeyboardShortcutEntry( + action: 'Send a chat message', + keys: _apple ? 'Cmd+Enter' : 'Ctrl+Enter', + ), + if (!web) + const KeyboardShortcutEntry( + action: 'Move between terminal tabs', + keys: 'Ctrl+Tab, Ctrl+Shift+Tab', + ), + ]; +} diff --git a/app/lib/features/settings/settings_keyboard_shortcuts_section.dart b/app/lib/features/settings/settings_keyboard_shortcuts_section.dart new file mode 100644 index 00000000..4a6466b6 --- /dev/null +++ b/app/lib/features/settings/settings_keyboard_shortcuts_section.dart @@ -0,0 +1,19 @@ +import 'package:flutter/material.dart'; + +import 'keyboard_shortcuts_help.dart'; +import 'settings_keys.dart'; +import 'settings_row.dart'; + +class SettingsKeyboardShortcutsSection extends StatelessWidget { + const SettingsKeyboardShortcutsSection({super.key}); + + @override + Widget build(BuildContext context) => SettingsRow( + key: SettingsKeys.keyboardShortcuts, + leading: const Icon(Icons.keyboard_outlined), + title: const Text(keyboardShortcutsLabel), + subtitle: const Text('See the shortcuts available on this platform.'), + chevron: true, + onTap: () => showKeyboardShortcutsHelp(context), + ); +} diff --git a/app/lib/features/settings/settings_keys.dart b/app/lib/features/settings/settings_keys.dart index 48bee87a..cd9a56b6 100644 --- a/app/lib/features/settings/settings_keys.dart +++ b/app/lib/features/settings/settings_keys.dart @@ -11,4 +11,7 @@ abstract final class SettingsKeys { static const saveWorkspace = ValueKey('settings.saveWorkspace'); static const templates = ValueKey('settings.templates'); static const schedules = ValueKey('settings.schedules'); + static const keyboardShortcuts = ValueKey( + 'settings.keyboardShortcuts', + ); } diff --git a/app/lib/features/settings/settings_screen.dart b/app/lib/features/settings/settings_screen.dart index bd646fd9..463a8c4b 100644 --- a/app/lib/features/settings/settings_screen.dart +++ b/app/lib/features/settings/settings_screen.dart @@ -37,6 +37,7 @@ import 'settings_templates_section.dart'; import 'server_connections.dart'; import 'saved_servers_section.dart'; import 'managed_connection_section.dart'; +import 'settings_keyboard_shortcuts_section.dart'; part 'settings_topic_pages.dart'; diff --git a/app/lib/features/settings/settings_topic_pages.dart b/app/lib/features/settings/settings_topic_pages.dart index 7defeaaf..2be494de 100644 --- a/app/lib/features/settings/settings_topic_pages.dart +++ b/app/lib/features/settings/settings_topic_pages.dart @@ -82,6 +82,11 @@ extension _SettingsTopicPages on _SettingsScreenState { SettingsStorageSection(gateway: widget.client), ), _single('Server', SettingsHealthSection(gateway: widget.client)), + SettingsGroup( + title: 'Help', + leadingRows: true, + children: const [SettingsKeyboardShortcutsSection()], + ), if (widget.onOpenSchedules != null || widget.onOpenTemplates != null) SettingsGroup( title: 'Library', diff --git a/app/lib/shell/adaptive_shell.dart b/app/lib/shell/adaptive_shell.dart index 9427c9da..1a1dec1b 100644 --- a/app/lib/shell/adaptive_shell.dart +++ b/app/lib/shell/adaptive_shell.dart @@ -10,6 +10,7 @@ import 'list_detail.dart'; import 'list_pane_widths.dart'; import 'shell_bar.dart'; import 'shell_list_shortcuts.dart'; +import 'shell_search_shortcut_labels.dart'; import 'tab_history.dart'; import '../ui/input/keyboard_owner.dart'; @@ -383,7 +384,7 @@ class _AdaptiveShellState extends State { IconButton( key: const ValueKey('shell.search'), onPressed: onSearch, - tooltip: 'Search', + tooltip: 'Search (${shellSearchShortcutLabels().join(', ')})', icon: const Icon(Icons.search), ), ...widget.barActions, diff --git a/app/lib/shell/shell_search_shortcut_labels.dart b/app/lib/shell/shell_search_shortcut_labels.dart new file mode 100644 index 00000000..b4046a5c --- /dev/null +++ b/app/lib/shell/shell_search_shortcut_labels.dart @@ -0,0 +1,12 @@ +import 'package:flutter/foundation.dart'; + +/// Search chords supported by the shell, independent of theme overrides. +List shellSearchShortcutLabels([TargetPlatform? platform]) { + final target = platform ?? defaultTargetPlatform; + final apple = target == TargetPlatform.macOS || target == TargetPlatform.iOS; + return [ + apple ? 'Option+/' : 'Alt+/', + if (target == TargetPlatform.macOS) 'Cmd+/', + 'Ctrl+/', + ]; +} diff --git a/app/notes/keyboard-shortcuts-help.md b/app/notes/keyboard-shortcuts-help.md new file mode 100644 index 00000000..97eb28d9 --- /dev/null +++ b/app/notes/keyboard-shortcuts-help.md @@ -0,0 +1,23 @@ +# Keyboard shortcuts help + +Added a Settings → Help entry that opens a root-layered, bounded Material help +surface on desktop and the existing adaptive sheet on narrow layouts. The +registry reuses the terminal, floating-chat, Center Stage and window-cycle +label helpers, and records browser caveats for shortcuts that may be reserved. +Search and its tooltip share platform-aware labels for Option/Alt+/, macOS +Cmd+/, and Ctrl+/. Integration depends on the separately reviewed Search +handler change (run 367); do not land the help without that handler. +Floating-chat help describes the new Terminal-to-composer focus handoff +instead of the obsolete macOS shell-yank exception. +Chat list numbering likewise uses Command only on macOS, matching the shell +rule on iOS and other platforms. + +Focused verification: + +- `tool/memwatch/full.sh 'test/features/settings/keyboard_shortcuts_help_test.dart test/features/settings/settings_screen_test.dart'` + — 15 passed, 0 failed. +- `tool/analyze.sh` — clean. + +Browser/full-app capture was not run in this implementation stage; ui-review +should verify desktop light/dark, scaled text, keyboard traversal, and phone +constraints with the full-app fixture. diff --git a/app/test/features/settings/keyboard_shortcuts_help_test.dart b/app/test/features/settings/keyboard_shortcuts_help_test.dart new file mode 100644 index 00000000..80fa97e1 --- /dev/null +++ b/app/test/features/settings/keyboard_shortcuts_help_test.dart @@ -0,0 +1,92 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:pipelines_app/features/settings/keyboard_shortcuts_help.dart'; +import 'package:pipelines_app/features/settings/keyboard_shortcuts_registry.dart'; + +void main() { + const registry = KeyboardShortcutRegistry( + platform: TargetPlatform.macOS, + web: true, + ); + + test('registry uses platform labels and browser caveats', () { + final entries = registry.entries; + final terminal = entries.firstWhere( + (entry) => entry.action == 'Show or hide terminal', + ); + final search = entries.firstWhere((entry) => entry.action == 'Open Search'); + + expect(terminal.keys, contains('Option+T')); + expect(terminal.keys, isNot(contains('Cmd+T'))); + expect(search.keys, 'Option+/, Cmd+/, Ctrl+/'); + expect(search.caveat, contains('browser')); + }); + + test('uses the shell primary modifier rule on iOS', () { + final entries = const KeyboardShortcutRegistry( + platform: TargetPlatform.iOS, + web: false, + ).entries; + expect( + entries + .firstWhere((entry) => entry.action == 'Open a chat list item') + .keys, + 'Ctrl+1…9', + ); + expect( + entries.firstWhere((entry) => entry.action == 'Open Search').keys, + 'Option+/, Ctrl+/', + ); + expect( + entries + .firstWhere((entry) => entry.action == 'Show or hide floating chats') + .caveat, + contains('focuses its message input'), + ); + }); + + testWidgets('help is readable and keyboard traversable', (tester) async { + await tester.pumpWidget( + MaterialApp( + home: Scaffold( + body: SingleChildScrollView( + child: KeyboardShortcutsHelp(registry: registry), + ), + ), + ), + ); + + expect(find.text('Keyboard shortcuts'), findsOneWidget); + expect(find.text('Show or hide floating chats'), findsOneWidget); + expect(find.text('Option+Y, Ctrl+Y, Cmd+Y'), findsOneWidget); + expect( + tester.getSemantics(find.bySemanticsLabel('Keyboard shortcuts help')), + matchesSemantics( + scopesRoute: true, + namesRoute: true, + label: 'Keyboard shortcuts help', + ), + ); + + await tester.sendKeyEvent(LogicalKeyboardKey.tab); + expect(find.byTooltip('Close keyboard shortcuts'), findsOneWidget); + }); + + testWidgets('narrow help content scrolls', (tester) async { + await tester.pumpWidget( + MediaQuery( + data: const MediaQueryData( + size: Size(400, 640), + textScaler: TextScaler.linear(2), + ), + child: MaterialApp( + home: Scaffold(body: KeyboardShortcutsHelp(registry: registry)), + ), + ), + ); + + expect(find.byType(SingleChildScrollView), findsOneWidget); + expect(find.text('Keyboard shortcuts'), findsOneWidget); + }); +} From ba198d144adff57b23c788b55071f8e4d212d606 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Wed, 11 Nov 2026 20:06:27 +0000 Subject: [PATCH 4/7] Use desktop dialogs for remaining sheets Keep the audited runs filter, chat colour picker, and Needs you flows as Material bottom sheets on narrow or touch layouts while presenting bounded desktop dialogs on wide layouts. Remove obsolete Cupertino flags and add focused route regressions and notes. --- .../features/attention/ui/needs_you_bell.dart | 6 --- .../attention/ui/needs_you_runs_heading.dart | 6 --- .../attention/ui/needs_you_sheet.dart | 30 ++++++++++++-- .../ui/needs_you_sheet_material.dart | 1 - .../chat/ui/sessions/chat_color_picker.dart | 10 ++--- .../features/runs/ui/runs_filter_sheet.dart | 19 ++++++++- app/notes/desktop-dialogs-remaining-sheets.md | 7 ++++ .../notification_manager_wiring_test.dart | 1 - .../attention/ui/needs_you_bell_test.dart | 30 -------------- .../attention/ui/needs_you_sheet_test.dart | 25 +++++++++++- .../chat/ui/sessions/chat_color_test.dart | 39 +++++++++++++++++++ .../features/runs/ui/runs_sheets_test.dart | 22 +++++++++-- app/tool/attention_probe.dart | 1 - 13 files changed, 135 insertions(+), 62 deletions(-) create mode 100644 app/notes/desktop-dialogs-remaining-sheets.md diff --git a/app/lib/features/attention/ui/needs_you_bell.dart b/app/lib/features/attention/ui/needs_you_bell.dart index 7048a799..0427d988 100644 --- a/app/lib/features/attention/ui/needs_you_bell.dart +++ b/app/lib/features/attention/ui/needs_you_bell.dart @@ -33,7 +33,6 @@ class NeedsYouBell extends StatefulWidget { required this.onOpen, required this.onDismiss, required this.onClearAll, - this.cupertino, }); final List entries; @@ -41,10 +40,6 @@ class NeedsYouBell extends StatefulWidget { final ValueChanged onDismiss; final ValueChanged> onClearAll; - /// Retained for callers that still pass it; the bell is the Material action - /// whether this is set or not. - final bool? cupertino; - @override State createState() => _NeedsYouBellState(); } @@ -132,7 +127,6 @@ class _NeedsYouBellState extends State { onOpen: _activate, onDismiss: widget.onDismiss, onClearAll: widget.onClearAll, - cupertino: widget.cupertino, ); if (!mounted || _openedRun) return; // The browser returns focus to the bell after the sheet closes; do the same diff --git a/app/lib/features/attention/ui/needs_you_runs_heading.dart b/app/lib/features/attention/ui/needs_you_runs_heading.dart index 7c051807..f8d6e0b7 100644 --- a/app/lib/features/attention/ui/needs_you_runs_heading.dart +++ b/app/lib/features/attention/ui/needs_you_runs_heading.dart @@ -25,7 +25,6 @@ class NeedsYouRunsHeading extends StatefulWidget { this.syncToken = 0, this.store = const SharedPreferencesAttentionStore(), this.now, - this.cupertino, this.notifications, this.attention, }); @@ -48,10 +47,6 @@ class NeedsYouRunsHeading extends StatefulWidget { /// Injected clock for deterministic local-day windows. final DateTime Function()? now; - /// Retained for callers that still pass it; the heading is always the - /// Material bell whether this is set or not. - final bool? cupertino; - /// The app-level notification capability. Absent in fixtures that only draw /// the bell, so no store or platform bridge is touched there. final NotificationController? notifications; @@ -163,7 +158,6 @@ class _NeedsYouRunsHeadingState extends State { animation: _attention, builder: (context, _) => NeedsYouBell( entries: _attention.entries, - cupertino: widget.cupertino, onOpen: widget.onOpen, onDismiss: (entry) { unawaited(_attention.dismiss(entry)); diff --git a/app/lib/features/attention/ui/needs_you_sheet.dart b/app/lib/features/attention/ui/needs_you_sheet.dart index bd4e0899..8f6852c8 100644 --- a/app/lib/features/attention/ui/needs_you_sheet.dart +++ b/app/lib/features/attention/ui/needs_you_sheet.dart @@ -1,6 +1,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import '../../../ui/adaptive/app_popups.dart'; import '../domain/attention_models.dart'; import 'needs_you_sheet_material.dart'; @@ -12,19 +13,40 @@ import 'needs_you_sheet_material.dart'; /// only on it, so an entry that arrives while the sheet is open is shown but is /// never silently cleared. /// -/// The sheet stays open after Dismiss and Clear all, so several rows can be +/// The surface stays open after Dismiss and Clear all, so several rows can be /// dealt with in one visit. Choosing a row closes it; Escape, the barrier and -/// system back are native route behaviour. The sheet is always the Material -/// bottom sheet; [cupertino] is retained for callers that still pass it. +/// system back are native route behaviour. Narrow windows use a Material +/// bottom sheet; wide windows use a bounded Material dialog. Future showNeedsYouSheet({ required BuildContext context, required ValueListenable> entries, required ValueChanged onOpen, required ValueChanged onDismiss, required ValueChanged> onClearAll, - bool? cupertino, }) { final snapshot = attentionDismissalSnapshot(entries.value); + if (usesDesktopPopups(context)) { + return showDialog( + context: context, + useRootNavigator: true, + builder: (dialog) => Dialog( + clipBehavior: Clip.antiAlias, + child: ConstrainedBox( + constraints: BoxConstraints( + maxWidth: 560, + maxHeight: MediaQuery.sizeOf(dialog).height * 0.85, + ), + child: MaterialNeedsYouSheet( + entries: entries, + snapshot: snapshot, + onOpen: onOpen, + onDismiss: onDismiss, + onClearAll: onClearAll, + ), + ), + ), + ); + } return showModalBottomSheet( context: context, isScrollControlled: true, diff --git a/app/lib/features/attention/ui/needs_you_sheet_material.dart b/app/lib/features/attention/ui/needs_you_sheet_material.dart index a4815c5c..fc1e7885 100644 --- a/app/lib/features/attention/ui/needs_you_sheet_material.dart +++ b/app/lib/features/attention/ui/needs_you_sheet_material.dart @@ -60,7 +60,6 @@ class MaterialNeedsYouSheet extends StatelessWidget { children: [ AppSheetHeader( title: attentionSheetTitle, - cupertino: false, doneKey: attentionDoneKey, actions: [ if (rows.isNotEmpty) diff --git a/app/lib/features/chat/ui/sessions/chat_color_picker.dart b/app/lib/features/chat/ui/sessions/chat_color_picker.dart index c7fff10d..80d7e414 100644 --- a/app/lib/features/chat/ui/sessions/chat_color_picker.dart +++ b/app/lib/features/chat/ui/sessions/chat_color_picker.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; +import '../../../../ui/adaptive/app_popups.dart'; import '../../../../ui/layout/app_sheet_header.dart'; import '../../domain/chat_colors.dart'; import 'chat_color_palette.dart'; @@ -135,7 +136,6 @@ Future showChatColorPicker( children: [ AppSheetHeader( title: 'Colour for $title', - cupertino: false, doneKey: const Key('chat-color-done'), ), Padding( @@ -144,11 +144,9 @@ Future showChatColorPicker( ), ], ); - await showModalBottomSheet( - context: context, - showDragHandle: true, - isScrollControlled: true, - useSafeArea: true, + await showAppDetails( + context, + maxWidth: 420, builder: (sheet) => SingleChildScrollView(child: content(sheet)), ); } diff --git a/app/lib/features/runs/ui/runs_filter_sheet.dart b/app/lib/features/runs/ui/runs_filter_sheet.dart index e1d517cd..e1a01719 100644 --- a/app/lib/features/runs/ui/runs_filter_sheet.dart +++ b/app/lib/features/runs/ui/runs_filter_sheet.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; +import '../../../ui/adaptive/app_popups.dart'; import '../../../ui/input/app_search_field.dart'; import '../../../ui/layout/app_sheet_header.dart'; import '../../pipelines/pipeline_format.dart' show runStateLabel; @@ -18,6 +19,22 @@ Future showRunsFilterSheet( BuildContext context, RunsController controller, ) { + if (usesDesktopPopups(context)) { + return showDialog( + context: context, + useRootNavigator: true, + builder: (dialog) => Dialog( + clipBehavior: Clip.antiAlias, + child: ConstrainedBox( + constraints: BoxConstraints( + maxWidth: 560, + maxHeight: MediaQuery.sizeOf(dialog).height * 0.85, + ), + child: _RunsFilterSheet(controller: controller), + ), + ), + ); + } return showModalBottomSheet( context: context, isScrollControlled: true, @@ -94,7 +111,6 @@ class _RunsFilterSheetState extends State<_RunsFilterSheet> { final field = AppSearchField( fieldKey: const ValueKey('runs.filter.query'), controller: _text, - cupertino: false, placeholder: 'Filter runs', onChanged: controller.setQuery, ); @@ -113,7 +129,6 @@ class _RunsFilterSheetState extends State<_RunsFilterSheet> { children: [ AppSheetHeader( title: runsFilterTitle, - cupertino: false, doneKey: runsFilterDoneKey, actions: [if (active) _clearButton()], ), diff --git a/app/notes/desktop-dialogs-remaining-sheets.md b/app/notes/desktop-dialogs-remaining-sheets.md new file mode 100644 index 00000000..16a78127 --- /dev/null +++ b/app/notes/desktop-dialogs-remaining-sheets.md @@ -0,0 +1,7 @@ +# Desktop dialogs for remaining sheets + +Added focused wide/narrow route regressions for the chat colour picker and the +Needs you surface. The existing runs filter test already covers the same split. +Wide layouts assert a Material `Dialog`; narrow layouts assert a Material +`BottomSheet`, while the existing interaction tests continue to cover selection, +dismissal, and live updates. diff --git a/app/test/features/attention/notify/notification_manager_wiring_test.dart b/app/test/features/attention/notify/notification_manager_wiring_test.dart index a308cad7..2c39cc13 100644 --- a/app/test/features/attention/notify/notification_manager_wiring_test.dart +++ b/app/test/features/attention/notify/notification_manager_wiring_test.dart @@ -35,7 +35,6 @@ void main() { onOpen: (_) {}, now: () => attentionNow, notifications: notify, - cupertino: false, ), ), ); diff --git a/app/test/features/attention/ui/needs_you_bell_test.dart b/app/test/features/attention/ui/needs_you_bell_test.dart index a6cf1859..d6010377 100644 --- a/app/test/features/attention/ui/needs_you_bell_test.dart +++ b/app/test/features/attention/ui/needs_you_bell_test.dart @@ -1,7 +1,5 @@ -import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pipelines_app/features/attention/ui/needs_you_bell.dart'; import 'package:pipelines_app/features/attention/ui/needs_you_keys.dart'; import 'needs_you_test_support.dart'; @@ -106,32 +104,4 @@ void main() { expect(find.byKey(attentionSheetKey), findsNothing); expect(bellHasFocus(tester), isTrue); }); - - testWidgets('a stale cupertino flag still draws the Material bell and sheet', ( - tester, - ) async { - await tester.pumpWidget( - attentionApp( - Scaffold( - body: Center( - child: NeedsYouBell( - entries: [attentionFixture()], - cupertino: true, - onOpen: (_) {}, - onDismiss: (_) {}, - onClearAll: (_) {}, - ), - ), - ), - ), - ); - - expect(tester.widget(find.byKey(attentionBellKey)), isA()); - expect(find.byIcon(Icons.notifications_outlined), findsOneWidget); - - await tester.tap(find.byKey(attentionBellKey)); - await tester.pumpAndSettle(); - expect(find.byType(BottomSheet), findsOneWidget); - expect(find.byKey(attentionSheetKey), findsOneWidget); - }); } diff --git a/app/test/features/attention/ui/needs_you_sheet_test.dart b/app/test/features/attention/ui/needs_you_sheet_test.dart index 2438d630..5a4d2107 100644 --- a/app/test/features/attention/ui/needs_you_sheet_test.dart +++ b/app/test/features/attention/ui/needs_you_sheet_test.dart @@ -1,4 +1,4 @@ -import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:pipelines_app/features/attention/domain/attention_models.dart'; import 'package:pipelines_app/features/attention/ui/needs_you_keys.dart'; @@ -7,6 +7,29 @@ import 'package:pipelines_app/ui/status/run_status_icon.dart'; import 'needs_you_test_support.dart'; void main() { + testWidgets('Needs you uses a dialog wide and a bottom sheet narrow', ( + tester, + ) async { + final entry = attentionFixture(id: 1, title: 'Ship the release'); + tester.view.physicalSize = const Size(800, 1400); + tester.view.devicePixelRatio = 1; + addTearDown(tester.view.resetPhysicalSize); + addTearDown(tester.view.resetDevicePixelRatio); + await tester.pumpWidget(attentionApp(NeedsYouPage(entries: [entry]))); + + await tester.tap(find.byKey(attentionBellKey)); + await tester.pumpAndSettle(); + expect(find.byType(Dialog), findsOneWidget); + Navigator.of(tester.element(find.byKey(attentionSheetKey))).pop(); + await tester.pumpAndSettle(); + + tester.view.physicalSize = const Size(500, 1400); + await tester.pump(); + await tester.tap(find.byKey(attentionBellKey)); + await tester.pumpAndSettle(); + expect(find.byType(BottomSheet), findsOneWidget); + }); + testWidgets('Material sheet names every row and every dismiss action', ( tester, ) async { diff --git a/app/test/features/chat/ui/sessions/chat_color_test.dart b/app/test/features/chat/ui/sessions/chat_color_test.dart index 06f0a748..e1cd9cac 100644 --- a/app/test/features/chat/ui/sessions/chat_color_test.dart +++ b/app/test/features/chat/ui/sessions/chat_color_test.dart @@ -155,6 +155,45 @@ void main() { }); }); + testWidgets('colour uses a dialog wide and a bottom sheet narrow', ( + tester, + ) async { + final gateway = _gateway(); + tester.view.physicalSize = const Size(800, 1400); + tester.view.devicePixelRatio = 1; + addTearDown(tester.view.resetPhysicalSize); + addTearDown(tester.view.resetDevicePixelRatio); + await _pump(tester, gateway, brightness: Brightness.light); + + await tester.tap( + find.descendant( + of: find.byKey(const Key('chat-actions-s2')), + matching: find.byType(IconButton), + ), + ); + await tester.pumpAndSettle(); + await tester.tap(find.text('Colour…')); + await tester.pumpAndSettle(); + expect(find.byType(Dialog), findsOneWidget); + Navigator.of( + tester.element(find.byKey(const Key('chat-color-sheet'))), + ).pop(); + await tester.pumpAndSettle(); + + tester.view.physicalSize = const Size(500, 1400); + await tester.pump(); + await tester.tap( + find.descendant( + of: find.byKey(const Key('chat-actions-s2')), + matching: find.byType(IconButton), + ), + ); + await tester.pumpAndSettle(); + await tester.tap(find.text('Colour…')); + await tester.pumpAndSettle(); + expect(find.byType(BottomSheet), findsOneWidget); + }); + testWidgets('the selected coloured row keeps its colour and selection', ( tester, ) async { diff --git a/app/test/features/runs/ui/runs_sheets_test.dart b/app/test/features/runs/ui/runs_sheets_test.dart index cd6f1d28..50a67cf0 100644 --- a/app/test/features/runs/ui/runs_sheets_test.dart +++ b/app/test/features/runs/ui/runs_sheets_test.dart @@ -96,6 +96,23 @@ void main() { expect(find.textContaining('Last 7 days'), findsOneWidget); }); + testWidgets('filter uses a dialog wide and a bottom sheet narrow', ( + tester, + ) async { + await mount(tester); + await tester.tap(find.byKey(const ValueKey('runs.filter'))); + await tester.pumpAndSettle(); + expect(find.byType(Dialog), findsOneWidget); + await tester.tap(find.byKey(runsFilterDoneKey)); + await tester.pumpAndSettle(); + + tester.view.physicalSize = const Size(500, 1400); + await tester.pump(); + await tester.tap(find.byKey(const ValueKey('runs.filter'))); + await tester.pumpAndSettle(); + expect(find.byType(BottomSheet), findsOneWidget); + }); + testWidgets('Material single-choice groups are check rows, not checkboxes', ( tester, ) async { @@ -136,10 +153,7 @@ void main() { testWidgets('the usage page is honest when nothing was reported', ( tester, ) async { - await mount( - tester, - createdAt: DateTime(2020, 1, 1).toIso8601String(), - ); + await mount(tester, createdAt: DateTime(2020, 1, 1).toIso8601String()); await tester.tap(find.byKey(const ValueKey('runs.stats'))); await tester.pumpAndSettle(); diff --git a/app/tool/attention_probe.dart b/app/tool/attention_probe.dart index 97a020f2..877ca652 100644 --- a/app/tool/attention_probe.dart +++ b/app/tool/attention_probe.dart @@ -109,7 +109,6 @@ class _ProbeHomeState extends State<_ProbeHome> { Widget build(BuildContext context) { final bell = NeedsYouBell( entries: _entries, - cupertino: widget.cupertino, onOpen: _open, onDismiss: _dismiss, onClearAll: _clearAll, From 69ae0519bd0b3df65b834f537f360a9faa2411e0 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Wed, 11 Nov 2026 20:10:51 +0000 Subject: [PATCH 5/7] Remove Cupertino fixture alternatives Keep capture and probe tooling on the app's single Material surface by removing obsolete platform switches, hosts, and documentation. Preserve the existing Material routes and fixture behavior while retaining compatibility APIs outside this lane. --- app/notes/material-fixtures-cleanup.md | 34 ++++++++++++++++ app/tool/artifact_list_probe.dart | 19 +-------- app/tool/capture/README.md | 10 ++--- app/tool/capture/capture.mjs | 6 +-- .../examples/settings-animation-library.json | 1 - .../fixture_host/fixture_host_native.dart | 2 +- app/tool/fixture_host/fixture_host_web.dart | 6 +-- app/tool/search_fixture/main.dart | 40 +++---------------- app/tool/search_selection_probe_entry.dart | 11 ++--- app/tool/server_editor_save_probe.dart | 8 +--- 10 files changed, 57 insertions(+), 80 deletions(-) create mode 100644 app/notes/material-fixtures-cleanup.md diff --git a/app/notes/material-fixtures-cleanup.md b/app/notes/material-fixtures-cleanup.md new file mode 100644 index 00000000..315127fd --- /dev/null +++ b/app/notes/material-fixtures-cleanup.md @@ -0,0 +1,34 @@ +# Material-only fixture cleanup + +Removed alternate Cupertino hosts and query switches from the search, saved-server, +and artifact-list browser fixtures. Their existing Material routes, callbacks, +text scaling, selection state, and retry behavior remain unchanged. Updated the +capture-kit documentation to describe the single Material fixture surface. + +Focused verification: `artifact_visit_list_test.dart` and +`artifact_visit_list_semantics_test.dart` passed (14 tests); `tool/analyze.sh` +reported clean. No browser capture was run because the fixture chrome host was +only simplified, not visually redesigned. + +## Review follow-up + +Removed the remaining `platform=cupertino` branch from the full-app capture +fixture and its web/native route helper signatures. The fixture now always +constructs the Material app; the shared `PipelinesApp.cupertino` compatibility +parameter remains untouched for other callers. + +Focused verification: the two artifact visit-list tests passed (14 tests), and +`tool/analyze.sh` reported clean. The first attempted test command used stale +paths and failed to load them; the corrected paths were then run successfully. + +## Review follow-up + +Removed the capture CLI's obsolete `--platform` option and URL forwarding, +including the script/example `platform` field. Capture routes now expose only +the Material fixture while retaining theme, search, sizing, and fixture params. + +Focused verification: `artifact_visit_list_test.dart` and +`artifact_visit_list_semantics_test.dart` passed (14 tests); `tool/analyze.sh` +reported clean. `node tool/capture/capture.mjs --help` no longer lists a +platform option, and no platform/Cupertino capture option remains under +`tool/capture`. diff --git a/app/tool/artifact_list_probe.dart b/app/tool/artifact_list_probe.dart index aecd9775..207293fb 100644 --- a/app/tool/artifact_list_probe.dart +++ b/app/tool/artifact_list_probe.dart @@ -1,4 +1,3 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:pipelines_app/features/artifacts/domain/artifact_groups.dart'; import 'package:pipelines_app/features/artifacts/domain/artifact_record.dart'; @@ -9,7 +8,6 @@ import 'package:pipelines_app/features/artifacts/ui/artifact_visit_list.dart'; /// line only echoes the widget's callback. /// /// Query parameters: -/// platform=ios render the Cupertino host instead of Material /// scale=1.5 large-text check /// state=empty no recorded groups /// state=disabled rows rendered without a selection callback @@ -17,7 +15,7 @@ import 'package:pipelines_app/features/artifacts/ui/artifact_visit_list.dart'; void main() { final params = Uri.base.queryParameters; runApp( - _ProbeApp(cupertino: params['platform'] == 'ios', state: params['state']), + _ProbeApp(state: params['state']), ); } @@ -115,9 +113,8 @@ List _groupsFor(String? state) => switch (state) { }; class _ProbeApp extends StatefulWidget { - const _ProbeApp({required this.cupertino, this.state}); + const _ProbeApp({this.state}); - final bool cupertino; final String? state; @override @@ -173,18 +170,6 @@ class _ProbeAppState extends State<_ProbeApp> { ).copyWith(textScaler: TextScaler.linear(scale)), child: child ?? const SizedBox.shrink(), ); - if (widget.cupertino) { - return CupertinoApp( - debugShowCheckedModeBanner: false, - builder: scaled, - home: CupertinoPageScaffold( - // Sections paint the grouped background; the page must match it or a - // white seam shows below the last section in light mode. - backgroundColor: CupertinoColors.systemGroupedBackground, - child: body, - ), - ); - } return MaterialApp( debugShowCheckedModeBanner: false, builder: scaled, diff --git a/app/tool/capture/README.md b/app/tool/capture/README.md index 8d1fe49e..a701b2e8 100644 --- a/app/tool/capture/README.md +++ b/app/tool/capture/README.md @@ -29,8 +29,8 @@ change, from `app/`: ``` URL parameters (the kit sets them from `open=` and the options): -`route=`, `q=`, `platform=material|cupertino`, -`theme=light|dark`; `--params` (or a step's or script's `params`) adds fixture +`route=`, `q=`, `theme=light|dark`; `--params` (or a step's +or script's `params`) adds fixture options such as `chats=2&rich=1`. Use `route=/settings` to open Settings and then click `Server health`; the fixture channel returns `server_stats` automatically. Without `theme`, the app follows the browser's colour @@ -39,7 +39,7 @@ scheme. `--theme` also sets that colour scheme through Chrome emulation. ## Steps You can pass steps on the command line as `verb=value`. With `--script`, they -go in a JSON array or in `{ "size", "platform", "theme", "q", "steps": [...] }`. +go in a JSON array or in `{ "size", "theme", "q", "steps": [...] }`. In JSON, a step can also set `wait` (ms), `timeout`, `name`, `ms` and `frames`. | step | effect | @@ -84,8 +84,8 @@ Its bytes are served from the build, so copy the fixture in after building: ## Recipes (run from `app/` after building `build/probe-app`) Capture a page at phone and fold widths. Use 560 for phone: headless Chrome -misrenders Flutter below about 500 px. The app has one Material UI; do not -capture `platform=cupertino`. +misrenders Flutter below about 500 px. The app has one Material UI. The fixture +is Material-only on every platform. ```sh for size in 560x1000 880x1000; do diff --git a/app/tool/capture/capture.mjs b/app/tool/capture/capture.mjs index 2955dccc..4624e305 100644 --- a/app/tool/capture/capture.mjs +++ b/app/tool/capture/capture.mjs @@ -16,7 +16,7 @@ import { contactSheet, pickFrames } from './sheet.mjs'; import { describe, flutterPage, parseTarget } from './page.mjs'; const USAGE = `usage: capture.mjs (--build | --url ) --out [options] [steps...] -options: --script --size WxH (880x1000) --platform material|cupertino +options: --script --size WxH (880x1000) --theme light|dark --q --wait --film-ms --cdp http://127.0.0.1: --probe true|false --params @@ -47,7 +47,7 @@ let steps = cliSteps; if (opts.script) { const script = JSON.parse(await readFile(opts.script, 'utf8')); const list = Array.isArray(script) ? script : script.steps; - if (!Array.isArray(script)) for (const k of ['size', 'platform', 'theme', 'q', 'params']) if (script[k] && !opts[k]) opts[k] = script[k]; + if (!Array.isArray(script)) for (const k of ['size', 'theme', 'q', 'params']) if (script[k] && !opts[k]) opts[k] = script[k]; steps = [...list, ...cliSteps]; } // The default size applies only when neither the command line nor the script sets one. @@ -74,7 +74,7 @@ const save = async (path, data) => { await writeFile(path, data); report.files.p function routeUrl(step, base) { const route = step.open; - const params = { platform: step.platform ?? opts.platform, theme: step.theme ?? opts.theme, q: step.q ?? opts.q }; + const params = { theme: step.theme ?? opts.theme, q: step.q ?? opts.q }; let url; if (/^https?:/.test(route)) url = new URL(route); else if (probe) { url = new URL('/', base); url.searchParams.set('route', route); } diff --git a/app/tool/capture/examples/settings-animation-library.json b/app/tool/capture/examples/settings-animation-library.json index 854ed8dd..ef5611df 100644 --- a/app/tool/capture/examples/settings-animation-library.json +++ b/app/tool/capture/examples/settings-animation-library.json @@ -1,6 +1,5 @@ { "size": "560x1000", - "platform": "material", "theme": "dark", "params": "chats=4&colors=1&header=1&rich=1", "steps": [ diff --git a/app/tool/fixture_host/fixture_host_native.dart b/app/tool/fixture_host/fixture_host_native.dart index 40ea7a27..5fa945ea 100644 --- a/app/tool/fixture_host/fixture_host_native.dart +++ b/app/tool/fixture_host/fixture_host_native.dart @@ -35,7 +35,7 @@ Map fixtureParams() { void installHostProbes(Map params) {} /// The route goes through [fixtureRouteProvider] instead. -void openFixtureRoute(String route, {required bool cupertino}) {} +void openFixtureRoute(String route) {} /// An explicit loopback endpoint; nothing connects to it but artifact fetches. ServerEndpoint fixtureServer(Map params) => diff --git a/app/tool/fixture_host/fixture_host_web.dart b/app/tool/fixture_host/fixture_host_web.dart index 7388264f..0d5ba3aa 100644 --- a/app/tool/fixture_host/fixture_host_web.dart +++ b/app/tool/fixture_host/fixture_host_web.dart @@ -17,13 +17,11 @@ void installHostProbes(Map params) { } /// Moves the browser to [route] before the app reads its location. -void openFixtureRoute(String route, {required bool cupertino}) { - final platform = cupertino ? 'platform=cupertino' : ''; - final joiner = route.contains('?') ? '&' : '?'; +void openFixtureRoute(String route) { web.window.history.replaceState( null, '', - platform.isEmpty ? route : '$route$joiner$platform', + route, ); } diff --git a/app/tool/search_fixture/main.dart b/app/tool/search_fixture/main.dart index 9a1b344f..cf6dc946 100644 --- a/app/tool/search_fixture/main.dart +++ b/app/tool/search_fixture/main.dart @@ -1,56 +1,34 @@ // Web-only fixture entrypoint for rendered search evidence. It is not part of // the application's `main.dart`; build it explicitly with: // flutter build web -t tool/search_fixture/main.dart -// `?cupertino=1` renders the same screen inside a CupertinoApp. import 'dart:convert'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:pipelines_app/core/api_gateway.dart'; import 'package:pipelines_app/features/search/search_screen.dart'; void main() { - final cupertino = Uri.base.queryParameters['cupertino'] == '1'; - runApp( - cupertino - ? const CupertinoApp( - title: 'Search fixture', - home: _FixtureHost(cupertino: true), - ) - : const MaterialApp( - title: 'Search fixture', - home: _FixtureHost(cupertino: false), - ), - ); + runApp(const MaterialApp(title: 'Search fixture', home: _FixtureHost())); } class _FixtureHost extends StatelessWidget { - const _FixtureHost({required this.cupertino}); - - final bool cupertino; + const _FixtureHost(); @override Widget build(BuildContext context) => SearchScreen( gateway: const _FixtureGateway(), - cupertino: cupertino, onOpen: (hit) { - final route = cupertino - ? CupertinoPageRoute( - builder: (_) => _Opened(hit: hit, cupertino: true), - ) - : MaterialPageRoute( - builder: (_) => _Opened(hit: hit, cupertino: false), - ); - Navigator.of(context).push(route); + Navigator.of(context).push( + MaterialPageRoute(builder: (_) => _Opened(hit: hit)), + ); }, ); } class _Opened extends StatelessWidget { - const _Opened({required this.hit, required this.cupertino}); + const _Opened({required this.hit}); final JsonMap hit; - final bool cupertino; @override Widget build(BuildContext context) { @@ -63,12 +41,6 @@ class _Opened extends StatelessWidget { ), ), ); - if (cupertino) { - return CupertinoPageScaffold( - navigationBar: const CupertinoNavigationBar(middle: Text('Opened')), - child: body, - ); - } return Scaffold( appBar: AppBar(title: const Text('Opened')), body: body, diff --git a/app/tool/search_selection_probe_entry.dart b/app/tool/search_selection_probe_entry.dart index 304ceb76..cd48cbe4 100644 --- a/app/tool/search_selection_probe_entry.dart +++ b/app/tool/search_selection_probe_entry.dart @@ -779,8 +779,6 @@ class _FixtureSink implements WebSocketSink { /// `?html=1` adds an HTML artifact to run 7 (`release-dashboard.html`); /// `?turn=1` adds run 7's debug turn files (input/memory/history/output.md); /// `?q=release` types that query into Search once its field is shown; -/// `?platform=cupertino` renders the Cupertino host (`material`, the -/// default, renders Material as browsers do); /// `?perf=1` prints frame timings (tool/perf/frame_log.dart); /// `?hits=N`, `?chats=N` and `?graph=1` add bench data /// (tool/perf/perf_fixture.dart); @@ -827,10 +825,9 @@ Future main() async { _htmlArtifact = params['html'] == '1'; _warnings = params['warnings'] == '1'; _turnFiles = params['turn'] == '1'; - final cupertino = params['platform'] == 'cupertino'; final route = params['route']; final opensRoute = route != null && route.startsWith('/'); - if (opensRoute) openFixtureRoute(route, cupertino: cupertino); + if (opensRoute) openFixtureRoute(route); final query = params['q']; if (query != null && query.isNotEmpty) _typeSearchWhenShown(query); useAppUrlStrategy(); @@ -896,7 +893,6 @@ Future main() async { sourceName: 'Home Linux', ), client: PipelinesClient(channelFactory: (_) => _FixtureChannel()), - cupertino: cupertino, routeInformationProvider: fixtureRouteProvider(opensRoute ? route : null), windows: probeWindows(params), ); @@ -914,9 +910,8 @@ Future main() async { } /// Pins the platform brightness below it. The app's own `MediaQuery.fromView` -/// takes platform fields from this ambient query, so `ThemeMode.system` (and -/// the Cupertino theme's null brightness) resolve to [brightness] while size, -/// padding and text scale still follow the real view. +/// takes platform fields from this ambient query, so `ThemeMode.system` resolves +/// to [brightness] while size, padding and text scale still follow the real view. class _PinnedBrightness extends StatelessWidget { const _PinnedBrightness({required this.brightness, required this.child}); diff --git a/app/tool/server_editor_save_probe.dart b/app/tool/server_editor_save_probe.dart index ec53934c..92896454 100644 --- a/app/tool/server_editor_save_probe.dart +++ b/app/tool/server_editor_save_probe.dart @@ -1,7 +1,6 @@ import 'dart:js_interop'; import 'dart:js_interop_unsafe'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:pipelines_app/core/servers/server_catalog.dart'; import 'package:pipelines_app/core/servers/server_catalog_store.dart'; @@ -11,7 +10,6 @@ import 'package:pipelines_app/features/settings/server_connections.dart'; // Isolated, in-memory browser fixture: first write fails, retry succeeds. // No sockets, real storage, or production requests. void main() { - final cupertino = Uri.base.queryParameters['host'] == 'cupertino'; final connections = ServerConnections( store: _Store(), onSelected: (_) async {}, @@ -21,11 +19,7 @@ void main() { child: SavedServersSection(connections: connections), ), ); - runApp( - cupertino - ? CupertinoApp(home: CupertinoPageScaffold(child: body)) - : MaterialApp(home: Scaffold(body: body)), - ); + runApp(MaterialApp(home: Scaffold(body: body))); } class _Store extends MemoryServerCatalogStore { From 3f698e1ef9d7a257b2a2833a0be45f7210615904 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Wed, 11 Nov 2026 20:43:49 +0000 Subject: [PATCH 6/7] Record integrated shortcut help verification --- app/notes/keyboard-shortcuts-help.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/notes/keyboard-shortcuts-help.md b/app/notes/keyboard-shortcuts-help.md index 97eb28d9..528f3c3c 100644 --- a/app/notes/keyboard-shortcuts-help.md +++ b/app/notes/keyboard-shortcuts-help.md @@ -1,12 +1,12 @@ # Keyboard shortcuts help -Added a Settings → Help entry that opens a root-layered, bounded Material help +Added a Settings → Tools → Help entry that opens a root-layered, bounded Material help surface on desktop and the existing adaptive sheet on narrow layouts. The registry reuses the terminal, floating-chat, Center Stage and window-cycle label helpers, and records browser caveats for shortcuts that may be reserved. Search and its tooltip share platform-aware labels for Option/Alt+/, macOS -Cmd+/, and Ctrl+/. Integration depends on the separately reviewed Search -handler change (run 367); do not land the help without that handler. +Cmd+/, and Ctrl+/. The separately reviewed Search handler change (run 367) +is integrated into this candidate before landing the help. Floating-chat help describes the new Terminal-to-composer focus handoff instead of the obsolete macOS shell-yank exception. Chat list numbering likewise uses Command only on macOS, matching the shell @@ -21,3 +21,6 @@ Focused verification: Browser/full-app capture was not run in this implementation stage; ui-review should verify desktop light/dark, scaled text, keyboard traversal, and phone constraints with the full-app fixture. + +Manager merged-tree verification after Search integration: 24 focused help, +Settings, Search-shortcut and chat-keyboard tests passed; analysis was clean. From a823a6e8a398ab1327ff22f9c393d970e52a6f4b Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Wed, 11 Nov 2026 20:44:32 +0000 Subject: [PATCH 7/7] Use theme typography in shortcut help --- app/lib/features/settings/keyboard_shortcuts_help.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/lib/features/settings/keyboard_shortcuts_help.dart b/app/lib/features/settings/keyboard_shortcuts_help.dart index a0b99414..11732b1e 100644 --- a/app/lib/features/settings/keyboard_shortcuts_help.dart +++ b/app/lib/features/settings/keyboard_shortcuts_help.dart @@ -33,10 +33,10 @@ class KeyboardShortcutsHelp extends StatelessWidget { children: [ Row( children: [ - const Expanded( + Expanded( child: Text( keyboardShortcutsLabel, - style: TextStyle(fontSize: 22, fontWeight: FontWeight.w600), + style: Theme.of(context).textTheme.headlineSmall, ), ), IconButton(