feat(context-chips): add mise-en-place support for node version switching#9841
Open
monotykamary wants to merge 4 commits intowarpdotdev:masterfrom
Open
feat(context-chips): add mise-en-place support for node version switching#9841monotykamary wants to merge 4 commits intowarpdotdev:masterfrom
monotykamary wants to merge 4 commits intowarpdotdev:masterfrom
Conversation
…hing Add mise as an alternative version manager alongside nvm in the Node.js version switching popup. When mise is detected, the popup lists installed versions from mise's install directories and uses mise-specific commands for switching and installing versions. - Add VersionManager enum (Nvm/Mise) with version-manager-specific commands for switching, installing, and manager installation - Add detect_mise_installed() with cross-OS detection via MISE_DATA_DIR, PATH binary check, ~/.local/share/mise, ~/.mise, and Homebrew paths - Add list_mise_node_versions() with symlink filtering and semantic version validation to avoid listing alias directories like '25', '25.9', 'latest' that mise creates as symlinks - Normalize version strings (strip 'v' prefix) for mise commands since 'mise use node@18.19.1' expects no 'v' prefix unlike 'nvm use v18.19.1' - Update empty state to show both 'Install nvm' and 'Install mise' buttons when no version manager is detected - Add 'Switch to mise/nvm' menu item when both managers are available - Update NodeVersionPopupEvent to carry version-manager-specific command strings instead of hardcoding nvm commands - Update display_chip.rs event handling to use the command strings from the popup events Closes warpdotdev#9715
Contributor
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
Contributor
There was a problem hiding this comment.
Overview
This PR adds mise support to the Node.js version popup by detecting mise installs, listing mise-managed Node versions, and emitting manager-specific install/switch commands.
Concerns
- When both managers are installed but the default active manager has no versions, the popup falls into the install-latest empty state and never exposes the manager switch, so mise versions can remain inaccessible.
- The selected menu index is not offset for the prepended manager-switch row, so keyboard selection/default selection can target the wrong item when both managers are available.
- Mise detection treats data directories as an installed manager even when the executable is unavailable, causing the UI to emit commands that may fail with
mise: command not found. - The install-latest button label is created once from the initial manager and can become stale after switching managers.
- For faster review, please upload screenshots or a video of the feature working end to end.
Verdict
Found: 0 critical, 4 important, 1 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
- Show manager switch toggle in the no-versions empty state so users with versions only in the inactive manager can still switch - Offset set_selected_by_index by 1 when the 'Switch to...' row is prepended, preventing off-by-one selection in the version menu - Require the mise binary in PATH for detect_mise_installed() instead of treating data directories as sufficient; avoids 'command not found' after stale uninstalls - Replace single install_latest_node_button with separate nvm/mise install-latest buttons so the label always matches the active manager
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.
Description
Adds mise-en-place as an alternative version manager alongside nvm in the Node.js version switching popup, as requested in #9715.
Currently the Node.js version chip only supports nvm for version switching. Users who use mise (or other version managers) instead of nvm see a broken "Install nvm" prompt even when they have a working mise installation with Node.js versions available.
What
VersionManagerenum (Nvm/Mise) encapsulating version-manager-specific commandsdetect_mise_installed()for cross-OS mise detectionlist_mise_node_versions()with symlink filtering and semantic version validationHow
VersionManagerenum withswitch_command(),install_latest_command(), andinstall_manager_agent_query()methodsMISE_DATA_DIR, PATH, standard directories, Homebrew paths, and Windows app datavprefix normalization for mise compatibilityLinked Issue
ready-to-specorready-to-implement.Screenshots / Videos
Screen.Recording.2026-05-02.at.02.18.09.mov
Testing
cargo checkpassescargo fmt -- --checkpassescargo clippyno new warningsAgent Mode
Co-Authored-By: Warp agent@warp.dev