You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FormState.modules is a generic Map that has only ever held one key #668
FormState.modules is a Map<string, unknown> described as a cache "for per-state modules, chiefly history". In practice it holds exactly one key, 'history', written at use-abstract-form.ts:249 and read at use-abstract-form.ts:292 and use-form-context.ts:118. Nothing else has ever registered a module.
Collapsing it to a dedicated optional field on the state measures 38 B gz eager, with undo/redo fully intact.
Small, self-contained, and it makes the shape honest: a one-key generic registry reads as an extension point that does not exist.
Not included here, deliberately. Making form.historyundefined on an unconfigured form measures a further 58 B, and it is a worse trade. build-form-api.ts:89-96 argues the current shape correctly: one instance serves every such form, and a template reads form.history.canUndo unconditionally. Turning a total API into a partial one means a template that forgets ?. throws during SSR render, which is a 500 rather than a console warning. 58 B does not buy that failure mode.
Found in the 2026-09-18 feature audit (main@b4a64ef9, eager baseline 33,204 B gz). Every byte figure is a measured ablation, not an estimate.
Activity