ActionStatus
Supplied lifecycle
state is required and must come from an authoritative application result.
This component never advances a lifecycle, starts a timer, fabricates progress,
or equates a callback return with success. A timeout means the outcome may still
be unknown; it does not prove remote execution stopped.
Job displays can also supply queued, running, cancel-requested, and canceled.
Cancellation requested is still an active outcome: work may finish before cancellation takes effect.
Only a supplied canceled result establishes that outcome. Use JobStatus when the display also
needs validated item progress and separate pending-request feedback.
Supported recovery
Pass onRetry and/or onCancel only when the application supports those actions.
Recovery appears only for supplied callbacks and never changes the displayed
state itself. Use disabled when permissions or context block an otherwise
supported recovery, and show the reason next to the component. The application
owns idempotency, confirmation, transport, authorization, cancellation semantics,
and reconciliation after timeout.
<ActionStatus
state={result.state}
label="Refresh source"
message={result.message}
requestId={result.requestId}
onRetry={result.retrySupported ? requestRetry : undefined}
onCancel={result.cancelSupported ? requestCancel : undefined}
disabled={!authorized}
/>Props
| PROP | TYPE | DEFAULT | REQUIRED |
|---|---|---|---|
stateAuthoritative application-supplied lifecycle state. Timeout does not imply rejection or completion. A cancel request does not establish cancellation; a supplied complete result can still follow cancel-requested. | enumsubmitted | accepted | rejected | in-progress | complete | partial | failed | timeout | queued | running | cancel-requested | canceled | — | yes |
label | string | — | yes |
message | string | — | no |
requestId | string | — | no |
onRetryRender Retry only when retry is supported. Does not change state. | function | — | no |
onCancelRender Cancel only when cancellation is supported. Does not change state. | function | — | no |
retryLabel | string | "Retry" | no |
cancelLabel | string | "Cancel" | no |
disabledDisables recovery actions without hiding supplied outcomes. | boolean | false | no |
Accessibility
- A polite atomic status region announces supplied changes. The announcement is one sentence ("Refresh request, failed. The application reported failure."); the drawn label, badge and message are hidden from assistive technology so nothing is read twice.
- A result that is added to a page that is already running (the usual case: it appears when the action starts) holds that sentence back from assistive technology for 100 ms. NVDA in Chrome says nothing for a status region that is inserted together with its text, so the sentence is written into a region the reader already has. It is drawn at once. A result in the page's first markup is content and is read where it is, and a new state of a result that is already there is announced at once.
- Status labels and indicators pair with semantic color.
- Recovery uses native buttons with visible focus and disabled semantics.
- When the focused recovery is withdrawn (the application stops supplying
onRetry, say once the request is accepted) or disabled, focus moves to the result instead of the page. The result is a group named bylabel, so a screen reader says where focus went. Focus that has already moved elsewhere is left where it is. - The label, request ID and message wrap, and a long identifier breaks instead of running out of the block.
Manifest entry
<ActionStatus state={result.state} label="Refresh source" message={result.message} requestId={result.id} onRetry={canRetry ? retry : undefined} />View agent manifest
{
"description": "Stateless authoritative action outcome display with optional application-supported recovery callbacks. When the focused recovery is withdrawn or disabled, focus moves to the result, a group named by its label. Long text wraps.",
"props": {
"state": {
"type": "enum",
"values": [
"submitted",
"accepted",
"rejected",
"in-progress",
"complete",
"partial",
"failed",
"timeout",
"queued",
"running",
"cancel-requested",
"canceled"
],
"required": true,
"description": "Authoritative application-supplied lifecycle state. Timeout does not imply rejection or completion. A cancel request does not establish cancellation; a supplied complete result can still follow cancel-requested."
},
"label": {
"type": "string",
"required": true
},
"message": {
"type": "string"
},
"requestId": {
"type": "string"
},
"onRetry": {
"type": "function",
"description": "Render Retry only when retry is supported. Does not change state."
},
"onCancel": {
"type": "function",
"description": "Render Cancel only when cancellation is supported. Does not change state."
},
"retryLabel": {
"type": "string",
"default": "Retry"
},
"cancelLabel": {
"type": "string",
"default": "Cancel"
},
"disabled": {
"type": "boolean",
"default": false,
"description": "Disables recovery actions without hiding supplied outcomes."
}
},
"composable_with": [
"Inspector",
"Alert",
"AppShell"
],
"never_inside": [
"Button"
],
"example": "<ActionStatus state={result.state} label=\"Refresh source\" message={result.message} requestId={result.id} onRetry={canRetry ? retry : undefined} />"
}