test(ui): SSE end-to-end smoke#95
Merged
Merged
Conversation
The integration suite covers the bus + SSE endpoint in isolation. This
Playwright spec proves the browser actually receives and acts on the
events — the missing piece in the v1.26.x test coverage.
Three scenarios:
1. Create-in-other-tab. Page is on the URL list. The test's request
context creates a monitor via the API; the new row appears in
the visible list within 2.5s. If SSE breaks or the dashboard
reverts to polling, this fails (old poll was 5s).
2. Delete-while-on-detail. Page is on a monitor's detail page; the
monitor is deleted via the API; the page bounces to '#/' via
detail.ts's monitor-deleted handler.
3. Delete-while-on-list. Page is on the URL list; the row
disappears without a refresh.
All assertions use a 2.5s timeout — tight enough to prove SSE drives
the update (not the deleted 5s poll), loose enough to absorb hono's
internal scheduling jitter and the test runner's overhead.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
Honest follow-up — v1.26.0 and v1.26.1 shipped without an end-to-end test of the actual browser-level SSE behavior. The integration suite covers the bus + endpoint, but never the processor → bus → SSE → EventSource → DOM chain in a real browser.
This spec closes that gap.
Scenarios
#/The 2.5s timeout is intentionally tight — the old polling baseline was 5s. If SSE breaks or the polling regression returns, this test fails.
What's NOT covered
Test plan
UI_BASE_URL=http://localhost:3010 bun run test:ui:e2e -- sse-live-updates.e2e.spec.ts🤖 Generated with Claude Code