From 43d6135df3e655a751e20e52a7fa6d112970a8b1 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Tue, 3 Nov 2026 17:34:42 +0000 Subject: [PATCH] Shell: Settings has no list column, so its tab bar stays at the right edge --- app/lib/shell/adaptive_shell.dart | 6 ++++-- app/test/shell/split_destination_bar_test.dart | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/app/lib/shell/adaptive_shell.dart b/app/lib/shell/adaptive_shell.dart index 3eecfc4b..426ddf0c 100644 --- a/app/lib/shell/adaptive_shell.dart +++ b/app/lib/shell/adaptive_shell.dart @@ -180,8 +180,10 @@ class _AdaptiveShellState extends State { listenable: Listenable.merge([_bar.badges, _bar.bar, _paneWidths]), builder: (context, _) { // On a wide window the bar stays under the list column even when no - // item is open (Search, a list alone), so it never jumps sides. - final split = _bar.split(_selected) || showsListBesideDetail(context); + // item is open (Search, a list alone), so it never jumps sides. A page + // (Settings) has no list column, so its bar stays at the right edge. + final split = + _bar.split(_selected) || (!page && showsListBesideDetail(context)); return ListPaneWidth( split: split, preferredWidth: _paneWidths.widthFor(_selected.name), diff --git a/app/test/shell/split_destination_bar_test.dart b/app/test/shell/split_destination_bar_test.dart index 60e78aa4..8c3f1957 100644 --- a/app/test/shell/split_destination_bar_test.dart +++ b/app/test/shell/split_destination_bar_test.dart @@ -77,12 +77,14 @@ void main() { bool tabs = false, double textScale = 1, ListPaneWidthStore? store, + AppDestination destination = AppDestination.chat, }) { final app = AdaptiveShell( cupertino: cupertino, listPaneWidthStore: store ?? MemoryListPaneWidthStore(), - destination: AppDestination.chat, + destination: destination, destinationBodies: { + AppDestination.settings: (_) => const SizedBox.expand(), AppDestination.chat: (_) => split ? ListDetailPanes( list: listBody(), @@ -211,6 +213,17 @@ void main() { expect(pill.right, lessThanOrEqualTo(list.right - kFloatingBarMargin)); }); + testWidgets('$host 1200 Settings: a page without a list keeps the bar ' + 'at the right edge', (tester) async { + await setSize(tester, const Size(1200, 800)); + await tester.pumpWidget( + shell(cupertino: cupertino, destination: AppDestination.settings), + ); + await tester.pump(); + final pill = destinationPill(tester); + expect(pill.right, closeTo(1200 - kFloatingBarMargin, 0.5)); + }); + testWidgets('$host 1200 unsplit: the bar stays under the list column', ( tester, ) async {