Score states
Render real scoring lifecycle states consistently across registry, Pages and Console.
| State | Display behavior |
|---|---|
| Loading | Stable shimmering skeleton in the final component dimensions |
| Pending | "Scoring in progress" and the verification receipt |
| Complete | Two donuts from canonical Trust and Confidence fields |
| Partial | Real available values plus a clear evidence-coverage state |
| Failed | Actionable retry; no random fallback score |
| Stale | Last confirmed pair with its timestamp and refresh action |
| Unavailable | Explicit unavailable labels, not zeroes |
Consistency requirement
The Pages card, Dashboard card, registry card and public Page must resolve the same canonical record. A score refresh invalidates or updates every affected query key so the next render cannot mix old and new pairs.
State transitions
unavailable -> pending -> complete
\-> partial
\-> failed
complete/partial -> stale -> pendingloading is a client-fetch state, not a persisted assessment. stale preserves the last confirmed score pair while indicating it falls outside the applicable freshness window. failed means the latest scoring attempt failed; it does not necessarily erase earlier confirmed evidence.
Data shape
type ScoreState = {
trust: number | null
confidence: number | null
status: 'pending' | 'complete' | 'partial' | 'failed' | 'stale' | 'unavailable'
scoredAt: string | null
}Both scores are in the 0–100 range when present. null remains null; a UI must not coerce it to 0 or use sample values. A partial state can contain one real value or incomplete evidence according to the authoritative source contract.
Refresh rendering
On refresh, keep the existing pair visible with a processing indicator when it remains valid as prior evidence. Disable only the Page being refreshed. After success, update the pair, status and timestamp atomically. After failure, preserve the prior pair where policy allows and show an actionable error.
Color rules
Use the shared score thresholds and donut component on landing cards, Console cards and public Pages. Color supplements the numeric/text state; it never replaces it. Pending, failed and unavailable states use neutral presentation rather than a risk color that could be mistaken for an assessment.
Policy behavior
Consumers define acceptable state and age per action. A high-impact operation can require complete and recent evidence, while a low-impact read-only preview may allow stale evidence in a sandbox. Infrastructure failure must be handled separately from a low Trust result.