Re-prompt a gallery that only works on fast laptops

Vibe codingMedium25 minMeta style

Your task

You asked an agent to "build an infinite-scroll image gallery in React". It shipped a clean component that looks great on your laptop over office fiber. Most of your users are on mid-range Android phones, often on slow mobile data. On a test phone, the gallery froze after a few minutes of scrolling and used 400 MB of data.

Write the follow-up prompt for the agent's second pass.

What you know:

  • the API returns 30 items per page, each with image URLs 320, 640 and 1280 pixels wide, plus the width and height
  • the grid has 2 columns on phones and 4 on desktop
  • the app already uses @tanstack/react-virtual elsewhere
  • the test phone has 3 GB of memory, and Chrome's dev tools can throttle it to a slow 3G profile

Then, in a few sentences: why did the first build look finished?