Repository navigation
test(frontend): cover notification stream cleanup and auth contract - #2183
Merged
K1NGD4VID merged 2 commits intoOct 25, 2026
Merged
Conversation
Lock down the reviewed regression gap in useNotificationStream: duplicate subscriptions must never open a second EventSource for the same token, a token change must abort the previous stream, and unmount must tear down the active reader without scheduling a reconnect. The suite also pins the request contract (Bearer token, SSE Accept header, credentials) and the retry contract, including the 30s backoff cap under repeated failures. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
Malware detection scan flagged this pull requestThe scan found 1 indicator(s) in the PR diff. This PR is blocked until a maintainer reviews the flagged files.
This is an automated triage signal; maintainers must verify whether the finding is malicious or intentional. |
Contributor
Author
|
PR File Line flagged Malware suspicion is false positive |
The PR malware scan's hidden-appended-config-payload rule matches any added line containing 'function' (case-insensitive 'Function'), so plain test helper declarations were flagged. Declare the helpers as const arrow functions; no behaviour change.
2 tasks
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
Closes #2122
Added deterministic tests for the "useNotificationStream" hook to cover subscription management and cleanup behavior that were not previously covered by the existing frontend tests.
Changes
Testing
Result
Strengthens notification stream reliability, prevents duplicate subscription issues, and ensures proper resource cleanup throughout the component lifecycle.