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:
@@ -28,6 +28,9 @@ import 'dart:convert';
|
||||
|
||||
import 'package:pipelines_app/application/app_url_strategy.dart';
|
||||
import 'package:pipelines_app/application/pipelines_app.dart';
|
||||
import 'package:pipelines_app/application/detached/detached_app.dart';
|
||||
import 'package:pipelines_app/application/detached/detached_platform.dart';
|
||||
import 'package:pipelines_app/application/detached/detached_route.dart';
|
||||
import 'package:pipelines_app/application/bootstrap.dart';
|
||||
import 'package:pipelines_app/core/api_gateway.dart';
|
||||
import 'package:pipelines_app/core/transport/pipelines_client.dart';
|
||||
@@ -1079,25 +1082,43 @@ Future<void> main() async {
|
||||
},
|
||||
)
|
||||
: null;
|
||||
final app = PipelinesApp(
|
||||
serverId: machines?.catalog.active?.id,
|
||||
servers: machines,
|
||||
chatPool: pool,
|
||||
server: fixtureServer(params),
|
||||
webPlatform: params['nativeUpdate'] == null ? kIsWeb : false,
|
||||
androidSupported: params['nativeUpdate'] == null ? null : true,
|
||||
installedVersionReader: () async => 1,
|
||||
androidFeedReader: (base) async => AppUpdate(
|
||||
versionCode: 2,
|
||||
versionName: '0.1.2',
|
||||
apk: base.resolve('Pipelines.zip'),
|
||||
platform: params['nativeUpdate'] ?? 'android',
|
||||
sourceName: 'Home Linux',
|
||||
),
|
||||
client: PipelinesClient(channelFactory: (_) => _FixtureChannel()),
|
||||
routeInformationProvider: fixtureRouteProvider(opensRoute ? route : null),
|
||||
windows: probeWindows(params),
|
||||
);
|
||||
// A detached window (`/window/chat/<id>`, opened by Open in new window)
|
||||
// runs on the same fixture: its URL carries this page's parameters.
|
||||
DetachedPlatform.extraQuery = () => {
|
||||
for (final entry in params.entries)
|
||||
if (entry.key != 'route' && entry.key != 'q') entry.key: entry.value,
|
||||
};
|
||||
final detached = kIsWeb ? DetachedRoute.parse(Uri.base.toString()) : null;
|
||||
final app = detached != null
|
||||
? DetachedWindowApp(
|
||||
route: detached,
|
||||
server: fixtureServer(params),
|
||||
serverId: machines?.catalog.active?.id,
|
||||
servers: machines,
|
||||
chatPool: pool,
|
||||
client: PipelinesClient(channelFactory: (_) => _FixtureChannel()),
|
||||
)
|
||||
: PipelinesApp(
|
||||
serverId: machines?.catalog.active?.id,
|
||||
servers: machines,
|
||||
chatPool: pool,
|
||||
server: fixtureServer(params),
|
||||
webPlatform: params['nativeUpdate'] == null ? kIsWeb : false,
|
||||
androidSupported: params['nativeUpdate'] == null ? null : true,
|
||||
installedVersionReader: () async => 1,
|
||||
androidFeedReader: (base) async => AppUpdate(
|
||||
versionCode: 2,
|
||||
versionName: '0.1.2',
|
||||
apk: base.resolve('Pipelines.zip'),
|
||||
platform: params['nativeUpdate'] ?? 'android',
|
||||
sourceName: 'Home Linux',
|
||||
),
|
||||
client: PipelinesClient(channelFactory: (_) => _FixtureChannel()),
|
||||
routeInformationProvider: fixtureRouteProvider(
|
||||
opensRoute ? route : null,
|
||||
),
|
||||
windows: probeWindows(params),
|
||||
);
|
||||
final brightness = switch (params['theme']) {
|
||||
'dark' => Brightness.dark,
|
||||
'light' => Brightness.light,
|
||||
|
||||
Reference in New Issue
Block a user