Skip to content

Release notes: skip Insiders draft on stable builds#298206

Open
RajeshKumar11 wants to merge 7 commits intomicrosoft:mainfrom
RajeshKumar11:fix/stable-release-notes-no-insiders-292861
Open

Release notes: skip Insiders draft on stable builds#298206
RajeshKumar11 wants to merge 7 commits intomicrosoft:mainfrom
RajeshKumar11:fix/stable-release-notes-no-insiders-292861

Conversation

@RajeshKumar11
Copy link

@RajeshKumar11 RajeshKumar11 commented Feb 27, 2026

Fixes #292861

Problem

When a new stable release ships, code.visualstudio.com/raw/v{major}_{minor}.md may 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.md today returns:

# February 2026 Insiders (version 1.110)

Fix

Insiders drafts always contain Insiders in the first heading. After fetching, on quality === '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 — adds isInsidersReleaseNotes() helper (exported for testability) and calls it in fetchReleaseNotes()
  • releaseNotesRenderer.test.ts — adds 4 unit tests for the helper covering Insiders heading, stable heading, "Insiders" in body only, and empty string

Test plan

  • Build stable VS Code — release notes panel should not appear while v{version}.md returns an Insiders heading
  • Build insider VS Code — release notes panel shows normally (guard is quality === 'stable' only)
  • Existing Release notes renderer snapshot tests still pass

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.
Copilot AI review requested due to automatic review settings February 27, 2026 09:47
@vs-code-engineering
Copy link

vs-code-engineering bot commented Feb 27, 2026

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@alexr00

Matched files:

  • src/vs/workbench/contrib/update/browser/releaseNotesEditor.ts

@joaomoreno

Matched files:

  • src/vs/workbench/contrib/update/browser/releaseNotesEditor.ts

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

@alexr00
Copy link
Member

alexr00 commented Feb 27, 2026

@ntrogh is this the best way to check if the release notes are insiders?

@ntrogh
Copy link
Contributor

ntrogh commented Feb 27, 2026

@RajeshKumar11 @alexr00 We have added a ProductEdition frontmatter field to the release notes to differentiate between Insiders and Stable.

It's an Insiders release note if this field equals Insiders, in all other cases, it's Stable.

---
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
---

Copy link
Contributor

@ntrogh ntrogh left a comment

Choose a reason for hiding this comment

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

@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.
@RajeshKumar11
Copy link
Author

Thanks @ntrogh! Updated in the latest commit to use ProductEdition: Insiders as the canonical signal.

The isInsidersReleaseNotes() function now:

  1. Parses front-matter first — if a --- block is present, it checks ProductEdition: Insiders exclusively (no heading fallback within front-matter content).
  2. Falls back to heading heuristic — for endpoints like code.visualstudio.com/raw/ that strip front-matter before serving, it checks whether the first heading contains the word Insiders.

This way the stable build correctly filters out Insiders notes regardless of which endpoint serves them. Tests updated to cover both paths.

@alexr00
Copy link
Member

alexr00 commented Feb 27, 2026

Falls back to heading heuristic — for endpoints like code.visualstudio.com/raw/ that strip front-matter before serving, it checks whether the first heading contains the word Insiders.

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.

@RajeshKumar11
Copy link
Author

@alexr00 The endpoint used is https://code.visualstudio.com/raw/v{version}.md, and it strips front-matter before serving the content. This is actually proven by the existing validation just above the isInsidersReleaseNotes call (line 231):

if (!text || (!/^#\s/.test(text) && !useCurrentFile)) {
    throw new Error('Invalid release notes');
}

If front-matter were present, the fetched text would start with ---, which would immediately fail this check and never reach isInsidersReleaseNotes(). So for this endpoint the ProductEdition front-matter check is effectively dead code — the heading fallback is the only signal that can fire.

If the intent is to rely solely on ProductEdition, the fix would need to either use a different endpoint that preserves front-matter (e.g. the GitHub raw URL), or relax/remove the !/^#\s/ validation so front-matter can pass through. Happy to make that change if preferred — just let me know which direction to take.

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 (`# `).
@RajeshKumar11
Copy link
Author

Updated — the heading fallback is removed. isInsidersReleaseNotes() now exclusively checks the ProductEdition: Insiders front-matter field. Also updated the format validation to accept content starting with --- (front-matter) in addition to # (heading).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stable release should not show Insiders release notes

4 participants