Skip to content

fix(inspector): run bundle:sandbox-proxies in predev#1973

Open
abedawi wants to merge 1 commit into
MCPJam:mainfrom
abedawi:fix/abedawi/predev-bundle-sandbox-proxies
Open

fix(inspector): run bundle:sandbox-proxies in predev#1973
abedawi wants to merge 1 commit into
MCPJam:mainfrom
abedawi:fix/abedawi/predev-bundle-sandbox-proxies

Conversation

@abedawi

@abedawi abedawi commented Apr 29, 2026

Copy link
Copy Markdown

Problem

npm run dev loads server routes that import SandboxProxyHtml.bundled.ts. That file is generated by scripts/bundle-sandbox-proxy-html.js (npm run bundle:sandbox-proxies) and is gitignored, so it is missing after a fresh clone.

predev previously only ran sdk:build, so dev could fail immediately with ERR_MODULE_NOT_FOUND for that import.

Change

Run npm run bundle:sandbox-proxies in predev after sdk:build, consistent with pretest and the full build pipeline, which already ensure this artifact exists.

Result

npm run dev -w @mcpjam/inspector works on a clean tree without a separate manual bundling step. Each dev start runs one short HTML-bundling step after the SDK build.

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Apr 29, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@chelojimenez

Copy link
Copy Markdown
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@coderabbitai

coderabbitai Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The predev npm lifecycle script in package.json now executes a two-step initialization sequence. Previously invoking only npm run sdk:build, it now chains npm run bundle:sandbox-proxies afterward, extending the development startup process to include sandbox proxy bundling alongside SDK compilation.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (1)
mcpjam-inspector/package.json (1)

48-57: Optional hardening: consider direct dev:server invocation.

Right now, the bundling guarantee is tied to npm run dev (via predev). If someone runs npm run dev:server directly on a clean clone, predev won’t run and they may still hit missing generated-artifact issues.

Suggested tweak (optional)
   "scripts": {
     "predev": "npm run sdk:build && npm run bundle:sandbox-proxies",
+    "predev:server": "npm run bundle:sandbox-proxies",
     "dev": "run-script-os",
     "dev:default": "concurrently \"npm run dev:server\" \"npm run dev:client\"",

This keeps the “generated file exists” contract consistent across entrypoints.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@mcpjam-inspector/package.json` around lines 48 - 57, Ensure the "generated
file exists" prestep runs when starting the server directly by invoking the
predev step from the dev:server entrypoint: update the dev:server script to run
npm run predev (or equivalent setup task) before its existing command so running
npm run dev:server on a fresh clone always performs the same generation as npm
run dev; reference the predev step and the dev:server script in your change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@mcpjam-inspector/package.json`:
- Around line 48-57: Ensure the "generated file exists" prestep runs when
starting the server directly by invoking the predev step from the dev:server
entrypoint: update the dev:server script to run npm run predev (or equivalent
setup task) before its existing command so running npm run dev:server on a fresh
clone always performs the same generation as npm run dev; reference the predev
step and the dev:server script in your change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 03098d04-d837-4679-884a-a077250e089c

📥 Commits

Reviewing files that changed from the base of the PR and between c321af7 and 06d9233.

📒 Files selected for processing (1)
  • mcpjam-inspector/package.json

chelojimenez pushed a commit that referenced this pull request Jun 5, 2026
- elicitation dialog: close on X/Esc/outside-click via onOpenChange so it
  can no longer get stuck open (supersedes #1919)
- oauth: drop the 8-char minimum on client secret; spec only recommends it
  and some IdPs issue shorter secrets (supersedes #1920)
- sidebar: remove the one-time Playground announcement popover (supersedes #2293)
- dev: run bundle:sandbox-proxies in predev so a fresh clone boots without
  ERR_MODULE_NOT_FOUND (supersedes #1973)

https://claude.ai/code/session_01SMtSZ3m7ccsX1bv17YZs9Z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants