Use static product info for Show Release Notes command#296708
Merged
Use static product info for Show Release Notes command#296708
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts update-related command registration/visibility so “Show Release Notes” (and related actions) don’t depend on context keys that may only be populated after the first menubar open, addressing the missing Help menu item on first window load.
Changes:
- Removed release-notes/download URL context keys and their initialization from
ProductContribution. - Updated “Show Release Notes” and “Download” actions to use static product configuration to decide whether to register the actions, instead of menu
when/preconditioncontext expressions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/vs/workbench/contrib/update/browser/update.ts | Removes context keys and the early binding of product URLs into context for menu gating. |
| src/vs/workbench/contrib/update/browser/update.contribution.ts | Switches action visibility/registration logic to be decided via static product config, removing context-key-based conditions. |
Comments suppressed due to low confidence (2)
src/vs/workbench/contrib/update/browser/update.contribution.ts:104
- Gating
registerAction2(ShowReleaseNotesAction)onAVAILABLEmeans the commandupdate.showCurrentReleaseNotesis not registered at all whenproduct.releaseNotesUrlis falsy. That command id is referenced from other parts of the workbench (e.g., built-in extension UI links), so this can turn those links into “command not found”. Prefer always registering the command and only conditionally contributing the Help menu item / visibility.
if (ShowReleaseNotesAction.AVAILABLE) {
registerAction2(ShowReleaseNotesAction);
}
src/vs/workbench/contrib/update/browser/update.contribution.ts:179
DownloadAction.AVAILABLEis computed from the staticproductmodule, but web usesIProductServicewhich can be overridden by an embedder. If an embedder suppliesdownloadUrlviaconfiguration.productConfiguration, this action will never be registered even thoughproductService.downloadUrlexists at runtime. Consider determining availability fromIProductService(e.g., via a contribution) or registering unconditionally and hiding via a context expression that reflectsIProductService.downloadUrl.
static readonly ID = 'workbench.action.download';
static readonly AVAILABLE = !!product.downloadUrl;
joaomoreno
approved these changes
Feb 23, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #236533
Changes
Updated release notes and download commands to follow the same pattern as documentation as suggested in the issue.
Validation
Using a full build verified release notes menu shows up immediately after startup.