Feature Library

List smarts

<0.01 CPU ms
A still of the List smarts demo
Still
The live demo starts when it’s in view.Swipe a row right to tick it off, left to remove · tick in your own order, or press Walk the shop, and watch the sections learn · Next day brings things due again · type “2 milk”

The small smarts that make a shared shopping or packing list feel like it knows you, as pure, tested functions.

What it costs a frame

<0.01 ms
GPU
not used
CPU, median
<0.01 ms
CPU, 95th pct
<0.01 ms
Draw calls
0
Weight
Light

Measured 13 November 2026 on RTX 4060 Laptop, 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 157, 1920×1080 at 1×. 600 frames × 3 rounds, median kept (rounds ranged CPU <0.01–<0.01 ms). What ran: Measured with the demo shopping by itself: it adds what is due, walks the shop ticking a row every 250 ms (each tick re-sorts the list with a FLIP move and may learn the order), finishes, and moves to the next day, then starts over after two weeks. The smarts are pure functions of a few dozen records: well under a millisecond each; the cost is the list being drawn again. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
RTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring toolnot timed<0.01<0.01
apple · Apple A19 Proin a browser tab · 16 November 2026not timed<0.01<0.01
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026not timed<0.01<0.01

Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.

What it needs

Renders with
DOM and CSSPlain DOM and CSS: every current browser.
Your browser
Runs hereNo WebGPU needed
Depends on
NothingNo other packages

What it’s for

  1. Shopping and grocery lists that sort themselves by aisle
  2. Packing, chores and stock lists with things that recur
  3. “you usually buy this every week” suggestions
  4. Typing a quantity and a thing in one go
  5. Streaks and achievements a client can’t fake
  6. Spotting a duplicate before it is added twice

Pitfalls, in brief

  1. Count streaks and gaps where the phone can’t write them: the server takes the time from its own clock and the person from the connection, and refuses a phone’s tally (clientPatch).
  2. A day is a calendar day in the list’s time zone, so pass one (dayKey(now, 'Europe/London')).
  3. “Yesterday” must be the calendar day before (previousDay), not 24 hours back: on the night the clocks go forward that lands two days back and breaks the streak.
  4. The stored streak only changes when the person does something, so read it with liveStreak(): a streak whose last day is before yesterday has lapsed and shows 0.
  5. learnOrder only moves a section later, to just after the one ticked before it.
4 more in brief
  1. Ticks further apart than one walk (10 minutes by default) teach nothing about each other: call walk.reset() when a shop is finished, so the next shop’s first tick isn’t read as following the last one.
  2. A suggestion needs a thing bought at least twice, and the gap is counted once a shop: the same thing ticked twice within half a day adds to the count but not to the gap.
  3. The parser is English first: “1,5” is read as one and a half, and thousands separators are not (“1,500 g” is 1.5 g).
  4. Names are compared by itemKey, which takes an English plural off the last word (eggs and egg, berries and berry).
9 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From My other apps. Fully custom code.

mulberry32, by Tommy Ettinger (public domain): The repeatable random that makes the demo’s made-up history (demo-data.ts), not the module.

listsshopping listlearningpersonalisationsuggestionsrecurrencerunning averageparsingquantitiesunitspluralsautocompleteduplicatesstreakstime zonesserver rulesgamificationpuretestedno dependencies

Near it in the frame