Release notes: skip Insiders draft on stable builds#298206
Release notes: skip Insiders draft on stable builds#298206RajeshKumar11 wants to merge 7 commits intomicrosoft:mainfrom
Conversation
Fixes microsoft#292861 When a new stable release ships, the release notes URL (code.visualstudio.com/raw/v{major}_{minor}.md) may still serve the Insiders draft until the stable notes are published. Insiders drafts carry "Insiders" in the first heading, e.g. "# February 2026 Insiders (version 1.110)". Add `isInsidersReleaseNotes()` that detects this marker and, on stable builds (`quality === 'stable'`), throw 'not found' so the release notes panel is silently suppressed instead of showing Insiders content.
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @alexr00Matched files:
@joaomorenoMatched files:
|
There was a problem hiding this comment.
Pull request overview
This pull request fixes an issue where stable VS Code builds incorrectly display Insiders release notes. This occurs when a new stable release ships before the final stable release notes are published to code.visualstudio.com, causing the API to serve the Insiders draft instead.
Changes:
- Added detection logic to identify Insiders release notes by checking if the first heading contains "Insiders"
- Stable builds now reject Insiders release notes and silently skip displaying them (same behavior as a 404)
- Added comprehensive unit tests for the detection logic
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/vs/workbench/contrib/update/browser/releaseNotesEditor.ts | Adds isInsidersReleaseNotes() helper function with regex-based detection and integrates it into the release notes fetch logic to reject Insiders drafts on stable builds |
| src/vs/workbench/contrib/update/test/browser/releaseNotesRenderer.test.ts | Adds 4 unit tests covering Insiders heading detection, stable heading, Insiders in body only, and empty string edge cases |
|
@ntrogh is this the best way to check if the release notes are insiders? |
|
@RajeshKumar11 @alexr00 We have added a It's an Insiders release note if this field equals ---
Order: 119
TOCTitle: Insiders
PageTitle: "Visual Studio Code February 2026 (Insiders)"
MetaDescription: Learn what is new in the Visual Studio Code February 2026 Release (1.110).
MetaSocialImage: 1_110/vscode-insiders-header.webp
Date: 2026-03-04
DownloadVersion: 1.110.0
Milestone: February 2026
ProductEdition: Insiders
--- |
ntrogh
left a comment
There was a problem hiding this comment.
@RajeshKumar11 See comment about frontmatter field ProductEdition
Use the `ProductEdition: Insiders` YAML front-matter field as the canonical signal for Insiders release notes, falling back to the heading-text heuristic only when front-matter has been stripped (e.g. by the code.visualstudio.com/raw/ endpoint). Fixes review feedback on microsoft#292861.
|
Thanks @ntrogh! Updated in the latest commit to use The
This way the stable build correctly filters out Insiders notes regardless of which endpoint serves them. Tests updated to cover both paths. |
Why do we need this? I would expect that we're always using the same endpoint, and so can expect the front matter to be there. |
|
@alexr00 The endpoint used is if (!text || (!/^#\s/.test(text) && !useCurrentFile)) {
throw new Error('Invalid release notes');
}If front-matter were present, the fetched text would start with If the intent is to rely solely on |
Remove the heading-text fallback from isInsidersReleaseNotes(). The canonical signal is the `ProductEdition: Insiders` YAML front-matter field; no heuristic fallback is needed. Also update the format validation to accept content that begins with YAML front-matter (`---`) in addition to a heading (`# `).
|
Updated — the heading fallback is removed. |
Fixes #292861
Problem
When a new stable release ships,
code.visualstudio.com/raw/v{major}_{minor}.mdmay still serve the Insiders draft until the stable release notes are published. Stable users would see incorrect "Insiders" release notes.Confirmed live — fetching
v1_110.mdtoday returns:Fix
Insiders drafts always contain
Insidersin the first heading. After fetching, onquality === 'stable'builds, reject the content if the heading matches and let the release notes panel stay closed silently (same behaviour as a 404).Changed files:
releaseNotesEditor.ts— addsisInsidersReleaseNotes()helper (exported for testability) and calls it infetchReleaseNotes()releaseNotesRenderer.test.ts— adds 4 unit tests for the helper covering Insiders heading, stable heading, "Insiders" in body only, and empty stringTest plan
v{version}.mdreturns an Insiders headingquality === 'stable'only)Release notes renderersnapshot tests still pass