Keep enlarged chat header controls reachable in short viewports

This commit is contained in:
2026-11-07 20:50:30 +00:00
parent 4bbbe01633
commit cb0942b5ee
2 changed files with 60 additions and 16 deletions
@@ -107,24 +107,27 @@ class ChatThreadHeader extends StatelessWidget {
color: cupertino
? CupertinoTheme.of(context).scaffoldBackgroundColor
: Theme.of(context).colorScheme.surface,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
bar,
if (narrow && controls.isNotEmpty)
Padding(
padding: const EdgeInsets.fromLTRB(12, 0, 12, 8),
child: SegmentedPill(
cupertino: cupertino,
child: _ControlIsland(
key: const Key('chat-model-permission-island'),
fill: true,
vertical: constraints.maxWidth < 340,
children: controls,
child: SingleChildScrollView(
primary: false,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
bar,
if (narrow && controls.isNotEmpty)
Padding(
padding: const EdgeInsets.fromLTRB(12, 0, 12, 8),
child: SegmentedPill(
cupertino: cupertino,
child: _ControlIsland(
key: const Key('chat-model-permission-island'),
fill: true,
vertical: constraints.maxWidth < 340,
children: controls,
),
),
),
),
],
],
),
),
);
},