System-wide audit of `src/uix/*` + `src/arts/adom` (excluding demos and
web/routes). Findings + fixes documented in `src/uix/AUDIT_REPORT_2026-05-27.md`.
**Fixed**:
1. `src/uix/eidos/lint.test.ts`: "every eidos CSS component has a morfo
file" test extended to walk `morfo/internal/` as well as
`morfo/components/`. The picker-shell relocation (audit-codex P1 #5)
moved picker-shell to internal but the test wasn't updated.
2. `src/uix/contracts.test.ts`: two pre-existing failures resolved.
(a) Picker WithChild regex updated to accept the
`WithChild<Omit<PrimitiveDivAttributes, ...> & {...}>` shape applied
in the audit-codex P0/P1 picker ProviderProps refactor.
(b) `collectPublicSomaComponentDirs` now skips `picker-shell` as an
internal primitive (symmetric to `collectKnownMorfoDataAttrs` which
now walks `morfo/internal/` to include the picker-shell data-attrs).
3. `src/uix/soma/components/command/command-provider.svelte.ts`:
restored missing `createAttrs(commandMorfo)` import. Was the only
ERROR in `npm run check` baseline.
4. `src/uix/soma/components/dialog/types.ts`: JSDoc comment updated to
reflect polymorphic close shape (cosmetic alignment with the 2026-05-27
refactor).
**Result**:
- `npm run check`: 1 ERROR → **0 ERRORS** ✓
- `npx vitest run src/uix`: 5 failed → **2 failed** (both 100% in user's
words/* WIP, not framework code)
- Polymorphic close + persistence + a11ySemantic rollout: **zero drift
detected** across morfos / providers / sema cascades / tests.
**NOT actioned** (documented in report):
- 6 pre-existing `morfo:check` failures (avatar / color-picker /
date-picker / dropdown-menu / table / tree-grid). All require domain
decisions (drop 'idle' state vs add it to morfo enum, etc.).
- 1 navigation-menu data-state='visible' eidos selector drift.
- ~14 README/`.md` files with stale Dialog/Drawer/Popover descriptions.
- Words editor doctrinal cleanup (user's WIP).
- Tooltip polymorphic alignment (optional, no consumer benefit today).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codex audit P0 items addressed:
P0 #1 - color-picker morfo invariante (`morfo:vocabulary` failed):
- close-commit / close-cancel / close-dismiss / dismiss-outside prewrites
escribian `data-last-action` en Content sin declararlo. Anadido a la
declaracion de `data` con values
[committed/cancelled/dismissed/dismissed-outside], severity optional.
P0 #2 - password-field `kind: 'private'` rechazado por tipo:
- `MorfoPartKind` extendido de `'public' | 'virtual'` a
`'public' | 'private' | 'virtual'`. Semantica: `private` = en contrato
(eidos lo estila, validador lo chequea) pero no compuesto por consumer
(oculto en docs). Justifica el StrengthMeterLabel sub-part.
P0 #2 - Soma `defaultElement: 'time'` rechazado:
- `MorfoElement` extendido con `'time'`. format-date y relative-time
morfos lo usan.
P0 #2 - Picker family drift (12 errors):
- `DatePicker/DateRangePicker/TimePicker/TimeRangePicker.ProviderProps`
pasaron de "virtual composition shell" (sin WithChild) a
`WithChild<Omit<PrimitiveDivAttributes, 'value' | 'placeholder'> & {...}>`
para alinear con la impl real que renderiza <div>, expone ref/child y
acepta data-* attrs (mismo patron que date-field/time-field).
- contracts.test.ts §1.1.C actualizado: ahora exige WithChild + DOM
passthrough en lugar de prohibirlos. Coherente con date-field/time-field.
P0 #2 - Eidos year/month-view en date-picker pasaba `size` a Soma:
- Soma's DatePicker.YearView no modela `size` como prop (delega a
YearGrid.Provider que tampoco). Cambiado a `data-size={...}` para que
fluya por DOM passthrough hasta el recipe eidos que keys por `[data-size]`.
P0 #2 - `KEYS.Enter` y `KEYS.Space` no existen:
- table-provider usa `KEYS.ENTER` y `KEYS.SPACE` (ya correctos en consts).
P0 #2 - `Snippet` import faltante en time-range-picker types.
P0 #5 - tmp/lexical contaminaba `npm run check`:
- `tsconfig.json` anadido `exclude: ['tmp/**', ...]`. svelte-check ya no
carga los `svelte.config.js` de lexical demos (faltaban deps).
Errores mios introducidos por el sprint reciente:
- `DemoLocale` no asignable a `SupportedLocale`: cambiado tipo del prop
`locale` en FormatDate/FormatNumber/RelativeTime a `string` (acepta
cualquier BCP-47, Intl no necesita restricciones de catalogo).
- `RelativeTimeUnit` con `'auto'` no asignable a `Intl.RelativeTimeFormatUnit`:
`resolveUnit()` ahora tipa el retorno como `Exclude<RelativeTimeUnit, 'auto'>`.
Errores pendientes (5):
- `floating/shell.ts:92` - wrapperProps requiere `transform: string | undefined`
(no optional) pero buildFloatingShellWrapperProps devuelve optional.
- `date-picker-year-view.svelte` / `date-picker-month-view.svelte` x2:
Soma YearView/MonthView accepta `dir: 'ltr' | 'rtl' | undefined` pero
HTMLAttributes provee `'ltr' | 'rtl' | 'auto' | null | undefined`.
Conflict en passthrough.
Estos 3 son drift entre Soma type strict y HTML passthrough laxo. Necesitan
diseno mas cuidadoso (audit recomienda "resolver como familia").
Estado: 42 errors → 5 errors. morfo-check pasa. morfo:vocabulary pasa
(con warnings ya conocidos de words).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Morfo now declares text slots as absolute idlangrefs in `texts: Record<string, LangRef>`,
not literal multilingual records. Multilingual content moves out of morfo entirely
into per-component catalogs under `src/uix/langs/components/{kebab}.ts`, merged
globally by `ActiveUix` via the new `componentLangs` barrel. Morfo stays a pure
abstract surface; localization lives in its own layer.
- Type: `translations?: LangNode` → `texts?: Record<string, LangRef>` in
`src/uix/morfo/types.ts`. Doc and test fixtures updated.
- Catalog: new `src/uix/langs/` directory with `common.ts` (was `langs.ts`),
`components/` (one file per migrated morfo, plus a barrel), and an aggregate
`uixLangs`. `ActiveUix` registers both namespaces at boot.
- Registry: `registerMorfo` no longer carries a translations fingerprint and
no longer extends `ActiveLangs` dynamically. `connectMorfoTranslations` and
`MorfoTranslationTarget` deleted from the public morfo barrel.
- Validation: schema.ts drops the relative-translationRef-in-morfo.translations
check; catalog presence is enforced by the new `scripts/translations-check.ts`
(wired as `npm run translations:check`).
- Audit: `scripts/component-audit.ts` rule A-1.3 now validates `texts.label`
idlangref shape (`#?components.{kebab}.label|Fallback`) and explicitly errors
on any surviving legacy `translations:` field.
- Migration: `scripts/migrate-translations-to-texts.ts` is the one-off Node
script that produced the 42 morfo rewrites and 42 catalog files.
- Tests: `morfo/registry.test.ts` rewritten around the simpler contract;
`active-uix.svelte.test.ts` reflects boot-time catalog availability instead
of lazy per-morfo extension.
Verification: `npm run check` (0 errors), `npm run translations:check`
(0/0), `npm run morfo:check` (36/36 routed). The 4 pre-existing failures
in `test` are unrelated (date-picker types, css regen, range-calendar
clear, color contract).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>