Work / Aakalan / Wiki / Surfaces
split-sheet
Surfacecanonicalverified 2026-09-23
SURFACE.MOBILE.ADD.SPLIT-SHEETSummary
How the bill divides — who is in it, in what proportion, and who paid.
Raw wireframe
- .context/designs/mobile/add/split.html
Why it is drawn this way
It opens only when the default is wrong. The screen behind already says "paid by you, equally, between N people" in a sentence, so this never opens by itself.
Every mode prints each person's figure in MONEY, including percent and shares where the user typed something else. Nobody multiplies anything out in their head.
Four modes, and all four are free. How a bill divides is part of splitting it, and a paywall between "equally" and "Arjun ate twice as much" would sit in the middle of the core loop. See pro-never-gates-the-core-loop.
Values are seeded from the equal amounts when a mode is chosen, so adjusting one person is one edit rather than five. An empty form here is why split editors go unused.
The box text is the user's; the value is the ledger's. Deriving the text from the stored number makes a decimal point impossible to type — "33." parses to 33, re-renders as "33", and eats the keystroke.
The reconciliation line is never absent and never neutral. Either the bill
adds up or it says by how much it does not, in money. A split editor you can
close with ₹1,800 unassigned produces a ledger nobody can settle. A bill of
nothing is its own case: with a total of 0 every split is 0 and remaining is 0
too, which is not "left to assign" and used to print the nonsense "₹0 over the
bill".
Payer chips wrap rather than scroll, and the last person cannot be removed from a split — somebody has to owe the bill, and emptying it entirely can only ever be a mis-tap.
"Several" exists because the data model has always carried it and a
restaurant where two cards went down is not an exotic case. It is drawn
collapsed here; the expanded per-payer amount list is recorded in routes.js
under missing.
Remainder goes to the payer — with several payers, to whoever put the most in, which is the only choice that needs no tie-break nobody asked for. See money-in-minor-units.
Related
Sources
- src/components/ui/split-sheet.tsx
- src/lib/split.ts
Every project of mine is written down like this.
Read the résumé