ToolingProjects

Tan’s Tools · DEV panel

The AI knows the rules from the Design System our team maintains and sees the real page on localhost itself — while the DEV panel beside the IDE puts the page into the case to check and sends fixes with numbered screenshots. So most of my time goes back to design decisions

12 min read

For AI to fix UI accurately, it has to know “what right looks like” and it has to “see” the real page it is changing, not guess from a screenshot — so I solved it in two layers: AI reads the Design System our team maintains first, then AI in the terminal opens the real page on localhost itself, with a DEV panel next to the terminal acting as a remote that puts the page into the case I want to check

VS Code / Antigravity / CursorWebviewShadow DOMSSEPlaywrightDesign SystemClaude Code
Empathize · Define

AI has to know“what right looks like” and has to“see” the real page

At my day job I redesigned an entire desktop app together with Claude Code — if the AI doesn't know the team's rules, it picks colors and spacing on its own. If it only sees a screenshot, it guesses which element the red box means. And my time goes into explaining things again and steering the page into the case I want to look at

Inventory page of a live-selling app showing summary number cards, status tabs and a table of 3 products; the logo and account name are blurred
The real app page running on the dev server's mock data — to see “empty inventory” I had to delete products one by one (logo and account name blurred)

To see what an empty inventory looks like, I had to delete items. To see 120 items, I had to create more. To check the dark theme, I had to go to settings. And when I found something wrong, I had to take a screenshot, draw a box, then type out for the AI where “here” actually is

— The starting problem

AI doesn't know what the team considers right

Left alone, AI picks colors, spacing and buttons that look good by its own taste. The page looks nice but doesn't match the team's other products

Edge cases have to be built by hand every time

Empty state, overflowing data, names that are too long, the system returning an error — no button takes you there directly. You edit real data, then delete it again

No way to tell which page is still missing which case

The checklist lives in someone's head or in a doc nobody opens, so we only check the cases we happen to think of

Handing fixes to AI with screenshots and descriptions

A picture doesn't tell the component name, size or spacing, so the AI has to guess. And capturing a browser tab needs a permission click every time

Test panels float over the page under review

Dev tools placed inside the page cover the content I want to look at, and use a different font from the design system


Ideate

Two layers, applied to4 real cases

The first layer is the rules, the second is the eyes — without either one, the AI still has to guess

  • Layer 1 · AI reads the Design System our team maintains first — our team built this system and maintains it together. It is the shared language of every product on the team. AI reads its tokens, components and rules through a skill, then edits code using components from the system
  • Layer 2 · Ask the AI in the terminal to open localhost — the AI sees the screenshot, the page structure and the real style values of the page it is editing, and re-checks the page itself when it's done
Overview of 4 cases: A full-system audit, shown as a fix list with P0 P1 P2 levels · B designer points at spots, shown as an app screen with numbered boxes next to the terminal · C edge cases, shown as an app screen switched to empty inventory · D what the system doesn't have yet, shown as status picker cards in light and dark themes
4 real cases — details for each are in the following sections
A

Full-system audit

The audit skill scans every page against the system and produces a plan book with a P0 / P1 / P2 fix list and annotated screenshots See the plan book ↓

B

Designer points at spots

Click an element on the real page, type a note, send a numbered screenshot to the terminal, with no permission prompt See image ↓

C

Edge case

One card click switches the real page to empty inventory · 120 items · long names · system down (52 cases across 13 pages), then the AI checks that case See image ↓

D

What the system doesn't have yet

Design new components, such as a status picker card, and bring them back into the system for the whole team — a PR is currently open for team review See image ↓

Result

The AI gets less work that requires guessing. I no longer explain the rules again or steer the page into each case myself — most of my time goes back to design decisions


Layer 1 · Case A

AI reads the Design System first, thenaudits every page against it

The Design System is something our team built and maintains together — AI reads its tokens, components and rules through a skill, then uses the audit skill to check every page against the system. The output is a plan book made from the system's own template, so from day one I know what to fix, at what priority, and which stage of the work it's in

Seven-stage workflow in the plan book: prepare, audit, decide the new structure, redesign and QA, cover edge cases, hand off and add to the Design System, wrap up lessons. Each stage shows a status of done, in progress or not started, plus the number of items done and pending
The 7-stage workflow from a real plan book — a flowchart following the Design System template. Each stage shows its status and pending work (product name and ticket numbers blurred)
  • Prepare → Audit → Decide the new structure — checking every page against the Design System found 131 items, split into P0 1 · P1 70 · P2 60. Then I picked a Design System template for each page before drawing anything new
  • Redesign and QA → Cover edge cases — fix one page at a time on the running app, check both light/dark themes and 390 / 1024 / 1440 screens, then go through every state of the page — this is where the DEV panel came from
  • Hand off + add to the Design System → Wrap up lessons — new components that came up along the way go back into the system through a PR for team review (case D), and new rules from reviews become the checklist for the next round
Fix list in the plan book, with filters by page, type, status and source, and counters for open P0 P1 P2. Each item has a P1 or P2 level, a type tag such as off-DS or odd UI, the problem, the fix and a status
Case A — every issue found goes into one list — level P0/P1/P2 · type (off Design System · odd UI) · problem · fix · status — spots sent from the DEV panel land here too

Layer 2 · Case C

Ask the AI to open localhost and control the real pagefrom outside

The AI in the terminal can open the page it's editing by itself and see the screenshot, the page structure and the real style values, then re-check when it's done — and since most problems show up when pieces sit together on the real page, I control the real page to put it in the case I want to check, instead of pulling components out to look at one by one

Two-sided workspace: on the left the app in a localhost browser, with the inventory page showing an Empty state; on the right the IDE with a terminal talking to Claude and the DEV panel with the empty inventory card selected
Case C — the actual working screen — ① the app on localhost · ② the terminal where I ask Claude to edit code · ③ the DEV panel with the “empty inventory” case selected (laid out from real screenshots; terminal text is an example)
OptionWhat you seeCostWhy it was dropped / chosen
A standalone component viewer (Storybook-style)One piece at a time, out of contextWrite a story for every stateThe piece looks fine, but you can't see what it collides with on the real page, and there are two places to maintain
Edit mock data by hand every timeThe real pageSeveral minutes per caseReal result, but slow, easy to forget to reset, and nobody else on the team can repeat it
A panel that controls the real page + an edge case file per project ChosenThe real page, every declared caseWrite one JSON file onceThe dev server returns data for the selected case, the real page switches in one click, and the same file is the team's checklist

Prototype

Three parts that talk through a single dev server

The app is in Chrome, the panel is in the IDE, and the AI is in the terminal — none of them need to know each other directly

Infographic: on the left the app on localhost, in the middle the dev server, on the right the IDE with a terminal talking to Claude and the DEV panel. Blue line A: click a case card and the app switches immediately. Orange line B: point at a spot with a note, and a numbered screenshot plus a summary line go to the terminal. Green dashed line C: Claude edits the code and the app reloads to show the result
How it works in one picture — A switch cases · B hand work to AI · C results come back to the real page
  • IDE extension — a webview in the right sidebar of Antigravity / Cursor / VS Code that embeds the panel, and the only part that can type into the terminal
  • dev server — an SSE message pipe so the panel and the app can talk across browsers · answers the API according to the selected case · receives fix reports and takes the screenshots itself
  • Edge case file per project — pages that follow the real menu · the cases for each page with the data the API should return · cases that can't be simulated yet, listed for manual checking · a link to the redesign plan book
  • Same design system as the app — the panel uses fonts, colors and components from the same Design System as the app — the status picker card I designed is being brought into the system (PR open for team review)

Prototype

How to use it — 5 steps, from picking a page to the AI making the fix

Your hands never leave the IDE, and no permission window ever pops up

Inventory page after clicking the empty inventory card: the table is empty and shows the Empty state illustration Inventory page after clicking the 120-item card: the table is long and the summary numbers update to match
One card click switches the real page to “empty inventory” or “120 items” immediately — click Normal to return to the original data
01

Pick a page

The page selector follows the app's real menu order. Click Next to walk through the whole flow page by page

02

Click an edge case card

The dev server changes the API response for that case, then the app page reloads — the case clears itself when you change pages

03

Switch the app theme

Light · dark · system, written straight into the app's theme setting, so both themes can be checked from one place

04

Point at what needs fixing

Click an element on the real page, press ↑ to expand to the parent box, get a numbered red outline, then type what to fix

05

Send to Claude

Captures a screenshot with numbered boxes, adds it to the plan book, and types a summary line into the terminal with the image path — the AI starts working right away

On the left, the app's banned-words page with red boxes numbered 1 to 3; on the right, the terminal receiving a three-spot review message while Claude reads the image and edits files, plus the spot review panel with a note for each spot
Case B — point at 3 spots in the app on the left, type notes in the panel on the right, press send — a summary line with the image path shows up in the terminal and Claude starts fixing right away (laid out from real screenshots; terminal text is an example)

Test & Iterate

Six things I ran into along the way

Most are browser and IDE limits that only show up once the panel actually moves out of the app page

The spot review tab in the panel, with a button to pick a spot on the app page and three steps
Spot review tab: one primary button, and when there are no spots yet it shows steps instead of a long paragraph

Capturing a browser tab needsa permission click every time

At first I used getDisplayMedia to capture the tab as it was, but Chrome asks for screen-sharing permission every time. With frequent sends, I was clicking Allow all day

Fix: send the page's current DOM to the dev server to re-render in an invisible Chrome and capture it there — typed input values and scroll position come along, and so do open menus. The trade-off is that camera images don't come through

BroadcastChannel only workswithin one browser

Once the panel moved into the IDE, the panel and the app were in different browsers. Clicking Next did nothing

Fix: build a message pipe through the dev server (SSE to receive + POST to send) with the same interface as BroadcastChannel, so the rest of the code didn't need to change

An iframe in the IDE webview gets isolated storage

The panel used to remember the app's page in localStorage, but in the IDE the value didn't stick, so the panel kept reloading itself in a loop

Fix: keep the app's page in the query of the panel's own url, with no storage at all

With the app open in two tabs, the panel reloads back and forth

Both tabs report their url every second. The panel follows one tab, then the other pulls it back

Fix: the panel only follows the url when the app changes page, or when it doesn't know the page yet

The server-running check was blocked byits own CSP

The webview blocked fetch to localhost, so the check concluded the server wasn't running and hid the panel even though everything was ready

Fix: add connect-src for localhost — the lesson: a misleading error message is worse than no message

A tickable checklist didn't make checking faster

In the first round, edge cases were checkboxes with a “view on page” button. The user (me) said the information order was wrong, because what I wanted was a card that switches the real page when clicked, not something to tick

Fix: selectable cards in 2 columns with icons for each case type, then proposed into the Design System as a status picker card (PR open for team review)

Test

The edge case file is a checklistyou can run

Write the cases once and use them while designing, while reviewing, and when handing off to the team

Status picker cards proposed for the Design System, in light and dark themes, six cards: normal, empty inventory, very long name, 120 items, near quota limit, failed to load
Case D — the status picker card, something the system didn't have yet, designed along the way and now being added to the system (PR open for team review): icons for case type · a check in the top-right corner · dark theme without heavy solid blocks
  • Cases live in the project's file — each project has different Empty states and edge cases, so the panel reads the file of the project that's open
  • Run every case automatically — a script opens every card on every page, checks for errors, and makes one overview image of all cases
  • Fix reports go into the plan book — 1 spot = 1 item, with a numbered screenshot in the same format as the automated scan results, so the team sees everything in one place
13
Pages with declared edge cases
52
Cards that switch the real page
47
Cases opened automatically with no errors
0
Permission clicks when handing work to AI

Define

What I chose not to build

A tool for the people doing the work, not a product feature — and some parts are still incomplete

  • Not every piece is a system component yet — fixes always use components from the system first, but the app still has its own styles that are gradually moving into the system. Pieces the team should share get a PR for team review, like the status picker card
  • Only in the dev server — not in the app that ships to customers — the panel and the stand-in API responses exist only during development
  • No camera or video capture — images rendered from the DOM don't include canvas/video content — cases that need a real camera stay on the manual check list
  • Nothing leaves the machine — reports and images stay in the project, messages go into the local terminal, with no external service involved

Tan · Natpakan Sirirat

Product Designer & AI Builder — designing user experiences and building AI tools that actually work.

0%