Repository navigation
feat(issueReporter): improve wizard destinations and attachments - #342852
Conversation
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]>
There was a problem hiding this comment.
🔵 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]>
|
Giuseppe Cianci (@Giuspepe) heads-up: this change breaks
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.
|
|
Giuseppe Cianci (@Giuspepe) since this merged, main has been red in the product build (ADO def 111, for example main CI 487717 and 487749). 1. WebM decoding fails on the Electron we ship (4 tests). The distro's
All of these pass on the public Electron, including with 2. Repository casing (10 tests). The distro's 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\n\n`,
+ body: `Description & details\n\n### Attachments\n\n\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',
|

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
issueReporter.additionalRepositoriesand an inline repository picker. Preserve public defaults, explicit private targets, and repository-specific upload caches.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-onlyandnpm 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.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
issueReporter.wizard.enabled. SetissueReporter.additionalRepositoriesto["microsoft/vscode-internalbacklog", "my-org/feedback"].