Only advance bytesRead to the last complete newline-terminated line, not to EOF. A partial trailing record (read during mid-write) stays unconsumed and gets re-read on the next refresh, preventing permanent entry loss from the transcript.
Only advance bytesRead to the last complete newline-terminated line, not to EOF. A partial trailing record (read during mid-write) stays unconsumed and gets re-read on the next refresh, preventing permanent entry loss from the transcript.