Skip to content

feat: implement form POST submission interception with route actions#95

Merged
uhyo merged 2 commits intomasterfrom
claude/implement-form-post-ywCwF
Feb 15, 2026
Merged

feat: implement form POST submission interception with route actions#95
uhyo merged 2 commits intomasterfrom
claude/implement-form-post-ywCwF

Conversation

@uhyo
Copy link
Owner

@uhyo uhyo commented Feb 15, 2026

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 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 uhyo merged commit 6e7759e into master Feb 15, 2026
1 check passed
@uhyo uhyo deleted the claude/implement-form-post-ywCwF branch February 15, 2026 06:35
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
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.

2 participants