Merge commit 'c75023eb402a3851e5bbb617920e1574bb1614ef' into pipelines/run-20261111-0115-cupertino-out-servers-and-settings-secur-c6ad

This commit is contained in:
2026-11-11 02:01:33 +00:00
12 changed files with 183 additions and 266 deletions
@@ -338,9 +338,7 @@ mixin _ChatScreenWorkspace on State<ChatScreen> {
context,
chatSessionColor(_rowFor(pane.sessionId)),
) ??
(chatControlsStyleOf(context) == ChatControlsStyle.cupertino
? CupertinoTheme.of(context).primaryColor
: Theme.of(context).colorScheme.primary)
Theme.of(context).colorScheme.primary
: Colors.transparent;
return Semantics(
selected: active,
@@ -1,8 +1,5 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../../ui/adaptive/host.dart';
/// Covers a chat beside the stage too narrow to use: its colour and title,
/// running down the column. A press brings that chat to center stage. The
/// retained chat underneath keeps its state.
@@ -22,20 +19,13 @@ class ChatCenterStageStrip extends StatelessWidget {
@override
Widget build(BuildContext context) {
final cupertino = usesCupertinoHost(context);
final scheme = Theme.of(context).colorScheme;
final accent =
color ??
(cupertino ? CupertinoTheme.of(context).primaryColor : scheme.primary);
final accent = color ?? scheme.primary;
final background = Color.alphaBlend(
accent.withValues(alpha: .12),
cupertino
? CupertinoColors.secondarySystemBackground.resolveFrom(context)
: scheme.surfaceContainer,
scheme.surfaceContainer,
);
final style = cupertino
? CupertinoTheme.of(context).textTheme.textStyle
: Theme.of(context).textTheme.titleSmall;
final style = Theme.of(context).textTheme.titleSmall;
final label = Padding(
padding: const EdgeInsets.symmetric(vertical: 16),
child: Column(
@@ -62,25 +52,17 @@ class ChatCenterStageStrip extends StatelessWidget {
label: 'Show $title on center stage',
excludeSemantics: true,
onTap: onSelected,
child: cupertino
? CupertinoButton(
padding: EdgeInsets.zero,
color: background,
borderRadius: BorderRadius.zero,
onPressed: onSelected,
child: SizedBox.expand(child: label),
)
: Tooltip(
message: title,
excludeFromSemantics: true,
child: Material(
color: background,
child: InkWell(
onTap: onSelected,
child: SizedBox.expand(child: label),
),
),
),
child: Tooltip(
message: title,
excludeFromSemantics: true,
child: Material(
color: background,
child: InkWell(
onTap: onSelected,
child: SizedBox.expand(child: label),
),
),
),
);
}
}
@@ -7,8 +7,8 @@ import 'chat_workspace_pane_scope.dart';
/// "Move up/down/left/right" for a tiled pane's actions (More) menu. A move
/// swaps the pane with the one across that edge. A direction with no pane is
/// disabled in the Material menu (and left out of a Cupertino action sheet).
/// Nothing is offered when the panes are not tiled (one pane, or a phone).
/// disabled in the menu. Nothing is offered when the panes are not tiled (one
/// pane, or a phone).
List<Widget> chatPaneMoveActions(
ChatWorkspacePaneScope? scope, {
required void Function(String targetPaneId) onMove,
@@ -1,6 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../../ui/adaptive/host.dart';
/// A named, explicit switch action above the inactive transcript. It occupies
/// space rather than obscuring the small chat's readable content.
@@ -17,20 +15,11 @@ class ChatPeekHeader extends StatelessWidget {
Widget build(BuildContext context) => LayoutBuilder(
builder: (context, constraints) {
final compact = constraints.maxHeight < 44;
final cupertino = usesCupertinoHost(context);
final textStyle = cupertino
? (compact
? CupertinoTheme.of(context).textTheme.tabLabelTextStyle
: CupertinoTheme.of(context).textTheme.textStyle)
: (compact
? Theme.of(context).textTheme.labelMedium
: Theme.of(context).textTheme.labelLarge);
final foreground = cupertino
? CupertinoColors.label.resolveFrom(context)
: Theme.of(context).colorScheme.onSurface;
final background = cupertino
? CupertinoColors.secondarySystemBackground.resolveFrom(context)
: Theme.of(context).colorScheme.surfaceContainer;
final textStyle = compact
? Theme.of(context).textTheme.labelMedium
: Theme.of(context).textTheme.labelLarge;
final foreground = Theme.of(context).colorScheme.onSurface;
final background = Theme.of(context).colorScheme.surfaceContainer;
final content = Row(
children: [
Expanded(
@@ -44,34 +33,23 @@ class ChatPeekHeader extends StatelessWidget {
const SizedBox(width: 8),
Text('Switch', style: textStyle?.copyWith(color: foreground)),
const SizedBox(width: 4),
Icon(
cupertino ? CupertinoIcons.arrow_up : Icons.arrow_upward,
color: foreground,
size: 18,
),
Icon(Icons.arrow_upward, color: foreground, size: 18),
],
);
return ColoredBox(
color: background,
child: Tooltip(
message: 'Switch to $title',
child: cupertino
? CupertinoButton(
minimumSize: const Size(0, 44),
padding: const EdgeInsets.symmetric(horizontal: 12),
onPressed: onActivate,
child: content,
)
: TextButton(
style: TextButton.styleFrom(
minimumSize: const Size(0, 44),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
padding: const EdgeInsets.symmetric(horizontal: 12),
shape: const RoundedRectangleBorder(),
),
onPressed: onActivate,
child: content,
),
child: TextButton(
style: TextButton.styleFrom(
minimumSize: const Size(0, 44),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
padding: const EdgeInsets.symmetric(horizontal: 12),
shape: const RoundedRectangleBorder(),
),
onPressed: onActivate,
child: content,
),
),
);
},
@@ -1,6 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../../ui/adaptive/host.dart';
import '../../../ui/motion/quick_switch_effect.dart';
import 'chat_pane_switch_motion.dart';
@@ -24,12 +22,8 @@ class ChatSwitchCard extends StatelessWidget {
motion.isAnimating ? motion.progress : 1,
outgoing: outgoing,
);
final shadow = usesCupertinoHost(context)
? CupertinoColors.black
: Theme.of(context).shadowColor;
final surface = usesCupertinoHost(context)
? CupertinoTheme.of(context).scaffoldBackgroundColor
: Theme.of(context).colorScheme.surface;
final shadow = Theme.of(context).shadowColor;
final surface = Theme.of(context).colorScheme.surface;
return LayoutBuilder(
builder: (context, constraints) => Opacity(
opacity: pose.opacity,
@@ -1,9 +1,7 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/semantics.dart';
import 'package:flutter/services.dart';
import '../../../ui/adaptive/host.dart';
import 'chat_workspace_controller.dart';
import '../../../ui/adaptive/resize_grip.dart';
import 'chat_workspace_geometry.dart';
@@ -50,9 +48,7 @@ class _ChatWorkspaceDividerState extends State<ChatWorkspaceDivider> {
@override
Widget build(BuildContext context) {
final verticalLine = _horizontal;
final color = usesCupertinoHost(context)
? CupertinoColors.separator.resolveFrom(context)
: Theme.of(context).dividerColor;
final color = Theme.of(context).dividerColor;
return Semantics(
identifier: 'chat-divider-${widget.geometry.split.id}',
label: 'Resize chat panes ${_horizontal ? 'horizontally' : 'vertically'}',
@@ -1,4 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/widgets.dart';
import '../../../ui/motion/motion.dart';
import '../../../ui/motion/surface_visibility.dart';
@@ -78,23 +78,16 @@ class _ChatWorkspaceEntranceState extends State<ChatWorkspaceEntrance>
),
),
);
final transition = widget.cupertino
? CupertinoPageTransition(
primaryRouteAnimation: _controller,
secondaryRouteAnimation: const AlwaysStoppedAnimation(0),
linearTransition: false,
child: content,
)
: FadeTransition(
opacity: _curve,
child: SlideTransition(
position: Tween<Offset>(
begin: const Offset(0, 0.08),
end: Offset.zero,
).animate(_curve),
child: content,
),
);
final transition = FadeTransition(
opacity: _curve,
child: SlideTransition(
position: Tween<Offset>(
begin: const Offset(0, 0.08),
end: Offset.zero,
).animate(_curve),
child: content,
),
);
return AnimatedBuilder(
animation: _controller,
child: transition,
@@ -1,6 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../../ui/adaptive/host.dart';
import 'chat_center_stage_motion.dart';
import 'chat_center_stage_strip.dart';
import 'chat_mobile_panes.dart';
@@ -130,11 +128,7 @@ Widget chatWorkspaceSurface({
clipBehavior: Clip.hardEdge,
children: [
if (mobile != null)
ColoredBox(
color: usesCupertinoHost(context)
? CupertinoTheme.of(context).scaffoldBackgroundColor
: Theme.of(context).colorScheme.surface,
),
ColoredBox(color: Theme.of(context).colorScheme.surface),
picture,
for (final pane in livePanes)
if (motion.isTape ||