Repository navigation
Conversation
Add connectDevServer and the @solidjs/start-devtools/protocol entry, so @solidjs/vite-plugin can send what only the dev server knows: - errors the server runtime reports go to the Health view - open in editor uses the plugin's endpoint, one request resolved against the Vite root - the solid-js version falls back to the one the dev server resolved Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ocol An <Errored> that renders its fallback on the server sends the error with the page, so hydration throws it again. The page's record and the server's now merge into one. The plugin's endpoint is mounted ahead of Vite's base handling, like Vite's own /__open-in-editor, so the info no longer carries the base. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 4, 2026
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.
Depends on #45. Its Health view is where server errors show, so this branch is stacked on
feat/dock-redesign.Replaces #32. That PR mounted the toolbar from a Vite plugin. A plugin is more useful as a channel for what only the dev server knows.
@solidjs/vite-pluginalready mounts the toolbar in Start mode, so it serves the other side of this channel: solidjs/solid-vite-plugin#530.What the dev server gives the toolbar
Server render:,Server function <id>:orServer request:. The error viewer maps their stack as it does for server frames today. An<Errored>that renders its fallback on the server sends the error with the page, and hydration throws it again. The two records merge into one row./__solid/devtools/open-in-editor?file=…. Like Vite's own/__open-in-editor, it does not take the Vitebase. The plugin resolves the path against the Vite root, so the toolbar no longer sends one request per sub-path. Without the plugin the old fan-out to/__open-in-editorstays.solid-js,@solidjs/web,@solidjs/vite-pluginandvitefrom the app root. The header uses itssolid-jsversion when the page cannot importsolid-js/package.json.Protocol
@solidjs/start-devtools/protocolholds the event names, the endpoint path and the payload types. The plugin imports the types and declares each constant with the type of the one here, as it does for@solidjs/diagnostics. A change on either side then fails the other's compile.connectDevServer(import.meta.hot). A pre-bundled package has noimport.meta.hot, so the plugin passes its own.solid:devtools:hellowithsince: performance.timeOrigin.solid:devtools:infowith the versions and the errors it kept since then. The errors of the render that served the page come in this answer, since that render happens before the page can connect.solid:devtools:server-error. The toolbar drops an id it already has.Changes
src/protocol.ts, exported as./protocoland built todist/protocol.jswith its types.src/dev-toolbar/dev-server.ts: the connection. It keeps the info and the errors that arrive before the toolbar renders and hands them to each listener.connectDevServerfrom the package entry. The server and no-op builds export a function that does nothing.ErrorRecord.servermarks an error the server sent. Its time moves from the epoch clock to the page's.addPageErrorandaddServerErrormerge the page's and the server's copy of a render error.openInEditoruses the plugin's endpoint when the plugin connected.Testing
src/dev-toolbar/dev-server.test.ts: the hello, late listeners, dropped duplicates, removed listeners.src/dev-toolbar/error-record.test.ts: the merge of a render error in either order, and the cases that stay apart.Server render: server render boom.tests/fixture/vite.config.tsthat speaks the protocol. A server error from before the page loaded shows in Health. Open in editor sends one request to the endpoint.pnpm test,pnpm typecheck,pnpm format:check,pnpm build,pnpm checkand the full e2e suite (27 tests) pass locally.Not done
sourceNames, not this channel./@fs/.🤖 Generated with Claude Code