Skip to content

feat: bug report AI drafting extension - #3

Merged
adrians5j merged 1 commit into
mainfrom
adrian/bug-report-ai
Sep 21, 2026
Merged

adrians5j merged 1 commit into
mainfrom
adrian/bug-report-ai

Conversation

@adrians5j

Copy link
Copy Markdown
Member

Adds bug-report-ai, installable with webiny extension bug-report-ai.

Webiny 6.6.0 ships a bug reporter in every project (webiny/webiny-js#5736): cmd+shift+b in the Admin app, describe what broke, paste a screenshot, and a GitHub issue appears with the environment and a timeline of the last few minutes attached. On its own it files what the reporter typed, verbatim. This extension decorates that with a model call, producing a searchable title, a summary and steps to reproduce.

It lived in the webiny-js monorepo until now, which meant nobody outside the team could use it.

Shape

Follows whitelabeling, since this is an Api.Extension registered by src path rather than a component imported from the project:

"imports": [{ "specifier": "Api", "path": "webiny/extensions" }],
"component": { "name": "Api.Extension", "props": { "src": "/extensions/bugReportAi/Extension.ts" } }

packageJson brings ai and zod, matching the versions @webiny/ai-powerups resolves.

Why a decorator, not a replacement

The built-in drafter is the fallback and is used on two of the three paths through here: no model role configured, and the model call failing. Only a successful draft discards it. Losing a report because drafting broke would be the worst possible trade, since the reporter has already spent the effort. Everything factual in the issue is assembled by the bug reporter regardless, so a report that falls back is still complete. Deleting the extension puts the reporter back as it was.

Version folder

6.6.x, not 6.0.x. The extension imports webiny/api/bug-reporter, which does not exist before 6.6.0. Checked how that resolves:

Project version Resolves to
0.0.0-local-npm.* 6.6.x
6.6.0, 6.6.3, 6.7.0 6.6.x
6.5.0 nothing, install fails

Failing on 6.5.0 is the point. 6.0.x would have installed an extension that cannot build.

Verification

Ran the installer's own updateWebinyConfig and mergePackageJson from webiny-js against a freshly scaffolded aws/ddb config, rather than reasoning about the JSON:

import { Infra, Api } from "webiny/extensions";
...
            <Cognito />
                <Api.Extension src={"/extensions/bugReportAi/Extension.ts"} />

Api merged into the existing webiny/extensions import rather than adding a second one, and ai and zod landed in dependencies. I did not run a full deploy against a live project.

The extra indentation on the inserted line is the installer, not this config: whitelabeling produces exactly the same thing through the same code path. Worth a fix in addComponentToExtensions upstream at some point.

Schema drift, not introduced here

extension.json breaks three rules in schemas/extension.schema.json, all of them identical to what whitelabeling already does: type is marked required, the import path pattern demands a relative ./… specifier, and the component name pattern disallows a dot. No extension in this repo has type, and the two dotted-component extensions are the ones that actually install, so the schema has drifted from what the installer accepts. Following the schema here would have produced something that does not work. Worth reconciling separately.

Docs for the bug reporter itself: webiny/docs.webiny.com#830.

Workspace: wby-next3 · ✨ BUG REPORTER - FINALS

🤖 Generated with Claude Code

Turns a report filed from the Admin app into a searchable issue title, a
summary and steps to reproduce, instead of the reporter's raw words.

Registers `bugReporter.draftIssue` as an AI capability, so it gets a row in
the AI Power-Ups settings screen and a project can point it at its own model
or append instructions. Decorates `IssueDrafter` rather than replacing it,
because the built-in drafter is the fallback on two of the three paths
through here: no model role configured, and the model call failing. A report
that falls back is still complete, since the screenshots, environment table
and timeline are assembled either way.

Filed under 6.6.x, not 6.0.x. The extension imports `webiny/api/bug-reporter`,
which only exists from 6.6.0, so an older project should fail to install it
rather than end up with a project that does not build.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
adrians5j added a commit to webiny/webiny-js that referenced this pull request Sep 21, 2026
Mirrors the whitelabeling install, in the same two AWS sites and the same
position. Pulled from S3 like any other published extension, so E2E covers the
install path a customer takes, not just the extension's code.

Drafting falls back to the reporter's own words in E2E, since no AI provider
is configured. Provider keys are encrypted runtime settings rather than build
params, so CI has no way to set one. What this proves is that the extension
installs, registers its capability, and the API still builds.

Depends on webiny/extensions#3. The extension reaches S3 only when that merges
to main, so this step fails until it does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@adrians5j
adrians5j merged commit b6a2ccd into main Sep 21, 2026
@adrians5j
adrians5j deleted the adrian/bug-report-ai branch September 21, 2026 12:01
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.

1 participant