Repository navigation
fix(functions): show the body of server function calls that send files - #43
Merged
Merged
Conversation
With enableRichArguments() in @solidjs/web 2.0.0-rc.20, a call whose arguments hold a File or Blob sends multipart form data marked X-Server-Function-Format: 0. The panel and the copied report read it as a seroval stream, which failed. Both now split the args part from the files. Also moves the dev dependencies to 2.0.0-rc.20 and @solidjs/vite-plugin 3.0.0-next.55. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lxsmnsyc
marked this pull request as ready for review
November 3, 2026 14:07
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
What and why
@solidjs/web2.0.0-rc.20 changedenableRichArguments(): a call whose arguments hold aFileorBlobnow sendsmultipart/form-datawithX-Server-Function-Format: 0. The encoded arguments go in anargspart, and each file goes in its own part (file0,file1, ...). In rc.13 these calls sent a plain serialized string.The server functions panel checked the Serialized format first and passed the multipart body to
ChunkReader.ChunkReaderthrewMalformed server function stream., so the request had no body in the panel and the page logged an unhandled rejection. The copied report had the same problem.Changes
body-format.ts: newisUploadBody(Serialized format and a multipart content type) andsplitUploadBody(theargstext, and the form without it).SerovalViewerand its files inFormDataViewer.seroval with files: the redacted arguments, then the list of files.solid-js,@solidjs/weband@solidjs/compiler2.0.0-rc.20, and@solidjs/vite-plugin3.0.0-next.55. TheminimumReleaseAgeExcludeentries are updated to match. The peer ranges stay at^2.0.0-rc.13, which already includes rc.20.Compatibility with rc.20
I compared the published rc.13 and rc.20 packages. These are unchanged: the
X-Server-Function-Formatheader, the__server_function_file__key, format codes0to8, theCallEvent,CallLiveandCallRequestEventtypes andOBSERVE.records.ChunkReader.next()returns the same{ done, value }. The multipart upload body is the only new format the panel had to handle.Proof
shows the arguments and files of an upload call. It fails with the panel change removed (the seroval tree stays empty) and passes with it.reads the arguments and files of an uploadcovers the report, including redaction.tsc, vitest (151 passed), Playwright (16 passed),oxfmt --check, publint and attw.Cost
Only adds one header check before the existing format switch. Performance pass skipped: this is a fix with no measurable cost.
Risk
Low. Only Serialized bodies with a multipart content type take the new path. Every other body is read as before.
Not done
argspart, the panel's rejection is not caught. The existingFormDataViewerbehaves the same way.9(Void) or fortext/event-streamresponses fromlive(). Both gaps were already there in rc.13.🤖 Generated with Claude Code