Track the server-function data address - #591
Draft
ryansolid wants to merge 2 commits into
Draft
Conversation
solidjs/solid#3094 gives scripted calls their own address — <endpoint>/data/<id> — leaving the bare <endpoint>/<id> to plain HTTP (rendered action urls, form posts). No functional router change: synthesized form actions hand the RENDERED url to createServerReference, and the transport re-addresses its own calls to the data sibling with the bound query intact. Wire-shape test expectations and the synthesis doc comment follow the split. Verified against the workspace @solidjs/web build carrying the split (both vitest configs); requires the release after 2.0.0-rc.4. Co-authored-by: Cursor <cursoragent@cursor.com>
🦋 Changeset detectedLatest commit: 033b6f1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Server-function redirects arrive as X-Server-Function-Redirect with the target resolved to an absolute url (solidjs/solid#3102), so the soft/hard split becomes an origin comparison: same-origin navigates softly with replace: true (the target takes the submission's place in history, as HTTP gives a form post), cross-origin hard-navigates. The old branch decided a redirect's fate by whether its target was spelled absolutely (solidjs/solid#3107). A locally-produced redirect() still navigates from its real 3xx + Location; a Location on any other status (a 201's created-at) is data and never navigates. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
nextas solidjs/solid@95229453) gives scripted server-function calls their own data address,<endpoint>/data/<id>, leaving the bare<endpoint>/<id>to plain HTTP — rendered action urls, no-JS form posts, direct callers. One answer shape per url means a shared cache can never replay one caller kind's answer to the other.parseServerFunctionUrl+createServerReference(id, undefined, url)with the rendered url as base, and the new client transport re-addresses its own calls to the data sibling (bound?argsintact). Registration, submissions,actionBaseinterception, flight data, and.url/.with()all stay on the rendered bare address by design.action.spec.ts/query.spec.ts(the transport's fetch url is now the data sibling) and thecreateServerFormActiondoc comment.Draft until the @solidjs/web release carrying the split (next after 2.0.0-rc.4); CI against rc.4 will show the three updated expectations failing until then.
Test plan
Made with Cursor