# Loading states

**Last updated:** 2026-11-27T05:14:27-03:00 (UTC-3)

What the reader sees while the console waits: the first load of the application, a page fetching its data, a refresh and a long operation. Part of the [design system](/docs/design/overview/).

## First load

The console is one inline bundle, so it starts at once; while it fetches the session (and while it signs out) it shows the boot screen: m7 (or the custom logo from Branding), centered over the background field in the reader's theme. The theme is set before the first paint, so the boot screen never flashes the other one. Under reduced motion m7 only blinks. Without a session, the login screen replaces it.

## A page fetching its data

- Show the page frame at once: heading, filters and empty panels at their final size, so nothing jumps when data arrives.
- A list that reads its pages from the server shows only "Loading…" until its first page arrives; its tools (filters, columns, export) come with that page, and only when the list has rows or a filter is set. Tools that appeared at once and vanished over an empty list were a flicker; a filter that matches nothing keeps them, so it can be read and cleared.
- Keep each panel's previous content while a refresh runs; replace it when the new data is complete. A first load shows the panel's empty frame, not an animated skeleton.
- Panels load independently; the slowest one does not hold the others back.

## Refresh and actions

- The Refresh button's icon spins (`.spinning`, a one-second rotation) while the request runs; on Usage the button is also disabled. Under `prefers-reduced-motion: reduce` the icon stops, and the new data replacing the old is the signal.
- A button that starts a slow action (save, test a provider, export) is disabled with `opacity: 0.65` and a `wait` cursor until the server answers, so a double click cannot send the action twice. Its label stays readable.
- Results of an action appear where the action was taken: a test result next to the Test button, a saved state on the form.

## Long operations

Operations that take more than a few seconds (a batch, an evaluation run, a fine-tuning job, a model catalog refresh) are jobs with their own status, not a spinner:

- show the state in words (queued, running, completed, failed, cancelled) in its status color with its mark (`--color-status-info` and a ring while queued or running, `--color-status-ok` and a round dot when done, `--color-status-error` and a square on failure);
- show progress as counts ("120 of 400 items") when the server reports them, never an invented percentage;
- let the reader leave the page; the job keeps running and its status is there when they come back.

## Timing

- Under 300 ms: show nothing; a flash of a loading state is worse than a short wait.
- Over 1 s: show the loading state of the area.
- Over 10 s: explain what is slow ("Waiting for the provider") and offer a way to cancel when the operation allows it.

## Live status

The gateway status in the top bar (`.live-indicator`) is itself a loading pattern: while the console checks the gateway it shows **Checking** in `--color-status-warning` with a triangle, then **Ready** (`--color-status-ok`, a round dot), **Draining** (the triangle again), or **Unavailable** or **Stopped** (`--color-status-error`, a square). A result older than two check intervals (for example after the browser tab slept) is labelled **Stale**, never shown as current.
