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
@@ -5,6 +5,7 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:pipelines_app/features/pipelines/screen.dart';
import 'package:pipelines_app/shell/detail_page.dart';
import 'fixtures.dart';
import 'test_helpers.dart';
@@ -44,38 +45,34 @@ void main() {
expect(find.text('no runs recorded'), findsNothing);
});
testWidgets('the detail header is one identity line; Summary keeps facts', (
tester,
) async {
testWidgets('the pane bar names the pipeline and its identity; the body '
'repeats neither', (tester) async {
final fixture = PipelineFixture();
await pumpWide(tester, gatewayFor(fixture));
await tester.tap(find.byKey(const Key('pipeline-row-1')));
await tester.pumpAndSettle();
final pane = find.byType(DetailPane);
final detail = find.byKey(const Key('pipeline-detail'));
final header = find.byKey(const Key('pipeline-detail-header'));
expect(header, findsOneWidget);
expect(
find.descendant(of: header, matching: find.text('Alpha review')),
findsOneWidget,
// No headline in the body: the title pill holds the name over the
// recorded identity.
expect(find.byKey(const Key('pipeline-detail-header')), findsNothing);
final title = find.descendant(
of: pane,
matching: find.text('Alpha review'),
);
final identity = find.text('id 1 · v2 · 2 stages');
expect(title, findsOneWidget);
expect(identity, findsOneWidget);
expect(
find.descendant(of: header, matching: find.text('id 1 · v2 · 2 stages')),
find.descendant(of: detail, matching: find.text('Alpha review')),
findsNothing,
);
// The recorded identity now sits at the top of the Summary tab.
expect(find.text('id 1 · v2 · 2 stages'), findsOneWidget);
expect(find.descendant(of: detail, matching: identity), findsNothing);
// The identity is the pill's subtitle, under the name.
expect(
tester
.getTopLeft(
find.descendant(
of: header,
matching: find.text('Alpha review'),
),
)
.dx -
tester.getTopLeft(detail).dx,
12,
tester.getTopLeft(identity).dy,
greaterThan(tester.getTopLeft(title).dy),
);
});
@@ -106,14 +106,15 @@ void main() {
await tester.pumpAndSettle();
expect(find.bySemanticsLabel('View runs of Alpha review'), findsOneWidget);
// Run and Runs share one action row, as the web's pipeline actions.
// Run and Runs float at the bottom right, Runs above the primary Run.
// Run and Runs share the detail pane's actions pill at the top right,
// Runs before the primary Run; nothing floats over the content.
final runs = tester.getRect(find.byKey(const Key('pipeline-view-runs')));
final run = tester.getRect(find.byKey(runPipelineActionKey));
final screen = tester.view.physicalSize / tester.view.devicePixelRatio;
expect(runs.bottom, lessThanOrEqualTo(run.top));
expect(runs.right, lessThanOrEqualTo(run.left));
expect((runs.center.dy - run.center.dy).abs(), lessThan(1));
expect(run.right, greaterThan(screen.width - 40));
expect(run.bottom, greaterThan(screen.height - 120));
expect(run.bottom, lessThan(screen.height / 4));
await tester.tap(find.byKey(const Key('pipeline-view-runs')));
expect(opened, [1]);
});