issueReporter: fix branded-build media and repository tests #343343

Merged
Giuspepe opened 3:51pm on October 21, 2026 wanted to merge 241 Δ into microsoft/vscode main from
agents/fix-issue-reporter-ci-media

Pull Request Overview

  • Opened on October 21, 2026
  • Status Merged
  • Commit count 1 with first commit October 21, 2026

Total Delta

241 Total Diff Delta

Open Days

Open 9 weekdays

Test Delta

169 Diff Delta in Test Files
Breakdown by Phase

How long has this pull request spent in each phase of its lifecycle?

Fraction of total time Business days Phase
 
0.0 days Authoring 1 commit before pull request opened for review
 
0.0 days Awaiting first review
 
9.0 days Merge to deploy (still awaiting deployment)

Total time for pull request 0.0 business days from first commit authored to merge
Still awaiting deployment

Author avatar

issueReporter: fix branded-build media and repository tests

Problem

Fixes https://github.com/microsoft/vscode-engineering/issues/4294

The tests assumed the OSS product URL's lowercase owner and WebM playback availability. Branded builds use Microsoft/vscode, and encoder support alone does not establish that recorded video can be played back.

Fix


  • Derive product-dependent expectations from the configured destination and retain explicit mixed-case routing/deduplication coverage.

  • Require both encoder and decoder support when selecting recording formats, with fallback from an unusable preference.

  • Keep real codec tests enabled. Supported formats must decode; unsupported fixtures must explicitly reject. Isolate the missing-duration import test from codec availability.

No tests are disabled. Production repository display casing and media-resource access rules remain unchanged.

Validation



  • npm run build-fast -- --client-only: passed.


  • npm run typecheck-client: passed.

  • Targeted ESLint on all seven changed files and git diff --check: passed.

  • The implementation run passed 204 tests across the six affected suites. Independent official Electron runs passed 114 media/import/recording tests and 11 affected form/overlay/capitalization checks, with no failures or skips.

Validation used macOS OSS Electron. The exact Microsoft Electron download was blocked by package-feed ReadPackages access. Branded Windows, macOS, and Linux CI must confirm recovery; this PR does not claim that build 487717 is fixed before that run.

Comments Threads Pending Resolution

ljharb reviewed on October 21, 2026
ljharb left a comment

> [!WARNING]
> Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a `copilot-code-review.yml` file specifying one with the `runs-on` attribute. See the [docs](https://gh.io/AA11tgch) for more details.

## Copilot review overview

4 open issues

- Medium severity [`isSupported` now calls `getSupportedFormats()`, which (via `canPlayType`) allocates a new…](https://github.com/microsoft/vscode/pull/343343#discussion_r4341991647) · New
- Medium severity [`isSupported` now calls `getSupportedFormats()`, which (via `canPlayType`) allocates a new…](https://github.com/microsoft/vscode/pull/343343#discussion_r4341991709) · New
- Medium severity [The fallback to the generic `video/webm` MIME type can still allow a mismatch between what the…](https://github.com/microsoft/vscode/pull/343343#discussion_r4341991774) · New
- Medium severity [This stub bypasses decoding and returns a fixed `durationMs`, which makes the earlier byte-level…](https://github.com/microsoft/vscode/pull/343343#discussion_r4341991854) · New

What changed in this PR

Fixes issue reporter failures in branded builds by aligning repository-casing expectations with configured product URLs and improving media recording/decoding test reliability across environments.

**Changes:**
- Make recording format selection require both MediaRecorder encoder support and HTML video decoder support, with fallback when a preferred format is unusable.
- Update issue reporter repository tests to preserve configured casing while deduplicating case-insensitively.
- Adjust media import/decoding tests to be less sensitive to platform codec availability and provide clearer decode failure diagnostics.

| File | Description |
| ---- | ----------- |
| src/​vs/​workbench/​contrib/​issue/​electron-browser/​nativeRecordingService.ts | Filters supported recording formats by both recording and playback capability; adjusts isSupported/startRecording logic accordingly. |
...

src/vs/workbench/contrib/issue/electron-browser/nativeRecordingService.ts
21
export class NativeRecordingService extends Disposable implements IRecordingService {
22
	readonly _serviceBrand: undefined;
23
	get isSupported(): boolean {
23 24
		return
 !!this.getMediaDevices()?.getDisplayMedia
 && this.getSupportedFormats().length > 0
;
src/vs/workbench/contrib/issue/electron-browser/nativeRecordingService.ts
104
			}
96 105
			if 
(this.isFormatSupported
(MediaRecorder
, 
'video/webm;codecs=vp9')) {
106
				formats.push({ mimeType: 'video/webm;codecs=vp9', label: 'WebM', extension: 'webm' });
98 107
			} else if (
this.isFormatSupported(
MediaRecorder
, 
'video/webm')) {
108
				formats.push({ mimeType: 'video/webm', label: 'WebM', extension: 'webm' });
src/vs/workbench/contrib/issue/electron-browser/nativeRecordingService.ts
80
		return typeof navigator === 'undefined' ? undefined : navigator.mediaDevices;
81
	}
82
83
	protected canPlayType(mimeType: string): boolean {
Unspecified Git Hub Copilot Model
84
		return mainWindow.document.createElement('video').canPlayType(mimeType) !== '';
Unspecified Git Hub Copilot Model
src/vs/workbench/contrib/issue/test/electron-browser/issueReporterMediaImport.test.ts
703
		const bytes = new Uint8Array(decodeBase64(issueReporterVideoFixtures.webm).buffer);
704
		const durationTag = bytes.findIndex((value, index) => value === 0x44 && bytes[index + 1] === 0x89 && bytes[index + 2] === 0x88);
705
		bytes[durationTag] = 0xEC;
706
		pane.videoDecoder = async () => ({ width: 48, height: 32, durationMs: 500, thumbnailDataUrl: issueReporterImageFixture });

Resolved Comment Threads

No resolved comments have been left on this PR.