-
Notifications
You must be signed in to change notification settings - Fork 0
fix(faults): enable real-time toast notifications for SSE fault events #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Enables real-time fault toast notifications by subscribing to the gateway’s SSE fault stream on connect and handling the gateway’s named SSE events/payload shape.
Changes:
- Subscribe to the faults SSE stream on connect and unsubscribe on disconnect.
- Update SSE parsing to support gateway payload shape
{ event_type, fault, timestamp }. - Listen for named SSE events (
fault_confirmed,fault_cleared) with a known-events fallback.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/lib/store.ts | Hooks fault stream subscription lifecycle into connect/disconnect. |
| src/lib/sovd-api.ts | Updates SSE subscription to handle named events and unwrap nested fault payloads. |
347c3c8 to
fe23e3a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
- Subscribe to fault SSE stream on connect, unsubscribe on disconnect
- Listen for named SSE events (fault_confirmed, fault_cleared)
- Handle confirmed and cleared events separately:
- fault_confirmed: add/update fault, show warning toast
- fault_cleared: remove fault from list, show success toast
- Extract fault data from SSE payload structure { event_type, fault, timestamp }
fe23e3a to
8bb159c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Pull Request
Summary
Issue
Link the related issue (required):
Type
Testing
How was this tested / how should reviewers verify it?
Checklist
npm run lint)npm run build)