feat(app,adapter-vite,element): 0.42.0-alpha.2 — form/action loop (ADR-0120) - #535
Merged
Conversation
added 8 commits
July 27, 2026 14:10
…med actions/ActionResult (0.42.0-alpha.2) Server-side form/action loop on the request-time foundation: - actions run BEFORE loaders on POST (revalidation invariant; previously a mutation rendered stale loader data); - fail(status, data) return channel (4xx-enforced, duck-typed cross-bundle): 422 re-render with the failure echoed through useActionData; - successful non-GET actions never answer 200 with a page: 303 PRG back to the route (or the action's own Response escape hatch); - named actions: ?/name selects module.actions[name] (formaction-compatible); - fetch callers (x-openelement-action header) receive the ActionResult discriminated union instead of HTML/redirects — failure/redirect/error; - POST to a route without an action is a defined 404, not a render; - real FormData via request.formData() (was parseBody objects); - element exports ActionResult + ACTION_FETCH_HEADER; app exports fail(), isActionFailure, OpenElementActionFailure. Codegen tests cover ordering, 303/422/named/fetch paths and catch channels (44/44 entry-renderer, 509 suite green). Client enhancement layer and e2e follow in the next commits.
…redirects (0.42.0-alpha.2) - The island client entry now carries the ADR-0120 form enhancement: data-open-enhance forms submit via fetch with the ActionResult protocol — redirect follows client-side, failure fires a cancelable open:action-failure event and otherwise falls back to the native 422 render. No DOM surgery: unhydrated islands are never touched. - Redirects thrown from POST actions coerce 302 to 303 (PRG); GET keeps the author's status. - Fixture: /form exercises fail(422) echo, PRG success, named ?/shout action; e2e proves the full loop with javaScriptEnabled: false, the ActionResult JSON shapes, the named/unknown-action paths and the enhanced submit — 33/33 across Chromium, Firefox and WebKit.
…(ADR-0120) The snapshot gate flagged the alpha.2 additions: element gains the ActionResult type and ACTION_FETCH_HEADER, app gains fail()/isActionFailure/ OpenElementActionFailure — all new request-time surface authorized by ADR-0119 (request-time explicitly unfrozen) and specified by ADR-0120. No frozen 0.41 export changed. Also deno fmt.
…dent prefix The stale-prefix assertion kept breaking at every version-shape change (stable→alpha.1, alpha.1→alpha.2): string-prefix relations between stale claims and the current line are incidental. The real invariant is that the stale regex with numeric boundaries never matches the current line.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
|
APIError: Insufficient Balance |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TP-3 of the 0.42.0 plan. The WC Application Loop's action half:
Release-prepare tier green locally. Publish via publish-existing after merge.