Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .design-sync/config.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .design-sync/entry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export {
type DisclosureGroupProps,
type DisclosureProps,
} from "@/components/ui/disclosure";
export { ErrorState, errorStateCopy, type ErrorStateProps, type ErrorStateReason } from "@/components/ui/error-state";
export {
ErrorSummary,
FieldError,
Expand Down
16 changes: 16 additions & 0 deletions .design-sync/previews/ErrorState.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { ErrorState } from "prompt-for-codex-medical-knowledge-base";

// A failed request has no count to report, so none of these render a number.
// "0 matches" on a failed services search asserts there are no crisis services
// when the search never ran — see SPEC §10 and COMPONENTS §0.3.
export const Reasons = () => (
<div className="flex flex-col gap-3">
<ErrorState reason="request_failed" subject="Services" onRetry={() => {}} />
<ErrorState reason="unauthorized" subject="Favourites" />
<ErrorState reason="timeout" subject="DSM diagnoses" onRetry={() => {}} />
</div>
);

// `inline` drops the panel chrome for a surface that already owns a border,
// exactly as the search band's fault panel sits inside the results ribbon.
export const Inline = () => <ErrorState reason="request_failed" subject="Referral services" density="inline" />;
2 changes: 1 addition & 1 deletion docs/design-system/ADOPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ multiply-owned routes fail the check. `src/app/api/**` and `src/app/mockups/**`
product exclusions; the only route-only disposition is the documented legacy document-source
redirect. Shared shell/component roots carry their own explicit `shared-shell` disposition.

Registered public components: 53
Registered public components: 54
Declared product roots: 59
Roots with a literal `.ckb-v2` opt-in: 1
Roots inheriting `.ckb-v2` from the global `<html>`: 58
Expand Down
5 changes: 3 additions & 2 deletions docs/design-system/COMPONENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -945,8 +945,8 @@ tests to run.

## Generated maturity snapshot

Registered public components: 53
Components with a valid design-sync preview: 53
Registered public components: 54
Components with a valid design-sync preview: 54
Components with product imports: 31

This generated snapshot is a local source-derived inventory. It does not assert remote design-project publication.
Expand All @@ -970,6 +970,7 @@ This generated snapshot is a local source-derived inventory. It does not assert
| `DoseLine` | answer | yes | yes | no | yes | no | 0 |
| `DownloadLink` | controls | yes | yes | no | yes | no | 0 |
| `EmptyState` | feedback | yes | yes | inherited-global-root | yes | no | 12 |
| `ErrorState` | feedback | yes | yes | no | yes | no | 0 |
| `ErrorSummary` | feedback | yes | yes | no | yes | no | 0 |
| `ExternalTextLink` | controls | yes | yes | no | yes | no | 0 |
| `FieldError` | feedback | yes | yes | no | yes | no | 0 |
Expand Down
108 changes: 81 additions & 27 deletions docs/design-system/GATES.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/design-system/adoption-contract.json
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,7 @@
"DoseLine": "answer",
"DownloadLink": "controls",
"EmptyState": "feedback",
"ErrorState": "feedback",
"ErrorSummary": "feedback",
"ExternalTextLink": "controls",
"FieldError": "feedback",
Expand Down
35 changes: 32 additions & 3 deletions docs/design-system/adoption-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@
"src/components/DocumentManagementActions.tsx",
"src/components/clinical-dashboard/account-setup-dialog.tsx",
"src/components/clinical-dashboard/auth-panel.tsx",
"src/components/clinical-dashboard/search-results-header-band.tsx"
"src/components/clinical-dashboard/search-results-header-band.tsx",
"src/components/ui/error-state.tsx"
],
"productImportFiles": [
"src/components/DocumentManagementActions.tsx",
Expand Down Expand Up @@ -688,6 +689,34 @@
"proofDeclared": true,
"baselineCommitted": false
},
{
"name": "ErrorState",
"family": "feedback",
"source": "src/components/ui/error-state.tsx",
"sourceExported": true,
"entryExported": true,
"directImportFiles": [],
"productImportFiles": [],
"designSync": {
"listedInSourceMap": true,
"listedInDtsProps": true,
"preview": ".design-sync/previews/ErrorState.tsx",
"previewValid": true
},
"testFiles": ["tests/design-sync-visual-exports.test.ts", "tests/error-state.dom.test.tsx"],
"baseline": {
"targetLayer": "v2",
"liveLayer": "v2",
"remoteStatus": "unverified",
"visualBaselineStatus": "not-committed"
},
"built": true,
"locallyRegistered": true,
"v2ShellMounted": false,
"v2MountMode": "none",
"proofDeclared": true,
"baselineCommitted": false
},
{
"name": "ErrorSummary",
"family": "feedback",
Expand Down Expand Up @@ -3314,8 +3343,8 @@
"declaredV2SurfaceCount": 14
},
"summary": {
"registeredComponentCount": 53,
"previewCount": 53,
"registeredComponentCount": 54,
"previewCount": 54,
"productImportedComponentCount": 31,
"rootCount": 59,
"productionRouteCount": 51,
Expand Down
Loading
Loading