It's what drives the loading of messages to show your messages in the paginated message list, we do this by only handing a subset of all keys to `collect_messages()` (only the keys for that page). It is probably worth factoring out but there's still going to be shared code between this & the UI as both need to allow for the scrubbing & skipping of sensitive messages.