From e7c9a34c3bb8ce707d3ed54763f4d59d9993fede Mon Sep 17 00:00:00 2001 From: Ollie Agent Date: Sat, 10 Oct 2026 15:39:54 +0200 Subject: [PATCH] Make log.raw a one-shot read, not a stream A Stream handler on log.raw blocks the GUI's synchronous startup read forever, so the window never renders. Live updates come from the separate chat and event streams. --- cmd/olliesrv/internal/fs/spec.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd/olliesrv/internal/fs/spec.go b/cmd/olliesrv/internal/fs/spec.go index d101250..dfd1f33 100644 --- a/cmd/olliesrv/internal/fs/spec.go +++ b/cmd/olliesrv/internal/fs/spec.go @@ -818,9 +818,13 @@ func buildAgentChildren(a *agent.Agent, s *session.Session) []virtfs.FsNodeDecl return []byte(item), nil }), ), - // log.raw — JSONL (one Block per line), for GUI/programmatic access + // log.raw — JSONL (one Block per line), for GUI/programmatic access. + // MUST be an ordinary one-shot read (returns a snapshot and EOFs), + // not a stream: the GUI reads it synchronously at startup. A Stream + // handler here blocks that read forever and the window never renders. + // Live updates come from the separate "chat" and "event" streams. virtfs.FileNode("log.raw", 0440, - virtfs.Doc("JSONL chat log. One JSON block per line. Streaming."), + virtfs.Doc("JSONL chat log. One JSON block per line."), virtfs.StatOverride(chatStat), virtfs.Read(func() ([]byte, error) { a.ChatMu().RLock() @@ -830,7 +834,6 @@ func buildAgentChildren(a *agent.Agent, s *session.Session) []virtfs.FsNodeDecl copy(data, raw) return data, nil }), - virtfs.Stream(a.RawLogRead, a.ChatSignal), ), // log — Rendered plain text for TUI/humans (non-blocking read) virtfs.FileNode("log", 0440,