Remove Cupertino chat transcript branches

Keep the existing Material transcript path while preserving public Cupertino parameters for callers. Narrow transcript tests to the Material-only behavior and remove Cupertino-only fixtures.
This commit is contained in:
2026-11-11 11:46:13 +00:00
parent 1c2bb8733a
commit fbe1928f59
52 changed files with 1524 additions and 2947 deletions
@@ -1,8 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../../../ui/adaptive/app_popups.dart';
import '../sessions/chat_adaptive.dart';
/// The quiet chip under an agent turn (its tools, its permissions) and the
/// native sheet it opens.
@@ -42,8 +40,6 @@ class ChatTurnChip extends StatelessWidget {
@override
Widget build(BuildContext context) {
final cupertino =
chatControlsStyleOf(context) == ChatControlsStyle.cupertino;
final content = Row(
mainAxisSize: MainAxisSize.min,
children: [
@@ -53,42 +49,27 @@ class ChatTurnChip extends StatelessWidget {
Flexible(child: _label(maxLines: 1, overflow: TextOverflow.ellipsis))
else
_label(),
Icon(
cupertino ? CupertinoIcons.chevron_up : Icons.expand_less,
size: 14,
color: color,
),
Icon(Icons.expand_less, size: 14, color: color),
],
);
return Semantics(
button: true,
// The child's own action is excluded with its label, so the node
// carries the activation for assistive technology.
onTap: () => _open(context, cupertino),
onTap: () => _open(context),
label: semanticsLabel,
excludeSemantics: true,
child: Padding(
padding: const EdgeInsets.only(top: 2),
child: cupertino
? CupertinoButton(
key: chipKey,
padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 4),
minimumSize: Size.zero,
onPressed: () => _open(context, cupertino),
child: content,
)
: InkWell(
key: chipKey,
borderRadius: BorderRadius.circular(8),
onTap: () => _open(context, cupertino),
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 4,
vertical: 6,
),
child: content,
),
),
child: InkWell(
key: chipKey,
borderRadius: BorderRadius.circular(8),
onTap: () => _open(context),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 6),
child: content,
),
),
),
);
}
@@ -109,8 +90,8 @@ class ChatTurnChip extends StatelessWidget {
);
}
Future<void> _open(BuildContext context, bool cupertino) {
if (open case final open?) return open(context, cupertino);
Future<void> _open(BuildContext context) {
if (open case final open?) return open(context, false);
return showChatTurnSheet(context, sheet!);
}
}