feat(learn): the assistant's conversation a dialog on the desktop and in expanded windows (Todo's ADR 0033, D11)

- halkyon_ui's sheetShowsAsDialog says whether showAdaptiveSheet shows
  a dialog here, for a sheet of its own that can't go through it.
- Learn's conversation, a half-height sheet dragged up, asks it: where
  sheets are dialogs it is a dialog up to 720 wide and as tall as the
  window, with no handle to drag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-11-01 18:20:58 +01:00
commit 4898d0a04a
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -63,6 +63,36 @@ void main() {
expect(find.byType(BottomSheet), findsNothing);
});
testWidgets('sheetShowsAsDialog says which a sheet of its own will be: '
'a dialog from expanded windows on, and on the desktop at every width', (
tester,
) async {
Future<bool> at(double width) async {
tester.view.physicalSize = Size(width, 900);
tester.view.devicePixelRatio = 1;
late bool shows;
await tester.pumpWidget(
MaterialApp(
home: Builder(
builder: (context) {
shows = sheetShowsAsDialog(context);
return const SizedBox();
},
),
),
);
return shows;
}
addTearDown(tester.view.reset);
expect(await at(400), isFalse);
expect(await at(840), isTrue);
debugDefaultTargetPlatformOverride = TargetPlatform.linux;
addTearDown(() => debugDefaultTargetPlatformOverride = null);
expect(await at(400), isTrue);
debugDefaultTargetPlatformOverride = null;
});
for (final platform in [
TargetPlatform.linux,
TargetPlatform.macOS,