Skip to content

feat: server function inspector - #2049

Merged
birkskyum merged 28 commits into
mainfrom
feat-server-function-inspector
Jul 21, 2026
Merged

feat: server function inspector#2049
birkskyum merged 28 commits into
mainfrom
feat-server-function-inspector

Conversation

@lxsmnsyc

@lxsmnsyc lxsmnsyc commented Jan 14, 2026

Copy link
Copy Markdown
Member

PR Checklist

Server function inspector, keeps track of server function calls and allows you to inspect both Response and Request easier (than viewing the network tab).

Some TODOs:

  • renderer for seroval plugins
  • multipart/form-data inspector
  • Hex/base64/Text Viewer for ArrayBuffer and other content-types
  • more Request/Response info (e.g. timing, request options, etc.)

Also some UI cleanup to dedupe stuff from the current DevOverlay

Testing

The overlay isn't visually-accessible for now so if you want to open it, go to Console then enter __START_SERVER_FN__(true)

The inspector is now available in the reworked dev overlay. Design is still to be finalized.

Note

seroval branch doesn't depend on this one, I can rebase this to main when that happens

@changeset-bot

changeset-bot Bot commented Jan 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 204e0f7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solidjs/start Minor

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

@netlify

netlify Bot commented Jan 14, 2026

Copy link
Copy Markdown

Deploy Preview for solid-start-landing-page ready!

Name Link
🔨 Latest commit 204e0f7
🔍 Latest deploy log https://app.netlify.com/projects/solid-start-landing-page/deploys/6a5fb8c86706d900087afc98
😎 Deploy Preview https://deploy-preview-2049--solid-start-landing-page.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@lxsmnsyc
lxsmnsyc marked this pull request as draft January 14, 2026 06:43
@pkg-pr-new

pkg-pr-new Bot commented Jan 14, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@solidjs/start@2049

commit: 204e0f7

@lxsmnsyc
lxsmnsyc changed the base branch from main to feat-seroval-json January 14, 2026 06:44
Comment thread apps/tests/src/routes/server-function-ping.tsx
@lxsmnsyc
lxsmnsyc force-pushed the feat-server-function-inspector branch 4 times, most recently from 4bf69fa to 830f1ce Compare January 18, 2026 15:44
@lxsmnsyc
lxsmnsyc force-pushed the feat-server-function-inspector branch from be34d27 to 25b0ce5 Compare January 23, 2026 07:03
Base automatically changed from feat-seroval-json to main February 25, 2026 16:48
@lxsmnsyc
lxsmnsyc force-pushed the feat-server-function-inspector branch from 860f37b to 8ea8a8b Compare February 26, 2026 01:28
@lxsmnsyc
lxsmnsyc marked this pull request as ready for review February 27, 2026 11:48
@lxsmnsyc
lxsmnsyc force-pushed the feat-server-function-inspector branch from c84c5ea to 78c44de Compare April 3, 2026 17:55

@brenelz brenelz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we just go ahead with this. I feel its pretty isolated

@lxsmnsyc

lxsmnsyc commented May 6, 2026

Copy link
Copy Markdown
Member Author

@brenelz yes exactly, it's supposed to be non-blocking. I'm planning on working on the new superfeature for the dev overlay on a separate branch.

@lxsmnsyc
lxsmnsyc force-pushed the feat-server-function-inspector branch from fc77b8b to ab72e93 Compare July 6, 2026 17:09
@lxsmnsyc
lxsmnsyc force-pushed the feat-server-function-inspector branch from b2926bb to 518af61 Compare July 16, 2026 20:17
@brenelz

brenelz commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Failing tests... Can probably get this merged soon after

@lxsmnsyc

Copy link
Copy Markdown
Member Author

@brenelz the PR isn't final so it's expected. I don't think I can finalize this before stable, but I'll still try.

@brenelz

brenelz commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Can maybe target 3.0 then. Thats fine

@lxsmnsyc

Copy link
Copy Markdown
Member Author

no not 3.0. This is going to ship in 2.0 perhaps in a minor release, just not the RC

@lxsmnsyc
lxsmnsyc force-pushed the feat-server-function-inspector branch 2 times, most recently from ca69989 to fca0400 Compare July 17, 2026 16:59
@birkskyum

Copy link
Copy Markdown
Member

Changeset missing.

@lxsmnsyc
lxsmnsyc force-pushed the feat-server-function-inspector branch from 640ad60 to 0d55980 Compare July 21, 2026 03:37
@birkskyum
birkskyum merged commit eeff49a into main Jul 21, 2026
10 checks passed
@birkskyum
birkskyum deleted the feat-server-function-inspector branch July 21, 2026 18:25
@birkskyum birkskyum changed the title feat(2.0): server function inspector feat: server function inspector Jul 21, 2026
@birkskyum

birkskyum commented Jul 21, 2026

Copy link
Copy Markdown
Member

Oh, @lxsmnsyc , sorry if this went in too early - I see your comment now above all the rebase lines that you didn't want this in 2.0, but i got confused about the title being "feat(2.0)". Should we revert ( #2226 )? How far is this towards completion?

@birkskyum
birkskyum restored the feat-server-function-inspector branch July 21, 2026 18:41
@birkskyum birkskyum changed the title feat: server function inspector feat(2.1): server function inspector Jul 21, 2026
@birkskyum birkskyum changed the title feat(2.1): server function inspector feat: server function inspector Jul 21, 2026
@lxsmnsyc

Copy link
Copy Markdown
Member Author

@birkskyum this is meant to be part of 2.0

@birkskyum

Copy link
Copy Markdown
Member

Great, and regarding the main branch, how would you prefer we proceed? do we make a revert, or will you make a follow-up pr with the remaining changes, or is this feature already finished?

brenelz added a commit that referenced this pull request Jul 29, 2026
Brings the v2 rc line (through 2.0.0-rc.6) into the Solid 2 branch.

Ported main features onto the Solid 2 architecture:
- Server-function error handler (#2262): wired through
  handleServerFunctionRequest's transformResult hook and the
  solid-start:server-fn-error-handler virtual module.
- Custom seroval plugins (#2250): serialization.plugins now feeds the
  @solidjs/web codec on both the client transport and the server handler.
- ~ alias fix for workspace packages (#2239): adopted appRootAlias in
  place of the global resolve.alias entry.
- Dev toolbar (#2049, replaces the dev overlay): ported to Solid 2
  (Errored/Loading, onSettled, two-arg createEffect, draft-mutation
  stores, terracotta 2 subpath imports, @solidjs/web Portal/Dynamic/JSX,
  createMemo(async) instead of createResource). Protocol-specific pieces
  (SerovalChunkReader, body-format markers) moved local to the toolbar.
- Deferred stream response via h3 iterable() (#2231), StartHandler type
  (#2234), routerLoad restore (#2228), nonce on streaming redirect
  script (#2252), ResizeObserver-loop filter (#2240) all kept.

Kept deleted (superseded by vite-plugin-solid / @solidjs/web /
@solidjs/router server-function integration): fs-routes tree-shake,
manifest.ts, directives, fns serialization/registration/shared and their
specs. Fixes main landed in those files (#2249, #2238, #2243, #2245,
#2241, #2261) live upstream now and are tracked for porting there.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
brenelz added a commit that referenced this pull request Jul 29, 2026
The inspector came over from #2049 built against Start's old fetch
transport; on this branch the transport lives in @solidjs/web, so the
toolbar's tracker never received a call and its viewers decoded a wire
format that no longer exists.

- fns/client.ts: in dev, hook the transport's prepareRequest to push
  each outgoing call (function id + the transport's per-call instance
  header) and responseHandler.handle to push each response, passing both
  through untouched.
- fns/handler.ts: in dev, echo X-Server-Function-Instance onto the
  response — the transport doesn't, and it is what lets the inspector
  pair a response with its request.
- body-format.ts: track @solidjs/web's markers (X-Server-Function-Format,
  the Json format, the new file form key) instead of the old X-Start-Type
  protocol; the Serialized chunk framing is unchanged, so SerovalViewer
  keeps working as-is.
- functions/index.tsx: add a JsonViewer for plain-JSON bodies (JSON-safe
  argument lists go over the wire as raw JSON).
- dev-toolbar/index.tsx: keep captured instances in a signal-backed plain
  record instead of a store — Request/Response methods throw "Illegal
  invocation" when reached through Solid 2's store proxy.

Calls made during SSR/hydration are served from the SSR payload without
a client fetch, so only real client-initiated calls appear — which is
what the inspector is for.

Verified against the tests app dev server: onclick and onSettled calls
both appear in the panel, request tab shows URL/headers/FormData body,
response tab decodes the Serialized stream with status and timing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

3 participants