Use menu title actions instead of PositronActionBar for the Packages pane#12950
Merged
bricestacey merged 14 commits intomainfrom Apr 14, 2026
Merged
Use menu title actions instead of PositronActionBar for the Packages pane#12950bricestacey merged 14 commits intomainfrom
bricestacey merged 14 commits intomainfrom
Conversation
|
E2E Tests 🚀 |
bricestacey
commented
Apr 10, 2026
| await MultiStepInput.run(accessor, (input) => pickVersion(input, state), cts); | ||
| } else { | ||
| await MultiStepInput.run(accessor, (input) => showLoading(input, state), cts); | ||
| await MultiStepInput.run(accessor, (input) => pickPackage(input, state), cts); |
Contributor
Author
There was a problem hiding this comment.
the changes to this file fix an unrelated bug where Update and Uininstall commands don't work correctly form the command palette.
bricestacey
commented
Apr 10, 2026
| updateBusy(); | ||
| })); | ||
| } | ||
|
|
Contributor
Author
There was a problem hiding this comment.
this seems convoluted, but it kinda just maintains the status quo, delegating the state to the context key.
I am open to improving this, but just not sure the right way forward.
Replace the React-based PositronActionBar with VSCode's native MenuId.ViewTitle menu system. Actions now appear in the view title bar: - Refresh as an icon button in the navigation group - Install, Update All, Update, Uninstall in the overflow menu Add context keys to control action enablement: - positronPackages.hasActiveSession - positronPackages.isBusy - positronPackages.hasSelectedPackage See #12922
Move busy/session checks from menu 'when' (visibility) to action 'precondition' (enablement) so actions are disabled when busy instead of hidden. See #12922
When Update/Uninstall commands are invoked from the ViewTitle menu, they now use the selected package from the service instead of requiring a command argument. This restores the previous behavior where selecting a package in the list would allow Update/Uninstall to operate on that package. - Add selectedPackage property and setSelectedPackage() to service - Update listPackages.tsx to set selected package via service - Update commands to use service.selectedPackage as fallback See #12922
Separate global command availability from menu visibility: - Commands use simple precondition (POSITRON_PACKAGES_ENABLED) for global access - Menu items use `when` clause to hide when no package selected See #12922
- Remove showLoading functions that created unawaited quick picks, causing the CancellationTokenSource to be canceled when replaced - Use package name instead of displayName for API calls - Remove selectedPackage fallback from command handlers See #12922
- Add UpdateSelectedPackageAction and UninstallSelectedPackageAction wrapper commands that pass the selected package to the main commands when invoked from the ViewTitle menu - Keep main Update/Uninstall commands for command palette (always show quick pick) - Simplify selectedPackage from boolean context key + property to a single string context key - Add PACKAGES_CAN_RUN_ACTION precondition to Update/Uninstall commands See #12922
Move PACKAGES_HAS_SELECTION from menu `when` clause to `precondition` so Update/Uninstall menu items are visible but disabled (grayed out) when no package is selected, rather than hidden. See #12922
- Delete unused PackagesInstanceMenuButton component - Update e2e test to not check for version button (no longer exists) - Minor style: use Boolean() instead of !! for context key See #12922
a63862c to
896706e
Compare
The Package Actions dropdown was removed in favor of ViewTitle menu actions. Update the page object to click the overflow menu (More Actions button) and select Install Package from there. See #12922
- Use contextMenu.triggerAndClick() for robust menu handling across native and web contexts - Wait for API search results before selecting package - Use selectQuickInputElementContaining for partial match on results See #12922
softwarenerd
previously approved these changes
Apr 13, 2026
| @@ -38,14 +48,21 @@ export class PositronPackagesService extends Disposable implements IPositronPack | |||
| * @param _runtimeSessionService The language runtime service. | |||
| * @param _editorService The editor service. | |||
Contributor
There was a problem hiding this comment.
Stale parameter - no longer used.
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.
See #12922
This PR uses the built-in vscode title menu actions instead of the PositronActionBar. The result is that the action buttons appear on the same row as the view's title. This behavior will provide a more native and consistent experience with vscode.
This also removes the active session label. Users should use the session picker in the top right to understand the current foreground session.
QA Notes
Behavior should basically be the same as before.
@:packages-pane