okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
2b36e8a02
main
14 · Empty, loading and error states
Across every screen — no single file
The states nobody designs and everybody sees. For an audience that finds computers intimidating, an empty screen is the most likely place to give up, and a silent failure is the most likely place to lose trust.
What is today
Emptyis a real component (icon, title, body, optional action) used on Chat, Models, Serving, Skills, Monitor, Workspace.BootSkeletoncovers the first paint.- Errors surface as toasts and as an inline error on the failed message.
- Empty states distinguish "nothing yet" from "nothing matches" on Skills and Workspace — the right instinct, applied inconsistently.
- Loading is a spinner or an indeterminate
Bardepending on the surface.
Where it falls short
- Empty states do not say what to do next, only what is absent. Several have an action, several do not.
- No empty state exists on Monitor or Serving for a first run beyond a generic message; neither points at the step that would fill them.
A failed model download leaves a row in an ambiguous state.Wrong, and the real gap was different.v.erroralready renders on the row. What was missing is what to do about it: there was no Retry anywhere in the app except Chat's Ask again, so a failed download was a dead end and the reader had to work out that the Download button was also the retry. Failed rows now carry the reason and a Try again action together.- No retry affordance on failure. The error is reported, never actionable.
- Loading has no time expectation. Downloads show a percentage but not how long; scans show a line with no sense of duration.
- The skeleton does not match the final layout, so the first paint jumps when real content arrives.
Offline / engine-unreachable has no dedicated state.Fixed.connectionhad been tracked in the store since the beginning and was rendered nowhere, so a dead host looked exactly like an idle one — every panel simply empty, with no statement that anything was wrong. A bar now names the problem in plain language and offers a reconnect. Verified both ways: with the host killed it reportsoffline, and with it running the bar is absent.- Skill and Workspace empties have an action; Monitor and Serving do not. The pattern exists and is not applied.
The plan
Substance — every state says what to do
- A state checklist per screen: first run (nothing exists yet) · filtered to nothing · engine unreachable · operation failed. Six screens × four states is twenty-four states, and today about eight are handled.
- Every empty state carries exactly one action that leads to the thing that would fill it. Monitor's empty should offer "Send a prompt", not describe itself.
Errors carry a way out.Fixed for the actions that can fail today. Engine failures reported only through a toast, which is gone in 5.2 s; the failure is now also recorded and rendered in place, with the retry on the surface that failed. Verified against a deliberately aborted restart: the toast had expired by 8.2 s and the inline error remained, retry re-reported the failure while it persisted, and cleared once the request succeeded — so it is a real retry, not a re-render. Model load failures still report by toast alone.An explicit engine-unreachable state.Done — driven by the existing event-stream status rather than a separate health poll, so it reacts the moment the stream drops.- Time expectations on every operation longer than two seconds, computed from observed rate where possible.
Fluidity
- Skeletons that match the final layout, so nothing jumps. Build the skeleton from the real component's box model.
- Loading resolves by cross-fade, never by a jump — the content fades in over
the skeleton on
--st-t-local.
Motion
| State | Spec |
|---|---|
| Skeleton → content | Cross-fade, --st-t-local. No layout movement |
| Empty state appearing | st-enter, --st-t-local, 8 px — once, not per element |
| Error appearing | st-enter, --st-t-control, 6 px; stays until dismissed |
| Retry in progress | The button becomes busy in place; no spinner elsewhere on screen |
| Indeterminate bar | Loops only while the operation runs, and stops the instant it ends |
Verification
- New
flow states: force each of the four states per screen and assert an action is present in the empty states and a retry in the failures. - Assert no operation over two seconds lacks a time expectation.
- Assert the skeleton and the loaded layout have identical box geometry — a jump of more than 2 px is a failure.
1# 14 · Empty, loading and error states 2 3**Across every screen** — no single file 4 5The states nobody designs and everybody sees. For an audience that finds 6computers intimidating, an empty screen is the most likely place to give up, and 7a silent failure is the most likely place to lose trust. 8 9## What is today 10 11- **`Empty`** is a real component (icon, title, body, optional action) used on 12Chat, Models, Serving, Skills, Monitor, Workspace. 13 - **`BootSkeleton`** covers the first paint. 14- **Errors** surface as toasts and as an inline error on the failed message. 15- **Empty states distinguish "nothing yet" from "nothing matches"** on Skills and 16Workspace — the right instinct, applied inconsistently. 17 - **Loading** is a spinner or an indeterminate `Bar` depending on the surface. 18 19## Where it falls short 20 211. **Empty states do not say what to do next, only what is absent.** Several have 22an action, several do not. 232. **No empty state exists on Monitor or Serving for a first run** beyond a 24generic message; neither points at the step that would fill them. 253. ~~A failed model download leaves a row in an ambiguous state.~~ **Wrong, and 26the real gap was different.** `v.error` already renders on the row. What was 27missing is what to *do* about it: there was no Retry anywhere in the app 28except Chat's *Ask again*, so a failed download was a dead end and the reader 29had to work out that the Download button was also the retry. Failed rows now 30carry the reason **and** a *Try again* action together. 314. **No retry affordance on failure.** The error is reported, never actionable. 325. **Loading has no time expectation.** Downloads show a percentage but not how 33long; scans show a line with no sense of duration. 346. **The skeleton does not match the final layout**, so the first paint jumps 35when real content arrives. 367. ~~Offline / engine-unreachable has no dedicated state.~~ **Fixed.** 37`connection` had been tracked in the store since the beginning and was 38rendered nowhere, so a dead host looked exactly like an idle one — every panel 39simply empty, with no statement that anything was wrong. A bar now names the 40problem in plain language and offers a reconnect. Verified both ways: with the 41host killed it reports `offline`, and with it running the bar is absent. 428. **Skill and Workspace empties have an action; Monitor and Serving do not.** 43The pattern exists and is not applied. 44 45## The plan 46 47### Substance — every state says what to do 481. **A state checklist per screen**: *first run (nothing exists yet)* · 49*filtered to nothing* · *engine unreachable* · *operation failed*. Six screens 50× four states is twenty-four states, and today about eight are handled. 512. **Every empty state carries exactly one action** that leads to the thing that 52would fill it. Monitor's empty should offer "Send a prompt", not describe 53itself. 543. ~~Errors carry a way out.~~ **Fixed** for the actions that can fail today. 55Engine failures reported only through a toast, which is gone in 5.2 s; the 56failure is now *also* recorded and rendered in place, with the retry on the 57surface that failed. Verified against a deliberately aborted restart: the 58toast had expired by 8.2 s and the inline error remained, retry re-reported 59the failure while it persisted, and **cleared once the request succeeded** — 60so it is a real retry, not a re-render. Model load failures still report by 61toast alone. 624. ~~An explicit engine-unreachable state.~~ **Done** — driven by the existing 63event-stream status rather than a separate health poll, so it reacts the 64moment the stream drops. 655. **Time expectations on every operation longer than two seconds**, computed 66from observed rate where possible. 67 68### Fluidity 696. **Skeletons that match the final layout**, so nothing jumps. Build the 70skeleton from the real component's box model. 717. **Loading resolves by cross-fade, never by a jump** — the content fades in over 72the skeleton on `--st-t-local`. 73 74## Motion 75 76| State | Spec | 77|---|---| 78| Skeleton → content | Cross-fade, `--st-t-local`. No layout movement | 79| Empty state appearing | `st-enter`, `--st-t-local`, 8 px — once, not per element | 80| Error appearing | `st-enter`, `--st-t-control`, 6 px; stays until dismissed | 81| Retry in progress | The button becomes busy in place; no spinner elsewhere on screen | 82| Indeterminate bar | Loops only while the operation runs, and stops the instant it ends | 83 84## Verification 85 86- New `flow states`: force each of the four states per screen and assert an action 87is present in the empty states and a retry in the failures. 88- Assert no operation over two seconds lacks a time expectation. 89- Assert the skeleton and the loaded layout have **identical box geometry** — a 90jump of more than 2 px is a failure.