Skip to content

vp migrate beta test#2

Draft
fengmk2 wants to merge 1 commit into
masterfrom
vp-migrate-test
Draft

vp migrate beta test#2
fengmk2 wants to merge 1 commit into
masterfrom
vp-migrate-test

Conversation

@fengmk2

@fengmk2 fengmk2 commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Fixes

Issue Number:

What is the current behavior?

What is the new behavior?

Other information

PR Checklist

Toggle...

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting)
  • Refactoring (no functional changes)
  • Documentation changes
  • Other - Please describe:

Please check all that apply to this PR using "x":

  • I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
  • I have checked that this PR does not introduce a breaking change
  • This PR introduces breaking changes and I have provided a detailed explanation below

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates the project to use vite-plus and pnpm catalogs, adds a pre-commit hook, and updates configuration files. However, several critical issues were introduced, likely due to an automated migration script. Specifically, the staged property was incorrectly injected into various return objects in vite.config.ts, including a major bug where a string (html) is spread into an object. Additionally, the postinstall script in package.json was renamed to postinstall2, which prevents it from running automatically.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread vite.config.ts
Comment on lines +846 to +857
if (!ctx.server) return {
staged: {
"*": "vp check --fix"
},
...html,
}
if (!process.env.REACT_SCAN) return {
staged: {
"*": "vp check --fix"
},
...html,
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Spreading a string (...html) into an object literal will result in an object of character indices (e.g., { 0: '<', 1: '!', ... }), which is a major bug. Additionally, transformIndexHtml expects a string or { html, tags } return value, not an object containing staged. This appears to be an accidental replacement by a migration script. It should be reverted to simply returning html.

          if (!ctx.server) return html;
          if (!process.env.REACT_SCAN) return html;

Comment thread package.json
"dev:web-server": "cross-env NODE_ENV=development node scripts/dev-web-server.mjs",
"run:web-server": "cross-env NODE_ENV=production vp build && cd web && node index.js",
"postinstall": "cd web && pnpm install",
"postinstall2": "cd web && pnpm install",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Renaming the postinstall script to postinstall2 will prevent it from running automatically after pnpm install. If this was done to temporarily disable it during migration, please ensure it is reverted to postinstall so that the web package dependencies are correctly installed in normal environments.

Suggested change
"postinstall2": "cd web && pnpm install",
"postinstall": "cd web && pnpm install",

Comment thread vite.config.ts
Comment on lines 874 to +877
return {
staged: {
"*": "vp check --fix"
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The staged property is not a valid field for a Vite/Rolldown plugin's transform return object. This appears to be an accidental injection by a migration script and should be removed.

Suggested change
return {
staged: {
"*": "vp check --fix"
},
return {

Comment thread vite.config.ts
Comment on lines +919 to +922
return {
staged: {
"*": "vp check --fix"
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The staged property is not a valid field for the returned favicon object. This appears to be an accidental injection by a migration script and should be removed.

Suggested change
return {
staged: {
"*": "vp check --fix"
},
return {

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