Organism · beta · v1.0.0 · owner: Site system lead · contract 19 of 20 points (open: figma)
Do and don't
Do: The mount
Rendered by health-check.tsOpen example: Health check · Do: The mount Use the full-page example to follow page links.
Do: Without JavaScript
Rendered by health-check.tsOpen example: Health check · Do: Without JavaScript Use the full-page example to follow page links.
Don't: Embedded elsewhere
Rendered by health-check.tsOpen example: Health check · Don't: Embedded elsewhere Use the full-page example to follow page links.
Don't: Without its privacy link
Rendered by health-check.tsOpen example: Health check · Don't: Without its privacy link Use the full-page example to follow page links.
Rules
| Rule | Why | Check |
|---|---|---|
| Health check is computed by Loom's code from the reader's own answers, scored in the browser by health-check/scoring.js against the public rubric, not drawn by hand. | A showcase is proof only if the product's own code produced what it shows. | Automated: scripts/site/interactives/check.ts (recomputes the showcase data and fails on drift) |
| The app states what happens to the reader's answers next to where they enter them. | Trust: nothing is sent without the reader knowing. | Automated: tests/site/health-check-turnstile.spec.ts |
API
No props.
Contract details
The full contract: identity, anatomy, variants, states, tokens, layout, motion, accessibility, content, tests
Identity
| Aspect | Value |
|---|---|
| Id | health-check |
| Layer | Organisms |
| Category | app |
| Owner | Site system lead |
| Status | beta |
| Version | 1.0.0 |
| Source | apps/showcase/site/system/organisms/health-check.ts (private repository; the contract and the render function are this one module) |
| Version | Date | Change |
|---|---|---|
| 1.0.0 | 2026-10-26 | Health check: computed by Loom's code from the reader's own answers, scored in the browser by health-check/scoring.js against the public rubric. |
Use when
- /health-check/. Why: A task that needs the whole screen.
Do not use when
- Embedded in a marketing page. Why: Pages link to it.
Anatomy
| Part | What it is |
|---|---|
| progress | div#progress (filled by the app) |
| app | div#app: the intro until the script takes over |
| noscript | A notice and the contact form as the alternative |
Made of: showcase-frame, panel, form-field, button, facts-list.
Used in: task-body, page-apps.
Variants
| Variant | When | Why |
|---|---|---|
| full | On its demo page and its section. | The whole experience where the claim is made. |
States
| State | Rendered or not applicable |
|---|---|
| default | Build-time task mount shows its loading intro; health-check.js boots the question flow. Without JavaScript a notice links to contact instead of claiming a completed result. |
| hover | The task uses native radio, button and link hover affordances. |
| focus-visible | Task controls show focus; advancing the task focuses its heading and invalid report requests focus the error summary. |
| active | Start/Next/Back and core/deep choices update the task; report actions use the actual answer scores. No Play/Pause control exists. |
| disabled | The report-request submit button is disabled while its request is pending; a rejected 400 request enables retry. |
| loading | Initial configuration/dictionary loading and the contact-step spam check/request belong to health-check.js, not the native showcase host. |
| empty | Unanswered questions and unsure answers remain distinct inputs to the scoring model; the reader may skip the optional deep section. This is not a build-time empty showcase. |
| error | Malformed shares show a notice; boot failure renders a localized retry view. Invalid contact/spam requests show associated errors. Network/server delivery failure opens the local report with an explicit not-sent notice; it does not claim delivery. |
| current | Native checked answers and written question/progress labels identify the current task position; there is no aria-valuetext playback slider. |
| visited | Not applicable: No visited state on this root; any contained native links retain their own browser history. |
| expanded | Not applicable: No disclosure state on this root; replacing a view is not aria-expanded. |
Tokens
| Part | Token |
|---|---|
| app.ground | --cotton |
| panel.background | --surface |
| --health-check-max-width-w-text | var(--w-text) |
| --health-check-margin-top-space-4 | var(--space-4) |
| --health-check-margin-bottom-space-9 | var(--space-9) |
| --health-check-gap-space-3 | var(--space-3) |
| --health-check-margin-bottom-space-4 | var(--space-4) |
| --health-check-font-type-small | var(--type-small) |
| --health-check-color-ink-2 | var(--ink-2) |
| --health-check-font-weight-weight-strong | var(--weight-strong) |
| --health-check-color-ink | var(--ink) |
| --health-check-gap-space-2 | var(--space-2) |
| --health-check-max-width-w-narrow | var(--w-narrow) |
| --health-check-padding-space-2 | var(--space-2) |
| --health-check-background-ink | var(--ink) |
| --health-check-height-space-6 | var(--space-6) |
| --health-check-background-surface-3 | var(--surface-3) |
| --health-check-background-ink-2 | var(--ink-2) |
| --health-check-gap-space-6 | var(--space-6) |
| --health-check-gap-space-5 | var(--space-5) |
| --health-check-margin-top-space-9 | var(--space-9) |
| --health-check-margin-space-5 | var(--space-5) |
| --health-check-margin-space-8 | var(--space-8) |
| --health-check-margin-top-space-10 | var(--space-10) |
| --health-check-padding-top-space-5 | var(--space-5) |
| --health-check-border-top-rule-hair | var(--rule-hair) |
| --health-check-border-top-line | var(--line) |
| --health-check-padding-space-1 | var(--space-1) |
| --health-check-gap-space-9 | var(--space-9) |
| --health-check-margin-bottom-space-10 | var(--space-10) |
| --health-check-color-on-dye | var(--on-dye) |
| --health-check-color-on-saffron | var(--on-saffron) |
| --health-check-font-type-h2 | var(--type-h2) |
| --health-check-letter-spacing-ls-h2 | var(--ls-h2) |
| --health-check-font-type-label | var(--type-label) |
| --health-check-margin-top-space-1 | var(--space-1) |
| --health-check-gap-grid-gap | var(--grid-gap) |
| --health-check-font-type-h3 | var(--type-h3) |
| --health-check-letter-spacing-ls-h3 | var(--ls-h3) |
| --health-check-margin-space-2 | var(--space-2) |
| --health-check-font-type-small-strong | var(--type-small-strong) |
| --health-check-font-type-figure | var(--type-figure) |
| --health-check-background-cotton | var(--cotton) |
| --health-check-border-rule-hair | var(--rule-hair) |
| --health-check-border-ink | var(--ink) |
| --health-check-background-band-holding | var(--band-holding) |
| --health-check-background-space-4 | var(--space-4) |
| --health-check-background-space-5 | var(--space-5) |
| --health-check-transition-dur-weave | var(--dur-weave) |
| --health-check-background-band-shape | var(--band-shape) |
| --health-check-background-band-loose | var(--band-loose) |
| --health-check-margin-top-space-8 | var(--space-8) |
| --health-check-field-bg-surface-2 | var(--surface-2) |
| --health-check-field-fg-ink | var(--ink) |
| --health-check-field-fg-2-ink-2 | var(--ink-2) |
| --health-check-font-type-lede | var(--type-lede) |
| --health-check-padding-space-8 | var(--space-8) |
| --health-check-background-surface | var(--surface) |
| --health-check-border-top-rule-frame | var(--rule-frame) |
| --health-check-border-top-madder | var(--madder) |
| --health-check-border-radius-radius | var(--radius) |
| --health-check-margin-space-4 | var(--space-4) |
| --health-check-margin-top-space-3 | var(--space-3) |
| --health-check-background-madder | var(--madder) |
| --health-check-border-top-saffron | var(--saffron) |
| --health-check-font-type-strong | var(--type-strong) |
| --health-check-background-saffron | var(--saffron) |
| --health-check-padding-space-5 | var(--space-5) |
| --health-check-margin-space-3 | var(--space-3) |
| --health-check-gap-space-4 | var(--space-4) |
| --health-check-border-top-line-strong | var(--line-strong) |
| --health-check-border-top-color-saffron | var(--saffron) |
| --health-check-padding-space-4 | var(--space-4) |
| --health-check-gap-space-8 | var(--space-8) |
| --health-check-margin-top-space-12 | var(--space-12) |
| --health-check-border-ink-2 | var(--ink-2) |
| --health-check-padding-top-space-8 | var(--space-8) |
| --health-check-bottom-space-8 | var(--space-8) |
| --health-check-padding-space-6 | var(--space-6) |
| --health-check-color-cotton | var(--cotton) |
| --health-check-box-shadow-shadow-float | var(--shadow-float) |
| --health-check-transition-dur-moderate | var(--dur-moderate) |
| --health-check-transition-ease-standard | var(--ease-standard) |
| --health-check-background-field-bg | var(--field-bg) |
| --health-check-color-field-fg | var(--field-fg) |
| --health-check-color-field-fg-2 | var(--field-fg-2) |
Layout
| Aspect | Value |
|---|---|
| breakpoints | Required review at 390, 768, 1024 and 1440 px; execution is not implied by this declaration; columns stack under 768 px and controls fill the row on phones. |
| wrapping | Text wraps; code panes scroll inside their own focusable region. |
| textExpansion | Japanese strings come from the i18n tables and wrap; engine output stays English. |
Spacing and rhythm
| Aspect | Value |
|---|---|
| internal | Inside the Showcase frame's padding, controls and caption at its foot. |
| external | Full width of its section. |
| rhythm | One showcase per section, after the section's claim (D-SITE-008). |
Motion
| Aspect | Value |
|---|---|
| None | The task advances through reader actions, not timed playback. Native focus/hover and the task stylesheet remain applicable. |
Runtime and reuse
Render-only element; mount any registered child enhancements separately. Preserve required Site CSS, fonts, responsive and locale rules from nativeElement.
Accessibility passport
| Aspect | Value |
|---|---|
| role | Task sections with headings, native question forms and result/report content. |
| name | Its heading or caption |
| keyboard | Native Tab/radio/button operation; Start, Next, Back and optional deep-section actions advance the task. |
| focus | Step changes focus the task heading; invalid report requests focus the error summary. |
| screenReader | Written progress, answer labels, result text and report/spam statuses; no showcase playback announcements. |
| contrast | Ink on surface 14:1; state dyes only as marks with words. |
| target | Controls are 44 px. |
Content
| Slot | Length | Voice |
|---|---|---|
| question | 1 sentence | Plain, second person |
Good: “How do teams find components today?”
Bad: “Rate your synergy”
Japanese: Japanese strings from health-check/i18n/ja.json, opened with ?lang=ja.
Icons and illustrations
None: this element uses no icon or illustration of its own.
Decisions and exceptions
Usage
4 uses across the built pages (measured by npm run site:system).
Tests
| Aspect | Value |
|---|---|
| unit | tests/unit/site-system.test.ts: renders every do and don't example through the registry and checks the classes it owns |
| visual | Not yet: there are no screenshot baselines; the Library page is checked for sideways scroll at 1440 px by tests/site/system.spec.ts |
| a11y | tests/site/system.spec.ts: axe (0 serious or critical) on the element's Library page in light and dark |
| parity | scripts/site/system/check.ts: Library examples are rendered by the same render function the site imports |
Figma
not-yet: The Loom Site Figma library is the last stage of the plan; this element is not mapped yet.