Skip to content

fix: stop intercepting vite as vp and synthesize vpr in task scripts#1186

Merged
graphite-app[bot] merged 1 commit intomainfrom
fix-issue-1176
Mar 30, 2026
Merged

fix: stop intercepting vite as vp and synthesize vpr in task scripts#1186
graphite-app[bot] merged 1 commit intomainfrom
fix-issue-1176

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Mar 28, 2026

Summary

  • Fix: VitePlusCommandHandler was intercepting both vp and vite program names in task scripts. This caused vp run dev to fail with "Invalid vite task command" when a package.json script used bare vite (e.g. "dev": "vite"), because vite is a separate tool, not a vp alias. Now only vp and vpr are intercepted; vite runs verbatim as an external process.
  • Feat: vpr commands in task scripts (e.g. "ready": "vpr hello && vpr dev") are now expanded to vp run and synthesized in-session, avoiding unnecessary process spawns.

Test plan

  • Added snap test command-run-script-vite-program covering:
    • bare vite, vite -h, vite --version all run verbatim
    • vpr hello synthesized in-session
    • chained vpr hello-vpr && vpr dev-version both synthesized
  • All 254 global snap tests pass
  • All 22 Rust unit tests pass
  • Verified on real reproduction project (vp run dev starts Vite dev server)

Closes #1176

Copy link
Copy Markdown
Member Author

fengmk2 commented Mar 28, 2026


How to use the Graphite Merge Queue

Add the label auto-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@fengmk2 fengmk2 added the test: e2e Auto run e2e tests label Mar 28, 2026
@fengmk2 fengmk2 force-pushed the vp-run-no-fallback branch from 3af4839 to 3048c0d Compare March 29, 2026 11:36
@fengmk2 fengmk2 force-pushed the vp-run-no-fallback branch from 3048c0d to ad0a0c7 Compare March 29, 2026 14:52
@graphite-app graphite-app bot force-pushed the vp-run-no-fallback branch from ad0a0c7 to 6c24f5a Compare March 29, 2026 15:44
@fengmk2 fengmk2 force-pushed the vp-run-no-fallback branch from 6c24f5a to 707c56a Compare March 30, 2026 02:39
@fengmk2 fengmk2 marked this pull request as ready for review March 30, 2026 02:43
@fengmk2 fengmk2 requested review from branchseer and cpojer March 30, 2026 02:43
@fengmk2 fengmk2 force-pushed the vp-run-no-fallback branch from 707c56a to 9a5c382 Compare March 30, 2026 06:33
@fengmk2 fengmk2 force-pushed the vp-run-no-fallback branch from 9a5c382 to e4862b2 Compare March 30, 2026 06:49
@fengmk2 fengmk2 force-pushed the fix-issue-1176 branch 2 times, most recently from 538ff45 to ffbfc0c Compare March 30, 2026 07:24
@fengmk2 fengmk2 force-pushed the vp-run-no-fallback branch from e4862b2 to f898075 Compare March 30, 2026 07:24
@fengmk2 fengmk2 force-pushed the vp-run-no-fallback branch from f898075 to 0e5b9c2 Compare March 30, 2026 07:40
@graphite-app graphite-app bot force-pushed the vp-run-no-fallback branch from 0e5b9c2 to c682cb1 Compare March 30, 2026 08:21
@graphite-app graphite-app bot changed the base branch from vp-run-no-fallback to main March 30, 2026 08:37
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 30, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit cf7593e
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69ca7793a5fc650008dc0058

@fengmk2 fengmk2 changed the title fix: stop intercepting vite as a vp command in task scripts fix: stop intercepting vite as vp and synthesize vpr in task scripts Mar 30, 2026
@graphite-app
Copy link
Copy Markdown

graphite-app bot commented Mar 30, 2026

Merge activity

…ripts (#1186)

## Summary

- **Fix**: `VitePlusCommandHandler` was intercepting both `vp` and `vite` program names in task scripts. This caused `vp run dev` to fail with "Invalid vite task command" when a package.json script used bare `vite` (e.g. `"dev": "vite"`), because `vite` is a separate tool, not a vp alias. Now only `vp` and `vpr` are intercepted; `vite` runs verbatim as an external process.
- **Feat**: `vpr` commands in task scripts (e.g. `"ready": "vpr hello && vpr dev"`) are now expanded to `vp run` and synthesized in-session, avoiding unnecessary process spawns.

## Test plan

- [x] Added snap test `command-run-script-vite-program` covering:
  - bare `vite`, `vite -h`, `vite --version` all run verbatim
  - `vpr hello` synthesized in-session
  - chained `vpr hello-vpr && vpr dev-version` both synthesized
- [x] All 254 global snap tests pass
- [x] All 22 Rust unit tests pass
- [x] Verified on real reproduction project (`vp run dev` starts Vite dev server)

Closes #1176
@graphite-app graphite-app bot merged commit cf7593e into main Mar 30, 2026
64 checks passed
@graphite-app graphite-app bot deleted the fix-issue-1176 branch March 30, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: e2e Auto run e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pressing Ctrl+C after vp run dev, pnpm run dev, or npm run dev leaves the terminal in a broken state on Windows

2 participants