Repository navigation
Adopt Component Explorer for webview fixtures - #9048
Henning Dieterichs (hediet) wants to merge 4 commits into
Conversation
Add root Webpack tooling, deterministic themed fixtures, scoped same-document rendering, local scroll viewports, and screenshot validation and publication. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
One or more custom setup steps configured for this repository failed during this Copilot code review run: Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review. Note You can configure setup steps for Copilot code review separately from Copilot cloud agent with a |
There was a problem hiding this comment.
🟡 Changes recommended
The new root dependencies are absent from the lockfile, causing the standard npm ci validation path to fail.
1 open finding
What changed in this PR
Adopts Component Explorer for deterministic webview fixtures, local development, and screenshot validation.
Changes:
- Adds 149 themed component and full-view fixtures.
- Adds Explorer build, serving, MCP, and editor integration.
- Adds screenshot capture, artifact retention, and OIDC publication workflow.
| File | Description |
|---|---|
webviews/fixtures/theme.css |
Styles fixture roots. |
webviews/fixtures/styles.d.ts |
Types inline CSS imports. |
webviews/fixtures/fixtureUtils.tsx |
Implements fixture rendering and mocks. |
webviews/fixtures/data.ts |
Provides deterministic fixture data. |
webviews/editorWebview/overview.fixture.tsx |
Adds overview fixtures. |
webviews/createPullRequestViewNew/app.fixture.tsx |
Adds create-PR fixtures. |
webviews/components/timeline.fixture.tsx |
Adds timeline fixtures. |
webviews/components/sidebar.fixture.tsx |
Adds sidebar fixtures. |
webviews/components/pullRequestStack.fixture.tsx |
Adds stack fixtures. |
webviews/components/merge.fixture.tsx |
Adds merge fixtures. |
webviews/components/header.fixture.tsx |
Adds header fixtures. |
webviews/components/dropdown.fixture.tsx |
Adds dropdown fixtures. |
webviews/components/commitVerification.fixture.tsx |
Adds signature fixtures. |
webviews/components/comment.fixture.tsx |
Adds comment fixtures. |
webviews/common/label.fixture.tsx |
Adds label fixtures. |
webviews/activityBarView/overview.fixture.tsx |
Adds Activity Bar fixtures. |
webpack.config.js |
Makes webview configuration reusable. |
webpack.config.explorer.mjs |
Configures Explorer bundling. |
tsconfig.explorer.json |
Configures fixture type-checking. |
tsconfig.base.json |
Excludes fixtures from production builds. |
scripts/component-explorer-serve.mjs |
Starts the Explorer server. |
scripts/component-explorer-build.mjs |
Builds Explorer assets. |
README.md |
Documents Explorer workflows. |
package.json |
Adds scripts and dependencies. |
eslint.config.mjs |
Configures fixture linting. |
component-explorer.json |
Configures Explorer sessions and server. |
build/filters.js |
Updates hygiene exclusions. |
.vscodeignore |
Excludes Explorer artifacts. |
.vscode/tasks.json |
Adds the Explorer server task. |
.vscode/mcp.json |
Adds Explorer MCP integration. |
.vscode/launch.json |
Adds browser launch configuration. |
.gitignore |
Ignores generated artifacts. |
.github/workflows/webview-screenshots.yml |
Adds screenshot CI and publication. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| "@vscode/component-explorer": "0.2.1-161", | ||
| "@vscode/component-explorer-cli": "0.2.1-163", | ||
| "@vscode/component-explorer-webpack-plugin": "0.3.1-153", |
Adapt sidebar preview fixtures and mocked mergeability replies to current main APIs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
One or more custom setup steps configured for this repository failed during this Copilot code review run: Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review. Note You can configure setup steps for Copilot code review separately from Copilot cloud agent with a |
| const manifest = JSON.parse(readFileSync(join(directory, 'manifest.json'))); | ||
| assert(manifest.fixtures.length > 0, 'No fixtures were captured'); | ||
| for (const fixture of manifest.fixtures) { | ||
| assert(!fixture.hasError, `${fixture.fixtureId}: ${JSON.stringify(fixture.events)}`); |
| env: | ||
| SCREENSHOT_SERVICE_URL: https://hediet-screenshots.azurewebsites.net | ||
| steps: | ||
| - uses: actions/download-artifact@v4 |
| const themeController = applyTheme(root, theme); | ||
| applyExtensionColors(root, theme); |
|
One or more custom setup steps configured for this repository failed during this Copilot code review run: Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review. Note You can configure setup steps for Copilot code review separately from Copilot cloud agent with a |
| root.style.setProperty(`--vscode-${color.id.replace('.', '-')}`, | ||
| value.startsWith('#') ? value : `var(--vscode-${value.replace('.', '-')})`); |
Merge the preparation scope reduction while retaining the exact viewport hook, consumers, and tests here. The Explorer tree is unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>


Stack
Depends on #9047. This PR targets
hediet/webview-preparation, notmain, so its review diff contains Component Explorer adoption and the small responsive-width seam required by its same-document fixtures. Merge the preparation first, then retarget this PR tomain.Summary
Add Component Explorer for the existing React webviews using the Webpack plugin and pinned prerelease Explorer packages.
@scope, use fixture-width container queries, and contain fixed overlays within each preview.Validation and known blockers
npm run lintandnpm run hygienepassed before committing.npm run explorer:checkpasses in a fresh owning worktree. The old local Octokit mismatch is resolved by dependency restoration.package-lock.jsonis intentionally unchanged. Usenpm install --no-save;npm ciwill require a separate lockfile update to accommodate the added development dependencies.CI repair update
Main conflicts are resolved and the updated preparation dependency is incorporated. The exact updated Explorer branch still captures all 149 fixtures with valid hashes and 12 diagnostics from fixes now owned by #9049. Merge #9050, then #9047, then #9049 before landing this adoption. The Azure npm-ci failure still needs a separate lockfile update; no CI gate was weakened.
Responsive viewport ownership
This PR owns useMaxViewportWidth, its overview/sidebar call sites, and the viewport regression tests. Production uses the real window width; fixtures provide their individual preview widths. These changes were moved out of #9047 to keep host/context preparation focused. The transfer preserves the entire Explorer source tree byte-for-byte; explorer:check, lint, and hygiene pass.