fix(app): float content behind top bars and give each wide pane its own bar row

- Top-bar clearance helpers (withTopBarClearance, withBarClearance,
  SliverTopBarClearance, BelowTopBar, TopBarNotices); shell, DetailPane and
  the runs/pipelines/templates/artifacts/stage definition/filter/usage pages
  drop their top SafeArea and pad their own lists, pinned headers pin at the
  inset.
- Wide windows: the shell bar narrows to the list pane (ShellPaneSplit) and
  the open item's bar shares its row; item tabs float at the pane's top
  (PageTabsEdge) instead of stacking on the shell's tab bar; the floating
  tab pill no longer swells over leftover media padding.
- Pipeline detail is a DetailPane on wide too; Run/Runs move from FABs into
  the bar's actions; name and identity live in the title pill.
- Run detail title pill shows the real title with Run N, pipeline and
  version (the pill links to the pipeline); the body keeps only status,
  actions and notices; standalone detail draws the same segmented bar.
- One Runs tab badge: attention outranks running.
- Tests for content-behind-bar padding and the no-stacking wide layout;
  notes/app-chrome-fixes.md.
This commit is contained in:
2026-10-31 03:36:22 +00:00
parent ea0f22dfc7
commit c6c6dcfe18
49 changed files with 1791 additions and 693 deletions
+7 -3
View File
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import '../features/chat/screen.dart';
import '../ui/adaptive/host.dart';
import '../ui/adaptive/top_bar_notices.dart';
import 'app_session.dart';
import 'connection_status.dart';
import 'server_endpoint.dart';
@@ -49,12 +50,15 @@ class ChatDestination extends StatelessWidget {
cupertino: cupertino,
);
}
return Column(
children: [
// The banner stays below the top bar; without it the chat screen
// reaches the top edge (an open chat beside the list draws its own bar
// there).
return TopBarNotices(
notices: [
if (!session.connected)
ConnectionBanner(session: session, cupertino: cupertino),
Expanded(child: _chatScreen()),
],
child: _chatScreen(),
);
},
);
@@ -3,6 +3,7 @@ import '../core/servers/server_scope.dart';
import '../features/pipelines/screen.dart';
import '../ui/adaptive/host.dart';
import '../ui/adaptive/top_bar_notices.dart';
import 'app_session.dart';
import 'connection_status.dart';
import 'server_endpoint.dart';
@@ -72,12 +73,14 @@ class PipelinesDestination extends StatelessWidget {
cupertino: cupertino,
);
}
return Column(
children: [
// The banner stays below the top bar; without it the pipelines reach
// the top edge and scroll behind the bar.
return TopBarNotices(
notices: [
if (!session.connected)
ConnectionBanner(session: session, cupertino: cupertino),
Expanded(child: _pipelinesScreen()),
],
child: _pipelinesScreen(),
);
},
);
+6 -3
View File
@@ -5,6 +5,7 @@ import '../features/attention/runtime/attention_controller.dart';
import '../features/runs/screen.dart';
import '../features/runs/ui/run_pipeline_link.dart';
import '../ui/adaptive/host.dart';
import '../ui/adaptive/top_bar_notices.dart';
import 'app_session.dart';
import 'connection_status.dart';
import 'server_endpoint.dart';
@@ -85,13 +86,15 @@ class RunsDestination extends StatelessWidget {
cupertino: cupertino,
);
}
return Column(
children: [
// The banner stays below the top bar; without it the runs reach the top
// edge and scroll behind the bar.
return TopBarNotices(
notices: [
if (!session.connected ||
session.subscription == RunSubscriptionState.refused)
ConnectionBanner(session: session, cupertino: cupertino),
Expanded(child: _runsScreen()),
],
child: _runsScreen(),
);
},
);
+84 -46
View File
@@ -4,7 +4,11 @@ import 'package:flutter/material.dart';
import '../ui/adaptive/segmented_bar.dart';
import '../core/api_gateway.dart';
import '../features/templates/screen.dart';
import '../shell/destination.dart';
import '../shell/shell_bar.dart';
import '../ui/adaptive/host.dart';
import '../ui/adaptive/floating_bar_layout.dart';
import '../ui/adaptive/top_bar_notices.dart';
import 'app_session.dart';
import 'connection_status.dart';
import 'server_endpoint.dart';
@@ -57,32 +61,33 @@ class TemplatesDestination extends StatelessWidget {
Widget _body(bool cupertino) {
if (!session.everConnected) {
return ConnectionGate(
session: session,
server: server,
cupertino: cupertino,
return BelowTopBar(
child: ConnectionGate(
session: session,
server: server,
cupertino: cupertino,
),
);
}
return Column(
children: [
return TopBarNotices(
notices: [
if (!session.connected)
ConnectionBanner(session: session, cupertino: cupertino),
Expanded(
child: TemplatesScreen(
gateway: session.gateway,
embedded: true,
onCreated: onCreated,
initialKey: initialKey,
),
),
],
child: TemplatesScreen(
gateway: session.gateway,
embedded: true,
onCreated: onCreated,
initialKey: initialKey,
),
);
}
}
/// The page's standard native bar. Back is named explicitly so it cannot be
/// confused with the gallery's own Back-to-gallery control.
class _TemplatesPage extends StatelessWidget {
/// confused with the gallery's own Back-to-gallery control. The gallery puts
/// Refresh in this bar ([ShellBar]); its content scrolls behind the bar.
class _TemplatesPage extends StatefulWidget {
const _TemplatesPage({
required this.cupertino,
required this.onBack,
@@ -93,39 +98,72 @@ class _TemplatesPage extends StatelessWidget {
final VoidCallback onBack;
final Widget child;
@override
State<_TemplatesPage> createState() => _TemplatesPageState();
}
class _TemplatesPageState extends State<_TemplatesPage> {
final ShellBarRegistry _bar = ShellBarRegistry();
@override
void dispose() {
_bar.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
if (cupertino) {
return CupertinoPageScaffold(
navigationBar: SegmentedBar(
cupertino: true,
leading: CupertinoButton(
key: templatesPageBackKey,
padding: EdgeInsets.zero,
onPressed: onBack,
child: const Icon(
CupertinoIcons.back,
semanticLabel: 'Back to Settings',
),
),
title: 'Templates',
),
child: SafeArea(child: child),
);
}
return Scaffold(
extendBodyBehindAppBar: true,
appBar: SegmentedBar(
cupertino: false,
leading: IconButton(
key: templatesPageBackKey,
tooltip: 'Back to Settings',
onPressed: onBack,
icon: const Icon(Icons.arrow_back),
),
title: 'Templates',
final cupertino = widget.cupertino;
// The page reaches its top edge; the gallery pads its lists by the bar.
final body = SafeArea(
top: false,
bottom: false,
child: ShellBarScope(
registry: _bar,
destination: AppDestination.settings,
child: widget.child,
),
body: SafeArea(child: child),
);
return ListenableBuilder(
listenable: _bar,
builder: (context, _) {
final actions =
_bar.specFor(AppDestination.settings)?.actions ?? const <Widget>[];
if (cupertino) {
return CupertinoPageScaffold(
navigationBar: SegmentedBar(
cupertino: true,
leading: CupertinoButton(
key: templatesPageBackKey,
padding: EdgeInsets.zero,
onPressed: widget.onBack,
child: const Icon(
CupertinoIcons.back,
semanticLabel: 'Back to Settings',
),
),
title: 'Templates',
actions: actions,
),
child: body,
);
}
return Scaffold(
extendBodyBehindAppBar: true,
appBar: SegmentedBar(
cupertino: false,
leading: IconButton(
key: templatesPageBackKey,
tooltip: 'Back to Settings',
onPressed: widget.onBack,
icon: const Icon(Icons.arrow_back),
),
title: 'Templates',
actions: actions,
),
body: body,
);
},
);
}
}