Skip to content

feat(context-chips): add mise-en-place support for node version switching#9841

Open
monotykamary wants to merge 4 commits intowarpdotdev:masterfrom
monotykamary:feat/mise-node-version-switching
Open

feat(context-chips): add mise-en-place support for node version switching#9841
monotykamary wants to merge 4 commits intowarpdotdev:masterfrom
monotykamary:feat/mise-node-version-switching

Conversation

@monotykamary
Copy link
Copy Markdown

@monotykamary monotykamary commented May 1, 2026

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

  • VersionManager enum (Nvm / Mise) encapsulating version-manager-specific commands
  • detect_mise_installed() for cross-OS mise detection
  • list_mise_node_versions() with symlink filtering and semantic version validation
  • Updated empty state showing both "Install nvm" and "Install mise" buttons
  • Manager switching when both nvm and mise are available

How

  • Added VersionManager enum with switch_command(), install_latest_command(), and install_manager_agent_query() methods
  • Cross-OS detection via MISE_DATA_DIR, PATH, standard directories, Homebrew paths, and Windows app data
  • Symlink filtering to avoid duplicate alias entries from mise
  • v prefix normalization for mise compatibility

Linked Issue

Screenshots / Videos

Screen.Recording.2026-05-02.at.02.18.09.mov

Testing

  • cargo check passes
  • cargo fmt -- --check passes
  • cargo clippy no new warnings
  • Manual testing of nvm-only, mise-only, both-installed, and neither-installed scenarios

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Co-Authored-By: Warp agent@warp.dev

…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
@cla-bot cla-bot Bot added the cla-signed label May 1, 2026
@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 1, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 1, 2026

@monotykamary

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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread app/src/context_chips/node_version_popup.rs
Comment thread app/src/context_chips/node_version_popup.rs Outdated
Comment thread app/src/context_chips/node_version_popup.rs Outdated
Comment thread app/src/context_chips/node_version_popup.rs Outdated
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support mise-en-place version switching and extend tool labels

1 participant