Knowledge

← All knowledge

Universal lessons

docs/knowledge/universal-lessons.md

Generated by /wrap — do not edit. A read-only snapshot of ~/design-kb/knowledge/lessons.ts (sha256 7de9cd1813179852, 17 lessons). Change a lesson there, through the crit-extraction skill, then run node scripts/sync-universal-lessons.mjs.

A secondary feature shouting over the screen's job

prominence-ceiling · product-intent · confirmed · seen 2× · mobile, both

Rule. A secondary feature's entry point must never outcompete the host screen's primary job — prominence is capped by the screen's role, not by how important the feature feels in isolation.

What happens. The entry point to a side feature lands as a full-width hero at the top of a screen whose job is something else, so it is the first and loudest thing on the page.

Why it's bad. Someone who opened the screen to do its actual job now has to look past the loudest element to find it. Prominence on a screen is zero-sum — every point spent on the side feature is taken from the reason the user came.

Fix. Name what the host screen is fundamentally for, and treat that as the ceiling. Place the entry as a quiet row, chip, or compact banner. The same feature may be loud on a screen whose job it actually is.

Vertical scroll inside a scrolling screen

nested-vertical-scroll · layout · confirmed · seen 2× · mobile, both

Rule. Never nest a vertical-scroll region inside a vertically-scrolling screen. The inner region captures the scroll gesture, and if it is taller than the viewport the user gets trapped in it.

What happens. A fixed-height scrolling list sits in the middle of the page. Scroll over it and it eats the gesture — the page underneath stays put until the inner list reaches its own end.

Why it's bad. Two vertical scroll regions make scroll ownership ambiguous: the user cannot tell whether they are moving the box or the page. The inner list holds far more than it shows, so the gesture stays captured — and if it is taller than the viewport, the page can never move past it at all.

Fix. Let inline content sit at its natural height — a long page is fine. If it is too large, move it into an overlay that owns the whole scroll surface, with header and footer pinned and the body as the single scroll region. A horizontal rail is fine: different axis, no ambiguity.

Large inline expansion shoves the page down

inline-expand-shifts-page · layout · confirmed · seen 2× · mobile, both

Rule. Expanding a large or variable-height control inline mid-page shoves everything below it down. The content the user was reading jumps away, and the more items appear the further it lurches.

What happens. Choosing “Schedule” opens a full slot grid inline, and everything below it — the summary, the total, the CTA — is pushed down and off the screen.

Why it's bad. The content the user was reading jumps away mid-read, and the more options appear the further it lurches. They lose their place, and the action they were heading for is now somewhere they have to hunt for.

Fix. Put the control in an overlay — a sheet or a pushed screen — so the page underneath stays put. Inline reveal is fine only when nothing sits below it. Test what is below the control, not its size alone.

Re-authoring the parts that are not the feature

reproduce-verbatim-or-omit · composition · confirmed · seen 2× · both

Rule. When forking or reproducing an existing screen, re-authoring the sections that are not the feature makes each one silently drift from the original.

What happens. A forked screen looks right at a glance, but its header, list rows and footer were retyped by hand, so each one sits subtly off from the real screen it copies.

Why it's bad. Every re-authored section is a second version drifting on its own schedule. The drift is invisible in review — it looks like the real screen — and surfaces later as a pile of small inconsistencies nobody can attribute.

Fix. Every section that is not the feature is either lifted verbatim — the real screen's own component — or left out. Before writing markup, ask 'is this the feature?' If no, reuse or drop. If you are adding something so it does not feel empty, stop.

Verifying at toy scale

toy-scale-verification · layout · confirmed · seen 2× · both

Rule. Verifying a screen with two items hides the defects that only appear at real content scale — an expander that shoves the page down, a list overflowing its container, a sheet taller than the viewport, text wrapping to four lines.

What happens. The screen is checked with two list items and a short name. Everything fits, so it ships.

Why it's bad. Toy data hides exactly the defects that matter — an expander that shoves the page down, a list overflowing its container, a sheet taller than the viewport, a name wrapping to four lines. The screenshot is clean and the screen is broken.

Fix. Open every control with its full realistic dataset before calling it done. These are defects even when the screenshot looks fine at toy scale.

Designing only the happy path

cover-the-states · composition · confirmed · seen 2× · both

Rule. Designing only the happy path leaves empty, loading, error, disabled, and boundary states to be improvised later — usually badly, and usually by someone else.

What happens. One state is designed — data present, everything valid. Empty, loading, error, disabled and boundary are left blank.

Why it's bad. Those states still ship; they just get improvised later, usually by someone who was not in the design conversation. The states a user is most likely to hit on a bad day are the ones nobody drew.

Fix. Enumerate every state as a gallery entry. A control that requires a choice keeps its confirm disabled until valid. Boundary means zero items and overflowing text, not just the middle case.

An artboard that grows to fit its content

fixed-height-artboard · layout · confirmed · seen 1× · mobile, both

Rule. An artboard that grows to fit its content can never reveal a below-the-fold problem — the CTA is always visible because the frame stretched to include it.

What happens. The frame stretches to whatever height the screen needs, so the CTA is always visible in review.

Why it's bad. A frame that auto-fits can never show a below-the-fold problem — it has already removed the fold. Every screen passes review, and the one that matters fails on a real phone.

Fix. Pin the artboard to the device height and let the content scroll inside it. Resizing the viewport changes the frame; it never lets the frame auto-fit.

A gallery that renders its own copy of the screen

no-dev-only-copy · composition · confirmed · seen 1× · both

Rule. A gallery that renders its own copy of a screen will drift from the live screen, and the drift is invisible until someone notices the tool is lying.

What happens. The gallery mounts a simplified stand-in rather than the screen itself. It looks identical on the day it is written.

Why it's bad. The copy drifts from the live screen and nothing surfaces the divergence. The tool keeps reporting confidently on a screen that no longer exists, which is worse than having no tool at all.

Fix. The live route and the gallery mount the same pure component. The route derives a view-model from a selector; the gallery pins fixed view-models. There is never a second copy that can rot.

Brevity that drops what the reader needed

concision-without-loss · copy · confirmed · seen 1× · both

Rule. Optimising copy for brevity drops information the user needed — the shorter option often removes what made the message trustworthy or actionable.

What happens. A message is cut to half its length. It reads tighter, and the fee, the deadline or the reason has gone with the words.

Why it's bad. A shorter version is only better if it still says the same thing. Cutting the part that made a message trustworthy or actionable does not remove the cost — it moves it to the user's next decision.

Fix. Cut what is already clear from context, repeated on screen, or irrelevant to the next decision. Keep anything affecting trust, accountability, policy, pricing, safety, eligibility, timing, or the next action. When a shorter option omits something, say so.

A warmer tone that quietly changes the message

tone-never-changes-facts · copy · confirmed · seen 1× · both

Rule. Offering copy in several tones invites the warm option to soften or omit a fact the user needed, so the variants stop being the same message.

What happens. Three tone variants are offered. The friendliest one has softened the blocker into a suggestion and dropped the deadline.

Why it's bad. They are no longer the same message, so choosing between them is not a tone decision — it is a content decision made by accident. In a blocking state, language that makes the blocker sound optional means the user does not act.

Fix. Tone may change phrasing, warmth, and directness. It must not soften, omit, or distort required facts. Hold the core message invariant across every option. In blocking states, avoid language that makes the blocker sound optional.

“Something went wrong” when the UI knows what went wrong

error-names-the-blocker · copy · confirmed · seen 1× · both

Rule. 'Something went wrong' when the UI knows the actual issue wastes the one moment the user is paying closest attention, and blaming them for a setup, network, or payment failure makes it worse.

What happens. A generic failure message appears in place of the specific one the screen already holds — sometimes with the blame pointed at the user.

Why it's bad. This is the one moment the user reads every word, and it is spent telling them nothing. They cannot tell whether to retry, wait, fix something or give up, so most of them give up.

Fix. Say what happened, what it means for them, and what to do next — in that order, in one message. Name the blocker plainly. Keep error codes and trace ids intact but out of the headline unless support needs them.

A reference image with no note

unannotated-reference · research · confirmed · seen 1× · both

Rule. A saved screenshot with no note becomes a graveyard entry — in three months nobody remembers which detail in it mattered, so it can never be acted on.

What happens. A folder of saved screenshots, each one just a filename and a date.

Why it's bad. In three months nobody remembers which detail in the picture mattered. An unannotated reference cannot be acted on or argued with, and it makes the folder look like research when it is a graveyard.

Fix. Every reference image carries one line saying what pattern it demonstrates and why it was kept. An image with no note is a liability, not an asset.

“Clean and modern” offered as a finding

tradeoffs-not-adjectives · research · confirmed · seen 1× · both

Rule. Describing a reference as 'clean and modern' records an impression, not a design decision, so it cannot inform a choice later.

What happens. The writeup describes each reference with adjectives — clean, modern, playful — and no mechanism.

Why it's bad. An impression cannot inform a choice. Nobody can tell from it what the approach buys, what it costs, or which of the two options actually in front of them it argues for.

Fix. State what the approach buys and what it costs. 'Two-tap date-then-time in a sheet keeps checkout in view — fast for the common case, but buries slot availability until step two, so users hit dead ends late.'

Padding a writeup with invented evidence

no-fabricated-evidence · research · confirmed · seen 1× · both

Rule. Padding a research writeup with invented statistics or 'users generally prefer…' produces confident-sounding claims that cannot be traced and may be false.

What happens. The report reaches for “users generally prefer…” and a percentage, neither of which has a source.

Why it's bad. It reads as the most authoritative line in the document and it cannot be traced or checked. One fabricated number discredits everything true around it, and the decision it steers is unrecoverable later.

Fix. No relevant information is a valid, honest result. Keep sourced fact and your own inference clearly separated, and date anything secondhand. A shorter true report beats a padded fabricated one.

Tool chrome bleeding into the artboard

chrome-isolation · composition · confirmed · seen 1× · both

Rule. Letting the tool's own chrome tokens reach the artboards makes the product screens inherit the tool's look, so what you are reviewing is no longer what ships.

What happens. The console's own fonts, colours and heading styles reach inside the device frame, so the screen picks up the tool's look.

Why it's bad. What you are reviewing is no longer what ships. Every judgement made in the tool — spacing, contrast, hierarchy — was made against a screen the user will never see.

Fix. Scope the tool palette under a single root class and never reference it outside. Re-assert the base color, font, and headings inside the artboard so tool styling cannot bleed into the screen.

Two segmented controls stacked back-to-back

stacked-segments · component-choice · tentative · seen 0× · mobile, both

Rule. Never stack two segmented controls. Two identical full-width tracks in a row read as one control with two rows, so neither one reads as its own question.

What happens. Two segmented tracks sit directly on top of each other at the top of the screen — one for delivery or pickup, one for now or scheduled.

Why it's bad. Identical tracks repeated vertically read as a single control with two rows rather than two independent questions. The user cannot tell which choice belongs to which decision, and each selection silently changes something they cannot see from where they are looking.

Fix. Keep one segmented control for the primary mode, and move the secondary choice into a content row that opens an overlay (a “Delivery time” row → a sheet) — or fold both into a single combined control.

A sheet opened over a sheet

sheet-over-sheet · composition · tentative · seen 0× · mobile, both

Rule. Never open a sheet or dialog over another sheet. One overlay surface at a time — the second buries the first one’s context and makes dismissal ambiguous.

What happens. A “Payment method” sheet is open. Tapping “Add new card” slides a second sheet up over it — two panels, two scrims, stacked.

Why it's bad. The second scrim dims the first sheet, so the screen reads as murky layers with no clear owner. Dismissal turns into a guess: a scrim tap or Escape might close the top sheet, both, or drop the user somewhere they never came from.

Fix. Transform the first sheet to the next step in place — swap its body and add a back arrow to return — or push a full screen for a heavier destination. Keep it to one surface at a time.