Keep settings and delivery updates together
Preserve the reviewed grouped Settings page while fixing its embedded phone safe area, and land the accompanying notification, walkthrough, terminal, and documentation updates captured by this run.
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -28,6 +28,9 @@ 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/first_run_walkthrough.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';
|
||||
@@ -579,6 +582,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)
|
||||
@@ -820,13 +827,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,
|
||||
@@ -837,32 +845,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.
|
||||
@@ -918,7 +934,7 @@ class _PipelinesAppState extends State<PipelinesApp>
|
||||
),
|
||||
// Settings is a page of the Pipelines tab (its bar's gear), not a
|
||||
// tab; the shell shows it with Back to Pipelines.
|
||||
AppDestination.settings: (_) => SettingsScreen(
|
||||
AppDestination.settings: (context) => SettingsScreen(
|
||||
terminalLayout: _terminals.layout,
|
||||
client: _session.client,
|
||||
// A phone signs in at the web login; a browser has its own.
|
||||
@@ -933,6 +949,9 @@ class _PipelinesAppState extends State<PipelinesApp>
|
||||
notifications: _notifications,
|
||||
deliveryService: _deliveryService,
|
||||
deliveryServiceController: _deliveryController,
|
||||
// The Help and about row replays the first-run walkthrough. It only
|
||||
// shows it; the device's seen record is left alone.
|
||||
onShowWalkthrough: () => unawaited(showFirstRunWalkthrough(context)),
|
||||
),
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user