Repository navigation
Conversation
…-car A page on 127.0.0.1 could not reach a side-car on the default localhost host. The client dials the page hostname, but listen(port, 'localhost') binds only the first address localhost resolves to (::1 on current Linux and macOS).
|
@onmax is attempting to deploy a commit to the NuxtLabs Team on Vercel. A member of the Team first needs to authorize it. |
|
👁️🗨️ Review this pull request with grouped, summarized diffs at: raw result💭 analyzed by {
"headSha": "3e5f0d10874de7c03bce3b20d0b4555292335f74",
"result": {
"overallSummary": "Fixes a bug where a side-car WebSocket server bound only to `localhost`'s first-resolved loopback address (typically `::1`), leaving pages opened on `127.0.0.1` unable to connect. The side-car now also binds the other loopback address and forwards traffic to the main server, with tests and docs updated accordingly.",
"groups": [
{
"key": "loopback-twin-fix",
"label": "Loopback twin listener fix",
"summary": "When the side-car host is `localhost`, it now also binds the other loopback address (`127.0.0.1` or `::1`) on the same port and forwards requests/upgrades to the main server, so pages opened on either loopback address can connect. If another process already holds the twin address, binding fails like a taken port; if the OS lacks that address family, the twin is simply skipped.",
"category": "core",
"filePaths": [
"packages/devframe/src/node/instance-shell.ts"
],
"critical": true,
"lineNotes": [
{
"path": "packages/devframe/src/node/instance-shell.ts",
"side": "additions",
"line": 118,
"text": "If the twin bind fails for a reason other than a missing address family (e.g. another process already owns that address/port), the main server is closed and the error propagates, so a page on that address never silently reaches a different server.",
"critical": true
}
]
},
{
"key": "tests",
"label": "Side-car loopback tests",
"summary": "Adds tests verifying that a `localhost` side-car is reachable on both `127.0.0.1` and `[::1]`, and that it moves to a new port when another process already holds the twin loopback address on the original port.",
"category": "tests",
"filePaths": [
"packages/devframe/src/adapters/__tests__/initiate.test.ts"
]
},
{
"key": "docs",
"label": "Docs update",
"summary": "Documents that a `localhost` side-car listens on both loopback addresses so pages opened on either one can reach it.",
"category": "docs",
"filePaths": [
"docs/content/2.adapters/1.initiate.md"
]
}
],
"schemaVersion": 1,
"source": "llm",
"generatedAt": "2026-10-26T20:03:27.071Z",
"model": "vercel-ai-gateway/anthropic/claude-sonnet-5",
"locale": "en"
}
} |
This branch has not been deployed
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.
A page on
127.0.0.1cannot connect to a side-car on the defaultlocalhosthost:The client dials the side-car on the page hostname. The side-car calls
listen(port, 'localhost'), and Node binds only one address. On current Linux and macOS, that address is::1. Nuxt DevTools 4 has this problem withnuxt dev --host 127.0.0.1.Repro: onmax/repros
devframe-localhost-sidecar. Runpnpm install && pnpm test.Now a
localhostside-car also listens on the other loopback address, on the same port. If a different process holds that address, the side-car moves to a new port.127.0.0.1connects, 2 Nuxt appsdevframetests