feat(dashboard): reconnect activity SSE with backoff and backfill missed events - #275
Closed
vreabernardo wants to merge 2 commits into
Closed
feat(dashboard): reconnect activity SSE with backoff and backfill missed events#275vreabernardo wants to merge 2 commits into
vreabernardo wants to merge 2 commits into
Conversation
added 2 commits
July 24, 2026 00:40
…sed events On stream drop the client now retries with exponential backoff and jitter (1s base, 30s cap) instead of falling straight through to polling, which still takes over after 5 consecutive failures or when EventSource is unavailable. Frames carry an id line so EventSource tracks lastEventId; manual reconnects pass it as ?lastEventId= and the stream route replays stored events published since that cursor. After a reconnect the feed hook backfills through the activity API with from=<last seen timestamp> before resuming live delivery. Polling fallback and NEXT_PUBLIC_ACTIVITY_REFRESH_MS=0 manual-only behavior are unchanged. Closes Adamantine-guild#258
5 tasks
Contributor
Author
|
Withdrawing this contribution. Thanks for your time. |
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.
Closes #258
Stacked on #273 (main does not build at HEAD; this branches from the repaired tree). Happy to rebase once #273 merges.
Before this, a dropped SSE connection meant the feed silently fell back to the polling interval and anything published during the outage only showed up on the next poll. Now:
Tests: the three client-connector tests that asserted immediate fallback now cover the reconnect contract (backoff instead of a tight retry loop, cursor on the reconnect URL, exhaustion into polling after N attempts), plus new coverage for the server replay and getEventsAfterCursor. Ran the full dashboard suite (556 passed, 0 failed, tsx --test across test/**) and eslint on the touched files. tsc reports only the pre-existing baseUrl deprecation in tsconfig.json.