Live tail

Polling newest-first by the index’s timestamp, with auto-pause when you scroll away and search_after paging into older documents.

The Elasticsearch REST API has no streaming endpoint, so a live tail has to be built out of searches. Kubo’s polls newest-first by the index’s timestamp field, and the interaction is designed around the fact that you will scroll:

  • scrolling away from the top auto-pauses the tail. Nothing is more annoying than a list that yanks itself back to the top while you are reading a stack trace;
  • a “Resume live” pill appears while paused and reloads from newest when tapped;
  • pull-to-refresh reloads;
  • scrolling to the bottom pages into older documents via search_after, so the same screen serves both “what is happening now” and “what happened before this”.

The tail is enabled only when the index actually has a date field — there is nothing to tail by otherwise — and it respects the time range you have set, so “last 15 minutes” stays last 15 minutes as time moves.

Live tail is an app-bar toggle: turn it off and the screen is an ordinary paged search that makes no requests until you ask it to.

Back to Elasticsearch.