feat(chat): segmented chat header with back, title and model pills

The open conversation draws its own bar of separate rounded pieces: the
platform Back in a circle, a title pill with the folder that opens the
chat information, and a pill with the model and mode controls. Detail
pages drop only their app bar for it, keeping the body mounted.
This commit is contained in:
2026-10-30 23:43:00 +00:00
parent 498c6f17a6
commit 4a85a12cf7
8 changed files with 385 additions and 168 deletions
@@ -207,20 +207,22 @@ void main() {
expect(find.byKey(const Key('chat-turn-activity')), findsOneWidget);
expect(find.text('Kept behind a native disclosure.'), findsNothing);
// The shell bar stays over the list and rail; the open chat has its
// own bar in its pane, with no Back: the list beside it is the way out.
// The shell bar stays over the list and rail; the open chat draws its
// own floating bar in its pane, with no Back: the list beside it is the
// way out.
expect(find.byType(ChatSessionsScreen), findsOneWidget);
expect(
find.byType(NavigationRail),
cupertino ? findsNothing : findsOneWidget,
);
if (cupertino) {
expect(find.byType(CupertinoNavigationBar), findsNWidgets(2));
expect(find.byType(CupertinoNavigationBar), findsOneWidget);
expect(find.byType(AppBar), findsNothing);
} else {
expect(find.byType(AppBar), findsNWidgets(2));
expect(find.byType(AppBar), findsOneWidget);
expect(find.byType(CupertinoNavigationBar), findsNothing);
}
expect(find.byKey(const Key('chat-thread-header')), findsOneWidget);
expect(findNativeBack(), findsNothing);
// A live frame updates the held thread.
@@ -240,8 +242,8 @@ void main() {
await tester.pump();
expect(find.text('A live line arrived.'), findsOneWidget);
// The pane bar carries the thread's controls: no second header row.
expect(find.byKey(const Key('chat-thread-header')), findsNothing);
// The thread's own bar carries its controls once: no second bar.
expect(find.byKey(const Key('chat-thread-header')), findsOneWidget);
// Browser Back to /chat clears the open pane and keeps the list.
await provider.didPushRouteInformation(
RouteInformation(uri: Uri.parse('/chat')),