Skip to content
How much to read

Knowledge base

projects / clarity / features

Design review work order 3, the desk's Today entry path

Clarity 2's third design-review work order gives the desk's Today its write path, one entry row, a money line that moves, and a just-saved entry corrected in place.

feature · current · updated 2026-09-21 · Clarity case study

Work order 3 is the slice of the Clarity 2 design review that gives the dentist's Today screen its write path. On an open day he records what a patient paid without leaving Today and without a dialog, the day's list grows as he records, one line of money moves when he does, and the entry he just saved stays in front of him so a mistake costs one field and not a re-typing. It was built and verified on 2026-09-20 over work order 2's shells and made-up clinic. See build process and status.

What it does

  • One ready row. Directly under the heading and the money line, above the day's list, with the cursor in the patient field: a patient type-ahead over the clinic's roster, a treatment type-ahead over the clinic's nine treatment names, and an amount field that opens empty.
  • The amount is never filled in for him. The chosen treatment's usual amount is a quiet hint beside the field, never a value waiting to be cleared.
  • Nothing blocks a save. A treatment the clinic knows is the only thing a row needs, so a patient and an amount can both be left out, which is how a lab-only payment is written.
  • A new patient from the same row. A name not in the roster is offered as a new patient and created on save, joining the desk's own Patients list.
  • Lab and consultant charges sit one keystroke away, out of the way when they are not needed.
  • The day's list in time order. A booked appointment is a row from its time; a payment against it marks that row recorded and shows the amount; a payment for someone who was not booked is its own row, at the time it was recorded.
  • The line of money. Taken today and still to collect, each figure carrying its words and fixed-width digits, never a bare number.
  • Fixing the last entry. The entry just saved stays as a line under the row; one key reopens it there, saving corrects it in place with no second row, and Escape abandons the correction.
  • A closed day says the clinic is closed and lists no patients, but the entry row still takes a payment.
  • The keyboard does the whole loop, and after a save the cursor is back in the patient field.

How it is built

  • Prices held apart. The made-up usual amount per treatment lives in a desk-only module, outside the shared seed and imported by desk modules only. The attendant's browser downloads the shared chunk, so a price there would put a money word in her file; the desk's own chunk is the one carrying the prices. This is what keeps the money wall honest.
  • Entries live inside the stored clinic, so Reset removes them with everything else. The review's prototype has no database.
  • Read, then write. Both writers re-read the stored clinic immediately before writing, so a payment recorded after a Reset lands in the reset clinic rather than resurrecting the old one. Two tabs of one browser are accepted as last-write-wins.
  • The entry's own time is the app's second clock reading, kept in the clinic's timezone.

Verification

A fresh checker with no memory of the build executed all 13 criteria against the live deployment, signing in as each person in two separate browser profiles and driving headless Chrome over CDP. The attendant's phone was checked twice: every screen she can reach, then every file her browser actually pulls, read over raw HTTPS with her cookie and with his. The shared chunk carried no amount, no rupee sign and no price; the desk's chunk carried the prices. Lint, the full test run (148 tests) and the build all pass. It also made one honest attempt to break each rule: a fractional amount, a negative one, a word where a number belongs and an unknown treatment each produced no entry, and a second identical entry settled the second booking rather than the first again. Two things it recorded without failing a criterion, the money wall not covering the app's own downloaded files and Alt L leaving the cursor where it was, are on known gaps; see overview.

This page was written by a model from my own repositories and checked by a second one against the same sources. I did not write it, and no version of it was approved by me before it went up. How that works, and where it can still be wrong.