Chat stack: the default, also on a wide phone or tablet; a close button where the pile was

Chat stack is now the default phone chat navigation (a stored choice is
kept), and on Android or iOS it stays on a wide layout (an unfolded
foldable) above the active pane, where floating is ignored too. When
expanded, the pile turns into a close button at its own spot and the
column rises above it; while a chat is dragged that button is the remove
target, replacing the separate x at the bottom. Chat widget tests start
on Quick switch (they run as Android); the stack's tests choose it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 21:47:57 +00:00
parent fba3b924f1
commit 130c1e6708
18 changed files with 344 additions and 184 deletions
@@ -32,19 +32,20 @@ void main() {
),
);
expect(find.text(SettingsChatNavigationSection.title), findsOneWidget);
expect(controller.value, MobileChatNavigation.quickSwitch);
// Without a stored choice: the Chat stack.
expect(controller.value, MobileChatNavigation.chatStack);
expect(
find.text(MobileChatNavigation.quickSwitch.description),
find.text(MobileChatNavigation.chatStack.description),
findsOneWidget,
);
await tester.tap(
find.byKey(const ValueKey('settings-chat-navigation-chatStack')),
find.byKey(const ValueKey('settings-chat-navigation-quickSwitch')),
);
await tester.pumpAndSettle();
expect(controller.value, MobileChatNavigation.chatStack);
expect(store.saved, 'chatStack');
expect(controller.value, MobileChatNavigation.quickSwitch);
expect(store.saved, 'quickSwitch');
expect(
find.text(MobileChatNavigation.chatStack.description),
find.text(MobileChatNavigation.quickSwitch.description),
findsOneWidget,
);
@@ -52,11 +53,11 @@ void main() {
final next = MobileChatNavigationController(store: store);
addTearDown(next.dispose);
await next.restore();
expect(next.value, MobileChatNavigation.chatStack);
expect(next.value, MobileChatNavigation.quickSwitch);
store.success = false;
await tester.tap(
find.byKey(const ValueKey('settings-chat-navigation-quickSwitch')),
find.byKey(const ValueKey('settings-chat-navigation-chatStack')),
);
await tester.pumpAndSettle();
expect(find.text('Could not save; applies until reload.'), findsOneWidget);