The phone had a hundred messages, reaching back to July. The conversation showed the newest fifty and stopped in August.
You could scroll to the top and reasonably conclude that was all there was. It wasn’t. Older messages were sitting in the phone’s local database, out of reach.
We found this in a chat app where the amount of history stored and the amount shown on screen had become tangled together. Giving the phone more storage wouldn’t fix access to messages it already held.
What should happen when you scroll back?
A chat app doesn’t need to draw an entire conversation at once. It can show a small portion and reveal older messages as you scroll. The phone can keep much more than it currently displays.
Our repair separated those jobs. Reaching the top of the visible conversation would reveal the next group of messages already on the phone. Only after reaching the end of that saved history would the app ask the server for more.
That lets ordinary scrolling do the work. A person shouldn’t have to press Retry to see something already on their device.
We also increased how much history the phone kept, but that was a separate choice. A bigger cupboard is useful only if you can open it.
A refresh had too much authority
During this work, we found a more worrying problem. A refresh could return fifteen recent messages and treat them as the complete conversation. Saved messages outside that small response could then be deleted from the phone.
Imagine asking for the latest page of a document and being handed a replacement for the whole thing. That was the mistake.
A page of messages tells the app about those messages. It doesn’t establish that everything else has been deleted.
We changed the refresh to merge the returned messages into the saved history. Removing a message requires explicit evidence of deletion from the server. Being absent from a small batch isn’t enough.
Then a test caught our first fix missing something
A new message can arrive while the app is still waiting for a refresh response.
Our first repair preserved the returned history but could leave that newly arrived message out when updating the screen. A regression test caught it: finishing an older request could make the visible conversation fall behind again.
The update needed to include newer messages the phone already knew about, alongside the returned batch.
There were several moving parts here, but the experience we wanted was ordinary: scroll back and find your messages. Refresh the conversation and keep the ones you already had.