Skip to content

python: show environment name before version in the interpreter picker - #17061

Open
isabelizimm wants to merge 3 commits into
mainfrom
iz/switch-version-name
Open

isabelizimm wants to merge 3 commits into
mainfrom
iz/switch-version-name

Conversation

@isabelizimm

@isabelizimm isabelizimm commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #17022

Summary

Python rows in the interpreter picker now lead with the tool or environment name, and the Python version moves to the gray text. The version now sits right next to "not supported", so it no longer reads as if the environment manager is unsupported.

Row Label Gray text
uv project env uv: myproject Python 3.12.4
Homebrew Homebrew Python 3.13.2
Unsupported, eg, pyenv pyenv Python 3.13.1 · not supported
Global Python with no known tool Python 3.8.10 not supported (if applicable)

Rows with only a tool name (several Homebrew rows, for example) repeat the label. The version in the gray text and the group header tell them apart. When there is no tool or env name, the version stays as the label so the row is never blank.

Within each group, rows sort alphabetically by environment manager (no known manager last), then by version, newest first. Unsupported rows still come after all supported ones.

The e2e helpers find picker rows by aria-label ("label, gray text, path"), so they are updated for the new order:

  • selectQuickInputElementContaining also accepts a list of substrings, and a row must contain all of them.
  • Starting a session with a sourced version (e.g. 3.12.10 (Conda)) matches the version and the source separately.
  • The base-install deprioritize pattern now looks for a label that is only a tool name.

Screenshots

new behavior

Screen.Recording.2026-11-02.at.1.06.13.PM.mov

Release Notes

New Features

Bug Fixes

  • N/A

Validation Steps

@:sessions @:interpreter @:environment-modules @:notebooks @:positron-notebooks

  1. Have several Python installs available, including a project venv, a Homebrew or pyenv base install, and an unsupported version (e.g. 3.8).
  2. Open the session picker in the top action bar.
  3. Verify each Python row shows the tool or env name as the label and Python X.Y.Z as gray text, and that unsupported rows read Python X.Y.Z · not supported.
  4. Type a version (e.g. Python 3.12) in the picker and verify the matching rows still appear.

The interpreter picker now labels Python rows with their tool or env name
and shows the version as gray text, next to "not supported".

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

E2E Tests 🚀
This PR will run tests tagged with: @:critical @:sessions @:interpreter @:environment-modules @:notebooks @:positron-notebooks @:console

Why these tags?
Tag Source
@:critical Always runs (required)
@:sessions PR description
@:interpreter PR description
@:environment-modules PR description
@:notebooks PR description
@:positron-notebooks PR description
@:console Changed files

More on automatic tags from changed files.

Test count: Linux: 312 tests across 2 shards.

readme  valid tags

@isabelizimm
isabelizimm marked this pull request as ready for review November 2, 2026 18:30
@isabelizimm

Copy link
Copy Markdown
Contributor Author

Interested in folks thoughts on how this looks/feels!! 👀

@isabelizimm
isabelizimm requested review from austin3dickey and midleman and removed request for midleman November 2, 2026 18:30
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

🔎 Exploratory testing 60d3bbd

2 minor
View report →

Started automatically for the auto-run experiment. Was it useful? React with 👍 or 👎 on this comment, and answer "Is this finding right?" on each finding in the report.

@austin3dickey

Copy link
Copy Markdown
Contributor

hmmmmm some things are bugging me a bit after all:

  • Since they're still sorted by (deemphasized) version, they look all mixed up if you have different managers. My externally-manged list shows uv, uv, uv, conda: base, Homebrew, Python 3.12.13, uv, uv, uv, uv, Command Line Tools. But I'm not sure if we should sort by manager because that defeats some of the careful ordering we've already put in.
  • The R Suggested row still shows R [version] which is pretty different from e.g. uv: my-workspace if that's your python suggestion

...maybe I did like the original better?

@isabelizimm

Copy link
Copy Markdown
Contributor Author

The ordering is by Python version within groups, so I think it's okay to break that up if there's something else that is more ergonomic! We could try out grouping by manager within each project/global/external group, then secondary sort via version? If that still doesn't feel right, happy to keep noodling around on this branch to find something that seems scannable for a variety of tasks!

isabelizimm and others added 2 commits November 2, 2026 16:42
Within each picker group, Python rows now sort alphabetically by the tool
that manages them (no tool last), then by version, newest first.
Unsupported rows still follow all supported ones.

Co-Authored-By: Claude <noreply@anthropic.com>
Base interpreters share the Global environments header; they now share
its groupOrder too, so unsupported Global rows no longer sit between the
supported Global rows and the Base rows.

Co-Authored-By: Claude <noreply@anthropic.com>
@austin3dickey

Copy link
Copy Markdown
Contributor

Yeah, I think this is looking better! I'm wondering if we can get a smarter manager order from elsewhere in this codebase? I'm not the hugest fan of showing conda alphabetically before uv in this current state.
picker-full-order

@testlabauto testlabauto reopened this Nov 10, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

python: switch label and version in session picker

3 participants