import 'package:flutter/widgets.dart'; import '../../../core/error_reason.dart'; /// The browser client's retry wording, kept verbatim. const retryActionLabel = 'Retry'; const retryDialogMessage = 'Only failed runs can be retried. The server starts a new run from the ' 'same input.'; const retryConfirmLabel = 'Retry'; const restartDialogMessage = 'This replays the whole pipeline from the start instead of resuming the ' 'failed stage.'; const restartConfirmLabel = 'Restart from start'; const retryKeepLabel = 'Keep'; /// Stable test/semantics keys shared by the action and its prompt. const retryActionKey = ValueKey('retry-run-action'); const retryKeepKey = ValueKey('retry-run-keep'); const retryConfirmKey = ValueKey('retry-run-confirm'); const retryRestartKey = ValueKey('retry-run-restart'); const retryErrorKey = ValueKey('retry-run-error'); /// The retry dialog's title: `Retry run {id}?`. String retryDialogTitle(num runId) => 'Retry run $runId?'; /// The restart dialog's title: `Restart run {id}?`. String restartDialogTitle(num runId) => 'Restart run $runId?'; /// The server's refusal, verbatim. Only a blank error gets a generic sentence /// so the prompt never claims a retry that did not happen. String describeRetryError(Object error) => describeErrorReason( error, fallback: 'The server did not retry the run.', );