Back/Engineering/Devin
BeginnerEngineering

How to Use Devin AI for Rapid Frontend UI Fixes and Iteration

Hand Devin a tightly scoped interface problem with the route, state, viewport, screenshot, and acceptance criteria it needs, then use before and after evidence plus browser checks to iterate quickly without losing responsive or accessible behavior.

How to Use Devin AI for Rapid Frontend UI Fixes and Iteration

Scott describes frontend fixes as an especially effective Devin task: attach a screenshot, specify the visual change, let Devin find and edit the code, then review its before and after screenshots in the same workflow.

Before you start

What you need

  • A reproducible route, user state, and viewport
  • An annotated screenshot or short recording of the current problem
  • The desired visual and behavioral result, including responsive states
  • Repository access plus documented local run, test, and screenshot commands
  • Design tokens, component conventions, and accessibility requirements

What you’ll make

A focused pull request with the requested interface change, before and after screenshots at representative widths, and evidence that interaction, accessibility, and neighboring states still work.

Tools used

  • Devin

    AI software engineer by Cognition Labs

Step by step

The workflow

Follow the sequence once, then adapt the prompts, checks, and handoffs to your own setup.

4 steps

Step01

Identify and Document the Frontend Task

Reproduce the issue and capture the exact route, user state, viewport, interaction, and current screenshot. Annotate the element and describe the desired result in observable terms, including mobile and interaction states.

Step02

Assign the Task to Devin

Assign the narrow task to Devin with the screenshot and repository conventions. Require it to identify the component, use existing tokens, preserve behavior, and provide evidence at the named viewports.

Example prompt
Fix [UI problem] on [route] in [state] at [viewport]. Current evidence: [screenshot]. Expected result: [observable criteria]. Use the existing components and tokens in [references]. Preserve keyboard, focus, loading, empty, and error behavior. Stay within [scope]. Run [tests] and return before and after screenshots for [viewports].
Step03

Review Visual Changes

Compare the screenshots at full size and exercise the actual interface. Check alignment, wrapping, overflow, type, color, focus, keyboard use, loading, empty, error, and the neighboring component states that share the changed code.

Step04

Provide Feedback and Finalize

Give feedback as a small list of observable differences, then let Devin revise the same branch. Inspect the final diff and run the required tests and build before accepting the change.

What good looks like

  • The task names the exact route, state, viewport, and problem rather than relying on a screenshot alone.
  • The implementation uses existing components and tokens unless the task explicitly requires a new pattern.
  • Screenshots cover the affected desktop and mobile states, including hover, focus, empty, loading, or error behavior when relevant.
  • The diff passes visual, interaction, accessibility, test, and build checks appropriate to the change.

Build your next product with ChatPRD

Turn an idea into a PRD, user stories, and a plan.

Try ChatPRD free

After the steps

Runbook notes

How to recover when the loop fails and where human judgment helps.

Recover

If it goes sideways

The agent matches the screenshot but guesses the wrong state or component
Provide the route, account or fixture state, viewport, interaction sequence, and relevant component name.
The change looks right at one width and breaks another
Specify representative breakpoints and capture before and after evidence at each one.
The agent hard codes styling that conflicts with the design system
Point to existing tokens and components, and inspect the diff for one off values or duplicated patterns.
A screenshot hides keyboard, focus, contrast, or behavior regressions
Run the affected flow, keyboard and focus checks, automated tests, and accessibility checks in addition to comparing images.

Start shipping
better products.

Join 100,000+ product managers who use ChatPRD to write better docs, align teams faster, and build products users love.

Free to start
No credit card
SOC 2 certified
Enterprise ready