The lessons library

13 general lessons written for a kind of product rather than one product. Adopt one with openbugfix adopt L-002 and sweep it across your surfaces with openbugfix sweep.

L-001

A screen rebuilt from a link, saved state or the Back button restores every choice the person made, not just some

WEB · APP
Rule, why, how to check, test recipe

Rule

When a page or screen is rebuilt (reload, shared link, Back or Forward, app restart or resume), every choice comes back exactly: dates, counts of people, place, mode, sort, filters, currency. Nothing silently falls back to a default.

Why it matters

A search for one person became two after a date change, because the form showed its built-in default instead of the search in the address. The person pays for the wrong thing or starts over.

How to check a product

  1. List every choice on the screen.
  2. Make non-default choices, then reload, share the link to a fresh browser, press Back and Forward, and restart the app.
  3. In code, find where each choice is written to the address or saved state, and where it is read back.

Test recipe

  • web: a browser test opens a link with non-default choices, changes one, searches, and asserts every choice is still in the form and the next link.
  • app: a widget test restores saved state and asserts every field.
  • server: the API echoes the choices it received.
L-002

Every number shown for the same thing comes from one source, and the amount shown last is the amount charged

WEB · APP · SERVER
Rule, why, how to check, test recipe

Rule

A price, total, count or date shown in more than one place (card, summary, total, confirmation, email, the payment provider) comes from one source for the current choice (currency, plan, dates, people). The total shown before paying equals what is charged, and the receipt shows the exact amount charged.

Why it matters

A checkout total showed the US-dollar number with a yen sign, while the card was charged the real yen price; elsewhere a receipt rounded the paid total. Totals that disagree with the charge lose trust and invite disputes.

How to check a product

  1. For each money figure, find where its number comes from.
  2. Change currency, plan, dates and people, and confirm every figure changes together.
  3. Compare the final total with the amount sent to the payment step, in at least one non-default currency.

Test recipe

  • web: select an item in each currency; assert card, total and the request to the payment step agree.
  • app: for each currency, the shown total equals the value passed to checkout.
  • server: the checkout recomputes the amount and rejects a mismatch.
L-003

Code shared by several pages works on every page that loads it

WEB
Rule, why, how to check, test recipe

Rule

A shared script, header, search box or style is tested on every page type that loads it, not only the page it was written for. It never assumes an element that only one page has.

Why it matters

A search box shared by two page types worked on the results page but left a blank page when used from a detail page.

How to check a product

  1. List the shared pieces and every page type that loads them.
  2. Use each shared feature on each page type.
  3. Check the console for errors on each.

Test recipe

  • web: one browser test per page type exercises the shared feature and asserts no page errors.
  • app: n/a unless screens share logic the same way.
  • server: n/a.
L-004

Controls in one form look like one family: same height, border, corners and font, whatever their type

WEB · APP
Rule, why, how to check, test recipe

Rule

Every control in a form (text field, select, date, phone, text area, picker) shares one box style: height, border, corner radius, padding, font and focus style. Width may follow content; the boxes line up.

Why it matters

A country code select next to a phone number field kept the browser's small default look, so a payment form looked stitched together.

How to check a product

  1. List every form.
  2. In the styles, check that select, text area, date and phone controls get the same box rule as text inputs.
  3. Look at each form on desktop and phone.

Test recipe

  • web: read computed height, border, radius and font of every control in a form and assert they match.
  • app: every field uses the shared input decoration; a screenshot of the form.
L-005

The checkout says exactly what the money pays for, read from the held order itself

WEB · APP
Rule, why, how to check, test recipe

Rule

Before someone pays, the page states what the total covers: dates, nights or days, rooms or items, people, and whether taxes and fees are included or paid later. These come from the held order, not from the search form or the address, so they survive a reload or a hand-off from an app.

Why it matters

A booking checkout showed the total but not how many nights it covered, because the count came from search values the checkout never had.

How to check a product

  1. Open the checkout from every way in: fresh search, reload, shared link, app hand-off.
  2. Check the summary names everything the total pays for.
  3. In code, confirm each value is read from the held order.

Test recipe

  • web: load a checkout for a held order with no search values in the address; assert the summary shows the counts and dates.
  • server: the hold response carries them.
L-006

Every block on a real page is filled from that item's own data, or hidden; sample content from the design never ships

WEB · APP
Rule, why, how to check, test recipe

Rule

Nothing from a design mock-up reaches a visitor. Every block (stay or order box, price tag, reviews, photos, facts, lists) is filled from the item's own data or hidden; while loading it shows a loading state, and on failure it says so.

Why it matters

A detail page built from a sample item showed the sample's dates, a made-up price when sold out, and the same reviews on every item.

How to check a product

  1. For each templated page, find the code that fills every block; a block with no filler is sample content.
  2. Open two different items: anything identical that should differ is suspect.
  3. Try no data and a slow or failed load.

Test recipe

  • web: render the page with an item that differs from the sample in every field and assert no sample text or number remains.
  • app: the same with two different items.
L-007

Every page's security policy allows each script and connection the page relies on; the console shows nothing blocked

WEB · APP
Rule, why, how to check, test recipe

Rule

The page's own security policy allows every script, frame, font and connection it relies on, including ones a host or CDN injects. If something is meant to be off, the policy and the privacy page both say so.

Why it matters

A host injected an analytics script that the site's own policy blocked on every page, while the privacy page said every page loads it. Nothing looked broken, so the business was blind to its traffic.

How to check a product

  1. Read the headers file and list allowed sources.
  2. Load several page types with the console open; any policy violation is a finding.
  3. Compare with what the privacy page says.

Test recipe

  • web: a browser test loads several page types and fails on any blocked request or policy violation.
L-008

A pinned (sticky) panel never covers what the person is reading or typing, at any screen size

WEB · APP
Rule, why, how to check, test recipe

Rule

A summary or header pinned while scrolling never sits over the content or form below it. On a phone it scrolls away with the page.

Why it matters

A booking summary pinned at the top of a one-column phone layout covered the guest details form while typing.

How to check a product

  1. Find every sticky or fixed element.
  2. Scroll each page at phone width and at desktop width, typing into every field.

Test recipe

  • web: at phone width, scroll to each form field and assert it is not covered by a sticky element.
L-009

Counts shown to people read correctly in the singular and plural

WEB · APP
Rule, why, how to check, test recipe

Rule

Every count reads right: 1 guest, 2 guests; 1 night, 2 nights; 1 city. Written once in a shared helper, not repeated per page.

Why it matters

A heading said '1 guests'.

How to check a product

  1. Search the code for counts glued to a fixed plural word.
  2. Try every count with 1 and 2.

Test recipe

  • web/app: a unit test of the plural helper, and a page test with a count of 1.
L-010

A failure or empty result is said plainly in the visitor's words, keeps the site's look and offers a way forward

WEB · APP
Rule, why, how to check, test recipe

Rule

When something fails or there is nothing to show, the page says so in plain words, keeps the site's header and footer and a main action, and never shows a failure as 'no results' or in internal words (feed, host, configured, upstream).

Why it matters

An unknown address answered with a bare 'Not found' text, a calendar said 'no fares' when prices failed to load, and a board showed a setup message meant for the team.

How to check a product

  1. Try a missing address under every route.
  2. Make each data call fail and read what the page says.
  3. Search user-facing strings for internal words.

Test recipe

  • web: stub each API to fail and to return empty; assert the two messages differ, use no internal words, and the page keeps its header and a main action.
L-011

Dates are worked out in the person's own time zone, the same way on the page and on the server

WEB · APP
Rule, why, how to check, test recipe

Rule

'Today', 'tomorrow', the earliest bookable date and the number of nights are worked out in the person's local time, the same way on the page and the server. Never take a visible date from UTC.

Why it matters

In the evening in the Americas it is already tomorrow in UTC, so a form's 'today' was tomorrow and the server dropped the person's tomorrow.

How to check a product

  1. Search for UTC date conversions near date picking (toISOString().slice(0,10), setUTCHours).
  2. Run the page with the browser time zone set to an evening in the Americas and just after midnight in Asia.

Test recipe

  • web: a browser test with a fixed evening clock in America/Los_Angeles: today and tomorrow are pickable.
  • server: a cut-off test just after UTC midnight.
L-012

A partner-hosted page wears our brand and stays readable, and every template change is re-applied there

WEB · APP
Rule, why, how to check, test recipe

Rule

A page a partner hosts for us (white label, hosted checkout or help) uses our colours and fonts over the partner's defaults, keeps text contrast at 4.5:1 or more, and gets every change to our template re-applied and checked live.

Why it matters

A partner's default colours overrode ours with unreadable links, and a brand fix never reached the live page because the template was not re-pasted.

How to check a product

  1. Diff the live partner page against our template file.
  2. Measure contrast of every link and button at phone and desktop width.
  3. Look for clipped text.

Test recipe

  • web: fetch the live partner page and diff our template block against the file; a contrast and clipping check at 390 and 1280 px.
L-013

No browser default leaks onto a designed element: links, buttons and form controls styled as something else get every default reset

WEB · APP
Rule, why, how to check, test recipe

Rule

Any designed element that is technically a link or a form control (card, tile, button, select, text area) has the browser's defaults reset: underline, link colour, border, font, size, appearance.

Why it matters

Result cards that were links showed every line underlined; a text area inherited a label's tiny capital letters.

How to check a product

  1. List elements that are links or controls but styled as something else.
  2. Check their styles set text-decoration, colour, font, border and appearance.
  3. Compare the page with the design.

Test recipe

  • web: read the computed text-decoration, colour, font size and border of each card and control and assert the designed values.