Commit graph

1 commit

Author SHA1 Message Date
cbe4a4b5f6
feat(ui): custom modifier editor
T3 Wave 4 (T25). 3-column visual primitive composer for authoring
custom modifier descriptors from the 15 T3 effect primitives.

- Left palette: 15 primitives grouped by category (State / Mechanic /
  Advanced); click adds to the descriptor's primitive list.
- Center tree: shows current primitives[]; click selects, delete
  button per node.
- Right inspector: parameter form per selected primitive. Introspects
  the primitive's Zod schema to render typed inputs (number / string /
  boolean / enum / array). Falls back to a JSON textarea for complex
  param shapes (e.g. nested EffectPrimitiveNode arrays).
- Header: descriptor name/description inputs + Save/Load library +
  live validation status from validateCustomDescriptor.
- Open from ModifierProfileEditor's header via the new + Custom
  Modifier button (data-testid open-custom-modifier-editor).

Type widening: ModifierKindId gains '| (string & {})' so the kind
field on TypeModifier/InstanceModifier accepts custom descriptor ids
without losing literal-completion on built-in kinds. The
applyCollectedContributions dispatcher already handles arbitrary
strings via its custom-registry fallback (T22).

Lint cleanup: replaced 4 'as any' casts on Zod internals with named
ZodObjectInternal / ZodWrappedDefInternal / ZodEnumDefInternal
structural shapes — auditable in one place if Zod renames _def.

E2E + extended tests deferred to T29; T26 (panel kind-dropdown
extension) and T27 (multi-profile lobby) shipped separately.
2026-04-19 20:17:33 -06:00