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
@@ -11,9 +11,6 @@ mixin _ChatScreenWorkspace on State<ChatScreen> {
JsonMap? _rowFor(String id);
void _back();
bool get _pageOpen;
ChatFloatFrames get _floatFrames;
void _bindFloat(ChatFloatStore store, Future<void> restored);
void _unbindFloat();
Widget _thread(ChatWorkspacePane pane);
ChatSidebarMode _sidebarMode = ChatSidebarMode.expanded;
@@ -112,17 +109,8 @@ mixin _ChatScreenWorkspace on State<ChatScreen> {
_publishWorkspaceRoute();
},
);
final restored = _workspaceBinding!.start(
initialSessionId: widget.initialSessionId,
);
unawaited(restored);
_bindFloat(
SharedPreferencesChatFloatStore(
serverScope: widget.gateway is FederatedChatGateway
? 'all-saved-servers'
: scope,
),
restored,
unawaited(
_workspaceBinding!.start(initialSessionId: widget.initialSessionId),
);
}
@@ -134,7 +122,6 @@ mixin _ChatScreenWorkspace on State<ChatScreen> {
}
_workspaceBinding?.dispose();
_workspaceBinding = null;
_unbindFloat();
if (_workspaceScope != null && scope != _workspaceScope) {
_workspace.restoreLayout(ChatWorkspaceSnapshot.fromLayout(null, null)!);
_forgetRecentSessions();
@@ -323,7 +310,6 @@ mixin _ChatScreenWorkspace on State<ChatScreen> {
controller: _workspace,
onVisibleSessionIdsChanged: _workspaceVisibilityChanged,
shortcutsEnabled: _workspaceVisible,
floatFrames: _floatFrames,
singlePane: !showsListBesideDetail(context),
mobilePeeks: true,
paneTitle: (pane) =>