Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Record a bug and its fix

Have an AI agent record a bug and its fix in the browser, with screenshots, page snapshots and a Playwright trace, and post the before and after on the pull request as proof the change works

An agent fixed a bug that no test covers. To approve the fix, a reviewer needs to see the bug, then see it gone, without running the branch. Have the agent record the browser before the fix and after it, in one session, and post the session link on the pull request. The session page puts the two screenshots side by side and lists what changed on the page.

A session with the before and after of a checkout fix: the two screenshots side by side, and the page changes: Applying… became Apply, the discount and the total changed

When a CI test covers the bug, you do not need a recording: the failing run is the before and the passing run is the after. See Prove a change with CI tests.

What you need

  • A skill that has the steps, so you do not have to describe them.

  • A browser the agent can drive. There are two ways: Playwright MCP, an MCP server, or Playwright CLI, shell commands. Each page has the setup.

  • A tool that can post on the pull request, such as the GitHub CLI. Currents does not post the comment.

Ask the agent

Name the skill in the prompt and say what to fix:

The agent records the bug, fixes the code, records the same steps again, shares the session and replies with the link. Claude Code with this prompt, sped up:

A terminal: Claude Code starts a session, records the checkout before the fix with playwright-cli, attaches it captioned before, edits app.js, records and attaches the after, shares the session, and replies with the cause, the fix and the session link

What the reviewer sees

The comment on the pull request has the before and after, and links to the session:

A pull request comment with the before and after screenshots side by side, links to each session page and trace digest, and the accessibility tree changes as a diff

The session page has:

  • The before and after screenshots, side by side or with a slider

  • What changed on the page: elements added, removed, and text that changed

  • The trace of each recording, with the clicks and requests

  • The commit and the pull request the fix is on

To post the evidence in Slack or Linear, see Post evidence to GitHub, Slack and Linear.

Last updated

Was this helpful?