Skip to content

How to fix a responsive layout bug with a coding agent

To fix a layout that breaks at one screen width, resize your dev site until it breaks, press C and pin the broken element right there. Tencil hands your agent your viewport width, the element’s size and position, its markup and its component, so it fixes the right breakpoint.

npx tencil

What you need

  • Tencil set up in your project with Claude Code or T3 Code
  • Your dev server running
  1. Find the width where it breaks

    Resize the window, or use your browser’s device toolbar, until the text overflows, the columns collide or the icon drops out of line.

  2. Pin it at that width

    Press C and click the element that breaks, not its container. Describe what you expected, such as “these three cards should stack below this width instead of squeezing”.

  3. Add a screenshot when words fall short

    Attach one to the pin. The agent gets it with the element context: the viewport and pixel ratio, the element’s size and position, its markup and, in React apps, its component and source file.

  4. Check the fix at the same width

    The page reloads in place, so you check the fix at the width you found it. Then widen and narrow the window around it, and reply on the pin if another width breaks.

Questions

What people run into along the way.

It works in your repository, so it reads your CSS, Tailwind config or design tokens, and gets the width you pinned at from Tencil.

Tencil hands over the width you saw; whether the agent checks others is up to the agent. Ask for it in the pin.

Read next

More on how it works and what it is good for.