Files
pipelines/app/lib/features/runs/ui/run_detail_visit_definition.dart
T
alan e34fa1050e Close the chrome gaps: content behind bars on Templates, run detail, stage page and Schedules; Search field fills the bar
- SegmentedBar.titleWidget (and ShellBar/ShellBarSpec titleWidget,
  backgroundColor): a bar's main pill can be an input in place of the title;
  Search uses it so the field fills the bar with Kind and info, capped at the
  result column width so field and results share edges on wide windows.
- Templates page/frame drop the top SafeArea again (BelowTopBar gate,
  TopBarNotices banners); Cupertino uses the grouped background.
- Settings on Cupertino in the shell publishes the grouped background so the
  bar scrim matches the page (no white band or seam).
- TopGlassStrip: the run detail header (status, actions, decision, notices)
  and the Schedules search/filter toolbar float as glass under the bar; tabs
  and lists scroll behind both.
- Stage page: stage title and Visit/Run subtitle in the bar, facts lead the
  Summary scroll, sections scroll behind the bar under floating tabs.
- Tests for content-behind-bar on each page and the title-widget bar mode;
  notes/chrome-gaps-fixes.md.
2026-10-31 04:27:35 +00:00

48 lines
1.5 KiB
Dart

import 'package:flutter/material.dart';
import '../../../core/api_gateway.dart';
import '../../../ui/adaptive/floating_bar_layout.dart';
import '../../graph/widgets/stage_definition_view.dart';
import 'run_detail_content.dart';
import 'run_detail_visit_facts.dart';
/// The Definition section: the authored definition this run pinned for the
/// visit's stage, rendered by the landed [StageDefinitionView].
///
/// When the reply's graph does not declare the stage, the pane's exact missing
/// sentence is shown instead. Nothing is reconstructed from the current source.
class RunVisitDefinition extends StatelessWidget {
const RunVisitDefinition({
super.key,
required this.run,
required this.stageKey,
});
final JsonMap run;
final String stageKey;
@override
Widget build(BuildContext context) {
final graph = detailGraph(run);
if (!detailVisitHasDefinition(graph, stageKey)) {
return ListView(
key: const Key('run-visit-body-definition'),
padding: withBarClearance(context, const EdgeInsets.all(16)),
children: const [Text(unknownStageDefinition)],
);
}
final pipelineId = run['pipeline_id'];
final version = run['version'];
return KeyedSubtree(
key: const Key('run-visit-body-definition'),
child: StageDefinitionView(
graph: graph!,
stageKey: stageKey,
pipelineId: pipelineId is num ? pipelineId.toInt() : 0,
pipelineName: detailPipeline(run),
version: version is num ? version.toInt() : 0,
),
);
}
}