Use adaptive popups for chat details

Present chat turn and shell-history detail surfaces through the shared adaptive popup helpers so desktop uses dialogs while phone layouts retain bottom sheets. Update focused tests and document the verified behavior.
This commit is contained in:
2026-11-10 22:14:29 +00:00
parent 31f495fc18
commit 8a308204fa
7 changed files with 36 additions and 107 deletions
@@ -1,7 +1,7 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../../shell/list_detail_policy.dart';
import '../../../ui/adaptive/app_popups.dart';
import '../ui/sessions/chat_adaptive.dart';
import '../ui/transcript/chat_turn_chip.dart';
import 'chat_shell_history.dart';
@@ -48,35 +48,10 @@ class ChatShellHistoryChip extends StatelessWidget {
}
Future<void> _open(BuildContext context, bool cupertino) {
if (MediaQuery.sizeOf(context).width >= kListDetailMinWidth) {
return showChatTurnSheet(
context,
cupertino,
ChatShellHistoryView(controller: controller, runIds: runIds),
);
}
final view = ChatShellHistoryView(
controller: controller,
runIds: runIds,
inSheet: false,
);
const title = Text(chatShellHistoryTitle);
return Navigator.of(context).push<void>(
cupertino
? CupertinoPageRoute<void>(
fullscreenDialog: true,
builder: (_) => CupertinoPageScaffold(
navigationBar: const CupertinoNavigationBar(middle: title),
child: SafeArea(child: view),
),
)
: MaterialPageRoute<void>(
fullscreenDialog: true,
builder: (_) => Scaffold(
appBar: AppBar(title: title),
body: SafeArea(child: view),
),
),
return showAppDetails<void>(
context,
builder: (_) =>
ChatShellHistoryView(controller: controller, runIds: runIds),
);
}
}