A proposal for one vocabulary across the report, for review before anything is built. Real theme CSS is inlined from the tree; only the bn-ghost and bn-skeleton rules and the page chrome are new. Brief: docs/design-loading-states-brief.md.
Why. In testing, progressive display read as broken: people did not see that analysis was still running, and never discovered that the bars under a session are a scrubbable timeline, because they only appear once frames exist. Today the one loading cue is the text shimmer. Skeleton and ghost are not defined anywhere in the system, and design-progressive-lenses.md §2 says “never a skeleton” and “a waiting row shows no thumbnail placeholder”. This page proposes reversing both.
Three states, five shapes. Switch to Off above to see the static fallback: the working state must still differ from the ghost without motion, so a skeleton is a solid fill and a ghost is a dotted outline.
| Shape | Done | Working on it now | Will exist, not started |
|---|---|---|---|
| Thumbnail 96 × 54 | |||
| Strip 4.5 px | |||
| Text that exists a filename | interview-02.mov | ||
| Chart cell sparkline bars | |||
| Card | The export button was where I expected it, but I wasn’t sure it had worked. exportfeedback |
The same grid at three points in one run. Facts known at ingest stay as they are.
Row 1 is readable, row 2 is being worked on (filename shimmers), row 3 waits. Everything not yet known is simply absent, and a sparkline cell shows a dash. Nothing says “more is coming” except one faint shimmer. The play box on row 1 is today’s fallback when a thumbnail does not exist, which reads as playable.
| Thing | When it is produced today | So the placeholder is up for |
|---|---|---|
| Thumbnail | At render (s12_render/report.py). The design doc plans a grab right after ingest, not built. Measured when it is built: 0.14 s per frame, about 1.5 s for ten files. | The whole run today: minutes. A skeleton here would shimmer for minutes, which is wrong; a static ghost is right. If extraction moves to ingest, it is seconds and may not need a placeholder at all. |
| Closed strip | Needs the session’s turns and scene colours. Scene colours are computed per session in the chain (about 1.5 s per hour of video). The closed strip draws as soon as the row is readable, so it needs no placeholder on a readable row. | None once readable. A waiting row has no strip yet. |
| Hover frames and scene strip | A background job in serve after the report is readable. It decodes at 4 fps, defers while a run is in progress, and works through sessions one at a time (server/scene_strips.py). | Per session, a real wait on long recordings: this is the one place a working shimmer is earned. Decode time per hour of video is not measured; do that before choosing. |
One section across three moments. Static while sessions are read, shimmering only while the grouping runs, then real. A ghost heading, no words.
Words (“appears when every session is read”) would be new copy, so none are drawn. Decision 2: silent ghost, or one plain line.
One moment, three cards in three states. The same two rules, a different feature.
| Case | What it does | Shown |
|---|---|---|
| Stop, or a cancelled run | Every ghost and skeleton goes. Nothing is left promising work that stopped. | (empty cell) |
| The frame can't be made (decode failed) | Resolves to today's play-icon box. The media is still playable, so the fallback is honest. | |
| Audio-only session | Never gets a placeholder: the probe says no video stream, so nothing is promised. | (no thumbnail slot) (no thumbnail slot) |
| Arrival | A 150 ms cross-fade (--bn-transition-fast) in the same box, so nothing reflows. Instant under reduced motion. |
Defined in this page only; tokens.css is untouched. Timing is reused from the shimmer tokens, not copied.
:root {
/* Will exist, not started — a STATIC ghost. Quiet outline, quieter fill. Never moves. */
--bn-ghost-line: var(--bn-colour-border-hover);
--bn-ghost-outline: color-mix(in srgb, var(--bn-ghost-line) 45%, transparent);
--bn-ghost-fill: color-mix(in srgb, var(--bn-colour-badge-bg) 45%, transparent);
/* Working on it now — a BLOCK skeleton. Same character as the text shimmer (single hue,
same timing, same band), drawn on a box because background-clip:text has no box to clip.
Polarity follows the theme: the band moves toward the ink, so it darkens on light and
lightens on dark. */
--bn-skeleton-base: var(--bn-colour-badge-bg);
/* A third of what a block of pixels would take from the text shimmer's 20%: on a big slab
the same swing reads as a flash. The peak is a translucent ink tint laid OVER whatever
fill the element already has, so a ghost shape and a skeleton box share one sweep. */
--bn-skeleton-contrast: 2.7%;
--bn-skeleton-peak: color-mix(in srgb, var(--bn-colour-text) var(--bn-skeleton-contrast), transparent);
/* Small shapes (sparkline bars, the 4.5px strip) have too little area for the eye to catch
a third-contrast sweep: they take the earlier, stronger value. */
--bn-skeleton-contrast-small: 8%;
--bn-skeleton-peak-small: color-mix(in srgb, var(--bn-colour-text) var(--bn-skeleton-contrast-small), transparent);
}
/* Ghost: 1px dotted outline (1px dots) + faint fill. Shapes under ~12px on a side (sparkline bars, the 4.5px
strip) cannot carry a dotted outline: they take the fill alone (.bn-ghost--solid). */
.bn-ghost {
box-sizing: border-box;
border: 1px dotted var(--bn-ghost-outline);
background: var(--bn-ghost-fill);
border-radius: var(--bn-radius-sm);
cursor: default;
pointer-events: none;
}
.bn-ghost--solid { border: none; background: var(--bn-ghost-line); opacity: 0.55; }
/* Skeleton: a solid base fill at rest (so the static fallback still differs from a ghost:
solid vs dashed), with the sweep on top when both motion gates pass. */
.bn-skeleton {
box-sizing: border-box;
background-color: var(--bn-skeleton-base);
border-radius: var(--bn-radius-sm);
cursor: default;
pointer-events: none;
}
/* Same two gates as atoms/shimmer.css: reduced-motion, and the app's animation toggle. */
@media (prefers-reduced-motion: no-preference) {
:root:not([data-analysis-animation="off"]) :is(.bn-skeleton, .is-working) {
background-image: linear-gradient(
var(--bn-shimmer-angle),
transparent 0%,
transparent calc(50% - var(--bn-shimmer-band) / 6),
var(--bn-skeleton-peak) 50%,
transparent calc(50% + var(--bn-shimmer-band) / 6),
transparent 100%
);
background-size: 300% 100%;
background-repeat: no-repeat;
animation: bn-skeleton-sweep var(--bn-shimmer-period) var(--bn-shimmer-easing) infinite;
/* Independent phase, so neighbours read as individual organisms, not a strobe. */
animation-delay: var(--bn-skeleton-phase, 0ms);
}
}
@keyframes bn-skeleton-sweep {
0% { background-position: 100% 50%; }
66.67% { background-position: 0% 50%; }
100% { background-position: 0% 50%; }
}
/* The principle: working is the SAME element as the ghost, started. It keeps its shape and
position; the dotted outline (the "not started" mark) goes, the fill firms up, the sweep runs.
Shapes with no outline (sparkline bars) firm up by opacity. */
.bn-ghost:not(.bn-ghost--solid).is-working { border-color: transparent; background-color: var(--bn-skeleton-base); }
.bn-ghost--solid.is-working { opacity: 0.8; }
.bn-ghost--solid.is-working, .bn-tapestry-preview .is-working { --bn-skeleton-peak: var(--bn-skeleton-peak-small); }
/* A thumbnail slot that is not (yet) a thumbnail: no pointer, no play icon. */
.bn-video-thumb.bn-ghost, .bn-video-thumb.bn-skeleton { cursor: default; }
/* The strip's placeholder lives in the strip's own box, so nothing moves when it resolves. */
.bn-tapestry-preview.is-placeholder { cursor: default; pointer-events: none; }