Merge branch 'main' into pipelines/run-20261111-1947-add-discoverable-unified-keyboard-shortc-134b

This commit is contained in:
2026-11-11 20:43:00 +00:00
104 changed files with 785 additions and 1036 deletions
+1 -2
View File
@@ -37,8 +37,7 @@ class AdaptiveShell extends StatefulWidget {
final Map<AppDestination, WidgetBuilder> destinationBodies;
/// Retained for callers that still pass it; the shell always draws the
/// Material controls and scaffold whether this is set or not.
/// Retained for callers that still pass it; the shell always draws Material.
final bool cupertino;
/// The destination a route owner selected. When null the shell keeps its own
+2 -2
View File
@@ -14,7 +14,7 @@ class AttentionDestinationIcon extends StatelessWidget {
const AttentionDestinationIcon({
super.key,
required this.count,
required this.cupertino,
this.cupertino = false,
required this.child,
});
@@ -55,7 +55,7 @@ class ActivityBadge extends StatelessWidget {
super.key,
required this.count,
required this.label,
required this.cupertino,
this.cupertino = false,
required this.child,
this.bottom = false,
});
+5 -8
View File
@@ -1,4 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
enum AppDestination { pipelines, runs, chat, search, settings }
@@ -22,34 +21,32 @@ AppDestination shellTabFor(AppDestination destination) =>
/// The label and icons for [value].
///
/// [cupertinoIcon] is retained in the record for callers that still read it;
/// the shell itself draws [icon] on its Material path.
({String label, IconData icon, IconData cupertinoIcon}) destinationDetails(
AppDestination value,
) => switch (value) {
AppDestination.pipelines => (
label: 'Pipelines',
icon: Icons.account_tree_outlined,
cupertinoIcon: CupertinoIcons.arrow_branch,
cupertinoIcon: Icons.account_tree_outlined,
),
AppDestination.runs => (
label: 'Runs',
icon: Icons.play_circle_outline,
cupertinoIcon: CupertinoIcons.play_circle,
cupertinoIcon: Icons.play_circle_outline,
),
AppDestination.chat => (
label: 'Chat',
icon: Icons.chat_bubble_outline,
cupertinoIcon: CupertinoIcons.chat_bubble_2,
cupertinoIcon: Icons.chat_bubble_outline,
),
AppDestination.search => (
label: 'Search',
icon: Icons.search,
cupertinoIcon: CupertinoIcons.search,
cupertinoIcon: Icons.search,
),
AppDestination.settings => (
label: 'Settings',
icon: Icons.settings_outlined,
cupertinoIcon: CupertinoIcons.gear,
cupertinoIcon: Icons.settings_outlined,
),
};
+7 -4
View File
@@ -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,
+14
View File
@@ -289,6 +289,20 @@ class WindowManager extends ChangeNotifier {
return true;
}
/// Hides the group when it is active; otherwise shows and raises its most
/// recently used window. A global shortcut should bring a group forward when
/// pressed from another window, rather than hide it behind that window.
bool toggleOrRaiseGroup(String groupId) {
final group = inGroup(groupId).toList();
if (group.isEmpty) return false;
if (group.any(isVisible) && active?.groupId == groupId) {
setGroupShown(groupId, false);
} else {
show(group.last.id);
}
return true;
}
/// Brings the next ([step] 1) or previous (-1) visible window to the top.
void cycle([int step = 1]) {
final visible = windows.where(isVisible).toList();