feat: replace VS Code integration with Code Server plugin - #1036
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughReplaces the legacy VS Code Server configuration with Coder code-server. Adds configuration types, defaults, validation, lifecycle mounting, supervisor cleanup, diagnostics, documentation, dependency updates, playground wiring, and unit/e2e coverage. Also updates head-tag resolution and a devframe mount type cast. Estimated code review effort: 4 (Complex) | ~45 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8)pnpm-workspace.yamlTraceback (most recent call last): 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
tests/e2e/specs/code-server.spec.ts (1)
13-21: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueExtract shared helpers for dock-wait / RPC-call boilerplate.
The "wait for dock entry", "call the status RPC", and "switch dock entry"
page.evaluateblocks are duplicated verbatim across both tests. A couple of small helpers (e.g.waitForDock(page, id),getCodeServerStatus(page)) would reduce the chance of the two tests drifting when the RPC name or client context shape changes.Also applies to: 30-33, 45-48, 54-57, 69-77, 83-86, 90-94, 100-103
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/e2e/specs/code-server.spec.ts` around lines 13 - 21, Extract shared helpers in the code-server E2E spec for waiting on a dock entry, calling the status RPC, and switching dock entries, then replace the duplicated page.evaluate and waitForFunction blocks in both tests with those helpers. Keep the existing dock IDs, RPC behavior, and assertions unchanged while centralizing access to __VITE_DEVTOOLS_CLIENT_CONTEXT__.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/devtools/src/integrations/code-server.ts`:
- Around line 74-88: Update the mountedDefinition setup and Nuxt close hook to
retain the in-flight setup promise and await it before disposing the supervisor.
Ensure shutdown disposes the supervisor whether setup has already completed or
is still pending, while preserving the existing setupCodeServer flow.
---
Nitpick comments:
In `@tests/e2e/specs/code-server.spec.ts`:
- Around line 13-21: Extract shared helpers in the code-server E2E spec for
waiting on a dock entry, calling the status RPC, and switching dock entries,
then replace the duplicated page.evaluate and waitForFunction blocks in both
tests with those helpers. Keep the existing dock IDs, RPC behavior, and
assertions unchanged while centralizing access to
__VITE_DEVTOOLS_CLIENT_CONTEXT__.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 978f2d72-bfb6-4c08-821a-a19168889ca2
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (20)
README.mddocs/content/1.guide/0.getting-started.mddocs/content/1.guide/1.features.mddocs/content/2.module/3.migration-v4.mdpackage.jsonpackages/devtools-kit/src/_types/integrations.tspackages/devtools-kit/src/_types/options.tspackages/devtools-kit/src/diagnostics.tspackages/devtools-kit/test/diagnostics.test.tspackages/devtools/package.jsonpackages/devtools/src/constant.tspackages/devtools/src/integrations/code-server.tspackages/devtools/src/integrations/vscode.tspackages/devtools/src/module-main.tspackages/devtools/src/server-rpc/index.tspackages/devtools/test/code-server.test.tsplaygrounds/empty/nuxt.config.tspnpm-workspace.yamltests/e2e/playwright.config.tstests/e2e/specs/code-server.spec.ts
💤 Files with no reviewable changes (3)
- package.json
- packages/devtools-kit/src/_types/integrations.ts
- packages/devtools/src/integrations/vscode.ts
Use Unhead's v3 tag resolver, bridge the Vite kit context at the Data Inspector mount, and await in-flight Code Server setup before teardown.

🔗 Linked issue
N/A
📚 Description
Replaces the bespoke VS Code custom tab and process supervisor with the maintained
@devframes/plugin-code-serverintegration.codeServeroptions with Coder-only backend supportvscodeoption withNDT_DEP_0008✅ Testing
pnpm buildpnpm lintpnpm test:unit(66 passed)The new Code Server scenario also passes in
pnpm test:e2e:dev. The full suite remains red on the unrelated existing Open Graph playground assertion (missingHome pagemetadata).pnpm typechecklikewise reports only the existing Open Graph and Data Inspector errors.