Workflows

Fix a Bug and Ship a Preview

Clone a repo, fix a bug, and hand a live staging URL to a designer.

You have a Next.js site in GitHub. The pricing page is broken on mobile and you need a working preview URL before merging anything.

Clone the repo#

  1. Open Repositories and click Spawn Agent on your repo.
  2. Create the agent with a standard machine and enough disk for the repo plus dependencies.

Describe the fix#

In the terminal or chat view, give the agent a concrete brief:

Inspect this repo, install dependencies, run the test suite, then fix the pricing
page mobile layout bug. After that, start the app on port 3000 and leave it running.
If you change anything significant, commit it on a new branch called fix/mobile-pricing.

Watch the agent work through the repo: install packages, run tests, edit the layout, and boot the app.

Preview and iterate#

  1. Open Settings > Exposed Ports, expose port 3000, and open the generated preview URL once the app is listening.
  2. Open the public preview URL and check the broken page yourself.
  3. Send a follow-up:
The hero is fixed, but the pricing cards still feel cramped on iPhone-width screens.
Give them more breathing room, tighten the typography, and keep the dev server running.

Hand off#

  1. Add staging.acme.com in Custom Domains, point its CNAME at the generated ports.chat.dev hostname, and verify DNS.
  2. Send the custom-domain staging link to your designer or PM for review.

This workflow is useful when the job is not just "edit code," but "fix something real, run it, and make it reviewable."