Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Introduces a new Rust crate (vite_global_cli_tips) and wires it into the vp CLI to display occasional, contextual “Tip:” messages (rate-limited) to help users discover commands and aliases.
Changes:
- Added a new
vite_global_cli_tipscrate with a tip registry, matching logic, and a time-based display gate. - Updated
vite_global_clito use a fallible clap parsing path and to print tips after execution (and on parse errors). - Documented the design in
rfcs/cli-tips.mdand stabilized snapshot tests by disabling tips in CLI test mode.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| rfcs/cli-tips.md | RFC documenting the CLI tips system and how to add tips |
| packages/tools/src/snap-test.ts | Ensures tips are disabled during snapshot tests via env var |
| crates/vite_global_cli_tips/src/lib.rs | Implements TipContext, Tip, and get_tip() selection + rate limiting |
| crates/vite_global_cli_tips/src/tips/mod.rs | Registers available tips |
| crates/vite_global_cli_tips/src/tips/short_aliases.rs | Adds a tip for discovering short aliases |
| crates/vite_global_cli_tips/src/tips/use_vpx_or_run.rs | Adds (currently disabled) unknown-command guidance tip |
| crates/vite_global_cli_tips/Cargo.toml | Declares the new crate |
| crates/vite_global_cli/src/main.rs | Integrates tip printing and switches to fallible clap parsing |
| crates/vite_global_cli/src/cli.rs | Introduces try_parse_args_from returning clap errors |
| crates/vite_global_cli/Cargo.toml | Adds dependency on vite_global_cli_tips |
| Cargo.toml | Adds vite_global_cli_tips to workspace dependencies |
| Cargo.lock | Lockfile updates to include the new crate and dependency graph changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5e5a6ae to
895fc1d
Compare
Member
|
Can you make the tips gray? |
Contributor
Author
Done. I think it's the issue of |
cpojer
reviewed
Feb 11, 2026
cpojer
reviewed
Feb 11, 2026
cpojer
reviewed
Feb 11, 2026
cpojer
approved these changes
Feb 11, 2026
…perience - Stateless per 5 minutes display for any tip - Use gray color for tips output Closes #546
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.
Closes #546