Skip to content

Prove native draft form submission - #109

Merged
pournasserian merged 16 commits into
mainfrom
75-form-integration
Nov 28, 2026
Merged

pournasserian merged 16 commits into
mainfrom
75-form-integration

Conversation

@pournasserian

@pournasserian pournasserian commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Integrated on landed #72

Exact draft head 3d27327caa84d021bf9db0b5bcbd7fbb4cd948cd includes main e1325039c857ff396bd2476749d2440fc8311218. The Form submission gallery and guide exercise a named EditForm at /static/form-post, /server/form-post, and /wasm/form-post. They use the landed checkbox, switch and radio group alongside the existing controls. The fixture is in-memory only. No new public API, validator, dependency or runtime script.

The one library adjustment is internal to FlField: validation notifications refresh the wrapper only when its rendered error text changes; individual controls still update their own validation state. The earlier exact Linux RED traced redundant old→empty value writes on the wrapped native time input, which blocked normal Save. The unchanged native keyboard clear and Save passed the pre-integration Linux fix check, and this branch re-verifies the actual integrated head. Regression tests cover error appearance/text changes/clear, unchanged group ownership with individual invalid states changing, and EditContext replacement.

Review: same-route nested-validation links

At a312f3b, the actual links changed the URL and wording in Server and WASM without replacing the document or form. The original validator subscription depended only on the initial query: opting in still saved an empty City, and opting out still rejected it. On the tests-only RED 0fab8aa, both new browser cases reached the independent host Seats error via normal Save, then failed on the missing City error (exit 2, zero skips). The gallery now keeps one validator subscription per EditContext, follows the current query, and clears only its own City submit message on opt-out. The tests use the actual links and normal Save, retain the edited draft and a separate host error, and repeat opt-in before a corrected save. Normal JavaScript-disabled document behavior is unchanged.

Actual verification on this head

  • Two real JavaScript-disabled HTTP 200 navigation POSTs in each of Windows Chromium, Firefox and WebKit. Unique flat, nested and indexed names, support_alias, distinct native date fields, Model.QuietTime= bound to null, and one each of Model.ReviewMode=shared, Model.Audience=everyone, and Model.NotifyOwners=true. Off Model.DailyDigest, disabled Model.LockedNotice and disabled reference are absent. Normal Save leaves native validation enabled; the wire payload includes antiforgery (value not recorded).
  • Browser-valid 18 seats and reversed dates reach host validation. The Delivery window owns the range error once, ahead of the internal help and external policy. The returned edits and choices are retained. The corrected POST yields the typed model. Default top-level validation does not walk the city; the fixture's opt-in city rule demonstrates the host-selected nested case. Malformed numeric text is tested separately through the actual component binder.
  • Server/WASM verify committed changes and bound values, the same native Save/host errors and corrected receiver. Held startup to compare first owned field IDs, native names, live values and roles without assuming focus survives takeover. Axe and 320 px/24 px checks pass for this fixture; neither browser snapshots nor these checks are speech evidence.
  • Isolated Release build (0 warnings/errors), 33 focused bUnit cases and guide lint passed. Windows Chromium and Firefox: all 14 FormPost cases each. Windows WebKit: six selected static, first-DOM and nested-navigation cases pass. No local skips. Interactive temporal edits on Windows WebKit's non-native text fallback remain a separate Blazor limitation and were not selected on that port. Playwright WebKit is not Safari.
  • Exact-head PR CI 46199345049 and Linux nightly 46199341403 passed. Chromium, Firefox, and native WebKit on Linux: 499 passed, zero failures, one pre-existing unrelated PublishedStandaloneRegistersTypedEvent skip per engine. All 255 component tests passed with no skips; build/pack and design checks passed. Both navigation cases and the original typed-null Save and receiver ran in Server and WASM.

Reproduce the focused tests:

dotnet test --project tests/FluentCMS.Components.Tests --filter-class '*FormPostBoundaryTests' --filter-class '*FlField*' --filter-class '*FlNativeChoiceTests'
dotnet test --project tests/FluentCMS.Components.Browser --filter-class 'FluentCMS.Components.Browser.Forms.FormPost*'

Failure proof on the settled candidate

Each mutation ran the unchanged static test in a separate snapshot of 3d27327 with local Windows Chromium, JavaScript disabled, and only *NativePostPreservesValuesAfterValidationAndSavesCorrected selected. Each got past the real successful document POST and antiforgery checks; each exited 2 with exactly one failure at the intended assertion, no skips. No mutant was pushed.

Isolated change Actual failed assertion
Post the title under Model.WrongTitle. Expected exactly one submitted value for Model.Title; received 0.
Keep the range error visible but omit its ID from the group description. Expected integration-start__error integration-start__help integration-window-policy, actual integration-start__help integration-window-policy.
Detach the editable second tag from the form. Expected exactly one submitted value for Model.Tags[1]; received 0.

Earlier mutations on 635b1e3 and a312f3b and the isolated pre-landing choice replay remain separate evidence. The PR remains a draft for independent coordinator review.

Closes #75

@pournasserian pournasserian left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial coordinator review of 635b1e3: named receiver, flat/nested/indexed field payloads, correction/retention, and the three controlled failure proofs are supported by the fixture and logs. The draft intentionally does not yet include all actual C1 choice controls. Re-review on updated main and final real POST/Server/WASM evidence after #72 and #73 integrate; this is not final acceptance.

@pournasserian pournasserian left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of a312f3b against merged #106: one open finding, not merge approval. FormPost.razor derives the displayed city-validation mode from a query parameter but registers the validator only in OnInitialized. The static fresh-URL test does not cover switching the actual link on an interactive form. Please verify opt-in and opt-out with an empty city through ordinary Save after Server/WASM takeover, including removal of stale errors, and align the guide with the observed draft behavior. The owner is testing this on the gallery; this is a source-review finding, not yet a browser reproduction. No other blocking findings: inspected the FlField validation refresh, real POST/receiver evidence and all three negative proofs. Full integrated-head hosted checks are tracked separately.

@pournasserian pournasserian left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technical re-review of 3d27327 against a312f3b: the sole prior blocker is resolved. Normal Save consults the current nested-validation rule. Opt-out clears only its own message, preserving the draft and unrelated errors. The test drives the actual links and verifies both the host validation and typed receiver; the guide accurately distinguishes native navigation from interactive draft retention. Reviewed exact source and red-to-green Server and WASM evidence. No remaining blocking code findings. Merge remains gated on final verification of this SHA, not CI for an earlier revision.

@pournasserian
pournasserian marked this pull request as ready for review November 28, 2026 23:12
@pournasserian
pournasserian merged commit d90e5b0 into main Nov 28, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C-23: Prove binding, validation and static form POST across the C1 inputs

1 participant