feat: implement form POST submission interception with route actions#95
Merged
feat: implement form POST submission interception with route actions#95
Conversation
Add first-class support for handling HTML form submissions (POST navigations) in the router, following the design document in docs/design/form-submission-interception.md. Key changes: - Add ActionArgs type and createActionRequest helper for POST requests - Extend LoaderArgs with optional actionResult parameter (backwards compatible) - Add action field to InternalRouteDefinition and route definition types - Add route() and routeState() overloads for routes with action + loader and action only - Update executeLoaders to pass actionResult through to loaders - Update NavigationAPIAdapter to detect formData, execute actions, clear loader cache, and revalidate loaders after action completion - Do not intercept POST submissions to routes without an action (let browser handle normally) - Find deepest matched route with action for nested route resolution - Extend OnNavigateInfo with formData field - Export ActionArgs type from public API https://claude.ai/code/session_01FkwmQfvFdApgBDrFosxns9
- Add ActionArgs type documentation to API Types page - Update LoaderArgs documentation to include actionResult parameter - Add action option to route() options table in API Utilities page - Add ActionArgs to server entry point exports list - Add Form Submissions example section to Examples page https://claude.ai/code/session_01FkwmQfvFdApgBDrFosxns9
uhyo
pushed a commit
that referenced
this pull request
Feb 15, 2026
Adds a new guestbook feature to the example app that showcases the form action feature from #95. Uses a native <form method="post"> with a route action to handle submissions, and the actionResult flows to the loader for displaying success/error feedback. https://claude.ai/code/session_01REPtDVYRNsT8Me3EfXjQt2
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.
Add first-class support for handling HTML form submissions (POST navigations)
in the router, following the design document in docs/design/form-submission-interception.md.
Key changes:
and revalidate loaders after action completion
https://claude.ai/code/session_01FkwmQfvFdApgBDrFosxns9