okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Merge f-clean-3 (321794636): docs and history (cleanup step 3, items 3.0-3.10); release manifest and capability table with checks, history/ with pointers, link check, tools/ split, bench index; owner OK'd the wording 11-082b36e8a02

main
4.7 KiB90 linesraw

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

  • Empty is a real component (icon, title, body, optional action) used on Chat, Models, Serving, Skills, Monitor, Workspace.
  • BootSkeleton covers 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 Bar depending on the surface.

Where it falls short

  1. Empty states do not say what to do next, only what is absent. Several have an action, several do not.
  2. 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.
  3. A failed model download leaves a row in an ambiguous state. Wrong, and the real gap was different. v.error already 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.
  4. No retry affordance on failure. The error is reported, never actionable.
  5. Loading has no time expectation. Downloads show a percentage but not how long; scans show a line with no sense of duration.
  6. The skeleton does not match the final layout, so the first paint jumps when real content arrives.
  7. Offline / engine-unreachable has no dedicated state. Fixed. connection had 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 reports offline, and with it running the bar is absent.
  8. 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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. Time expectations on every operation longer than two seconds, computed from observed rate where possible.

Fluidity

  1. Skeletons that match the final layout, so nothing jumps. Build the skeleton from the real component's box model.
  2. Loading resolves by cross-fade, never by a jump — the content fades in over the skeleton on --st-t-local.

Motion

StateSpec
Skeleton → contentCross-fade, --st-t-local. No layout movement
Empty state appearingst-enter, --st-t-local, 8 px — once, not per element
Error appearingst-enter, --st-t-control, 6 px; stays until dismissed
Retry in progressThe button becomes busy in place; no spinner elsewhere on screen
Indeterminate barLoops 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
12  Chat, 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
16  Workspace — 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
22   an action, several do not.
232. **No empty state exists on Monitor or Serving for a first run** beyond a
24   generic message; neither points at the step that would fill them.
253. ~~A failed model download leaves a row in an ambiguous state.~~ **Wrong, and
26   the real gap was different.** `v.error` already renders on the row. What was
27   missing is what to *do* about it: there was no Retry anywhere in the app
28   except Chat's *Ask again*, so a failed download was a dead end and the reader
29   had to work out that the Download button was also the retry. Failed rows now
30   carry 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
33   long; scans show a line with no sense of duration.
346. **The skeleton does not match the final layout**, so the first paint jumps
35   when 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
38   rendered nowhere, so a dead host looked exactly like an idle one — every panel
39   simply empty, with no statement that anything was wrong. A bar now names the
40   problem in plain language and offers a reconnect. Verified both ways: with the
41   host 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.**
43   The 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
52   would fill it. Monitor's empty should offer "Send a prompt", not describe
53   itself.
543. ~~Errors carry a way out.~~ **Fixed** for the actions that can fail today.
55   Engine failures reported only through a toast, which is gone in 5.2 s; the
56   failure is now *also* recorded and rendered in place, with the retry on the
57   surface that failed. Verified against a deliberately aborted restart: the
58   toast had expired by 8.2 s and the inline error remained, retry re-reported
59   the failure while it persisted, and **cleared once the request succeeded** —
60   so it is a real retry, not a re-render. Model load failures still report by
61   toast alone.
624. ~~An explicit engine-unreachable state.~~ **Done** — driven by the existing
63   event-stream status rather than a separate health poll, so it reacts the
64   moment the stream drops.
655. **Time expectations on every operation longer than two seconds**, computed
66   from observed rate where possible.
67
68### Fluidity
696. **Skeletons that match the final layout**, so nothing jumps. Build the
70   skeleton from the real component's box model.
717. **Loading resolves by cross-fade, never by a jump** — the content fades in over
72   the 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
87  is 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
90  jump of more than 2 px is a failure.