Skip to content

Prevent transient Service Status flicker - #2466

Merged
ejsmith merged 2 commits into
mainfrom
issue/transient-service-status-flicker
Aug 13, 2026
Merged

Prevent transient Service Status flicker#2466
ejsmith merged 2 commits into
mainfrom
issue/transient-service-status-flicker

Conversation

@ejsmith

@ejsmith ejsmith commented Aug 13, 2026

Copy link
Copy Markdown
Member

Summary

  • confirm transient API failures against the same-origin health endpoint before leaving the current page
  • coalesce concurrent health checks and Service Status navigation, while preserving the complete return URL
  • make WebSocket callbacks socket-specific and suppress errors from intentional shutdowns
  • add unit and Playwright regressions for healthy and unavailable service paths

Root cause

Every API response with status 0, 408, or 503 immediately navigated to Service Status. Several responses during rapid navigation could therefore repeatedly mount and unmount the authenticated layout. Each teardown closed the push socket, and a socket still connecting reported that intentional interruption through the normal error path.

Behavior and compatibility

An isolated transient API response no longer interrupts navigation when /health remains healthy. If the health probe also fails, the app performs one coalesced Service Status redirect and retains the current path, query string, and hash for recovery.

Existing API contracts and push message formats are unchanged. Breaking changes: none.

Verification

  • npm run validate — 0 Svelte errors and 0 warnings
  • npm run test:unit — 48 files, 486 tests passed
  • npm run build — passed
  • focused localhost Playwright — new Service Status regression plus event and stack effect-chaos coverage, 3 tests passed
  • controlled localhost reproduction — healthy service: 1 health probe, 0 status redirects, 0 WebSocket errors; unavailable service: 1 status redirect with the exact return URL
  • no effect_update_depth_exceeded, maximum-update-depth, console, or page errors in the focused browser suite

@niemyjski

Copy link
Copy Markdown
Member

Thermo-nuclear code-quality pass found one straightforward structural simplification, fixed in 5cf3b0e: the redirector now coalesces the entire health-check/redirect operation behind one promise instead of coordinating separate health and navigation promises. This preserves the cache and concurrency behavior while removing state and the interleaving between phases.\n\nFocused verification on the exact PR head plus the fix:\n- service-status-redirect.test.ts: 5 passed\n- Prettier check: passed\n- git diff --check: passed\n\nThe hosted replacement CI run is the authoritative full-suite gate.

@github-actions

Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Complexity Health
Exceptionless.Core 75% 67% 9992
Exceptionless.AppHost 38% 40% 139
Exceptionless.Insulation 37% 35% 286
Exceptionless.Web 85% 69% 7024
Summary 78% (23475 / 30282) 67% (11017 / 16516) 17441

@ejsmith
ejsmith marked this pull request as ready for review August 13, 2026 04:12
@ejsmith
ejsmith merged commit 1985e3e into main Aug 13, 2026
12 checks passed
@ejsmith
ejsmith deleted the issue/transient-service-status-flicker branch August 13, 2026 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants