Integrate scoped Settings restoration and preserve detail on Back

This commit is contained in:
2026-11-08 01:05:07 +00:00
parent 151d99fbb6
commit e363a90295
4 changed files with 22 additions and 1 deletions
+4 -1
View File
@@ -664,7 +664,9 @@ class _PipelinesAppState extends State<PipelinesApp>
cupertino: _cupertino,
destination: _destinationOf(route.kind),
onDestinationSelected: _selectDestination,
onClosePage: () => _delegate.goTo(AppRoute.pipelines),
onClosePage: () => _delegate.goTo(
_bodyRoutes[AppDestination.pipelines] ?? AppRoute.pipelines,
),
destinationBodies: {
AppDestination.pipelines: (_) => PipelinesDestination(
session: _session,
@@ -745,6 +747,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(
navigationScope: _navigationScope,
client: _session.client,
// A phone signs in at the web login; a browser has its own.
showSignIn: !kIsWeb,
@@ -95,6 +95,7 @@ class _ChatWorkspaceDividerState extends State<ChatWorkspaceDivider> {
onPanEnd: (_) => setState(() => _drag = null),
onPanCancel: () => setState(() => _drag = null),
child: Tooltip(
excludeFromSemantics: true,
message: 'Drag to resize chat panes',
child: Stack(
fit: StackFit.expand,
+7
View File
@@ -6,3 +6,10 @@ existing 12-pixel divider; split geometry and resize limits are unchanged.
Hover/focus/drag highlights the grip. Existing mouse/touch/keyboard resizing and
double-click reset remain on the same hit target. Mobile keeps its existing grip
size and appearance through the shared widget.
Sixteen focused workspace/mobile-pane tests pass (`/tmp/memwatch/out.0QqRuP`),
analysis clean. Full-app browser captures at 1280x1000 show side-by-side and
stacked separators in Material and Cupertino; both grips and native theme
colors were inspected. Cupertino dragging changed both split extents using
the grips. Evidence: `/tmp/review/pane-divider-grips` and
`/tmp/review/pane-divider-grips-cupertino`. Native device verification is absent.
@@ -197,6 +197,16 @@ void main() {
await tab(tester, 'pipelines');
expect(app.provider.value.uri.path, '/settings');
expect(tester.widget<PipelinesScreen>(hidden).initialPipelineId, 1);
await tester.tap(find.byKey(const Key('shell.back')));
await tester.pumpAndSettle();
expect(app.provider.value.uri.path, '/pipelines/1');
expect(tester.state(find.byType(PipelinesScreen)), same(pipelineState));
expect(
tester
.widget<PipelinesScreen>(find.byType(PipelinesScreen))
.initialPipelineId,
1,
);
expect(tester.takeException(), isNull);
});
}