Skip to content

feat(issueReporter): improve wizard destinations and attachments - #342852

Merged
Giuseppe Cianci (Giuspepe) merged 7 commits into
mainfrom
agents/issue-reporter-redirect-issue-check
Oct 21, 2026
Merged

Giuseppe Cianci (Giuspepe) merged 7 commits into
mainfrom
agents/issue-reporter-redirect-issue-check

Conversation

@Giuspepe

@Giuspepe Giuseppe Cianci (Giuspepe) commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Why

The new issue reporter needs an explicit repository choice and a way to attach existing images and videos. Recording failures must leave the reporter usable.

Related to #327380, #326787, #326371, and #326786.

What changed

  • Add issueReporter.additionalRepositories and an inline repository picker. Preserve public defaults, explicit private targets, and repository-specific upload caches.
  • Support image and video paste/drop, including image paste into the description. Reserve pending attachment slots and keep owned videos in the profile's existing trusted storage root with input-scoped cleanup.
  • Recover from recording permission/start/stop failures. Hide the duplicate Chat palette entry while preserving its command ID. Simplify repository deduplication and preview URL construction.

Scope

This changes the new wizard only. The classic reporter remains unchanged relative to the merged main revision. The separate AI troubleshooting prototype and form redesign are not included.

Verification

  • npm run build-fast -- --client-only and npm run typecheck-client: passed. Targeted ESLint and commit hygiene passed.
  • ./scripts/test.sh --runGlob '**/{workbench/contrib/issue,platform/protocol}/test/**/*.test.js' --reporter dot: 289 passed, including real MP4/WebM encode/decode and native resource-boundary tests.
  • npm run test-browser-no-install -- --browser webkit --run src/vs/workbench/contrib/issue/test/browser/issueReporterMedia.test.ts --run src/vs/workbench/contrib/issue/test/browser/issueFormService.test.ts --reporter dot: 59 passed.
  • npm run test-browser-no-install -- --browser firefox --run src/vs/workbench/contrib/issue/test/browser/issueReporterMedia.test.ts --run src/vs/workbench/contrib/issue/test/browser/issueFormService.test.ts --reporter dot: 59 passed.
  • npm run test-browser-no-install -- --browser chromium --run src/vs/workbench/contrib/issue/test/browser/issueReporterMedia.test.ts --run src/vs/workbench/contrib/issue/test/browser/issueFormService.test.ts --reporter dot: 59 passed.
  • From extensions/copilot, npm run test:unit -- src/extension/conversation/vscode-node/test/feedbackContribution.spec.ts --reporter=dot: 6 passed.
  • ./scripts/test.sh --run src/vs/platform/github/test/common/githubChannel.test.ts --grep 'anonymous|cancel|lease' --reporter dot: 67 passed.

Independent review caught and verified fixes for browser-specific test fixtures and WebM/MOV loading outside approved native resource roots. Production protocol guards and CSP remain unchanged.

Fresh Editor and Agents runs passed 21 UI steps, including real file-backed imports from outside the application root, repository selection, annotation, and review/navigation. A captioned product demo and a narrated PR walkthrough were recorded locally. No GitHub issue or upload was created.

Signed macOS screen-capture permissions, actual OS screen capture, private uploads, and live AI title generation remain unverified. The latest Windows unit job failed in an unchanged upstream downloader retry test; a targeted rerun was requested.

How to test

  1. Enable issueReporter.wizard.enabled. Set issueReporter.additionalRepositories to ["microsoft/vscode-internalbacklog", "my-org/feedback"].
  2. Open Help: Report Issue. Paste or drop an image/video, then paste an image with text into the description.
  3. Use the inline repository menu, navigate back and forward, and confirm the review and preview URL use the selected repository. Test in Editor and Agents windows.
  4. Leave the list empty or disable the wizard to check that the normal destination and classic reporter behavior remain unchanged.

Add configurable GitHub repository choices through an inline wizard picker and retire the duplicate Chat palette entry. Keep the classic reporter unchanged.

Support pasted and dropped images and videos, preserve attachment limits during pending work, and improve recording permission and lifecycle recovery. Cover routing, privacy, media import and recording behavior with focused regression tests.

Co-authored-by: Copilot <[email protected]>
Integrate main at 93f79a2. Preserve the wizard target and media tests while adopting the shared GitHub search client and utility-model title service.

Co-authored-by: Copilot <[email protected]>
Reuse ordered deduplication and keep body encoding and template selection in one place. Characterize preview query and fragment preservation before simplifying the helpers.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 20, 2026 11:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

An attachment-format defect remains, and signed macOS permissions and live private uploads still need product-level verification.

1 open issue
What changed in this PR

Improves the issue reporter wizard with explicit repository selection, existing media attachments, and recording recovery.

Changes:

  • Adds repository choices and destination-specific upload caching.
  • Supports image/video paste and drop, with validation and attachment limits.
  • Handles recording failures and hides the duplicate Chat palette entry.
File Description
src/​vs/​workbench/​test/​electron-browser/​workbenchTestServices.ts Adds permission-request stub.
src/​vs/​workbench/​contrib/​issue/​test/​electron-browser/​nativeRecordingService.test.ts Tests recording lifecycle and playback.
src/​vs/​workbench/​contrib/​issue/​test/​electron-browser/​issueService.test.ts Tests repository configuration and routing.
src/​vs/​workbench/​contrib/​issue/​test/​electron-browser/​issueReporterRecording.test.ts Tests recording recovery.
src/​vs/​workbench/​contrib/​issue/​test/​common/​issueReporterTarget.test.ts Tests destination resolution.
src/​vs/​workbench/​contrib/​issue/​test/​common/​issueReporterMediaFixtures.ts Adds media fixtures.
src/​vs/​workbench/​contrib/​issue/​test/​browser/​recordingService.test.ts Tests permission guidance and web fallback.
src/​vs/​workbench/​contrib/​issue/​test/​browser/​issueReporterRepositoryPicker.test.ts Tests picker layout and keyboard access.
src/​vs/​workbench/​contrib/​issue/​test/​browser/​issueReporterOverlay.test.ts Tests attachments and repository navigation.
src/​vs/​workbench/​contrib/​issue/​test/​browser/​issueReporterMedia.test.ts Tests media validation and decoding.
src/​vs/​workbench/​contrib/​issue/​test/​browser/​issueFormService.test.ts Tests uploads, caching, and previews.
src/​vs/​workbench/​contrib/​issue/​electron-browser/​nativeRecordingService.ts Hardens recording lifecycle and cleanup.
src/​vs/​workbench/​contrib/​issue/​electron-browser/​issueService.ts Loads configured repositories.
src/​vs/​workbench/​contrib/​issue/​electron-browser/​issueReporterEditorPane.ts Coordinates imports and recording recovery.
src/​vs/​workbench/​contrib/​issue/​electron-browser/​issue.contribution.ts Registers repository setting.
src/​vs/​workbench/​contrib/​issue/​common/​issueReporterTarget.ts Centralizes destination and URL handling.
src/​vs/​workbench/​contrib/​issue/​common/​issue.ts Extends repository-selection data.
src/​vs/​workbench/​contrib/​issue/​browser/​recordingService.ts Extends recording permission contracts.
src/​vs/​workbench/​contrib/​issue/​browser/​media/​issueReporterRepositoryPicker.css Styles inline repository picker.
src/​vs/​workbench/​contrib/​issue/​browser/​media/​issueReporterOverlay.css Styles attachment feedback and focus.
src/​vs/​workbench/​contrib/​issue/​browser/​issueReporterRepositoryPicker.ts Implements accessible repository menu.
src/​vs/​workbench/​contrib/​issue/​browser/​issueReporterMedia.ts Adds media detection and decoding.
src/​vs/​workbench/​contrib/​issue/​browser/​issueReporterEditorInput.ts Tracks imported-file ownership.
src/​vs/​workbench/​contrib/​issue/​browser/​issueFormService.ts Isolates uploads by destination.
src/​vs/​platform/​native/​electron-main/​nativeHostMainService.ts Requests macOS capture access.
src/​vs/​platform/​native/​common/​native.ts Declares capture-permission API.
extensions/​copilot/​src/​extension/​conversation/​vscode-node/​test/​feedbackContribution.spec.ts Tests feedback routing and command visibility.
extensions/​copilot/​src/​extension/​conversation/​vscode-node/​feedbackReporter.ts Preserves explicit private-report intent.
extensions/​copilot/​src/​extension/​conversation/​vscode-node/​feedbackContribution.ts Sets public primary destination.
extensions/​copilot/​package.json Hides duplicate palette entry.

Review effort: Balanced

Use authentic WebP and VP8 WebM data instead of relying on browser-specific canvas encoders or tiny VP9 decoding. Load WebM test media through disposable Blob URLs while preserving the MIME, thumbnail, duration, and cleanup assertions.

Co-authored-by: Copilot <[email protected]>
Keep owned imports and recordings in the default profile's existing global storage root so the native resource protocol can load WebM and MOV files. Preserve input-owned cleanup without broadening protocol access.

Add regression coverage through the real native resource guard, including rejection of unowned paths outside approved roots.

Co-authored-by: Copilot <[email protected]>
Keep import success feedback in screen-reader announcements instead of persistent wizard text. Preserve visible progress and errors.

Decode serialized JSON arrays for array-valued setting experiments so team assignments can supply additional repositories while the unassigned default remains empty. Reject invalid treatment values without retaining stale defaults or overriding explicit user choices.

Co-authored-by: Copilot <[email protected]>
Preserve screen-capture permission requests alongside the upstream native clipboard image API.

Co-authored-by: Copilot <[email protected]>
@Giuspepe
Giuseppe Cianci (Giuspepe) marked this pull request as ready for review October 21, 2026 18:30
@Giuspepe
Giuseppe Cianci (Giuspepe) merged commit d63e5be into main Oct 21, 2026
59 checks passed
@Giuspepe
Giuseppe Cianci (Giuspepe) deleted the agents/issue-reporter-redirect-issue-check branch October 21, 2026 18:55
@vs-code-engineering vs-code-engineering Bot added this to the 1.144.0 milestone Oct 21, 2026
@bryanchen-d

Copy link
Copy Markdown
Collaborator

Giuseppe Cianci (@Giuspepe) heads-up: this change breaks Unit Tests (Electron) in the product build on every platform (Linux x64, Windows x64, macOS arm64), so main CI has been red since it merged.

  • Main CI 487717 on b8527c9712 and manual insider 487719: 14 failing tests, all in IssueFormService, for example uploads all supported imported image formats with matching MIME types and extensions.
  • The diff is only repository casing: the tests in src/vs/workbench/contrib/issue/test/browser/issueFormService.test.ts hardcode microsoft/vscode, but the product build's product.json (with distro) yields Microsoft/vscode. PR CI uses the OSS product.json, which is why it passed there.

Could you fix forward, for example by deriving the expected repository from the same product configuration the service reads, or by comparing case-insensitively? The 23:00 UTC insider will fail the same way otherwise. We're preparing a test-only fix-forward draft in case it helps.

Co-authored with Copilot

@bryanchen-d

Copy link
Copy Markdown
Collaborator

Giuseppe Cianci (@Giuspepe) since this merged, main has been red in the product build (ADO def 111, for example main CI 487717 and 487749). Unit Tests (Electron) fails 14 tests on Linux, macOS and Windows. PR CI didn't catch either cause, because it uses the OSS product.json and the public Electron release. A revert has been recommended so tonight's insider isn't lost. Here are the details for the re-land.

1. WebM decoding fails on the Electron we ship (4 tests). The distro's product.json sets electronArtifactFeed: vscode-electron-prebuilt, so product builds use the Microsoft-built Electron from that feed (build/lib/electron.ts). On that runtime, a VP8 WebM doesn't decode in a <video> element on any OS:

  • Issue reporter media decoding › decodes real webm or explicitly rejects an unsupported container… and does not invent a duration for a playable WebM recording…. Both fail with The video could not be decoded from the HTMLVideoElement error handler in issueReporterMedia.ts.
  • Issue reporter media import lifecycle › does not present Chromium's last-frame estimate… (durationMs of undefined).
  • NativeRecordingService › encodes and decodes playable video/webm without OS capture. It records with MediaRecorder and then can't decode its own output.

All of these pass on the public Electron, including with --build. So recording attachments and WebM imports probably don't work in real Insiders builds. Before re-landing, please run these on the feed Electron, or decide what the product should do when WebM can't be decoded there. I couldn't download the feed Electron on my machine, so the shipped-runtime part is inferred from CI on all 3 OSes, not reproduced locally.

2. Repository casing (10 tests). The distro's reportIssueUrl is https://github.com/Microsoft/vscode/issues/new (capital M). The service correctly keeps the product's spelling and matches repositories case-insensitively, but the IssueFormService and IssueReporterOverlay tests hardcode microsoft/vscode. The test-only patch below reads the expected repository from product.reportIssueUrl. With Microsoft swapped into product.json locally, the old tests fail (5+5) and the patched ones pass (21/21 and 43/43). They also pass with the OSS spelling. Feel free to fold it into the re-land.

Patch (test-only)
diff --git a/src/vs/workbench/contrib/issue/test/browser/issueFormService.test.ts b/src/vs/workbench/contrib/issue/test/browser/issueFormService.test.ts
index 0eb27cbbebe..f5a3ba65376 100644
--- a/src/vs/workbench/contrib/issue/test/browser/issueFormService.test.ts
+++ b/src/vs/workbench/contrib/issue/test/browser/issueFormService.test.ts
@@ -36,6 +36,9 @@ import { IIssueSubmissionHost, IssueReporterData, IssueSource } from '../../comm
 import { internalIssueReporterUrl } from '../../common/issueReporterTarget.js';
 import { issueReporterAvifFixture, issueReporterGifFixture, issueReporterImageFixture, issueReporterVideoFixtures, issueReporterWebpFixture } from '../common/issueReporterMediaFixtures.js';
 
+/** The product's public issue repository as `product.json` spells it: the distro uses `Microsoft/vscode`, the OSS build `microsoft/vscode`. */
+const productRepository = new URL(product.reportIssueUrl!).pathname.split('/').slice(1, 3).join('/');
+
 suite('IssueFormService', () => {
 	const store = ensureNoDisposablesAreLeakedInTestSuite();
 
@@ -135,11 +138,11 @@ suite('IssueFormService', () => {
 		const { service, host, data, mediaUploads } = createSubmissionService(false, false, { screenshots: sources.map(dataUrl => ({ dataUrl })), recordings: [] });
 		await service.submitIssue(host, data, 'Imported images', 'Description');
 		assert.deepStrictEqual(mediaUploads, [
-			{ repository: 'microsoft/vscode', name: 'screenshot-1.png', contentType: 'image/png' },
-			{ repository: 'microsoft/vscode', name: 'screenshot-2.jpg', contentType: 'image/jpeg' },
-			{ repository: 'microsoft/vscode', name: 'screenshot-3.gif', contentType: 'image/gif' },
-			{ repository: 'microsoft/vscode', name: 'screenshot-4.webp', contentType: 'image/webp' },
-			{ repository: 'microsoft/vscode', name: 'screenshot-5.avif', contentType: 'image/avif' },
+			{ repository: productRepository, name: 'screenshot-1.png', contentType: 'image/png' },
+			{ repository: productRepository, name: 'screenshot-2.jpg', contentType: 'image/jpeg' },
+			{ repository: productRepository, name: 'screenshot-3.gif', contentType: 'image/gif' },
+			{ repository: productRepository, name: 'screenshot-4.webp', contentType: 'image/webp' },
+			{ repository: productRepository, name: 'screenshot-5.avif', contentType: 'image/avif' },
 		]);
 	});
 
@@ -150,8 +153,8 @@ suite('IssueFormService', () => {
 		screenshot.annotatedDataUrl = issueReporterImageFixture;
 		await service.submitIssue(host, data, 'After annotation', 'Description');
 		assert.deepStrictEqual(mediaUploads, [
-			{ repository: 'microsoft/vscode', name: 'screenshot-1.gif', contentType: 'image/gif' },
-			{ repository: 'microsoft/vscode', name: 'screenshot-1.png', contentType: 'image/png' },
+			{ repository: productRepository, name: 'screenshot-1.gif', contentType: 'image/gif' },
+			{ repository: productRepository, name: 'screenshot-1.png', contentType: 'image/png' },
 		]);
 	});
 
@@ -171,14 +174,14 @@ suite('IssueFormService', () => {
 				return { path: url.pathname, labels: url.searchParams.get('labels'), assignees: url.searchParams.get('assignees'), template: url.searchParams.get('template'), privateLinks: url.searchParams.get('body')?.includes('/attachments/owner/private-reports/') };
 			}),
 		}, {
-			mediaUploads: ['owner/private-reports', 'microsoft/vscode'].flatMap(repository => [
+			mediaUploads: ['owner/private-reports', productRepository].flatMap(repository => [
 				{ repository, name: 'recording-1.mp4', contentType: 'video/mp4' },
 				{ repository, name: 'recording-2.webm', contentType: 'video/webm' },
 				{ repository, name: 'recording-3.mov', contentType: 'video/quicktime' },
 			]),
 			previews: [
 				{ path: '/owner/private-reports/issues/new', labels: 'internal', assignees: 'maintainer', template: null, privateLinks: true },
-				{ path: '/microsoft/vscode/issues/new', labels: null, assignees: null, template: 'bug_report.md', privateLinks: false },
+				{ path: `/${productRepository}/issues/new`, labels: null, assignees: null, template: 'bug_report.md', privateLinks: false },
 				{ path: '/owner/private-reports/issues/new', labels: 'internal', assignees: 'maintainer', template: null, privateLinks: true },
 			],
 		});
@@ -222,15 +225,15 @@ suite('IssueFormService', () => {
 				};
 			}),
 		}, {
-			repositories: ['microsoft/vscode', 'microsoft/vscode-internalbacklog'],
+			repositories: [productRepository, 'microsoft/vscode-internalbacklog'],
 			uploads: [
-				{ repository: 'microsoft/vscode', names: ['screenshot-1.png'] },
+				{ repository: productRepository, names: ['screenshot-1.png'] },
 				{ repository: 'microsoft/vscode-internalbacklog', names: ['screenshot-1.png'] },
 			],
-			previews: ['vscode', 'vscode-internalbacklog', 'vscode'].map(repository => ({
-				path: `/microsoft/${repository}/issues/new`,
+			previews: [productRepository, 'microsoft/vscode-internalbacklog', productRepository].map(repository => ({
+				path: `/${repository}/issues/new`,
 				title: 'Title #1',
-				body: `Description & details\n\n### Attachments\n\n![screenshot-1.png](https://github.com/attachments/microsoft/${repository}/screenshot-1.png)\n\n`,
+				body: `Description & details\n\n### Attachments\n\n![screenshot-1.png](https://github.com/attachments/${repository}/screenshot-1.png)\n\n`,
 				template: 'bug_report.md',
 			})),
 		});
@@ -272,14 +275,14 @@ suite('IssueFormService', () => {
 				return { path: url.pathname, body: url.searchParams.get('body') };
 			}),
 		}, {
-			repositories: ['microsoft/vscode', 'microsoft/vscode-internalbacklog', 'microsoft/vscode-internalbacklog'],
+			repositories: [productRepository, 'microsoft/vscode-internalbacklog', 'microsoft/vscode-internalbacklog'],
 			uploads: [
-				{ repository: 'microsoft/vscode', names: ['issue-data.md'] },
+				{ repository: productRepository, names: ['issue-data.md'] },
 				{ repository: 'microsoft/vscode-internalbacklog', names: ['issue-data.md'] },
 			],
-			previews: ['vscode', 'vscode-internalbacklog', 'vscode-internalbacklog'].map(repository => ({
-				path: `/microsoft/${repository}/issues/new`,
-				body: `Description\n\n### Additional Issue Data\n\n[issue-data.md](https://github.com/attachments/microsoft/${repository}/issue-data.md)\n\n<!-- generated by issue reporter -->`,
+			previews: [productRepository, 'microsoft/vscode-internalbacklog', 'microsoft/vscode-internalbacklog'].map(repository => ({
+				path: `/${repository}/issues/new`,
+				body: `Description\n\n### Additional Issue Data\n\n[issue-data.md](https://github.com/attachments/${repository}/issue-data.md)\n\n<!-- generated by issue reporter -->`,
 			})),
 		});
 	});
diff --git a/src/vs/workbench/contrib/issue/test/browser/issueReporterOverlay.test.ts b/src/vs/workbench/contrib/issue/test/browser/issueReporterOverlay.test.ts
index 8f3035e3746..f266d5296b6 100644
--- a/src/vs/workbench/contrib/issue/test/browser/issueReporterOverlay.test.ts
+++ b/src/vs/workbench/contrib/issue/test/browser/issueReporterOverlay.test.ts
@@ -35,6 +35,9 @@ import { ISimilarIssue, IssueReporterData, IssueSource, IssueType } from '../../
 import { internalIssueReporterUrl, resolveIssueReporterTarget } from '../../common/issueReporterTarget.js';
 import product from '../../../../../platform/product/common/product.js';
 
+/** The product's public issue repository as `product.json` spells it: the distro uses `Microsoft/vscode`, the OSS build `microsoft/vscode`. */
+const productRepository = new URL(product.reportIssueUrl!).pathname.split('/').slice(1, 3).join('/');
+
 const nesContext = `# Inline Edits Debug Info
 
 ## Result:
@@ -545,7 +548,7 @@ suite('IssueReporterOverlay', () => {
 				menu: !!container.querySelector('.issue-reporter-repository-picker'),
 				section: !!container.querySelector('.wizard-repository-field'),
 				target: container.querySelector('.wizard-target-status')?.textContent,
-			}, { menu: false, section: false, target: 'Issue will be opened in microsoft/vscode' });
+			}, { menu: false, section: false, target: `Issue will be opened in ${productRepository}` });
 		});
 	}
 
@@ -558,7 +561,7 @@ suite('IssueReporterOverlay', () => {
 			destination: data.issueRepository,
 			menu: !!container.querySelector('.issue-reporter-repository-picker'),
 			target: container.querySelector('.wizard-target-status')?.textContent,
-		}, { source: IssueSource.AgentsWindow, destination: undefined, menu: true, target: 'Issue will be opened in microsoft/vscode' });
+		}, { source: IssueSource.AgentsWindow, destination: undefined, menu: true, target: `Issue will be opened in ${productRepository}` });
 	});
 
 	test('late extension reporter overrides do not replace the selected product destination', async () => {
@@ -639,9 +642,9 @@ suite('IssueReporterOverlay', () => {
 		}, {
 			initial: {
 				actions: [
-					{ label: 'microsoft/vscode', checked: true }, { label: 'owner/second', checked: false }, { label: 'team/third', checked: false },
+					{ label: productRepository, checked: true }, { label: 'owner/second', checked: false }, { label: 'team/third', checked: false },
 				],
-				expanded: 'true', role: 'button', popup: 'menu', label: 'Choose Issue Repository: microsoft/vscode', section: false,
+				expanded: 'true', role: 'button', popup: 'menu', label: `Choose Issue Repository: ${productRepository}`, section: false,
 			},
 			focusRestored: true,
 			destination: 'team/third',

Co-authored with Copilot

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.

4 participants