Files
pipelines/app/lib/features/runs/actions/action_refusal.dart
T

19 lines
869 B
Dart

/// A refused operator action and, when one was started, the bounded re-read of
/// server truth that follows it.
///
/// The prompt shows [message] and allows dismissal immediately; it must never
/// wait for [stillPossible]. That future is only observed so a retry can be
/// ruled out once server truth arrives: `true` means the re-read found the run
/// still allows the action, `false` means it plainly does not, and `null` means
/// the re-read failed or was overtaken, leaving a deliberate retry possible.
class ActionRefusal {
const ActionRefusal(this.message, {this.stillPossible});
final String message;
final Future<bool?>? stillPossible;
}
/// Local guards, distinct from a server refusal; they never claim success.
const actionOptionRequired = 'Choose an option before continuing.';
const actionAlreadySending = 'That action is still being sent.';