Reference guide lists the UI edge cases that code-generating AI usually misses
Published this week on UX Collective, the document was born from a client's question during a workshop on agentic flows: why only review the AI's code afterward, if you can hand over the list of edge cases beforehand?

- Reading
- 5 min
- Tables
- 1
Published this week on UX Collective, the document was born from a client's question during a workshop on agentic flows: why only review the AI's code afterward, if you can hand over the list of edge cases beforehand?
The question that became a document
Adir SL was at a workshop on agentic flows in UI design and development when the client asked a simple question that no one on the team had a ready answer for. Instead of accepting that reviewing AI-generated code item by item was inevitable, he asked why not hand the list of edge cases to the AI from the start, as part of the prompt.
If we, designers and developers, are left to check the AI's code for all the small but important edge cases it might miss, why don't we give a document or a list of UI edge cases to the AI to begin with?
Client at a workshop on agentic flows, quoted by Adir SL in UX Collective
Adir SL and a colleague went looking for a ready-made document like this and found nothing generic enough for any client and specific enough to cover everyday cases. They found sector-specific material, for military, government, medical, and telecom, but no general reference guide. The solution was to write their own document, drawing on more than 15 years of combined experience in UI design and development between the two of them, and use it to guide the client's agentic flow. According to the author, the result was code generated with fewer gaps.
Why this matters when AI is the one writing the screen
The angle that matters to whoever designs the product isn't the list itself, it's the decision behind it: turning reactive review into upfront specification. Today a good part of interface code comes from a prompt, and a prompt without edge criteria tends to generate the happy path version of the flow, the one where the field is never empty, the text is never too long, and the network never drops.
Adir SL's document attacks exactly this blind spot: instead of a functional description ("create a list of projects"), the prompt gains edge case constraints ("handle empty list, long names, network error, and loading state above 300ms"). This shifts product design work from reviewing after the fact to specifying before the fact, which is the kind of decision that usually separates a senior PM or designer from someone who just approves screens.
The guide's five categories
The document organizes the edge cases into five groups, each with: what breaks, how to test, and how to design the fix.
| Category | What usually breaks | How to test |
|---|---|---|
| Content-driven | Empty lists, long names, pluralization, broken image | Load a new account, force counts of 0/1/2/many, point <img> to a 404 URL |
| State-driven | Loading, error, optimistic state, stale data | Throttle network to "Slow 3G", mock a 500/403 response, open the same record in two sessions |
| Input-driven | Keyboard focus, disabled vs. readonly, repeated click, pasting formatted text | Navigate using only Tab/Shift+Tab/Enter/Space/Esc, click a button three times in a row, paste rich text from Word |
| Layout and responsive | Extreme viewport, zoom, dynamic content, nested scroll | Resize to ultrawide and to a folded screen, zoom to 200%, measure Cumulative Layout Shift |
| System and environment | Dark mode, high contrast mode, reduced motion | Toggle prefers-color-scheme: dark, enable Windows High Contrast, enable "Reduce Motion" in the OS |
Some concrete examples from the guide itself help calibrate the level of detail expected. On Hacker News, the points and comments counter changes template depending on quantity: "discuss" when there are no comments, "1 comment" in the singular, and "15 comments" in the plural, instead of a single template that gets the agreement wrong at one of the two extremes.
On Loading.io, the action button visually changes to a loading state the instant it's clicked, which prevents a double click from triggering two requests. On MUI, the example illustrates another point: the gap between the user's action and the server's confirmation, with a pending state visible on the button until the response arrives. On GOV.UK, the keyboard focus ring is designed as a first-class element, not inherited from the browser default.
What to do with this in the generative AI flow
The most direct use of the guide, according to the author's own account, is as a prompt attachment in agentic UI generation flows. Instead of reviewing the AI's output hunting for edge case after edge case, the team hands over the list as an input constraint. In practice, this means three moves:
- Turn each category in the guide into an acceptance checklist item for the component, before approving the AI-generated PR
- Include explicit constraints on pluralization, truncation, and error state in the prompt, instead of letting the AI infer on its own
- Use the guide's "how to test" columns as a manual QA script for any new screen, whether AI-generated or not
In short: the document doesn't replace user testing or discovery research, it reduces rework at the implementation layer, which is where much of the design and development time is still lost reviewing the obvious.
The guide's limits
The UX Collective piece itself admits the limit: the published version is the human-language paraphrase of a document written on commission for a specific client, with technical parts left out to keep it generic. This means teams with a very particular stack or domain (healthcare, financial, government) will still need to supplement it with the sector-specific documents the author herself mentions having found, aimed at areas like military, government, medicine, and telecom.
It's also worth noting that the guide is a list of symptoms and fixes, not a prioritization methodology: it doesn't say which edge case to test first when the deadline is tight, a decision that remains up to the product, not the document. The good question to bring to your own backlog is simple: which of these five categories has your team never tested on purpose, only discovered in production?
Translated from the Brazilian Portuguese original · Read the original
Figma Dev Mode MCP Server Links Design to Code, but UX Curation Remains Manual
Figma's Dev Mode MCP Server lets AI agents extract variables, components, and layout directly from the design file to generate code in the editor. What it solves from the classic handoff and where human UX review remains indispensable.





