Show interpreter session picker immediately, fetch contributed items after#14868
Merged
Merged
Conversation
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>
|
E2E Tests 🚀 Why these tags?
More on automatic tags from changed files. |
austin3dickey
approved these changes
Jul 15, 2026
austin3dickey
left a comment
Contributor
There was a problem hiding this comment.
The fix makes sense to me and I couldn't get it to break manually!
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fix the Windows session picker occasionally failing to open, which surfaced as
a flaky "Open Session QuickPick Menu ... toBeVisible() failed" e2e failure.
selectNewLanguageRuntimeawaitedfetchContributedItems()before callingquickPick.show(). Once runtime discovery is complete, that fetch calls eachpicker contribution's
getItems()-- for positron-python this is anextension-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-widgetnever enters the DOM until the fix.Release Notes
New Features
Bug Fixes
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
mainand 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.