Add a feature-flagged Desks UI default toggle#3537
Merged
Conversation
Collaborator
📊 Performance Test ResultsComparing f254282 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
2e90bd8 to
f81ee63
Compare
f81ee63 to
f254282
Compare
1 task
fredrikekelund
pushed a commit
that referenced
this pull request
May 29, 2026
….cmd` (#3627) ## Related issues - Fixes [STU-1761](https://linear.app/a8c/issue/STU-1761/windows-npm-start-fails-with-spawn-npx-enoent) ## How AI was used in this PR Diagnosed and patched with Claude Code. I reviewed the one-line change and verified it locally on Windows. ## Proposed Changes `scripts/start-studio.mjs` spawns `npx vite ...` and `npx electron-vite ...` with raw `child_process.spawn(...)`. On Windows, `npx` is `npx.cmd` (a batch file), and Node's `spawn` without `shell: true` only resolves real executables — so `npm start` immediately throws `Error: spawn npx ENOENT` and the dev server never starts. macOS/Linux are unaffected because `npx` is a real binary there. Fix: pass `shell: true` to the default `spawn` options inside `spawnCommand`. The shell resolves `npx` → `npx.cmd` on Windows and finds `npx` the usual way on macOS/Linux. This was a latent bug in the predecessor `scripts/start-new-ui.mjs` (only reachable via the opt-in `npm run start:new`). #3537 promoted that script to default `npm start`, turning it into a Windows-wide blocker. ### Why this is safe on macOS/Linux - All spawn args are hardcoded literals (`'vite'`, `'--port'`, `'5200'`, etc.), so there's no shell-quoting risk. - `stdio: 'inherit'` still works through the shell wrapper. - `SIGINT`/`SIGTERM` handlers in the script already call `.kill()` on the child references, so Ctrl+C still works. Caveat (not a regression vs. current state, but worth knowing): with `shell: true` the immediate child is the shell wrapper. If the parent script is killed abruptly, the inner `vite`/`electron-vite` may briefly outlive the wrapper until they notice their parent is gone. The script's own SIGINT/SIGTERM handlers cover the normal Ctrl+C path. ## Testing Instructions **Windows (the regression):** 1. `git checkout stu-1761-fix-windows-npm-start-enoent` 2. `npm install && npm start` 3. Expected: prestart build runs, then `Starting @studio/ui dev server on port 5200...` followed by `VITE vX ready in ... ms`, then Electron launches. 4. On `trunk` the same command throws `Error: spawn npx ENOENT` and exits with code 1. **macOS / Linux (regression check):** 1. `npm start` from this branch should behave identically to `trunk` — vite on 5200, then Electron. ## Pre-merge Checklist - [ ] Have you checked for TypeScript, React or other console errors?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
app.json.defaultto avoid colliding withapps/ui'sclassic-uiterminology.Ctrl+D/Cmd+Dinside Desks UI as an internal toggle betweenclassicanddesksviews.start:new/make:new-uipaths.Testing