feat(web): reconnecting badge and reload prompt for degraded sse stream - #3467
Merged
Merged
Conversation
…tream degrades The live-update EventSource already reported sse_connection_degraded to PostHog after 15s non-OPEN, but the only UI was the sidebar status text, which loses to saving/sync status and hides with the sidebar. Users saw a normal calendar that had silently stopped updating. The SSE client now records when degradation began instead of a boolean. CalendarHeader renders a pulsing "Reconnecting…" badge while degraded and, after 30s, a Refresh control that reloads the page, since native EventSource never retries once the browser marks it CLOSED. Like UpdateAvailableButton, the tooltip and blocked-click hint name Mod+R because the calendar is keyboard-only. Also documents the three live PostHog alerts, including the new hourly "SSE connection degraded burst (production)" alert (more than 3 events in a trailing 60 minutes). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
tyler-dane
marked this pull request as ready for review
September 7, 2026 17:13
tyler-dane
enabled auto-merge
September 7, 2026 17:13
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.
No linked issue. Observability fix from the PostHog
sse_connection_degradedsignal (error_type: server_closed | timeout).What and why
The live-update
EventSource(GET /api/events/stream) already reportssse_connection_degradedto PostHog after 15s non-OPEN, but the only UI was the sidebar status text, which loses to saving/sync status and disappears with a collapsed sidebar. Users saw a normal-looking calendar that had quietly stopped updating.sse.client.tsnow stores when degradation began (getSseDegradedSinceMs) instead of a boolean;isSseDegradedand the sidebar/Settings callers are unchanged.LiveUpdatesStatusin the sharedCalendarHeader: a pulsing dot plus "Reconnecting…" while degraded, cleared on the stream'sopen. After 30s it adds a Refresh control that reloads the page, because nativeEventSourcenever retries once the browser marks it CLOSED (theserver_closedcase). As withUpdateAvailableButton, the tooltip and the blocked-click pointer hint name Mod+R, since the calendar is keyboard-only.launch-ops-checklist.mdnow lists the three live PostHog alerts.PostHog (created via MCP, not in this diff):
sse_connection_degradedwithenvironment = productionover the trailing 60 minutes.Verified in the local preview by driving the degraded store: badge appears, Refresh appears after the 30s mark, the button carries
data-pointer-shortcut=["Mod","R"], and both the header badge and sidebar status clear when the store resets.Verify
VERDICT: FAILlocally (macOS). Checks run: lint (semantic-colors, agent-constraints, biome), knip, type-check, web unit (800 tests, 0 failures), a11y and e2e Playwright.All 16 Playwright failures are the documented local-macOS false failures, not regressions: 15 are
getByRole('dialog', { name: 'Settings' })never appearing becausebooking-harness.tspresses Control+Comma (Meta+Comma on macOS), and 1 is the hold-Mod page-jump hints inaccount-page-jump.spec.ts. Same classes as #3407-#3410; CI (Linux, one worker) is the gate. Every other check passed.🤖 Generated with Claude Code