Skip to content

Show interpreter session picker immediately, fetch contributed items after#14868

Merged
jonvanausdeln merged 2 commits into
mainfrom
jonv/windows-session-quickpick-flake-c6caff
Jul 15, 2026
Merged

Show interpreter session picker immediately, fetch contributed items after#14868
jonvanausdeln merged 2 commits into
mainfrom
jonv/windows-session-quickpick-flake-c6caff

Conversation

@jonvanausdeln

Copy link
Copy Markdown
Contributor

Fix the Windows session picker occasionally failing to open, which surfaced as
a flaky "Open Session QuickPick Menu ... toBeVisible() failed" e2e failure.

selectNewLanguageRuntime awaited fetchContributedItems() before calling
quickPick.show(). Once runtime discovery is complete, that fetch calls each
picker contribution's getItems() -- for positron-python this is an
extension-host RPC that enumerates interpreters. Right after a window reload the
extension host is still activating, so the RPC can hang for seconds and show()
is never reached: clicking the session button appears to do nothing.

The picker now shows the registered runtimes immediately and folds contributed
items in via a rebuild once they arrive (guarded against a disposed picker).
This also fixes the real-user papercut where clicking "Start New Console
Session" right after opening a workspace does nothing until interpreter
discovery finishes.

Trace analysis of the CI failure confirmed the click fires the command every
time, but the .quick-input-widget never enters the DOM until the fix.

Release Notes

New Features

  • N/A

Bug Fixes

  • Show the interpreter session picker immediately instead of waiting on interpreter discovery, fixing a case where the session button could appear unresponsive right after opening a workspace.

Validation Steps

@:sessions @:catalog-explorer @:win

Automated: a new Vitest regression test in
src/vs/workbench/contrib/languageRuntime/test/browser/languageRuntimeActions.vitest.ts
("opens the picker immediately without waiting for slow contributed items")
drives a getItems() that never resolves and asserts the picker still opens --
it fails on main and passes with this change.

Manual: open a workspace and, as soon as the window loads, click the session
picker button in the top action bar. The Session QuickPick should open promptly
even before interpreter discovery finishes.

jonvanausdeln and others added 2 commits July 14, 2026 16:15
selectNewLanguageRuntime awaited fetchContributedItems() before
quickPick.show(). When startupPhase is Complete, that fetch calls each
picker contribution's getItems() -- for positron-python this is an
extension-host RPC that enumerates interpreters. Right after a window
reload the ext host is still activating, so the RPC can hang for
seconds and show() is never reached: the session picker button appears
to do nothing.

This is the Windows-only e2e flake "Open Session QuickPick Menu ...
toBeVisible() failed" (catalog-explorer and any test using the python/r
fixtures, whose reuse scan opens this picker right after app.restart()).
Trace analysis confirmed the click fires the command every time but the
.quick-input-widget never enters the DOM.

Show the runtimes immediately, then fetch contributed items and rebuild
when they arrive (guarded against a disposed picker). Also fixes the
real-user papercut where clicking "Start New Console Session" right
after opening a workspace does nothing until interpreter discovery
finishes.

Contributed items now populate after show(), so the vitest suite polls
for them; adds a regression test that a slow getItems() no longer blocks
the picker from opening.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Condense the explanatory comment on the deferred contributed-items fetch;
no behavior change.

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

Copy link
Copy Markdown

E2E Tests 🚀
This PR will run tests tagged with: @:critical @:sessions @:catalog-explorer @:win @:console @:interpreter

Why these tags?
Tag Source
@:critical Always runs (required)
@:sessions PR description
@:catalog-explorer PR description
@:win PR description
@:console Changed files
@:interpreter Changed files

More on automatic tags from changed files.

readme  valid tags

@jonvanausdeln jonvanausdeln marked this pull request as ready for review July 15, 2026 02:13

@austin3dickey austin3dickey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The fix makes sense to me and I couldn't get it to break manually!

@jonvanausdeln jonvanausdeln merged commit 7b55caa into main Jul 15, 2026
27 checks passed
@jonvanausdeln jonvanausdeln deleted the jonv/windows-session-quickpick-flake-c6caff branch July 15, 2026 03:42
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 15, 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.

2 participants