Keep occurrence and outcome separate

The useful phases are awaiting-server, skipped, queued-catch-up, active, stale, and completed. A selected run is not a decision. A queued catch-up is not an active effect. A stale response is not a failure or completion.

Server-correlated state Text the interface may use
Skipped The service reports this occurrence was skipped
Queued catch-up The service reports one catch-up run is queued
Active The service reports this run is active
Stale The displayed run may be stale; request a current service result
Completed The service reports this run completed

The backend owns authorization, schedule interpretation, replay policy, execution, and the authoritative outcome. A request ID helps prevent an older response from replacing the currently selected run; it is not a lock.

Exercise the reducer

node --test sites/reactjsx.com/evidence/P218/scheduled-run-state.test.mjs

The tests cover a server-reported skipped result, rejection of a response for a different run, a stale active result, selection replacement, a refresh with a fresh request identity, rejection of a delayed prior response after refresh, and a pure textual-status descriptor. The accompanying JSX is illustrative only and has not been browser or assistive-technology tested.

// Illustrative only; use a trusted backend for every outcome.
function ScheduledRunStatus({ state, dispatch, createRequestId }) {
  const status = scheduledRunStatus(state);
  return <section aria-labelledby="scheduled-run-heading">
    <h2 id="scheduled-run-heading">Scheduled run</h2>
    <p role={status.role} aria-atomic={status.atomic}>{status.text}</p>
    <button type="button" disabled={!status.canRefresh} onClick={() => dispatch({
      type: "refresh", requestId: createRequestId(), runId: state.runId,
      scheduledAt: state.scheduledAt
    })}>Request current status</button>
  </section>;
}

The named React and accessibility reviewer must test the rendered specimen before any approval; this snippet only makes the untested specimen inspectable.

Do not collapse uncertainty into a button

Keep the current-status request available after a run is selected. Send it with a fresh request ID and the same selected run ID, then accept only its matching service result. Do not make “retry” or “run now” the default recovery control: those actions need an authorized backend route and a policy for duplicate effects and ordering. If the service cannot provide a stable run ID, scheduled time, and current result, the screen should show that the state is unresolved rather than selecting a plausible label.

For a request whose outcome remains unknown, see Keep Unresolved Requests Across React Record Selection. This pattern communicates a backend result; it does not secure, schedule, or recover work.