Capture desktop and phone screenshots for every UI pull request

A small team building PILAH 2.0, a Flutter and Django waste-bank app, has an AI agent build the app, screenshot each changed screen at desktop and phone width, and post the images in the PR.

Done withCustom agentinGitHub· Nov 26, 2026

What they did

The author, writing as scallss on Medium, works on PILAH 2.0, a waste-bank management app with a Flutter front end for Android and the web and a Django API. Any pull request that changes what a user sees now gets screenshots, and the developer only tells the agent to add them. The agent builds the app, starts it against a local backend seeded with demo data, and drives a headless browser through the Playwright MCP server to capture each screen at desktop width and at about 390 pixels. For Android it walks the screens in an emulator with Maestro and grabs images with adb. It uploads the images with the gh image extension and writes the returned markdown into a Screenshots section of the PR description.

How it went

The author says reviews started to point at what users see rather than guess. In one PR the 390 pixel shot showed bank names cut off by two status labels; the fix moved the labels and added a test that the name gets more than 240 of 390 pixels, up from about 75. A reviewer replied to another PR with a cropped screenshot that exposed a 16 pixel padding mismatch. Retaking images after a fix costs almost nothing, so PRs show the current state. No time or cost figures are given.

Worth knowing

The post does not name the coding agent. Committing the PNGs to a throwaway branch, the team's first approach, cluttered the branch list; gh image or GitHub's newer attach option for gh pr create avoids that. The agent needs a seeded local backend and a logged-in demo user to reach the right screens.

Try it

With Custom agent· 7 parts to fill in

At the end of any task that changes what a user sees in [my app], do this before you finish. Build the app and start it against [my local backend] with [demo seed data]. Using [Playwright or my browser tool], open every screen this change touches at desktop width and at 390 pixels wide, and save one image of each. If [the mobile build] is affected, capture the same screens in [my emulator tool]. Upload the images with [gh image or gh pr create --attach] and add them under a Screenshots heading in the pull request description, with a before and after where the screen already existed. Show me the images and stop before you push or edit the PR. Retake them after any later fix to the UI.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

Related