Files
pipelines/app/lib/features/runs/ui/run_decision_notice.dart
T
alan ebe79ebed0 App: findings ledger tab, retry extra visits and exhaustion decisions
Run detail gains a Findings tab (open-count badge) listing the server's
findings ledger with status and minimum-severity filters and expandable
event history; visit grants show as an Extra visits summary fact. The
resume retry prompt can grant 1-5 extra visits to the exhausted stage or a
chosen graph stage (never sent on restart), suggested when the run failed
on a visit limit. A loop-exhaustion decision waiting on a model stage is
now decidable from its recorded options, with readable labels, targets and
the visit count.

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

73 lines
2.3 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,
),
if (decisionExhaustedText(pending) case final text
when text.isNotEmpty)
Text(text, style: metaStyle),
],
),
),
const SizedBox(width: 12),
HumanDecisionAction(
run: run,
gateway: gateway,
onRunChanged: onRunChanged,
),
],
),
);
}
}