Skip to main content
Yosemite CrewDeveloper Docs

Validation Matrix

On this page

Validation Matrix

This document defines the engineering controls and evidence model for UI quality. It is for engineers and reviewers shipping UI: it tells you what proof each class of component needs before it merges, and which components carry extra scrutiny. It builds on the Contribution Guide and Component Taxonomy.

The intent is GxP-ready (GxP is the umbrella for the "Good Practice" quality guidelines used in regulated industries such as pharma; here it means risk-based, traceable, reproducible) - not a blanket certification claim.


Evidence categories

CategoryToolAutomation
Unit / integration testsJest + React Testing Library✅ CI
Component story coverageStorybook✅ Build verification
Accessibility checksStorybook @storybook/addon-a11y✅ Per-story
Keyboard behaviorStorybook interaction tests✅ Per-story
Visual regressionManual review (Storybook)🔲 Planned
Responsive reviewStorybook viewport presetsManual
Manual validation checklistGitHub PR checklistManual

Component class risk matrix

🔴 High risk - explicit validation checklist required

These component classes handle critical user actions. Each must have a manual validation checklist in the PR that ships or modifies them.

Component classRiskChecklist items
Destructive confirmation dialogsData lossFocus management, escape key, cancel/confirm labeling, loading state
File upload flowsData integrityError states, size limits, format validation, progress states
Financial displaysAccuracyNumber formatting, currency symbols, zero/null states
Consent / signature surfacesLegalClear labeling, audit trail, cannot be dismissed by accident
Embedded iframe / PDF viewersContent integrityLoading states, error states, a11y labels
Data-heavy tables with critical actionsAccuracy + actionsSorting, filtering, empty states, bulk action confirmation

🟡 Medium risk - story + a11y check required

Component classNotes
Modal / dialog (general)Focus trap, escape, aria-labelledby, close button
Form inputsLabel association, error states, required indicators
Navigation componentsKeyboard accessibility, current page indication
Search / filter componentsEmpty states, loading, no-results
Notification / toastDismissibility, screen-reader announcement

🟢 Standard - story coverage sufficient

Component classNotes
Display cardsNo interactive states beyond hover
Typography componentsToken alignment only
Decorative animationsMust respect prefers-reduced-motion
Badges / chipsAccessible label where color is the only differentiator

Minimum test expectations per component

Approved primitive or overlay:
  ✅ Jest: renders without crashing
  ✅ Jest: key variants render correctly
  ✅ Jest: disabled/error state renders correctly
  ✅ Jest: callbacks fire on interaction
  ✅ Storybook: story for each variant and state
  ✅ Storybook: a11y addon passes with no violations
  ✅ Storybook: interaction story for keyboard usage (if interactive)

High-risk overlay (modal, upload, confirm):
  All of the above, plus:
  ✅ Jest: focus moves into dialog on open
  ✅ Jest: Escape key closes the dialog
  ✅ Jest: focus returns to trigger on close
  ✅ Manual checklist reviewed in PR

Storybook interaction test expectations

Interactive components (Accordion, Modal, Dropdown, Search) must have interaction stories using @storybook/test:

play: async ({ canvasElement }) => {
  const canvas = within(canvasElement);
  await userEvent.click(canvas.getByRole('button', { name: /toggle/i }));
  expect(canvas.getByRole('region')).toBeVisible();
};

Current interaction stories: ModalBase (focus trap, escape key, blocked close).

Planned: Accordion expand/collapse, Dropdown open/close, Search input/clear.


CI gates (planned)

GateCommandTrigger
Type checknpx tsc --noemitPR, push
Lintpnpm --filter frontend run lintPR, push
Unit testspnpm --filter frontend run testPR, push
Storybook buildpnpm --filter frontend run storybook:buildPR

Bootstrap removal progress

The following react-bootstrap consumers block full Bootstrap CSS removal from layout.tsx. Each must be replaced before the global import is safe to remove.

FileStatus
overlays/OtpModal/OtpModal.tsx⚠️ Pending migration
overlays/Toast/Toast.tsx⚠️ Pending migration
widgets/UploadImage/UploadImage.tsx⚠️ Pending migration
widgets/DynamicSelect/DynamicSelect.tsx⚠️ Pending migration
inputs/FileInput/FileInput.tsx⚠️ Pending migration
features/auth/SignIn.tsx⚠️ Pending migration
features/auth/SignUp.tsx⚠️ Pending migration
features/auth/ForgotPassword.tsx⚠️ Pending migration
features/marketing/LandingPage.tsx⚠️ Pending migration