feat(app): icon-only tab bars, Settings from the Pipelines bar, main bar bottom right with detail bars above it

Settings leaves the tab bar (Pipelines, Runs, Chat, Search) and opens as a
page from a gear in the Pipelines bar, keeping /settings, its keys and a Back
to Pipelines (also the system Back). Every floating tab bar shows icons only,
named for assistive technology. On wide windows the shell's tab bar stays at
the bottom right; a split detail learns its height plus a 12px gap, so its
tabs or the chat composer float above it, and pages the detail opens (the
stage page) stay in its pane through its own navigator.
This commit is contained in:
2026-10-31 14:57:56 +00:00
parent 33cb9ca121
commit a1c4c1c402
40 changed files with 1057 additions and 228 deletions
+61 -38
View File
@@ -117,7 +117,10 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
// Full-screen detail routes cover the shell themselves. Keep the root tabs
// mounted/layout-ready underneath, so Back does not resize or reveal them
// only after the outgoing page has finished its native animation.
final index = AppDestination.values.indexOf(_selected);
// Settings is shown as a page of the Pipelines tab: the tab bar keeps
// Pipelines selected and the bar offers Back to it.
final index = shellTabDestinations.indexOf(shellTabFor(_selected));
final page = !shellTabDestinations.contains(_selected);
final details = destinationDetails(_selected);
final contents = AppDestination.values.map((destination) {
final item = destinationDetails(destination);
@@ -144,62 +147,75 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
// scaffold's structure depends on the width, so resizing never
// remounts a destination.
//
// While the tab shows its list beside an open item, the bar floats
// over the list pane only (judging its placement on that width), so
// it never covers the item or stacks on the item's own composer.
// While the tab shows its list beside an open item the bar keeps
// the same place, bottom right near the thumb: the item pane learns
// the bar's height (see ListDetailPanes) and floats its own tabs or
// composer above it, so the two never overlap.
final split = _bar.split(_selected);
final bar = ListPaneWidth(
split: split,
alignment: AlignmentDirectional.bottomStart,
child: FloatingDestinationBar(
cupertino: widget.cupertino,
currentIndex: index,
onTap: (value) => _select(AppDestination.values[value]),
items: _destinationItems(),
),
final bar = FloatingDestinationBar(
cupertino: widget.cupertino,
currentIndex: index,
onTap: (value) => _select(shellTabDestinations[value]),
items: _destinationItems(),
);
// Destinations reach the top edge and scroll behind the floating top
// bar too: each learns the bar's height as its top media padding and
// pads its own lists by it (see withTopBarClearance).
final topBar = _ListPaneBar(
split: split,
bar: _segmentedBar(spec, details.label),
bar: _segmentedBar(spec, details.label, page: page),
);
// The scaffolds below swap the system insets for their bars'
// heights; panes beside a list read the real ones from here.
final system = MediaQuery.paddingOf(context);
// A page (Settings) closes to Pipelines on the system Back too. The
// scope is always there, so opening the page never remounts the shell.
Widget backable(Widget child) => PopScope(
canPop: !page,
onPopInvokedWithResult: (didPop, _) {
if (!didPop) _closePage();
},
child: child,
);
if (widget.cupertino) {
return ShellSystemInsets(
padding: system,
child: CupertinoPageScaffold(
navigationBar: topBar,
child: SafeArea(
top: false,
bottom: false,
child: FloatingBarOverlay(
bar: bar,
child: _destinationStack(contents, index),
return backable(
ShellSystemInsets(
padding: system,
child: CupertinoPageScaffold(
navigationBar: topBar,
child: SafeArea(
top: false,
bottom: false,
child: FloatingBarOverlay(
bar: bar,
child: _destinationStack(contents),
),
),
),
),
);
}
return ShellSystemInsets(
padding: system,
child: Scaffold(
extendBodyBehindAppBar: true,
appBar: topBar,
body: _destinationStack(contents, index),
extendBody: true,
bottomNavigationBar: bar,
return backable(
ShellSystemInsets(
padding: system,
child: Scaffold(
extendBodyBehindAppBar: true,
appBar: topBar,
body: _destinationStack(contents),
extendBody: true,
bottomNavigationBar: bar,
),
),
);
},
);
}
/// Leaves a page destination (Settings) for the tab it belongs to.
void _closePage() => _select(shellTabFor(_selected));
List<FloatingDestinationItem> _destinationItems() =>
AppDestination.values.map((destination) {
shellTabDestinations.map((destination) {
final item = destinationDetails(destination);
return FloatingDestinationItem(
key: ValueKey('shell.destination.${destination.name}'),
@@ -213,9 +229,13 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
/// The open screen's own bar: its Back, title and actions, or the tab's
/// name with Search.
SegmentedBar _segmentedBar(ShellBarSpec? spec, String label) {
SegmentedBar _segmentedBar(
ShellBarSpec? spec,
String label, {
required bool page,
}) {
final cupertino = widget.cupertino;
final onBack = spec?.onBack;
final onBack = spec?.onBack ?? (page ? _closePage : null);
final published = spec?.actions ?? const <Widget>[];
final onSearch = widget.onSearch;
return SegmentedBar(
@@ -251,7 +271,7 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
)
// A screen whose main pill is its own field (Search) needs no
// separate Search action.
else if (onSearch != null && spec?.titleWidget == null)
else if (onSearch != null && spec?.titleWidget == null && !page)
cupertino
? CupertinoButton(
key: const ValueKey('shell.search'),
@@ -272,8 +292,11 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
);
}
Widget _destinationStack(List<Widget> contents, int index) =>
IndexedStack(key: _destinationStackKey, index: index, children: contents);
Widget _destinationStack(List<Widget> contents) => IndexedStack(
key: _destinationStackKey,
index: AppDestination.values.indexOf(_selected),
children: contents,
);
}
/// The shell's top bar, over the list pane only while the tab shows a list