Merge commit '40623991e8709e5c1ab3e875b51d4de55f0c20a5' into pipelines/run-20261112-0201-chat-seen-only-after-real-interaction-7302

This commit is contained in:
2026-11-12 03:08:16 +00:00
130 changed files with 5209 additions and 813 deletions
+9
View File
@@ -8,6 +8,7 @@ import '../features/terminal/terminal_machines.dart';
import '../features/terminal/terminal_surface.dart';
import '../features/terminal/terminal_toggle_button.dart';
import '../features/terminal/terminal_window.dart';
import '../shell/list_detail_policy.dart';
import '../shell/windows/window_manager.dart';
/// The app's machine terminals: one hub over every connected machine (the
@@ -66,6 +67,14 @@ class AppTerminals {
/// The bar button showing or hiding the terminal.
Widget toggle() => TerminalToggleButton(layout: layout);
/// The Chat tab's shell-bar button. Only a wide layout shows the shell bar
/// over an open chat, so only there is it kept. A narrow layout has none:
/// its open chat's own bar carries the terminal (see
/// `terminalChatBarAction`), and a chat list's bar has none (the shortcut
/// still shows the terminal).
Widget? barToggle(BuildContext context) =>
showsListBesideDetail(context) ? toggle() : null;
void dispose() {
floating?.dispose();
hub.dispose();
+43 -28
View File
@@ -28,6 +28,8 @@ import '../features/runs/ui/run_search_selection.dart';
import '../features/search/domain/search_target.dart';
import '../features/settings/settings_screen.dart';
import '../features/settings/settings_store.dart';
import '../features/walkthrough/walkthrough_gate.dart';
import '../features/walkthrough/walkthrough_store.dart';
import '../features/updates/app_updates.dart';
import '../features/updates/launch_update.dart';
import '../features/updates/launch_update_dialog.dart';
@@ -581,6 +583,10 @@ class _PipelinesAppState extends State<PipelinesApp>
_attentionCount.value = count;
}
/// The device's first-run walkthrough record (per device, not per server).
final WalkthroughStore _walkthroughStore =
const SharedPreferencesWalkthroughStore();
@override
Widget build(BuildContext context) => widget.servers == null
? MyApp.router(routerConfig: _config)
@@ -803,7 +809,7 @@ class _PipelinesAppState extends State<PipelinesApp>
builder: (context, count, _) => _terminals.surround(
_shellFor(route, count),
onChat: route.kind == AppRouteKind.chat,
windows: WindowHost(manager: _windows),
windows: WindowHost(manager: _windows, reservesRail: true),
),
);
@@ -822,13 +828,14 @@ class _PipelinesAppState extends State<PipelinesApp>
final runsRoute = tab(AppDestination.runs);
final chatRoute = tab(AppDestination.chat);
return AdaptiveShell(
// The terminal button sits on the Chat tab only; the keyboard
// The terminal button sits on the Chat tab's shell bar on wide layouts;
// a narrow layout has it in the chat's own bar instead. The keyboard
// shortcut still toggles the terminal everywhere.
barActions: [
// Shown on every tab while the app has floating windows.
WindowsMenuButton(manager: _windows),
if (_destinationOf(route.kind) == AppDestination.chat)
_terminals.toggle(),
?_terminals.barToggle(context),
],
attentionCount: counts.attention,
runningRunCount: counts.running,
@@ -839,32 +846,40 @@ class _PipelinesAppState extends State<PipelinesApp>
_bodyRoutes[AppDestination.pipelines] ?? AppRoute.pipelines,
),
destinationBodies: {
AppDestination.pipelines: (_) => PipelinesDestination(
session: _session,
server: widget.server,
active: _destinationOf(route.kind) == AppDestination.pipelines,
legacyPendingEndpoints: widget.legacyPendingEndpoints,
refreshToken: _pipelinesRefresh,
onRunStarted: _runStarted,
onViewPipelineRuns: (id) =>
_delegate.goTo(AppRoute.runsForPipeline(id)),
onOpenSchedules: _delegate.openSchedules,
onOpenSettings: () => _delegate.goTo(AppRoute.settings),
// The open pipeline is part of the route, so Back steps out of it.
onSelectionChanged: (id) {
final current = _delegate.route;
if (current.kind != AppRouteKind.pipelines) return;
if (id == null) {
if (current.pipelineId != null) {
_delegate.goTo(AppRoute.pipelines);
AppDestination.pipelines: (_) => FirstRunWalkthroughGate(
store: _walkthroughStore,
enabled: _destinationOf(route.kind) == AppDestination.pipelines,
serverScope: _navigationScope,
connection: _session,
connected: () => _session.connected,
gateway: _session.client,
child: PipelinesDestination(
session: _session,
server: widget.server,
active: _destinationOf(route.kind) == AppDestination.pipelines,
legacyPendingEndpoints: widget.legacyPendingEndpoints,
refreshToken: _pipelinesRefresh,
onRunStarted: _runStarted,
onViewPipelineRuns: (id) =>
_delegate.goTo(AppRoute.runsForPipeline(id)),
onOpenSchedules: _delegate.openSchedules,
onOpenSettings: () => _delegate.goTo(AppRoute.settings),
// The open pipeline is part of the route, so Back steps out of it.
onSelectionChanged: (id) {
final current = _delegate.route;
if (current.kind != AppRouteKind.pipelines) return;
if (id == null) {
if (current.pipelineId != null) {
_delegate.goTo(AppRoute.pipelines);
}
} else if (current.pipelineId != id) {
_delegate.goTo(AppRoute.pipeline(id));
}
} else if (current.pipelineId != id) {
_delegate.goTo(AppRoute.pipeline(id));
}
},
initialPipelineId: pipelinesRoute.pipelineId,
initialVersion: pipelinesRoute.version,
initialStageKey: pipelinesRoute.stageKey,
},
initialPipelineId: pipelinesRoute.pipelineId,
initialVersion: pipelinesRoute.version,
initialStageKey: pipelinesRoute.stageKey,
),
),
// The one place a field or artifact hit's selection can be resolved: the
// run detail owns the recorded visit and Summary section.