Forms consolidation: one shared core for SSR and SPA, proven by a conformance kit #35
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/support!35
Loading…
Reference in a new issue
No description provided.
Delete branch "iw-support-form-effort"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this delivers
The core-hardening-spa-refold slice of the forms-consolidation effort (
project-management/issues/iw-support-form-effort-3/): every form walker — UIFormBuilder, SSR HTML renderer, XML renderer, FormRJsonEncoder, DeclaredValidation, LiveHtmlInterpreter — now evaluates conditions, validation, required-ness, field-type dispatch and repeated-row expansion through one shared core, and disagreement is a failing test instead of a production surprise.Condition.eval,Repeated.instances/template(total — rows are never silently dropped),Field.required, declaredValidationvocabulary withValidation.check/Validation.rule,ValidationRuleRegistryforRule(id, params)bindings,FieldKindclosed dispatch index,FormDataas the typed value currency,TypedForm[A](the FormSchema salvage).czech-supportextracted (FC-D3);portaly.formsrenamed toworks.iterative.forms.forms/scenarios): a corpus with one sample per FieldKind/Validation/Condition case — Mirror-derived case counts make a new enum case red until covered — plus per-walker agreement suites and a browser pair (ssrVocab/spaVocab) pinning the per-kind control tables and ButtonIntent semantics in Gherkin. 23 Playwright scenarios green.Drift the kit killed (each red-green)
Repeated.Instance.segmentis now anOption; every walker faces the unrenderable case explicitly.UIFormBuilderignored a declaredRequiredfor the star decoration.FieldTypeResolver.emptyrendered email/date/number as plain text inputs while SSR typed them — the defaults now share one control table.Migration flags for client upgrades (cmi-portaly, medeca-modul-poptavky)
portaly.forms→works.iterative.forms(compile-time only; verify akka-persistence journals for serialized FQNs before replay).Enum/Date/Button;UIButtoncarries an intent; custom UIForm walkers need aUIRepeatedGrouparm.FieldTypestring conversion retired — wrap inFieldType(...).FieldFactory.rendergained the declared-rule parameter; optional Selects no longer validate blank values.FieldTypeResolver.emptyis kind-aware (cmi uses it in two internal demo scenarios);LiveHtmlInterpretergained a defaulted trailingruleRegistryparameter.FormRJsonEncoderstays onFormRuntil medeca rebinds (FC-D2 sequencing).Known gaps, deliberately deferred (tracked in the tracker)
ctx.statesee removed-row values (FormVnever forgets) — browser-verified evidence for the FormR→FormData SPA-internals move, next slice.Fieldvalue semantics are a design corner in both variants (SPA renders it as text — Laminar forbids the value controller on checkbox inputs; boolEnums are the checkbox story). Pinned as the one documented divergence in the conformance feature.ButtonIntentis not yet exposed to the SPAButtonHandler— YAGNI until a client needs it; current routing pinned.Verification
./mill __.compile(zero warnings, clean build),./mill __.test(full suite),./mill formsScenarios.jvm.e2e(23 browser scenarios, ~21s),./mill __.checkFormat. Scenarios server:PORT=8391 ./mill formsScenarios.jvm.run— pages at/ssrForm,/spaForm,/ssrVocab,/spaVocab.🤖 Generated with Claude Code
Two updates since opening:
3b7e14a1fixes the pre-existing one-liner whereLiveHtmlInterpreter.aroundTitle's copy constructor silently resetformMods, and67fb0cfemerges current main (workflow-kernel extraction #34) — the three effort-doc add/add conflicts resolved to this branch's versions, which are strict supersets of the day-one framing the kernel branch carried. Full gate re-run on the merged tree: clean compile zero warnings, all tests, 23 browser scenarios green.🤖 Generated with Claude Code