Host floating chats on the shell window system

Phase 2.3 and 2.4 of docs/plans/floating-windows.md. A floating chat is a
window of the chat kind over the app's WindowManager, built from the
app-lifetime ChatRuntime, so it shows over every destination and at start
without the Chat destination being built. Float and Dock move the same
keyed view between the tiling and the window host. The pipelines app keeps
one runtime and one ChatWindows; saved chatFloat records (v1 and v2) are
brought over once.

ChatFloatHost, ChatFloatWindow, the float frames and binding, the
controller's float list and FloatingFocusRoot are gone; the workspace only
asks whether a chat is out in a window. Every MenuAnchor targets the root
overlay (guarded by a test), and menus and tooltips name the Alt chords.
This commit is contained in:
2026-11-10 21:17:40 +00:00
parent 9695100faa
commit fdc730422d
44 changed files with 1369 additions and 1792 deletions
+1 -4
View File
@@ -33,10 +33,7 @@ void main() {
// semantics (a page route's barrier hides what is behind it).
final handle = tester.ensureSemantics();
expect(find.bySemanticsLabel('Window: Probe a'), findsOneWidget);
expect(
tester.getSemantics(find.byTooltip('Minimise')).tooltip,
'Minimise',
);
expect(tester.getSemantics(find.byTooltip('Minimise')).tooltip, 'Minimise');
expect(find.bySemanticsLabel('sheet'), findsOneWidget);
expect(find.bySemanticsLabel('Chat'), findsOneWidget);
expect(
@@ -0,0 +1,27 @@
import 'dart:io';
import 'package:flutter_test/flutter_test.dart';
/// Window content takes input only inside its window (see `WindowNavigator`),
/// so a `MenuAnchor` panel, which may extend past the window, must be in the
/// root overlay. Any content can end up in a window, so every `MenuAnchor` in
/// the app opts in.
void main() {
test('every MenuAnchor targets the root overlay', () {
final offenders = <String>[];
for (final file in Directory('lib').listSync(recursive: true)) {
if (file is! File || !file.path.endsWith('.dart')) continue;
final source = file.readAsStringSync();
for (final match in RegExp(r'\bMenuAnchor\(').allMatches(source)) {
final end = (match.end + 400).clamp(0, source.length);
if (!source
.substring(match.end, end)
.contains('useRootOverlay: true')) {
final line = '\n'.allMatches(source.substring(0, match.start)).length;
offenders.add('${file.path}:${line + 1}');
}
}
}
expect(offenders, isEmpty);
});
}