Merge branch 'main' into run-chat-info-header

This commit is contained in:
2026-10-31 15:10:50 +00:00
40 changed files with 1057 additions and 228 deletions
+15 -20
View File
@@ -12,6 +12,7 @@ import 'pipeline_models.dart';
import 'pipeline_repository.dart';
import 'pipelines_controller.dart';
import 'pending_run_store.dart';
import 'widgets/pipeline_bar_buttons.dart';
import 'widgets/pipeline_controls.dart';
import 'widgets/pipeline_detail_panel.dart';
import 'widgets/pipeline_list_panel.dart';
@@ -36,6 +37,7 @@ class PipelinesScreen extends StatefulWidget {
this.onViewPipelineRuns,
this.onSelectionChanged,
this.onOpenSchedules,
this.onOpenSettings,
this.initialPipelineId,
this.initialVersion = 0,
this.initialStageKey,
@@ -66,6 +68,9 @@ class PipelinesScreen extends StatefulWidget {
/// Opens every schedule; shown in the bar while the list is visible.
final VoidCallback? onOpenSchedules;
/// Opens Settings as a page; a gear in the bar while the list is visible.
final VoidCallback? onOpenSettings;
/// The pipeline a deep link names, opened after the list read starts.
final int? initialPipelineId;
@@ -281,6 +286,8 @@ class _PipelinesScreenState extends State<PipelinesScreen> {
if (listShown && widget.onOpenSchedules != null)
_schedulesButton(context),
_refreshButton(context),
if (listShown && widget.onOpenSettings != null)
_settingsButton(context),
],
child: body,
);
@@ -298,6 +305,7 @@ class _PipelinesScreenState extends State<PipelinesScreen> {
...pipelineListActions(context, _controller),
if (widget.onOpenSchedules != null) _schedulesButton(context),
_refreshButton(context),
if (widget.onOpenSettings != null) _settingsButton(context),
],
),
),
@@ -307,26 +315,11 @@ class _PipelinesScreenState extends State<PipelinesScreen> {
);
}
Widget _schedulesButton(BuildContext context) {
if (useCupertinoControls(context)) {
return Semantics(
button: true,
label: 'Schedules',
child: CupertinoButton(
key: const Key('pipelines-open-schedules'),
padding: EdgeInsets.zero,
onPressed: widget.onOpenSchedules,
child: const Icon(CupertinoIcons.calendar),
),
);
}
return IconButton(
key: const Key('pipelines-open-schedules'),
tooltip: 'Schedules',
onPressed: widget.onOpenSchedules,
icon: const Icon(Icons.schedule),
);
}
Widget _schedulesButton(BuildContext context) =>
pipelineSchedulesButton(context, widget.onOpenSchedules);
Widget _settingsButton(BuildContext context) =>
pipelineSettingsButton(context, widget.onOpenSettings);
Widget _refreshButton(BuildContext context) {
if (useCupertinoControls(context)) {
@@ -357,6 +350,7 @@ class _PipelinesScreenState extends State<PipelinesScreen> {
...pipelineListActions(context, _controller),
if (widget.onOpenSchedules != null) _schedulesButton(context),
_refreshButton(context),
if (widget.onOpenSettings != null) _settingsButton(context),
],
),
body: SafeArea(top: false, child: body),
@@ -372,6 +366,7 @@ class _PipelinesScreenState extends State<PipelinesScreen> {
...pipelineListActions(context, _controller),
if (widget.onOpenSchedules != null) _schedulesButton(context),
_refreshButton(context),
if (widget.onOpenSettings != null) _settingsButton(context),
],
),
child: SafeArea(top: false, child: body),
@@ -0,0 +1,57 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'pipeline_controls.dart';
/// One icon action in the Pipelines bar's actions pill: a Material
/// [IconButton] with its tooltip, or a Cupertino button named for
/// accessibility.
Widget pipelineBarIconButton(
BuildContext context, {
required Key key,
required String label,
required IconData icon,
required IconData cupertinoIcon,
required VoidCallback? onPressed,
}) {
if (useCupertinoControls(context)) {
return Semantics(
button: true,
label: label,
child: CupertinoButton(
key: key,
padding: EdgeInsets.zero,
onPressed: onPressed,
child: Icon(cupertinoIcon),
),
);
}
return IconButton(
key: key,
tooltip: label,
onPressed: onPressed,
icon: Icon(icon),
);
}
/// Opens every schedule.
Widget pipelineSchedulesButton(BuildContext context, VoidCallback? onPressed) =>
pipelineBarIconButton(
context,
key: const Key('pipelines-open-schedules'),
label: 'Schedules',
icon: Icons.schedule,
cupertinoIcon: CupertinoIcons.calendar,
onPressed: onPressed,
);
/// Opens Settings as a page (it is not a tab of the shell).
Widget pipelineSettingsButton(BuildContext context, VoidCallback? onPressed) =>
pipelineBarIconButton(
context,
key: const Key('pipelines-open-settings'),
label: 'Settings',
icon: Icons.settings_outlined,
cupertinoIcon: CupertinoIcons.gear,
onPressed: onPressed,
);
@@ -4,14 +4,15 @@ import 'package:flutter/material.dart';
/// The detail sections: Summary, the pinned definition Graph and Source.
enum PipelineDetailTab {
summary('Summary', Icons.summarize_outlined, CupertinoIcons.doc_text),
graph('Graph', Icons.account_tree_outlined, CupertinoIcons.arrow_branch),
graph('Graph', Icons.hub_outlined, CupertinoIcons.flowchart),
source('Source', Icons.code, CupertinoIcons.chevron_left_slash_chevron_right);
const PipelineDetailTab(this.label, this.icon, this.cupertinoIcon);
final String label;
/// The tab's glyph, shown above its name in the bottom bar.
/// The tab's glyph, the only thing the bottom bar draws (the label is its
/// accessible name); distinct from the shell's Pipelines tab beneath it.
final IconData icon;
final IconData cupertinoIcon;
}
@@ -29,7 +29,7 @@ enum RunVisitSection {
Icons.difference_outlined,
CupertinoIcons.arrow_right_arrow_left,
),
session('Session', Icons.forum_outlined, CupertinoIcons.chat_bubble_2),
session('Session', Icons.forum_outlined, CupertinoIcons.text_bubble),
definition(
'Definition',
Icons.description_outlined,