feat(frontend): add real-time SSE log streaming with LiveLogViewer, fixes #329#397
feat(frontend): add real-time SSE log streaming with LiveLogViewer, fixes #329#397samarthsugandhi wants to merge 4 commits into
Conversation
utksh1
left a comment
There was a problem hiding this comment.
This overlaps the same TaskDetails/EventSource area as #410, which now has the broader backend-backed phase implementation and test coverage. Please rebase on top of #410/main after it lands and integrate the live log viewer without regressing phase events or completed-task raw-output replay. Please also add focused frontend tests for output chunks, stderr labels, and completed-task replay so the streaming UI is protected.
…tderr highlighting, auto-scroll and pause
…er, copy, pause and replay
2307021 to
3699181
Compare
|
Hi @utksh1 — addressed all three points:
Ready for re-review. |
|
Re-reviewed after the latest push. Still blocked: real-time log streaming needs to preserve the current task stream contract, handle reconnect/terminal states without duplicate output, and include tests for SSE lifecycle and fallback/error behavior before approval. |
Summary
Adds a
LiveLogViewercomponent toTaskDetailsthat streams real-timescan output via the existing SSE endpoint (
/task/{taskId}/stream),rendering stdout and stderr lines with distinct visual treatment,
auto-scroll with pause control, and live/terminated status indicators.
Closes #329.
Changes
New files
frontend/src/components/LiveLogViewer.tsx— real-time log viewer with:Modified files
frontend/src/pages/TaskDetails.tsx:logLines: LogLine[],isStreaming,copiedLogstateoutputhandler now parses structured{ line, stream, ts }events AND legacy{ chunk }formatdoneanderror_eventSSE sentinel handlers thatclose the stream and trigger a final
loadTask()refreshtermination_reasonfield instatusevents surfacesterminated:timeout/terminated:memory_limitas adistinct status badge
LiveLogViewerwhen streaming orlog lines exist; falls back to the existing static viewer
for completed tasks loaded from stored results
copyLoghandler that copies structured log linesHow to test
Notes
/task/{taskId}/streamSSE route{ chunk }(legacy) and{ line, stream, ts }(structured) output event formatsEventSourceis torn down on component unmount via theuseEffectcleanup function — no zombie connectionsCloses #329