fix(desktop): poll messaging sessions so platform traffic appears live - #57636
Merged
Conversation
Inbound Telegram/WeChat/Discord messages are written by the background gateway, not the desktop websocket that drives local chats. Without explicit polling the messaging sidebar and the open transcript stay frozen until the user manually refreshes. Desktop: - MESSAGING_POLL_INTERVAL_MS (10 s): interval poll of the messaging session list so new platform sessions surface automatically. - ACTIVE_MESSAGING_SESSION_POLL_INTERVAL_MS (5 s): poll the currently- viewed messaging transcript and re-hydrate the chat state when the FNV-1a signature changes (hash covers role + timestamp + content). - sameCronSignature now compares lineage_root_id / source / profile / preview / message_count / last_active / ended_at so stale previews and activity times are no longer silently ignored. - sessionMatchesStoredId helper de-dups the id / _lineage_root_id check. - refreshMessagingSessions exposed from useSessionListActions so the controller can use it in the poll effect. Gateway: - SessionStore._compression_tip_for_session_id: look up the latest compression continuation for a session id. - SessionStore._heal_compression_tip_locked: rewrite a stale entry to the compression child before returning it, so a restart or failed send no longer leaves the store pinned to the compressed parent. Co-authored-by: lawyer112 <lawyer112@users.noreply.github.com>
…sion The active-transcript poll armed a 5 s timer for every selected session and no-op'd inside the tick for local chats (already live over the websocket). Derive activeIsMessaging and gate the effect on it so local chats never spin an idle timer.
The routing-heal added to get_or_create_session calls SessionDB.get_compression_tip; the stale-guard suite's bare MagicMock db returned a Mock the heal then assigned as session_id, failing JSON serialization. Model the real contract (a non-compressed session's tip is itself) so the heal is a correct no-op.
19 tasks
habarmc1223-sudo
pushed a commit
to habarmc1223-sudo/hermes-agent-fluxmem
that referenced
this pull request
Jul 8, 2026
…ssaging-poll fix(desktop): poll messaging sessions so platform traffic appears live
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
…ssaging-poll fix(desktop): poll messaging sessions so platform traffic appears live
This was referenced Jul 16, 2026
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
…ssaging-poll fix(desktop): poll messaging sessions so platform traffic appears live
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
…ssaging-poll fix(desktop): poll messaging sessions so platform traffic appears live
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #45677 — ported to main after the desktop refactor split
refreshMessagingSessionsand related infrastructure intouse-session-list-actions.ts.Problem
Inbound Telegram / WeChat / Discord messages are written by the background gateway, not the desktop WebSocket that drives local chats. Without explicit polling the messaging sidebar and the open transcript stay frozen until the user manually navigates away and back.
Changes
Desktop:
MESSAGING_POLL_INTERVAL_MS(10 s) — interval poll of the messaging session list while connected + visible, so new platform sessions surface automatically.ACTIVE_MESSAGING_SESSION_POLL_INTERVAL_MS(5 s) — poll the currently-viewed messaging transcript and re-hydrate when the FNV-1a content signature changes.sameCronSignatureextended to comparelineage_root_id / source / profile / preview / message_count / last_active / ended_at— stale previews and timestamps were silently ignored before.refreshMessagingSessionsexported fromuseSessionListActionsso the controller can use it in the poll effect.Gateway:
_compression_tip_for_session_id— DB lookup for the latest compression continuation, outside the lock._heal_compression_tip_locked— rewrites a staleSessionStoreentry to the compression child so a restart or failed send no longer leaves the mapping pinned to the compressed parent.Tests
npm --workspace apps/desktop run typecheck✓pytest tests/gateway/test_restart_resume_pending.py::TestGetOrCreateResumePending::test_resume_pending_follows_compression_tip✓Co-authored-by: lawyer112 lawyer112@users.noreply.github.com