Skip to content

feat: replace VS Code integration with Code Server plugin - #1036

Merged
antfu merged 3 commits into
mainfrom
codex/code-server-plugin
Jul 23, 2026
Merged

feat: replace VS Code integration with Code Server plugin#1036
antfu merged 3 commits into
mainfrom
codex/code-server-plugin

Conversation

@antfu

@antfu antfu commented Jul 23, 2026

Copy link
Copy Markdown
Member

🔗 Linked issue

N/A

📚 Description

Replaces the bespoke VS Code custom tab and process supervisor with the maintained @devframes/plugin-code-server integration.

  • adds curated codeServer options with Coder-only backend support
  • defaults the Code Server working directory to the Nuxt root
  • validates reserved authentication arguments and environment variables
  • mounts Code Server into the Nuxt DevTools group and disposes it on Nuxt shutdown
  • deprecates the legacy vscode option with NDT_DEP_0008
  • removes obsolete tunnel/reuse/controller code and direct dependencies
  • updates documentation and adds missing-binary plus installed/authenticated browser coverage

✅ Testing

  • pnpm build
  • pnpm lint
  • pnpm test:unit (66 passed)
  • focused missing-binary Playwright test
  • opt-in installed Code Server launch/authentication Playwright test

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 (missing Home page metadata). pnpm typecheck likewise reports only the existing Open Graph and Data Inspector errors.

@socket-security

socket-security Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​devframes/​plugin-code-server@​0.7.9751009994100

View full report

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d6ce38ea-be7a-4435-8c21-5d256b4fd60f

📥 Commits

Reviewing files that changed from the base of the PR and between 1a9d886 and 62382a8.

📒 Files selected for processing (1)
  • pnpm-workspace.yaml

📝 Walkthrough

Walkthrough

Replaces 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)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: replacing the VS Code integration with the Code Server plugin.
Description check ✅ Passed The description clearly matches the changeset and summarizes the new integration, deprecations, docs, and testing.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/code-server-plugin

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.yaml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


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

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

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
tests/e2e/specs/code-server.spec.ts (1)

13-21: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Extract shared helpers for dock-wait / RPC-call boilerplate.

The "wait for dock entry", "call the status RPC", and "switch dock entry" page.evaluate blocks 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

📥 Commits

Reviewing files that changed from the base of the PR and between 202b51d and df88570.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (20)
  • README.md
  • docs/content/1.guide/0.getting-started.md
  • docs/content/1.guide/1.features.md
  • docs/content/2.module/3.migration-v4.md
  • package.json
  • packages/devtools-kit/src/_types/integrations.ts
  • packages/devtools-kit/src/_types/options.ts
  • packages/devtools-kit/src/diagnostics.ts
  • packages/devtools-kit/test/diagnostics.test.ts
  • packages/devtools/package.json
  • packages/devtools/src/constant.ts
  • packages/devtools/src/integrations/code-server.ts
  • packages/devtools/src/integrations/vscode.ts
  • packages/devtools/src/module-main.ts
  • packages/devtools/src/server-rpc/index.ts
  • packages/devtools/test/code-server.test.ts
  • playgrounds/empty/nuxt.config.ts
  • pnpm-workspace.yaml
  • tests/e2e/playwright.config.ts
  • tests/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

Comment thread packages/devtools/src/integrations/code-server.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.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 23, 2026

Copy link
Copy Markdown

Deploying nuxt-devtools with  Cloudflare Pages  Cloudflare Pages

Latest commit: 62382a8
Status:⚡️  Build in progress...

View logs

@antfu
antfu merged commit 239ab85 into main Jul 23, 2026
4 of 7 checks passed
@antfu
antfu deleted the codex/code-server-plugin branch July 23, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant