hermes - 💡(How to fix) Fix [Feature]: Dashboard Logs page — replace 5s polling with SSE live-tail [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#17377Fetched 2026-04-30 06:48:03
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4
RAW_BUFFERClick to expand / collapse

Problem or Use Case

The Logs page currently refreshes by polling GET /api/logs every 5 seconds when "Auto-refresh" is toggled on. This means:

  • Up to 5 seconds of delay before new log lines appear
  • The entire buffer is re-fetched on every tick even if nothing changed
  • Scroll position resets on each refresh, interrupting reading

The pulsing green "live" badge shown when Auto-refresh is on implies real-time streaming, but the underlying mechanism is a periodic snapshot swap.

Proposed Solution

Add a GET /api/logs/stream SSE endpoint to web_server.py that tracks the log file's byte offset and pushes only new lines as they are written. On the frontend (LogsPage.tsx), replace the setInterval polling with an EventSource connection that appends incoming lines to the existing buffer rather than replacing it, and only auto-scrolls if the user is already at the bottom.

The existing /api/logs endpoint and manual Refresh button should remain for initial page load and fallback.

Alternatives Considered

No response

Feature Type

Performance / reliability

Scope

None

Contribution

  • I'd like to implement this myself and submit a PR

Debug Report (optional)

extent analysis

TL;DR

Implement a Server-Sent Events (SSE) endpoint to stream new log lines in real-time, replacing the current polling mechanism.

Guidance

  • Create a new GET /api/logs/stream endpoint in web_server.py to track the log file's byte offset and push new lines as they are written.
  • Update LogsPage.tsx to use an EventSource connection, appending incoming lines to the existing buffer instead of replacing it.
  • Modify the auto-scroll behavior to only scroll if the user is already at the bottom of the log buffer.
  • Ensure the existing /api/logs endpoint and manual Refresh button remain functional for initial page load and fallback scenarios.

Example

// LogsPage.tsx example
const eventSource = new EventSource('/api/logs/stream');
eventSource.onmessage = (event) => {
  const newLogLine = event.data;
  // Append new log line to the existing buffer
  logBuffer.push(newLogLine);
  // Auto-scroll if user is at the bottom of the buffer
  if (isAtBottomOfBuffer()) {
    scrollToBottom();
  }
};

Notes

This solution assumes that the log file's byte offset can be accurately tracked and that the SSE endpoint can efficiently push new lines as they are written. Additional error handling and edge cases may need to be considered.

Recommendation

Apply workaround by implementing the proposed SSE endpoint and updating the frontend to use EventSource, as this approach addresses the current polling limitations and provides a more real-time logging experience.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix [Feature]: Dashboard Logs page — replace 5s polling with SSE live-tail [1 participants]