Source of demo: logtail/run.astro.
Model and live logic: createLogTailModel.ts, log-tail-controller.ts.
A rolling log file like tail -f: up to 5,000 new lines per second, one million lines at most. Select a line, press
↓ or Shift+↓ – the selection stays at its line while the lines keep coming, and every click arrives, even while the
table renders under the mouse pointer. MIT-licensed, no dependencies.
const result = tableApi.appendRows(lines, { follow: frozen ? false : "auto", // "auto": at the end → stay at the end ("tail -f") maxRows: 1_000_000 // ring buffer: the oldest lines leave});if (result && !result.following) newBelow += result.shown; // "+N new lines"follow: false – the view stays where it is, even at the end; lines keep coming.tableApi.repaintHard({ py: Number.MAX_SAFE_INTEGER }) and follow: "auto" again – it follows
also when you scroll to the end yourself.tableApi.rowsAppended(count, { removedAtStart }) after your area model appended.Docs: instructions.md 6.9 · API: TableApi.appendRows, TableApi.rowsAppended.