Release notes ยท 4.2

How offline counting works, and why we rebuilt it

What the app shows while it waits for signal. Counting carries on underneath.

Most pantries we work with run out of a hall with one router in the office and thick walls everywhere else. For three years, Pantry Board coped with that badly: if a count failed to send, the volunteer saw a red banner and had to try again. On a busy Saturday, that meant people kept tallies on paper and typed them in later.

Version 4.2 changes that. Every count is now saved on the phone first and sent in the background. Here is how it works, in plain terms.

The phone is the first copy

When you tap a shelf and enter a number, the app writes it to the phone straight away. You can close the app, lose signal or let the battery die. The count is still there when you come back.

SavedOn this phone, waiting
SendingSignal found, uploading
SharedEvery volunteer can see it

What happens when two people count the same shelf

This was the hard part. If Ana counts tinned veg at 9:10 and Tom counts it again at 9:12 on a phone with no signal, which number wins? We tried three answers before settling on the simplest:

  1. The later count wins, by the time it was made, not the time it arrived.
  2. If the two counts differ by more than ten items, both people get a note asking them to check.
  3. Nothing is ever deleted. The shelf history shows both counts.
We stopped writing on the back of delivery notes the week this came out. That alone saves us an hour every Saturday.

That quote is from Marguerite at Hillside Pantry, who tested 4.2 with us for six weeks.

For the curious

Counts are stored in the browser's own database and sent with a retry that waits a little longer each time. If you run your own server, set SYNC_RETRY_MAX to change the longest wait.

Updating: phones update on their own within a day. On the web app, reload the page. Your counts carry over.