Keep phone pages and window pages for turn changes and shell history

A dialog only in the tiled app on a wide layout: a phone keeps its
full-screen page (run 304 had turned it into a sheet and rewritten the
tests), and a floating window opens it as a page of that window so a diff
or command output it opens stays in the window.
This commit is contained in:
2026-11-10 22:56:32 +00:00
parent 122c849281
commit 3a0577cba0
4 changed files with 67 additions and 11 deletions
@@ -187,14 +187,24 @@ void main() {
expect(chip, findsNothing);
});
testWidgets('narrow: the history opens as a bottom sheet', (tester) async {
testWidgets('narrow: the history opens as a full-screen page', (
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), findsOneWidget);
expect(find.byType(BottomSheet), findsNothing);
expect(find.byType(Dialog), findsNothing);
expect(
find.descendant(
of: find.byType(AppBar),
matching: find.text('Dismissed commands'),
),
findsOneWidget,
);
await tester.tap(
find.byKey(const ValueKey('chat-shell-history-restore-run_a')),
);