Building the lease round-trip: upload, extract, review, countersign
A lease only becomes trustworthy when both sides agree on what it says. Here is the state machine behind that, and why the "verified" banner is stricter than it looks.
The lease card on the dashboard looks like a simple status bar. It is actually a small state machine, and every visual state maps to exactly one status the two parties can agree on.
The lifecycle
- none → the renter is invited to upload.
- processing → fields are being extracted.
- extracted → the renter reviews what we pulled.
- pending_landlord → sent for countersignature.
- verified → the landlord countersigned. Only now does the green banner appear.
The important discipline: the green "Lease verified" banner renders only in the terminal state, after the landlord countersigns. Every earlier state gets its own honest treatment — amber "Processing", orange "N fields extracted", amber "Awaiting landlord".
Disputes are a first-class path
A landlord can flag a field with a note. That flips the lease to a disputed state, surfaces the note to the renter, lets them correct the value, and re-sends — clearing the flags. Agreement is something the system helps you reach, not something it assumes.