Files
pipelines/app/lib/features/runs/ui/run_detail_wide_chrome.dart
T
alan a6db4ba20e App: run tabs under the header on wide layouts, stable Artifacts tab, spelled-out pipeline status, shared list selection, code block header and edge fades
- Run detail: on a wide window (>= 840, pane >= 600) the tabs are Material
  segments under the run header; phones keep the floating bottom bar.
  Artifacts is always a tab, badged with its count and disabled with 0 (its
  tooltip says why), so Changes never moves.
- Pipelines list: 'Failed · last run 19 Oct' beside the status dot; facts on
  the next line; compact rows keep 'Failed · 19 Oct'.
- Settings: Disconnect is outlined beside a tonal Reconnect.
- Lists: one selection style (tonal fill plus one leading accent bar) for
  runs, pipelines and chats; chat's border, fill and pointer removed.
- Transcript: overflowing blocks fade at the edge with a chevron instead of
  a 'Scroll horizontally' line (semantics hint kept); code blocks get a
  header strip with language and Copy; lighter light-mode code fill.
- Runs list: rows under a day heading show only the time of day.
- Artifact search reveal re-centres once the lazy list's extent settles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 00:55:50 +00:00

61 lines
2.1 KiB
Dart

import 'package:flutter/widgets.dart';
import '../../../ui/adaptive/floating_bar_layout.dart';
import '../../../ui/adaptive/top_glass_strip.dart';
/// The narrowest detail pane that puts its tabs under the run header.
const double kRunDetailWideChromeMinWidth = kFloatingBarWideWidth;
/// The narrowest window whose run detail puts its tabs at the top: a wide
/// (desktop or tablet) window. Phones keep the floating bottom tab bar.
const double kRunDetailTopTabsMinWindowWidth = 840;
/// Whether the run detail at [context], [width] wide, shows its tabs under
/// the run header rather than as the floating bottom bar: on a wide window
/// with a wide enough detail pane, or where the host asks for top tabs.
bool runDetailTabsOnTop(BuildContext context, double width) {
if (width < kRunDetailWideChromeMinWidth) return false;
return PageTabsEdge.of(context) == FloatingBarEdge.top ||
MediaQuery.sizeOf(context).width >= kRunDetailTopTabsMinWindowWidth;
}
/// The run detail's controls on a wide layout: one frosted strip under the
/// pane's top bar holding the header (status, run actions, notices) and,
/// under it, the tabs, so the tabs sit right below the run's title instead
/// of floating at the far corner of a wide pane.
///
/// Float it with `FloatingBarOverlay` at the top edge so the tab body pads
/// past it at rest. The strip keeps the key `run-detail-header`.
class RunDetailWideChrome extends StatelessWidget {
const RunDetailWideChrome({
super.key,
required this.tabs,
required this.header,
});
/// The tabs (`RunDetailTopTabs`).
final Widget tabs;
/// The header's content, already bounded in height.
final Widget header;
@override
Widget build(BuildContext context) {
return TopGlassStrip(
key: const Key('run-detail-header'),
padding: const EdgeInsets.fromLTRB(0, 4, 0, 12),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
header,
Padding(
padding: const EdgeInsets.symmetric(horizontal: 12),
child: tabs,
),
],
),
);
}
}