Files
pipelines/app/lib/features/runs/ui/run_decision_notice.dart
T
alan b771f3813a Remove Cupertino remnants from runs and pipelines
Keep the assigned runs and pipelines UI Material-only by removing alternate icons, host branches, and Cupertino color usage while preserving compatibility parameters needed by other callers. Update mirrored tests and record focused verification for the cleanup.
2026-11-11 21:12:40 +00:00

70 lines
2.2 KiB
Dart

import 'package:flutter/material.dart';
import '../../../core/api_gateway.dart';
import '../actions/decision_action.dart';
import '../actions/decision_wording.dart';
import '../domain/run_decisions.dart';
/// A recorded human checkpoint, never an audit-export/resource wait.
class RunDecisionNotice extends StatelessWidget {
const RunDecisionNotice({
super.key,
required this.run,
required this.gateway,
required this.onRunChanged,
});
final JsonMap run;
final ApiGateway gateway;
final ValueChanged<JsonMap> onRunChanged;
@override
Widget build(BuildContext context) {
final pending = pendingDecision(run);
if (pending == null) return const SizedBox.shrink();
// One full-width line of the header strip: the glyph in the waiting
// colour, the title over its meta line, and the action on the trailing
// edge. The strip is already the frame, so the banner draws no card,
// border or tint of its own.
final color = Theme.of(context).colorScheme.tertiary;
final metaStyle = Theme.of(context).textTheme.bodySmall;
return Container(
key: const Key('run-decision-banner'),
width: double.infinity,
padding: const EdgeInsets.only(top: 8, bottom: 4),
child: Row(
children: [
Icon(Icons.schedule, color: color, size: 18),
const SizedBox(width: 12),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Semantics(
header: true,
child: const Text(
decisionWaitingTitle,
style: TextStyle(fontWeight: FontWeight.w600),
),
),
const SizedBox(height: 2),
Text(
decisionMeta(pending),
style: metaStyle,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
],
),
),
const SizedBox(width: 12),
HumanDecisionAction(
run: run,
gateway: gateway,
onRunChanged: onRunChanged,
),
],
),
);
}
}