github nesquena/hermes-webui v0.50.59
v0.50.59 — Fix false 'Connection lost' after settled stream

latest releases: v0.50.62, v0.50.61, v0.50.60...
3 hours ago

What's fixed

The WebUI no longer injects a fake **Error:** Connection lost assistant message when an SSE connection drops after the stream already completed normally.

Root cause

The old error handler treated every EventSource disconnect as a potential failure. If the stream was no longer active server-side, it called _handleStreamError() and appended the error message — even when the stream had already finished cleanly and the SSE connection simply dropped afterward.

Fix

  • Track terminal stream states (done, stream_end, cancel, apperror) with a _terminalStateReached flag
  • If the flag is set when an error event fires, close the source and return immediately — no reconnect, no error message
  • When reconnect/status shows the stream inactive, call _restoreSettledSession() which fetches /api/session and restores the completed session if it's settled (active_stream_id == null and no pending message)
  • Real failures still go through the existing error path unchanged

Credit

Thanks to @halmisen for the bug report (issue #561) and the fix (PR #562). Validated against 1319 tests + browser QA.

Don't miss a new hermes-webui release

NewReleases is sending notifications on new releases.