Skip to content

docs: refine Vite DevTools integration plans#1030

Merged
antfu merged 2 commits into
nuxt:mainfrom
antfubot:eleven-swans-eat
Jul 21, 2026
Merged

docs: refine Vite DevTools integration plans#1030
antfu merged 2 commits into
nuxt:mainfrom
antfubot:eleven-swans-eat

Conversation

@antfubot

Copy link
Copy Markdown
Collaborator

Replace the stale Devframe 0.6 integration plans with four independently executable plans targeting Vite DevTools Kit 0.4.2 and Devframe 0.7.5.

The new sequence establishes the Nuxt dock group, completes Messages and terminal convergence, replaces the bespoke VS Code integration with the Code Server plugin, and replaces DiscoveryJS with a preconfigured Data Inspector source. It records the verified platform constraints, migration boundaries, dependencies, drift checks, acceptance criteria, and STOP conditions for future implementation agents.

This PR was created with the help of an agent.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 03eb71ae-e604-41c6-bc1f-7e7cdbe969f9

📥 Commits

Reviewing files that changed from the base of the PR and between 1f22575 and 929c9d3.

📒 Files selected for processing (5)
  • plans/vite-devtools-integration/01-dock-foundation.md
  • plans/vite-devtools-integration/02-platform-services-cleanup.md
  • plans/vite-devtools-integration/03-code-server-plugin.md
  • plans/vite-devtools-integration/04-data-inspector-plugin.md
  • plans/vite-devtools-integration/README.md
🚧 Files skipped from review as they are similar to previous changes (5)
  • plans/vite-devtools-integration/03-code-server-plugin.md
  • plans/vite-devtools-integration/01-dock-foundation.md
  • plans/vite-devtools-integration/02-platform-services-cleanup.md
  • plans/vite-devtools-integration/README.md
  • plans/vite-devtools-integration/04-data-inspector-plugin.md

📝 Walkthrough

Walkthrough

The PR updates Vite DevTools Kit 0.4.2 and Devframe 0.7.5 integration documentation. It defines plans for dock foundation, platform-service cleanup, Code Server, and Data Inspector integration, while removing superseded plan documents. The plans specify implementation steps, compatibility boundaries, dependency alignment, acceptance criteria, verification commands, tests, and STOP conditions.

Estimated code review effort: 3 (Moderate) | ~25 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately reflects the documentation-focused refinement of the Vite DevTools integration plans.
Description check ✅ Passed The description clearly matches the changeset by describing the updated integration plans and their scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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

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: 9

🤖 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 `@plans/vite-devtools-integration/01-dock-foundation.md`:
- Around line 120-138: Update the existing devtools.setup(ctx) registration flow
in module-main.ts to guard both the Nuxt group and nuxt:devtools dock
registrations with the same client-context classifier used elsewhere. Keep the
existing IDs, metadata, and direct hub-member activation/lookups unchanged,
while preventing SSR setup from registering either dock entry.

In `@plans/vite-devtools-integration/02-platform-services-cleanup.md`:
- Around line 221-229: Update the Verification section to explicitly list pnpm
11 validation commands: pnpm lint, pnpm prepare or pnpm build, pnpm typecheck,
pnpm test:unit, and the appropriate Playwright command. Place pnpm prepare/build
before pnpm typecheck, and replace the vague “shared commands” wording without
adding npm or yarn commands.
- Around line 145-147: Update the analyze-build integration plan to define the
server-to-client trigger that publishes the active terminal session ID
immediately when a build starts, before “view terminal” becomes available, and
clears it when the build completes. Specify whether this uses an immediate
refresh or a start-response contract, and ensure client state is derived from
that refreshed server info rather than processAnalyzeBuildInfo or an exit event.
- Around line 109-120: The pre-ready bridge state must also retain terminal
exits, not just registrations and chunks. Update the legacy terminal bridge
state and registration flow to persist each exit code/status received before
devtools:ready, then apply the buffered result when the corresponding session is
registered so it ends as stopped for code 0 or omitted and error for defined
non-zero codes; add a test covering exit before readiness.
- Around line 116-124: Guard legacy-ID bridge operations with a per-run
generation or session token so delayed write, exit, and remove events from a
prior registration cannot affect the replacement session. Update the
re-register/clear/restart flow to assign a new token and require each hook to
match the currently mapped token before acting, while preserving normal handling
for the active run.

In `@plans/vite-devtools-integration/03-code-server-plugin.md`:
- Around line 191-199: Expand the Verification section to document the complete
validation sequence using pnpm 11: run lint, prepare or build before typecheck,
then typecheck, unit tests, and the appropriate Playwright/dev e2e commands.
Explicitly include the Nuxt tsconfig generation step via the documented
prepare/build command, and retain the existing test coverage requirements and
prohibition on installing code-server in CI.

In `@plans/vite-devtools-integration/04-data-inspector-plugin.md`:
- Around line 208-215: Update the Verification section to explicitly list the
required repository validation commands instead of referring to “shared
commands.” Specify pnpm 11, run pnpm prepare or pnpm build before pnpm
typecheck, and include the required lint, unit, Playwright, e2e, and
documentation build checks in the correct order.
- Around line 183-189: Update the data inspector plugin plan to either define
optional polling behavior—including its refresh trigger, lifecycle cleanup, and
required tests—or remove optional polling from the planned scope and related
test requirements. Keep the remaining query and source-shape coverage unchanged.

In `@plans/vite-devtools-integration/README.md`:
- Around line 117-123: Update the verification command block in the README to
explicitly require pnpm 11 before running install, lint, build, typecheck, or
unit tests. Add a clear pnpm version precondition or check, while preserving the
existing command sequence.
🪄 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

Run ID: dfabb012-582e-4e34-a2a1-647d9033172e

📥 Commits

Reviewing files that changed from the base of the PR and between 03b7a1a and 1f22575.

📒 Files selected for processing (9)
  • plans/README.md
  • plans/vite-devtools-integration/01-dock-foundation.md
  • plans/vite-devtools-integration/01-messages-unification.md
  • plans/vite-devtools-integration/02-platform-services-cleanup.md
  • plans/vite-devtools-integration/02-terminals-reuse.md
  • plans/vite-devtools-integration/03-code-server-plugin.md
  • plans/vite-devtools-integration/03-dock-groups-presentation.md
  • plans/vite-devtools-integration/04-data-inspector-plugin.md
  • plans/vite-devtools-integration/README.md
💤 Files with no reviewable changes (3)
  • plans/vite-devtools-integration/01-messages-unification.md
  • plans/vite-devtools-integration/02-terminals-reuse.md
  • plans/vite-devtools-integration/03-dock-groups-presentation.md

Comment on lines +120 to +138
In `module-main.ts`'s existing `devtools.setup(ctx)` callback, register the group
before the hub iframe:

```ts
ctx.docks.register({
id: NUXT_DEVTOOLS_GROUP_ID,
type: 'group',
title: 'Nuxt',
icon: '/__nuxt_devtools__/client/nuxt.svg',
category: 'framework',
defaultOrder: -900,
defaultChildId: 'nuxt:devtools',
})
```

Add `groupId: NUXT_DEVTOOLS_GROUP_ID` to the existing `nuxt:devtools` iframe and
change its `defaultOrder` to `-300`. Keep its ID, URL, icon, and title unchanged.
Existing calls that activate or look up `nuxt:devtools`, including the single
Vue DevTools iframe bridge, must continue to target the hub member directly.

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

sed -n '110,165p' plans/vite-devtools-integration/01-dock-foundation.md

Repository: nuxt/devtools

Length of output: 2619


🏁 Script executed:

rg -n "connectDevToolsKit|client classifier|SSR|devtools.setup|register the group|nuxt:devtools|NUXT_DEVTOOLS_GROUP_ID" plans/vite-devtools-integration/01-dock-foundation.md

Repository: nuxt/devtools

Length of output: 1860


🏁 Script executed:

sed -n '1,115p' plans/vite-devtools-integration/01-dock-foundation.md

Repository: nuxt/devtools

Length of output: 5037


🏁 Script executed:

rg -n "devtools\.setup|ctx\.docks\.register|NUXT_DEVTOOLS_GROUP_ID|nuxt:devtools|defaultChildId|groupId" packages/devtools/src packages/devtools-kit/src

Repository: nuxt/devtools

Length of output: 2393


🏁 Script executed:

sed -n '80,125p' packages/devtools/src/module-main.ts && printf '\n---\n' && sed -n '180,240p' packages/devtools-kit/src/index.ts && printf '\n---\n' && rg -n "register\\(|defaultChildId|switchEntry\\(|toggleEntry\\(|getStateById\\(" packages/devtools-kit/src packages/devtools/src -g '*.ts'

Repository: nuxt/devtools

Length of output: 6377


🏁 Script executed:

rg -n "docks\.register|register\(.*id:|update\(.*id:|defaultChildId|duplicate" packages docs plans -g '*.md' -g '*.ts'

Repository: nuxt/devtools

Length of output: 3878


🏁 Script executed:

sed -n '40,60p' plans/vite-devtools-integration/README.md && printf '\n---\n' && sed -n '80,95p' plans/vite-devtools-integration/README.md

Repository: nuxt/devtools

Length of output: 2121


🏁 Script executed:

sed -n '165,195p' plans/vite-devtools-integration/01-dock-foundation.md

Repository: nuxt/devtools

Length of output: 969


Gate dock registration on the client context too. In module-main.ts's devtools.setup(ctx) callback, apply the same client classifier before ctx.docks.register(...); otherwise the SSR setup can still register the Nuxt group and nuxt:devtools member, creating duplicate Nuxt groups across environments.

🤖 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 `@plans/vite-devtools-integration/01-dock-foundation.md` around lines 120 -
138, Update the existing devtools.setup(ctx) registration flow in module-main.ts
to guard both the Nuxt group and nuxt:devtools dock registrations with the same
client-context classifier used elsewhere. Keep the existing IDs, metadata, and
direct hub-member activation/lookups unchanged, while preventing SSR setup from
registering either dock entry.

Comment thread plans/vite-devtools-integration/02-platform-services-cleanup.md Outdated
Comment thread plans/vite-devtools-integration/02-platform-services-cleanup.md Outdated
Comment thread plans/vite-devtools-integration/02-platform-services-cleanup.md Outdated
Comment thread plans/vite-devtools-integration/02-platform-services-cleanup.md
Comment thread plans/vite-devtools-integration/03-code-server-plugin.md
Comment thread plans/vite-devtools-integration/04-data-inspector-plugin.md Outdated
Comment thread plans/vite-devtools-integration/04-data-inspector-plugin.md
Comment thread plans/vite-devtools-integration/README.md
- Gate Plan 01's dock/group registration by the client-context classifier
  so the SSR Vite instance never registers a duplicate inert Nuxt group.
- Plan 02: buffer terminal exit status (not just registrations/chunks)
  before devtools:ready, and guard re-register/restart with a per-run
  generation token so stale write/exit/remove events can't hit the
  replacement session.
- Plan 02: define the exact contract for delivering the active
  analyze-build terminal session ID to the client (extend
  getAnalyzeBuildInfo + the existing refresh call site).
- Clarify Plan 04's Data Inspector polling mention as an upstream SPA
  feature requiring no Nuxt-side implementation or tests.
- Make every plan's Verification section self-contained (spell out the
  pnpm 11 lint/build-or-prepare/typecheck/test:unit/e2e sequence instead
  of referring to "shared commands"); note pnpm 11 explicitly in the
  README's shared verification block.
@antfu
antfu merged commit 673b02b into nuxt:main Jul 21, 2026
5 of 6 checks passed
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.

2 participants