Skip to main content

2 posts tagged with "frontend"

View all tags

Your Design System Was Documentation. Now It Needs to Be a Compiler

· 9 min read
Tian Pan
Software Engineer

Your design system survived the last decade because humans absorbed it slowly. New engineers learned the button variants through Figma files, PR nitpicks, and the one designer who always caught the wrong shade of gray. That absorption pipeline had a throughput of maybe a few components per engineer per week — slow enough that a design team could police the edges by hand.

Coding agents just broke the pipeline. An agent fleet can generate fifty slightly-wrong buttons before lunch: each one plausible, each one using a hex value that's two shades off, a padding that's 14px instead of your 16px scale step, a border radius invented on the spot. No designer reviews at that speed. And the instruction you reached for first — "follow the style guide" in the system prompt — decays exactly like every other soft instruction: it loses statistical weight as the context window fills, and the model reverts to the generic CSS patterns it learned from a million other people's codebases.

The fix is not a better prompt. It's a category change: your design system has to stop being documentation that humans interpret and become a contract that machines enforce. Documentation asks. Compilers refuse.

When Streaming Tokens Meet the Screen Reader: The Accessibility Debt of Generative UIs

· 10 min read
Tian Pan
Software Engineer

The most celebrated interaction pattern of the last two years — text that materializes word by word, as if the machine were thinking out loud — is, for a screen reader user, closer to noise than to language. Every token your model emits is a DOM mutation. Plug a naive aria-live region into that stream and the screen reader will try to announce each mutation as it lands, producing a stuttering, overlapping torrent that resets mid-sentence dozens of times per second. The feature that makes your product feel alive is the same feature that makes it unusable for the people who depend on assistive technology.

This is accessibility debt, and generative UIs accrue it faster than any interface pattern before them. The reason is structural: traditional web content is static and predictable, so you can reason about it once and ship. A generative interface changes on every interaction — one prompt returns a list, the next returns a table, the next streams 600 words of prose followed by a tool-call widget. There is no fixed DOM to audit, no stable tab order to verify, no single snapshot that represents "the page." The accessibility contract has to hold across an infinite space of generated outputs, and almost nobody is testing for that.