Add the shell window host with layering acceptance tests
Phase 1.3 and 1.4 of docs/plans/floating-windows.md. Windows are plain children of the terminal stage's stack in the shell page, outside every destination, so popups opened from one are above all of them. Each window has its own page navigator: pushed pages open inside the window, and popup routes go to the root navigator. One WindowFrame chrome (move, resize, minimise, maximise, close), a focus scope per window, a ScaffoldMessenger per window. No feature uses it yet. The capture fixture opens probe windows with ?windows=N, and window_layering_test.dart covers every popup type from a window over Chat and over another destination.
This commit is contained in:
@@ -41,6 +41,7 @@ import 'package:web_socket_channel/web_socket_channel.dart';
|
||||
import 'fixture_host/fixture_host.dart';
|
||||
import 'perf/chat_search_fixture.dart';
|
||||
import 'perf/chat_question_fixture.dart';
|
||||
import 'capture/window_probe.dart';
|
||||
import 'perf/chat_scroll_fixture.dart';
|
||||
import 'perf/perf_fixture.dart';
|
||||
import 'probe_folder_fixture.dart';
|
||||
@@ -647,8 +648,9 @@ class _FixtureAuthenticator extends ChangeNotifier
|
||||
@override
|
||||
Future<MachineAccessResult> probe(SavedServer server) async {
|
||||
await Future<void>.delayed(const Duration(milliseconds: 400));
|
||||
return _verdicts[server.id] ??=
|
||||
const MachineAccessResult(MachineAccess.needsPassword);
|
||||
return _verdicts[server.id] ??= const MachineAccessResult(
|
||||
MachineAccess.needsPassword,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -784,6 +786,8 @@ class _FixtureSink implements WebSocketSink {
|
||||
/// (tool/perf/perf_fixture.dart);
|
||||
/// `?terminals=1` lists two machine terminals, and `?terminal=panel` or
|
||||
/// `?terminal=float` opens them at launch (tool/perf/terminal_fixture.dart);
|
||||
/// `?windows=N` opens N floating probe windows whose content opens every
|
||||
/// kind of popup and a pushed page (tool/capture/window_probe.dart);
|
||||
/// `?theme=dark` / `?theme=light` pins the platform brightness the app's
|
||||
/// `ThemeMode.system` follows (omitted: the browser's color scheme).
|
||||
///
|
||||
@@ -894,6 +898,7 @@ Future<void> main() async {
|
||||
client: PipelinesClient(channelFactory: (_) => _FixtureChannel()),
|
||||
cupertino: cupertino,
|
||||
routeInformationProvider: fixtureRouteProvider(opensRoute ? route : null),
|
||||
windows: probeWindows(params),
|
||||
);
|
||||
final brightness = switch (params['theme']) {
|
||||
'dark' => Brightness.dark,
|
||||
|
||||
Reference in New Issue
Block a user