Repository navigation
Conversation
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
|
There was a problem hiding this comment.
🟡 Changes recommended
The media check misses reference-style Markdown images with extensionless URLs, causing a supplied screenshot to be published even when the report already contains an image.
1 open issue
What changed in this PR
Adds a StackBlitz-based workflow for reproducing public Primer React bugs and preserving verified examples without changing published packages.
Changes:
- Adds bounded browser investigation and guarded publication of commit-pinned reproductions.
- Provides a runnable starter, form-generation and publication helpers, and regression tests.
- Integrates tooling tests into CI and documents the workflow for contributors.
| File | Description |
|---|---|
tsconfig.json |
Allows native .ts imports in tooling. |
script/publish-bug-reproduction.ts |
Validates and publishes reproduction files and comments. |
script/publish-bug-reproduction.test.mts |
Tests publication guards, limits, and media handling. |
script/create-stackblitz-reproduction.ts |
Generates submission forms and reproduction bundles. |
script/create-stackblitz-reproduction.test.mts |
Tests form contents, escaping, and validation. |
package.json |
Adds the reproduction-tooling test command. |
package-lock.json |
Records the starter workspace and dependencies. |
examples/stackblitz/vite.config.ts |
Configures Vite with React support. |
examples/stackblitz/tsconfig.json |
Configures starter TypeScript checks. |
examples/stackblitz/src/main.tsx |
Initializes React with Primer providers. |
examples/stackblitz/src/App.tsx |
Supplies a minimal Primer example. |
examples/stackblitz/package.json |
Pins starter dependencies and defines commands. |
examples/stackblitz/index.html |
Provides the starter HTML entry point. |
contributor-docs/bug-reproductions.md |
Documents reproduction and publication behavior. |
.github/workflows/reproduce-bug.md |
Defines investigation instructions and publication safeguards. |
.github/workflows/reproduce-bug.lock.yml |
Adds the compiled agentic workflow. |
.github/workflows/ci.yml |
Runs tooling tests before the React 19 rewrite. |
.github/ISSUE_TEMPLATE/bug_report.yml |
Links reporters to the StackBlitz starter. |
Review effort: Balanced
| return {status: 'skipped'} | ||
| } | ||
| const hasMedia = [issue.body, ...comments.map(comment => comment.body)].some(text => | ||
| /!\[[^\]]*\]\(|<(?:img|video)\b|https?:\/\/[^\s)>]*(?:user-attachments\/|assets\/|\.(?:png|jpe?g|gif|webp|mp4|webm|mov)(?:[?#\s)]|$))/i.test( |
joshblack
left a comment
There was a problem hiding this comment.
@copilot add support for workflow_dispatch on a specific issue for debugging. This manual dispatch should also have a checkbox to enable every behavior (e.g. comments, opening a PR, etc) instead of just a dry-run. Let's also make update the bug template to set the issue type to bug and update the corresponding events.
Do not put the bug-reproductions.md file in contributor-docs, instead turn it into a skill. Let's have a bug skill with a reproduction section. It should also detail how to capture this in an issue comment or description with stackblitz through the shared script.
For stackblitz itself, can we just put the form in the issue comment or no? Making a whole html page is strange for this use-case
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Added issue-specific |

Adds an agentic workflow for newly opened bugs and issues subsequently labeled
bug. It submits a minimal example through StackBlitz's HTML form interface, verifies the reported behavior and a one-variable control in the preview, and posts only useful, evidence-backed findings. Screenshots are included only when the issue and its comments do not already contain media.StackBlitz-generated projects are not persisted without an account, so a trusted safe-output job preserves the verified files on an isolated
reproductions/bug-ISSUE-RUNbranch and generates a commit-pinned StackBlitz GitHub-import link. No StackBlitz SDK, API credentials, or account is used. Publication is gated on successful threat detection, rechecks the issue, and never changesmain.Live StackBlitz verification was blocked by this session's browser network policy; the workflow's hosted form/preview flow still needs a first-run check. The starter and form were exercised locally.
Changelog
New
examples/stackblitzstarter, form generator, publication helpers, focused regression tests, and contributor guidance.Changed
.tsimports.Removed
Rollout strategy
Testing & Reviewing
Review the form-only StackBlitz flow and isolated publication boundary. For the first hosted run, check a reproducible public bug, an issue with existing media, and an inconclusive report: expect a durable reproduction link, no duplicate screenshot, and no speculative comment respectively.