Repository navigation
fix(mcp): restore the Inspector's missing app sandbox document - #348
Merged
Merged
Conversation
@transcend-io/airgap.js-types
@transcend-io/cli
@transcend-io/design-tokens
@transcend-io/internationalization
@transcend-io/privacy-types
@transcend-io/sdk
@transcend-io/type-utils
@transcend-io/utils
@transcend-io/mcp
@transcend-io/mcp-server-admin
@transcend-io/mcp-server-assessment
@transcend-io/mcp-server-base
@transcend-io/mcp-server-consent
@transcend-io/mcp-server-discovery
@transcend-io/mcp-server-docs
@transcend-io/mcp-server-dsr
@transcend-io/mcp-server-inventory
@transcend-io/mcp-server-preferences
@transcend-io/mcp-server-workflows
commit: |
This was referenced Aug 2, 2026
dsklyar
force-pushed
the
danielsklyar/zel-8113-inspector-sandbox-proxy
branch
from
August 3, 2026 06:02
518609f to
7e2bf06
Compare
dsklyar
changed the base branch from
main
to
danielsklyar/zel-8129-vite-view-build-pipeline
August 3, 2026 06:03
This was referenced Aug 3, 2026
dsklyar
force-pushed
the
danielsklyar/zel-8113-inspector-sandbox-proxy
branch
from
August 3, 2026 23:47
7e2bf06 to
1a928d6
Compare
dsklyar
force-pushed
the
danielsklyar/zel-8113-inspector-sandbox-proxy
branch
from
August 4, 2026 20:24
1a928d6 to
b9e7dda
Compare
Base automatically changed from
danielsklyar/zel-8129-vite-view-build-pipeline
to
main
August 5, 2026 21:48
Vendors upstream sandbox_proxy.html and restores it into npx Inspector installs that omit clients/web/static. Points the removal TODO at ZEL-8153.
dsklyar
force-pushed
the
danielsklyar/zel-8113-inspector-sandbox-proxy
branch
from
August 5, 2026 22:30
ada3a80 to
3849525
Compare
dawson-turechek-transcend
approved these changes
Aug 6, 2026
dawson-turechek-transcend
left a comment
Member
There was a problem hiding this comment.
Looks good!
| const VENDORED_SANDBOX_PROXY = join(scriptsLibDir, 'inspector-sandbox-proxy.html'); | ||
|
|
||
| /** What {@link restoreSandboxProxy} did, for logging and tests. */ | ||
| export type SandboxProxyOutcome = 'present' | 'written' | 'unrecognized'; |
There was a problem hiding this comment.
Nit: I think we should use an enum and derive the type, if we're going to use these string values in the code.
Contributor
Author
There was a problem hiding this comment.
Going to add as follow up point for this ticket.
htunnicliff
approved these changes
Aug 6, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to no response for status checks
Aug 6, 2026
2 of 3 tasks
This was referenced Sep 7, 2026
Merged
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
Works around inspector#1859: the published v2 tarball's
fileslist coversclients/web/buildandclients/web/distbut notclients/web/static, so the one document the Apps tab needs is absent. The web server reads it at startup, swallows the ENOENT, and substitutes its own error page — which then renders inside the app frame asSandbox not loaded: ENOENT ... sandbox_proxy.html. Every other tab works, so it reads as a broken view rather than a missing file. Upstream shipped and fixed the same omission once before in v1 (#1113, forserver/static).ensureInspectorSandboxProxylocates the install and copies the document in if it is missing, carrying aTODOnaming the issue and the exact condition for deleting all of it.Ticket: ZEL-8113. Eighth of eleven PRs splitting the MCP Apps branch, and the first of three building the Inspector dev loop. Nothing calls this yet —
pnpm mcp:inspectarrives in the next PR — so this lands as an inert, independently reviewable fix.Why restore upstream's file instead of substituting our own
The proxy is the security boundary for app rendering: it holds the untrusted view at an opaque origin, strips
allow-same-originfrom anything a server asks for, and relays bridge messages between host and view. A replacement of our own making would make this loop diverge from real hosts on exactly the axis the Inspector exists to check. So the vendored copy is upstream's file verbatim, down to the bytes — which is why oxfmt is told to skip it and a test pins its SHA-256.Two other choices worth a look:
PATH, not by globbing~/.npm/_npx. npm decides where that cache lives; it moves withnpm_config_cacheand sandboxes relocate it wholesale. Running the probe under the same spec we are about to launch is what guarantees we patch the install that will actually be used.This PR also carries the one-line switch of
test:roottovitest run --dir scripts, since it is the first to add ascripts/*.test.tsbeyond the three that were named explicitly.Where this sits in the stack
Eleven layers, each targeting the one below it, registered as a GitHub stack — so this diff is only its own commits, and merging a lower layer rebases and retargets everything above it automatically.
tokens.cssfrom source inside the monorepoui://resources and per-capability tool variants./uisubpath withuseMcpAppdev/mcp-server-examples, the first consumer of all of itpnpm mcp:inspectwith per-request dev view HTMLpnpm mcp:new-viewscaffolderDepends on nothing below it: its position is ordering alone, so it can be read and approved without the layers underneath.
Test plan
format,lint,typecheck,typecheck:root, and the fulltestrun are green; root test files go from 3 to 4allow-same-origin, one pinning its hash. The hash test passing afterpnpm run formatis what proves the oxfmt ignore actually holds.npx @modelcontextprotocol/inspector@2reproduces theSandbox not loadederror in the app frame, and rendering succeeds once the document is restoredMade with Cursor