# WorkSteps: what a long job is doing

WorkSteps shows a job that takes more than a moment, such as an import or an assistant's answer, as the one step it is on, with the step's words shimmering. When the job ends it folds into one quiet line with the time and the number of steps, and that line opens the steps and what each one found.

Checked 2 December 2026. By Bohuslav Poláček. https://meadowstack.com/components/work-steps/

*The demo's VAT and CIS check on Kline Air Systems at three moments: the first step at once, the second after 650 ms, the summary when the answer came at 1.4 s. A click on the summary opens the three steps with their findings, which a page built ahead of time does not do.*

A live screen, rendered from the kit's components on the page: https://meadowstack.com/components/work-steps/

## What it is for

Some jobs take a few seconds and have steps a person would recognise: reading a file, matching its rows, checking a number with an outside register. A spinner hides what is happening; WorkSteps names the one step that is running, then gets out of the way.

The preview is one run of the check a site manager starts on a subcontractor in the [Stonebridge example](https://meadowstack.com/examples/construction-site-management/): look the company up, check the VAT number, verify it under CIS. While the job runs, a single line shows the current step with a twinkling dot matrix and the words shimmering. When it ends, the line becomes "Done in 1.4 s · 3 steps", quiet enough to leave on the record, and a click opens the three steps with what each one found: the company's name and number, a valid VAT number, the verification number. The demo uses the same component for importing fuel card statements, where the steps are reading the file, matching cards and plates to trucks and looking for anomalies.

The manifest keeps it for long jobs: an assistant's answer, an import. A short wait is a `Spinner` or `ThinkingState` instead.

## The rules and where they live

- **Steps of a job, then a quiet summary that opens them.** `docs/patterns.md`, Motion and feedback, after ChatGPT and Linear, with the place to try it: the subcontractor panel at Stonebridge.
- **Nothing blanks the page.** `docs/principles.md`, Response time: changes show at once, anything over 120 ms shows the route line, and a job with steps says which step it is on rather than covering the screen.
- **Motion is mandatory and comes from the catalogue.** The root `AGENTS.md` (Motion) and `docs/motion.md`: the shimmer and the dot matrix are the kit's, reduced motion keeps fades only, and `npm run check:motion` guards the curves and lengths.
- **After the job the screen stays.** `AGENTS.md`: the data swaps in quietly, here the line under the check that says what was verified and by whom.
- **Copy says what is being done**, in plain words, as every message in an app does (`AGENTS.md`, Copy): "Checking the VAT number with HMRC", not "Processing".

## What AI coding tools write instead

The manifest names **a hand-built progress list**. The usual results are a spinner with "Loading…" for ten seconds, a progress bar whose percentage is not tied to any work, or a list of every step with ticks that stays on the screen and pushes the record down long after the job ended. Another is a row of timers that pretend to be steps while the request is still on its way, so the ticks say nothing about what happened.

`WorkSteps` takes each step's status from the job (`waiting`, `running`, `done`, `failed`), so the line can only say what the code knows, and it folds itself into one line once the job has a duration. A failed step turns the summary into a line that says it did not work, and the steps underneath show which one stopped.

## How to use it

| Prop | What it takes |
| --- | --- |
| `steps` | `WorkStep[]`: `id`, `label` (what is being done), `detail` (what the step found, shown when the steps open) and `status`. |
| `durationMs` | Leave it out while the job runs; pass how long it took when it ends, and the summary appears. |
| `className` | Where it sits in your layout. |

Build the steps from your job's progress, as the demo does with one index, and keep the labels in the order the job runs them. For a job that runs in the background while the person works on, the kit's `WorkingPill` shows a label and the time since `startedAt`.

## Its entry in the manifest

*The component's rules as the kit's manifest states them, the same entry an AI coding tool reads.*

| Manifest field | WorkSteps |
| --- | --- |
| What it is | What an assistant or a long job is doing, step by step, then a quiet summary. |
| Use it for | A long job with steps (an assistant's answer, an import). |
| Not for | For a short wait (Spinner, ThinkingState) |
| It replaces | A hand-built progress list |
| Screen types | Any |
| Import | `import { WorkSteps, WorkingPill } from "@meadowstack-studio/kit";` |

Read from the kit's component manifest when the site was built (126 components, packages/kit/src/components.json); the same entry answers an AI coding tool through the kit's MCP server.

## Where the example apps use it

*The example apps and modules that render WorkSteps, read from the demo's code when the site builds.*

| Example app | Modules that render it |
| --- | --- |
| [An app for a haulage company](https://meadowstack.com/examples/haulage-dispatch-planning/) | Costs |
| [An app for a construction company](https://meadowstack.com/examples/construction-site-management/) | Crews, Budget |

Read from the demo's source when the site was built: 2 of 9 example apps render <WorkSteps>, in the modules named here as each app's sidebar names them.

## How the demo drives it

*Three labels and one index: the steps before it are done, the one at it runs, the rest wait. The demo's register answers from its simulated server, so the first two steps are shown for as long as they would take and the answer ends the third.*

From `apps/demo/src/modules/crews/components/sub-panel.tsx` in the Meadowstack repository:

```tsx
const stepsAt = (done: number, details: string[] = []): WorkStep[] =>
  labels.map((label, index) => ({
    id: `step-${index}`,
    label,
    detail: details[index],
    status: index < done ? "done" : index === done ? "running" : "waiting",
  }));

const verify = async () => {
  const started = Date.now();
  setRun({ steps: stepsAt(0) });
  // The register answers from the server; the first two steps are shown as they would take, the answer ends the third.
  const answer = verifyVat(company.slug, sub.id, person);
  answer.catch(() => undefined);
  await sleep(650);
  setRun({ steps: stepsAt(1) });
  await sleep(750);
  setRun({ steps: stepsAt(2) });
```

## Questions

### When should I use WorkSteps instead of a spinner?

When the job has steps a person would understand and takes long enough to watch, such as an import or a check against an outside register. A short wait gets a spinner or the thinking state.

### What does the summary line show?

How long the job took and how many steps it had, as Done in 1.4 s · 3 steps in the demo. A click opens the steps with what each one found.

### What happens when a step fails?

The step is marked failed and the summary says it did not work instead of giving the time, so the person opens it and sees which step stopped.

### Does every step stay on the screen while the job runs?

No. Only the step that is running shows, on one line, so the record does not jump while the job works through its steps.

## Related

- [Skeleton screen](https://meadowstack.com/glossary/skeleton-screen/) (Glossary)
- [A document inbox that catches a changed bank account](https://meadowstack.com/screens/document-inbox/) (Screens)
- [A workflow canvas where a test run walks the steps](https://meadowstack.com/screens/workflow-canvas/) (Screens)
- [Defects pinned on the drawing, carried across revisions](https://meadowstack.com/screens/defects-on-drawings/) (Screens)
- [AsyncState: every data view has four states](https://meadowstack.com/components/async-state/) (Components)
- [Checklist: the small steps inside a record](https://meadowstack.com/components/checklist/) (Components)
