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
@@ -155,7 +155,7 @@ void main() {
await tester.tap(chip);
await tester.pumpAndSettle();
expect(find.byType(BottomSheet), findsOneWidget);
expect(find.byType(Dialog), findsOneWidget);
expect(find.text('Dismissed commands'), findsOneWidget);
expect(find.text('\$ git status'), findsOneWidget);
expect(find.text('Exit 0 · 50 ms'), findsOneWidget);
@@ -181,29 +181,20 @@ void main() {
await tester.pumpAndSettle();
expect(gateway.bodies('chat_shell_restore').single['run_ids'], ['run_a']);
expect(find.textContaining('restored to the transcript'), findsOneWidget);
Navigator.of(tester.element(find.byType(BottomSheet))).pop();
Navigator.of(tester.element(find.byType(Dialog))).pop();
await tester.pumpAndSettle();
expect(card(), findsOneWidget);
expect(chip, findsNothing);
});
testWidgets('narrow: the history opens as a full-screen page', (
tester,
) async {
size(tester, const Size(400, 800));
testWidgets('narrow: the history opens as a bottom sheet', (tester) async {
size(tester, const Size(430, 900));
gateway.messages = [reply('a1', 10000, 'Answer')];
history([dismissed('run_a', 5000)]);
await open(tester);
await tester.tap(chip);
await tester.pumpAndSettle();
expect(find.byType(BottomSheet), findsNothing);
expect(
find.descendant(
of: find.byType(AppBar),
matching: find.text('Dismissed commands'),
),
findsOneWidget,
);
expect(find.byType(BottomSheet), findsOneWidget);
await tester.tap(
find.byKey(const ValueKey('chat-shell-history-restore-run_a')),
);