App: open a chat, the terminal or a diff in a new window
"Open in new window" sits beside Float: the chat pane and chat list row menus, a floating chat window's title bar, the terminal options menu and the diff bar, plus Alt+Shift+Y for the chat with the keyboard (listed in the shortcut help). Once the window opens the item leaves the main window as Float takes a pane out of the tiling. The window is its own app instance at /window/chat/<id>, /window/terminal?tab=<key> or /window/diff/<token>: only that item, named after it, with "Bring back to main window". It has its own connection and writes no shared layout (no open-chat workspace, window store or terminal layout) and posts no notifications, so they stay the main window's. Web opens a popup window (a blocked popup offers a tab); Linux and macOS start a second process with --detached (Flutter's multi-window API is still experimental); Android and iOS hide the action. The capture kit gains a follow step for windows a page opens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,8 @@ import '../features/settings/settings_store.dart';
|
||||
import '../ui/scale/ui_scale.dart';
|
||||
import '../ui/theme/app_font_controller.dart';
|
||||
import '../ui/theme/app_theme.dart';
|
||||
import 'detached/detached_app.dart';
|
||||
import 'detached/detached_route.dart';
|
||||
import 'pipelines_app.dart';
|
||||
import 'server_endpoint.dart';
|
||||
|
||||
@@ -38,8 +40,12 @@ class PipelinesRoot extends StatefulWidget {
|
||||
this.nativeUpdatesSupported,
|
||||
this.federatedChats = true,
|
||||
this.chatPoolFactory,
|
||||
this.detached,
|
||||
});
|
||||
|
||||
/// The detached window this launch shows instead of the whole app.
|
||||
final DetachedRoute? detached;
|
||||
|
||||
final ServerEndpoint server;
|
||||
|
||||
/// The server this build was made for; it pre-fills onboarding.
|
||||
@@ -321,6 +327,20 @@ class _PipelinesRootState extends State<PipelinesRoot> {
|
||||
),
|
||||
);
|
||||
}
|
||||
if (!_onboarding && widget.detached != null) {
|
||||
return DetachedWindowApp(
|
||||
key: ValueKey(_generation),
|
||||
route: widget.detached!,
|
||||
server: _server,
|
||||
client: _client,
|
||||
chatPool: _chatPool,
|
||||
servers: _servers,
|
||||
serverId: _servers.catalog.active?.id,
|
||||
serverAddresses: widget.web
|
||||
? null
|
||||
: _servers.catalog.active?.endpoints.map(Uri.parse).toList(),
|
||||
);
|
||||
}
|
||||
if (!_onboarding) {
|
||||
return PipelinesApp(
|
||||
androidSupported: widget.nativeUpdatesSupported,
|
||||
|
||||
Reference in New Issue
Block a user