Content and voice
How every empty, loading, error and gated state in apiome-ui reads, and how that is kept
true. The rule comes from DESIGN.md §10 (and the
voice line in §2); HIVE-10.4 (#5340) brought
every route into line with it.
The rules
| Thing | Rule | Yes | No |
|---|---|---|---|
| Page title | A noun | "Users", "SDK settings" | "User Management", "Configure SDKs" |
| Button | A verb | "New feature flag", "Close" | "OK", "Submit" |
| Description | What it is for, in ≤ 14 words | "Create a key to reach this tenant's data over the REST API." | Two sentences of background |
| Empty state | The situation, then the way out | "No matching records. Try a different search, or view all records." | "No records found." |
| Error | What happened and what to do | "Could not load branches — try again." | "Could not load branches" |
| Loading | Name the thing, in the content's shape | Skeleton + "Loading records…" | A bare "Loading…" |
The four surfaces
Use the shared components from src/app/components/ui. They already draw the honeycomb art
and handle the live regions, so a screen only has to supply the words.
- Empty:
EmptyState(default,compactorinline; adddashedwhen a filter emptied the list). Honey art for "nothing yet",tone="neutral"for "nothing matches". - Loading:
LoadingStatewith aSkeleton*preset shaped like the content, and amessagethat names it. - Error:
ErrorStatewhen the failure replaces the content,ErrorBannerwhen the rest of the page still works. PassonRetrywhenever there is something to retry. - Gated:
GatedStatewhen the page needs something first, such as a workspace or a linked account.
Every read on Catalog, Projects and Versions
RC6 releases Catalog, Projects and Versions, so none of their reads may leave a blank area, a stale view, or an empty state that is really a failure (RC6-H3, #6210).
| While the read is… | The screen shows |
|---|---|
| Pending | A skeleton shaped like the content (CatalogSkeletons presets, DataTable rows, SkeletonCard), with a live region that names it: Loading the projection graph… |
| Failed, and it filled a page, tab or dialog | ErrorState that names what failed (Couldn't load this version's changelog), the server's reason, and Try again |
| Failed, inside a dialog or form that still works | ErrorBanner with Try again, for example a branch list or a publish check |
| Failed because of a rule (no permission, an invalid URL) | A plain alert, with no retry: trying again cannot change it |
Never turn a failed read into "No projects yet" or "No versions yet", and never show placeholder content in its place (a made-up spec, an empty class list).
A few reads only decorate content that is already there: tag filter options, review pills, mock
sparklines, lint rule descriptions. They fail silently and leave the content as it was.
apiome-ui/tests/rc6-fetch-states-ledger.test.ts lists every read on these screens. Each
content read names the tests that hold it pending and make it fail; each decoration says what
the screen shows without it. A read behind a surface that is switched off (the Compare dialog's
Canvas tab) is listed with its gate and the test that keeps the surface hidden; turning it back on
means giving the read its pending and failed tests again. The suite fails if a read moves or a
named test disappears, so a new read joins the ledger with its tests.
Several statuses on one page
A page shows at most one Alert under its header (the page gates below check it). When it has more than one thing to say
about the same object (compatible, what's new, deprecated, server is ahead), use
StatusStrip instead of stacking banners. The strip shows one row of chips and one detail row
underneath.
| Part | How it reads |
|---|---|
| Chip | Icon, a short label ("Compatible", "v2.2.0 deprecated"), then a muted detail ("v2.3.0 → v2.3.1"). |
| Detail row | A title sentence, a body, and at most two small actions ("View report", "Sunset timeline"). |
| Tone | ok, accent, warn or danger, from the status vocabulary. |
- The most severe chip opens first: danger, then warn, accent, ok.
- Clicking the open chip, pressing Collapse, or pressing Escape hides the detail row.
- The strip remembers which chip was open for the browser session, per
storageKey(for exampleversions:<projectId>). It never useslocalStorage. - With one status, its chip starts open and there is no Collapse button. With no statuses
the strip renders nothing. Pass
loadingto show one placeholder chip. - Leave out any chip that has nothing to say.
The Status strip section of /design-system shows every state.
Stats and explainers on list pages
List pages put the first row of data above the fold. Two components keep the same information on the page without taking a fixed block of space.
FactsLine shows a stat strip as one line, such as 3 items · 3 formats · avg quality B · 83.
- Each fact is a number in full ink plus a few words. Put the label first when it reads better
(avg quality B · 83). Mark an aside such as 1 deleted · 1 disabled as
muted. - Pass the page's existing
StatGridasstatsand a Show stats button appears at the end of the line. It opens the grid in place, and the button then reads Hide stats. - The choice is remembered on this device, per page, under
hive.<page>.stats. - An empty list reads 0 items (or
emptyLabel) and has no button. Passloadingto show a placeholder line.
DismissibleCallout shows an explainer on a reader's first visit only.
- It has a body, an optional Learn more button and Got it. Got it hides it on this
device for good (
hive.seen.<id>). Clearing site data shows it again. - Dismissing must never hide information. Set
reopenFromto the header link or dialog that still holds the content, such as How the catalog works. The copy check below fails when it is missing. - It is tinted
accentby default;neutralandhoneyare also available.
The Facts line & callout section of /design-system shows every state.
Page headers and unavailable controls
A page header holds the actions for the whole page, and only a few of them (DESIGN.md §1.2, §5.3).
| In the header's actions | Limit |
|---|---|
Primary (ink) Button | 1, drawn last |
Other Buttons (outline, soft, ghost, accent, danger) | 2 |
⋯ overflow menu (overflow on PageHeader) | 1, between the secondaries and the primary |
<select> or Select | none. Put a filter or a picker in the page body, next to what it filters |
- Move a page's extra actions into
overflowrows. An unavailable row usesdisabledReasonrather than disappearing. - Only
Buttons count. Read-outs in the cluster, such as the score orbs on a catalog item, do not.
A control that cannot be used says why:
- A disabled button carries a
titleor anaria-describedbythat gives the reason, such as Rescan is already running. - "Coming soon" is never the text of a button. Draw a feature that is not there yet as a dimmed,
aria-disabledelement with the label, the way the import wizard draws a source it cannot read yet. A short "Coming soon" as a disabled control'stitleis also fine.
What enforces it
At runtime, every shared error surface makes sure a failure names a next action
(lib/copy-voice.ts):
| Surface | Behaviour |
|---|---|
ErrorState, ErrorBanner | With no retry or action, a string description gains "— try again." A missing description becomes "Reload the page, or try again in a moment." |
Alert (danger / error) | A bare failure string with no actions gains "— try again." |
toast.error (components/ui/toast) | A failure ("Failed to…", "Could not…", "…error", a 4xx/5xx code) gains "— try again." |
AlertDialog (danger) and useDialog perform failures | Same as toast.error. |
A message that already names an action ("Could not sign out. Try again.") is left alone. So is a message that states a rule ("System primitives cannot be edited", "That name is taken"), because retrying cannot fix it. Rich (React node) messages are never rewritten.
At test time, tests/copy-voice-gate.test.ts parses every source under src/ with the
TypeScript compiler and fails when:
- a literal
title/descriptiononEmptyState,ErrorState,GatedState,ErrorBannerorPageHeader, or a*_EMPTY_TITLE/*_EMPTY_DESCconstant, breaks the rules above (over 14 words, "No … found", "Manage …", "… Management"); - any JSX text is "No records found"-class copy;
- an admin navigation title is not a noun;
- a component imports
toastfromsonnerinstead ofcomponents/ui/toast; - a
DismissibleCallouthas no literalreopenFrom; - "Coming soon" is the text of a
buttonorButton; - the number of disabled buttons with no
titleoraria-describedbychanges. This is a ratchet (HIVE-13.2): 470 older buttons are pinned, a new one fails, and a change that gives older buttons their reasons lowers the number to match.
The runtime behaviour is pinned in tests/copy-voice-surfaces.test.tsx.
The page gates, tests/page-header-gate.test.tsx (HIVE-13.2,
#5615), read every rendered page the test suites
dump under apiome-ui/e2e/fixtures/ and fail when:
- a header breaks the limits in Page headers and unavailable controls;
- more than one banner (
Alert, a status bar or a callout) sits under the header before the page's content starts. AStatusStripcounts as one; - a button's text says "Coming soon".
The gates also read the source, so a select inside a PageHeader's actions fails even on a
route nothing dumps. Two frozen copies of the old Versions page, with three banners and a
six-control header, are kept as cases the gates must fail (e2e/fixtures/hive-page-gates/).
Pages that are not released yet can be allow-listed in the test with a reason. An entry fails as
stale once its page passes. Both suites run in the Apiome UI workflow's unit-test step.
Route checklist
Every route was reviewed in HIVE-10.4. Each state column shows which shared surface covers that state on the route (✓), or why the state doesn't apply.
- n/a: the route draws no data (a redirect or a static gallery).
- —: the route has no such state. For example, the page needs no workspace, or it has no list that can be empty.
- ✓¹: no dedicated error component. Failures reach the reader through the voiced
toast.erroror a dangerAlert.
The ✓ marks come from the shared components each route imports (directly or through its own feature components). The notes record what HIVE-10.4 changed there.
| Route | Empty | Loading | Error | Gated | Notes |
|---|---|---|---|---|---|
/ade/dashboard/api-keys | ✓ | ✓ | ✓ | ✓ | |
/ade/dashboard/audit | ✓ | ✓ | ✓¹ | — | Load failure shown in a danger Alert, now voiced. Empty description shortened. |
/ade/dashboard/catalog/[id] | ✓ | ✓ | ✓ | — | Missing item: "Catalog item unavailable" + Back to Catalog / Try again. |
/ade/dashboard/catalog | ✓ | ✓ | ✓ | ✓ | |
/ade/dashboard/export/studio | ✓ | ✓ | ✓ | — | |
/ade/dashboard/help | n/a | n/a | n/a | ✓ | Static guide index; no fetch to fail. |
/ade/dashboard/linked-accounts | ✓ | ✓ | ✓¹ | — | Danger Alert voiced; PAT error copy no longer "No linked account found". |
/ade/dashboard/lint-workspace | ✓ | ✓ | ✓ | ✓ | Queue empty shortened. |
/ade/dashboard/mcp/[endpointId] | ✓ | ✓ | ✓ | — | Seven MCP panel empties shortened; snapshot empty rewritten. |
/ade/dashboard/mcp/agents | ✓ | ✓ | ✓ | ✓ | Toolsets and usage empties shortened. |
/ade/dashboard/mcp/analytics | ✓ | ✓ | ✓ | ✓ | Catalog-insight empty shortened. |
/ade/dashboard/mcp/capabilities | ✓ | ✓ | ✓ | ✓ | "No capabilities found" → "No capabilities match". |
/ade/dashboard/mcp/compare | ✓ | ✓ | ✓ | ✓ | Compare empty shortened. |
/ade/dashboard/mcp | ✓ | ✓ | ✓ | ✓ | |
/ade/dashboard/members | ✓ | ✓ | ✓ | — | Invite empty shortened. |
/ade/dashboard/notifications | — | — | ✓¹ | ✓ | Load failure: Alert with a Try again action. |
/ade/dashboard | ✓ | ✓ | ✓¹ | — | Home. "Continue working" empty state shortened to ≤ 14 words. |
/ade/dashboard/primitives/[id] | ✓ | ✓ | ✓ | — | |
/ade/dashboard/primitives | ✓ | ✓ | ✓ | ✓ | "No Primitives Found" → "No matching primitives". |
/ade/dashboard/profile | ✓ | ✓ | ✓¹ | — | Save failures raise voiced toasts; 2FA errors name the fix ("Enter your current password…"). |
/ade/dashboard/projects/[projectId]/consumers | ✓ | ✓ | ✓ | — | |
/ade/dashboard/projects | ✓ | ✓ | ✓ | ✓ | |
/ade/dashboard/published | ✓ | ✓ | ✓ | ✓ | |
/ade/dashboard/repositories/[id] | — | — | ✓¹ | ✓ | Server shell; the detail client is covered under /repositories. |
/ade/dashboard/repositories/[id]/preview | ✓ | ✓ | ✓ | ✓ | |
/ade/dashboard/repositories/catalog | ✓ | ✓ | ✓ | ✓ | |
/ade/dashboard/repositories/new | ✓ | ✓ | ✓ | ✓ | |
/ade/dashboard/repositories | ✓ | ✓ | ✓ | ✓ | Empty description shortened (24 → 11 words). |
/ade/dashboard/repositories/telemetry | ✓ | ✓ | ✓ | ✓ | |
/ade/dashboard/repositories/webhook-ip-allowlist | ✓ | ✓ | ✓ | ✓ | |
/ade/dashboard/roles | ✓ | ✓ | ✓¹ | — | Danger Alert voiced; both empty descriptions shortened. |
/ade/dashboard/sdk-settings | — | ✓ | ✓¹ | — | Danger Alert voiced. Title is a noun ("SDK settings"). |
/ade/dashboard/style-guides/[guideId] | ✓ | ✓ | ✓¹ | — | Catalog errors in danger Alert, voiced. Rule-filter empty shortened. |
/ade/dashboard/style-guides | ✓ | ✓ | ✓ | — | Empty description shortened. |
/ade/dashboard/tenants | ✓ | ✓ | ✓ | ✓ | "Not a member" empty description shortened. |
/ade/dashboard/versions | ✓ | ✓ | ✓ | ✓ | First-version empty description shortened. |
/ade/dashboard/versions/sunset-timeline | ✓ | ✓ | ✓ | ✓ | |
/ade | — | — | ✓¹ | — | Launcher; data resolved on the server. Signed-out renders the brand hero. |
/ade/reviews/[id] | ✓ | ✓ | ✓ | ✓ | "Nothing published" compare empty shortened. |
/ade/studio/code | n/a | n/a | n/a | ✓ | Redirect only. |
/ade/studio/editor | n/a | n/a | n/a | ✓ | Redirect only. |
/ade/studio | n/a | n/a | n/a | ✓ | Redirect only. |
/ade/studio/paths | n/a | n/a | n/a | ✓ | Redirect only. |
/admin/dashboard/feature-flags | ✓ | ✓ | ✓¹ | — | Shares the licenses client: flag empty is an EmptyState with "New feature flag". |
/admin/dashboard/licenses | ✓ | ✓ | ✓¹ | — | Title "License Management" → "Licenses"; three empties and four loaders converted. |
/admin/dashboard | — | — | ✓¹ | — | Overview. Card titles are nouns ("Users", "Payments", "System settings"). |
/admin/dashboard/settings | — | — | ✓¹ | — | Title "System Configuration" → "System settings". |
/admin/dashboard/templates | ✓ | ✓ | ✓¹ | — | "No templates found" → dashed "No matching templates". |
/admin/dashboard/tenants | ✓ | ✓ | ✓¹ | — | Title → "Tenants"; three empties and the loader converted. |
/admin/dashboard/users | ✓ | — | ✓¹ | ✓ | Title → "Users"; "No users found" / "No pending signups" → EmptyState. |
/admin | — | — | ✓¹ | ✓ | Admin sign-in form; its fallback error already says "try again". |
/design-system/command-palette | n/a | n/a | n/a | n/a | Static gallery. |
/design-system | ✓ | ✓ | ✓ | ✓ | The design system route; draws the whole feedback set. |
/design-system/hive | n/a | n/a | n/a | n/a | Redirects to /design-system. |
/design-system/mcp | ✓ | ✓ | ✓ | ✓ | Gallery of MCP primitives. |
/design-system/page-header | n/a | n/a | n/a | n/a | Static gallery. |
/design-system/shortcuts | n/a | n/a | n/a | n/a | Static gallery. |
/login/2fa | — | — | ✓ | — | Shares auth-error-copy with sign-in. |
/login | — | — | ✓ | ✓ | Auth errors come from auth-error-copy (mapped codes, each with a way forward). |
/ | n/a | n/a | n/a | ✓ | Redirects to the launcher or sign-in; no content of its own. |
/signup/oauth | — | — | ✓ | ✓ | OAuth errors in danger Alert, voiced. |