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,6 +7,7 @@ import 'package:flutter/material.dart';
import '../../../ui/text/markdown_source_view.dart';
import '../../chat/ui/transcript/chat_markdown_view.dart';
import '../../../core/api_gateway.dart';
import '../../../ui/adaptive/floating_bar_layout.dart';
import '../../../ui/adaptive/host.dart';
import '../domain/graph_protocol.dart';
import '../domain/stage_definition.dart';
@@ -42,6 +43,7 @@ class StageDefinitionView extends StatefulWidget {
required this.pipelineId,
required this.pipelineName,
required this.version,
this.showIdentity = true,
});
final JsonMap graph;
@@ -50,16 +52,24 @@ class StageDefinitionView extends StatefulWidget {
final String pipelineName;
final int version;
/// Whether the view starts with its pipeline and version. The page leaves
/// it out: its top bar shows them under the title.
final bool showIdentity;
@override
State<StageDefinitionView> createState() => _StageDefinitionViewState();
}
/// The pinned pipeline a definition belongs to (`Demo pipeline \u00b7 v7`).
String stageDefinitionIdentity(String pipelineName, int version) =>
'${pipelineName.isEmpty ? 'Pipeline' : pipelineName} \u00b7 v$version';
class _StageDefinitionViewState extends State<StageDefinitionView> {
// One switch for every authored text block; raw is the exact text.
bool _raw = true;
String get _identity =>
'${widget.pipelineName.isEmpty ? 'Pipeline' : widget.pipelineName} \u00b7 v${widget.version}';
stageDefinitionIdentity(widget.pipelineName, widget.version);
@override
Widget build(BuildContext context) {
@@ -74,11 +84,14 @@ class _StageDefinitionViewState extends State<StageDefinitionView> {
? terminalDefinitionFields(graph, stageKey)
: const <StageDefinitionField>[];
// Scrolls behind the page's floating top bar; at rest it starts below it.
return ListView(
padding: const EdgeInsets.all(16),
padding: withBarClearance(context, const EdgeInsets.all(16)),
children: [
Text(_identity, style: style.muted),
const SizedBox(height: 16),
if (widget.showIdentity) ...[
Text(_identity, style: style.muted),
const SizedBox(height: 16),
],
if (fields.any((field) => field.block)) ...[
MarkdownModeSwitch(
raw: _raw,
@@ -131,7 +144,9 @@ Future<void> openStageDefinition(
pipelineId: pipelineId,
pipelineName: pipelineName,
version: version,
showIdentity: false,
);
final identity = stageDefinitionIdentity(pipelineName, version);
final settings = RouteSettings(
name: 'stage-definition/$pipelineId/$version/$stageKey',
);
@@ -142,16 +157,24 @@ Future<void> openStageDefinition(
? CupertinoPageRoute<void>(
settings: settings,
builder: (_) => CupertinoPageScaffold(
navigationBar: SegmentedBar(cupertino: true, title: title),
child: SafeArea(child: view),
navigationBar: SegmentedBar(
cupertino: true,
title: title,
subtitle: identity,
),
child: SafeArea(top: false, bottom: false, child: view),
),
)
: MaterialPageRoute<void>(
settings: settings,
builder: (_) => Scaffold(
extendBodyBehindAppBar: true,
appBar: SegmentedBar(cupertino: false, title: title),
body: SafeArea(child: view),
appBar: SegmentedBar(
cupertino: false,
title: title,
subtitle: identity,
),
body: SafeArea(top: false, bottom: false, child: view),
),
);
return Navigator.of(context).push(route);