fix(@typegpu/cli): show install output and don't auto-start dev server#2546
Closed
zichen0116 wants to merge 2 commits into
Closed
fix(@typegpu/cli): show install output and don't auto-start dev server#2546zichen0116 wants to merge 2 commits into
zichen0116 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the @typegpu/cli project creation flow to improve UX by making dependency installation output visible and preventing the CLI from auto-starting the dev server after scaffolding.
Changes:
- Switch
pmInstallto an interactiverunCommandinvocation so install progress/output is shown. - Update the create flow prompt to only ask about installing dependencies (no auto-start).
- Always display “next steps” instructions after scaffolding, tailored based on whether install was run.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/typegpu-cli/src/utils/pm.ts | Makes pmInstall run interactively and logs install start/success instead of using a spinner. |
| packages/typegpu-cli/src/create.ts | Adjusts prompts, removes dev-server auto-start, and prints next-step instructions after scaffolding. |
Comments suppressed due to low confidence (1)
packages/typegpu-cli/src/create.ts:64
- When the project directory is
.(current directory),cdPathbecomes an empty string, but this branch will still printcd ${cdPath}. That results in a broken instruction (cdwith no target). Only include thecd ...line whencdPathis non-empty.
if (!shouldInstall && installCmd) {
msg += ` cd ${cdPath}\n`;
msg += ` ${installCmd.command} ${installCmd.args.join(' ')}\n`;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Two ergonomic improvements to the create command: 1. Show installation output: Replace the spinner-based pmInstall with interactive mode so users can see npm/pnpm install progress instead of staring at a spinner with no feedback. 2. Don't auto-start dev server: Replace the combined 'Install with X and start now?' prompt with just 'Install dependencies with X?'. After scaffolding (and optional install), always show the next steps so users know what to do without the CLI hijacking their terminal. Fixes software-mansion#2544
f9b8ca1 to
6c504ab
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
6c504ab to
d5d5206
Compare
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.
What
Two ergonomic improvements to the
tgpucreate command:Show installation output: Replace the spinner-based
pmInstallwith interactive mode so users can seenpm/pnpminstall progress instead of staring at a spinner with no feedback.Don't auto-start dev server: Replace the combined "Install with X and start now?" prompt with just "Install dependencies with X?". After scaffolding (and optional install), always show the next steps so users know what to do without the CLI hijacking their terminal.
Why
tgputo create a new project, the installation step shows a spinner but no actual output, leaving users wondering if anything is happening.pnpm dev) which takes over the terminal. Users should be told what to do next instead.Changes
packages/typegpu-cli/src/utils/pm.tspmInstall: Replaced spinner wrapper withp.log.step()+ interactiverunCommandcall so install output is visible to the userpackages/typegpu-cli/src/create.tspmRun(pm, ['dev']))pmRunimportFixes #2544