Repository navigation
fix(hub-ui): prevent nested docks in popup panels - #487
Merged
Merged
Conversation
|
@SaKaNa-Y 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": "16a71516c4e3e61a6bbba09e4e288026bcfb56fb",
"result": {
"overallSummary": "Fixes a bug where Popup mode could show a nested dock over a same-origin tool page's content: the Popup window now publishes the Hub client context before mounting its views, so embedded bootstraps recognize their Hub parent and skip rendering a duplicate dock. Includes a regression test for this behavior and an unrelated fix to properly close keep-alive sockets in serve-static test fixtures.",
"groups": [
{
"key": "popup-context-fix",
"label": "Publish Hub context on popup",
"summary": "Publishes the existing Hub client context onto the Popup window before its views mount, so same-origin iframe bootstraps detect the Hub parent and skip rendering a duplicate dock.",
"category": "core",
"filePaths": [
"packages/hub-ui/src/client/state/popup.ts"
],
"critical": true,
"fileNotes": [
{
"path": "packages/hub-ui/src/client/state/popup.ts",
"text": "Sets CLIENT_CONTEXT_KEY on the popup window right before view mounting, mirroring the existing connection-meta propagation pattern."
}
]
},
{
"key": "popup-tests",
"label": "Popup regression test",
"summary": "Adds a regression test that opens a Popup and verifies the real parent detector recognizes it as a Hub before its iframe views mount.",
"category": "tests",
"filePaths": [
"packages/hub-ui/src/client/state/popup.test.ts"
]
},
{
"key": "serve-static-fixture-fix",
"label": "Close keep-alive sockets in test fixtures",
"summary": "Unrelated maintenance fix: ensures test server fixtures call closeAllConnections() so keep-alive sockets don't keep the server open and delay/hang test teardown.",
"category": "tests",
"filePaths": [
"packages/devframe/src/utils/serve-static.test.ts"
]
}
],
"schemaVersion": 1,
"source": "llm",
"generatedAt": "2026-11-10T05:45:44.057Z",
"model": "vercel-ai-gateway/anthropic/claude-sonnet-5",
"locale": "en"
}
} |
Member
Author
Node 27 keeps fetch sockets alive, so server.close() never resolved and the afterEach hooks timed out.
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
In Popup mode, opening a same-origin tool page that loads the embedded bootstrap can show a second full dock over the tool's content. The bootstrap checks its parent window for the Hub client context, but the Popup does not publish that context.
Publish the existing context on the Popup window before mounting its views, so the iframe recognizes its Hub parent and skips the duplicate dock.
mountStandaloneApp(context, popup) publish connection metadata + publish Hub client context on popup construct DockStandalone mount viewsEvidence
identifies the popup as a Hub before mounting its iframe viewsfails withexpected false to be true.After: The test passes. It exercises Popup initialization and calls the real parent detector before view construction. All five focused Popup and parent-detector tests pass.
After: Browser checks with the rebuilt embedded bundle show no nested dock in the Nuxt mock; page switching works. Edge and Float also show no nested dock.
pnpm lint,pnpm knip,pnpm test,pnpm typecheck, andpnpm buildpass. The full test run reports 1,837 passed and 14 skipped.Merge Danger
Door: two-way
The change can be reverted without a data migration.
Blast Radius: Popup
The production change publishes the existing context on the Popup window before its views mount. Embedded pages in that window use it to suppress duplicate docks.