Skip to content

Conversation

@mfaferek93
Copy link

@mfaferek93 mfaferek93 commented Feb 1, 2026

Pull Request

Summary

  • Subscribe to fault SSE stream on connect, unsubscribe on disconnect
  • Listen for named SSE events (fault_confirmed, fault_cleared) instead of only unnamed events - gateway sends named events
  • Extract fault data from SSE payload structure { event_type, fault, timestamp }

Issue

Link the related issue (required):

  • closes #

Type

  • Bug fix
  • New feature
  • Breaking change
  • Documentation only

Testing

How was this tested / how should reviewers verify it?


Checklist

  • Breaking changes are clearly described (and announced in docs / changelog if needed)
  • Linting passes (npm run lint)
  • Build succeeds (npm run build)
  • Docs were updated if behavior or public API changed

@mfaferek93 mfaferek93 requested a review from Copilot February 1, 2026 10:42
@mfaferek93 mfaferek93 self-assigned this Feb 1, 2026
@mfaferek93 mfaferek93 added the bug Something isn't working label Feb 1, 2026
Copy link

Copilot AI left a 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.

Copy link

Copilot AI left a 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 }
@mfaferek93 mfaferek93 force-pushed the fix/sse-fault-toast-notifications branch from fe23e3a to 8bb159c Compare February 1, 2026 11:01
@mfaferek93 mfaferek93 requested a review from bburda February 1, 2026 11:02
Copy link

Copilot AI left a 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.

@mfaferek93 mfaferek93 merged commit ebc151d into main Feb 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants