Skip to content

feat(websocket-connection): add isolated online/offline state machine [WPB-23826]#20588

Merged
screendriver merged 2 commits intodevfrom
xstate
Mar 6, 2026
Merged

feat(websocket-connection): add isolated online/offline state machine [WPB-23826]#20588
screendriver merged 2 commits intodevfrom
xstate

Conversation

@screendriver
Copy link
Member

@screendriver screendriver commented Mar 6, 2026

EpicWPB-23826 [Web] Optimize websocket implementation

Pull Request

Summary

Screen Recording 2026-03-06 at 13 15 58


Security Checklist (required)

  • External inputs are validated & sanitized on client and/or server where applicable.
  • API responses are validated; unexpected shapes are handled safely (fallbacks or errors).
  • No unsafe HTML is rendered; if unavoidable, sanitization is applied and documented where it happens.
  • Injection risks (XSS/SQL/command) are prevented via safe APIs and/or escaping.

Accessibility (required)

Standards Acknowledgement (required)


Screenshots or demo (if the user interface changed)

Notes for reviewers

  • Trade-offs:
  • Follow-ups (linked issues):
  • Linked PRs (e.g. web-packages):

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

🔗 Download Full Report Artifact

🧪 Playwright Test Summary

  • Passed: 11
  • Failed: 0
  • Skipped: 3
  • 🔁 Flaky: 0
  • 📊 Total: 14
  • Total Runtime: 86.7s (~ 1 min 27 sec)

@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.58%. Comparing base (48d14dc) to head (9500c50).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev   #20588   +/-   ##
=======================================
  Coverage   45.58%   45.58%           
=======================================
  Files        1641     1642    +1     
  Lines       40496    40499    +3     
  Branches     8354     8354           
=======================================
+ Hits        18461    18463    +2     
  Misses      20097    20097           
- Partials     1938     1939    +1     
Flag Coverage Δ
app_webapp 43.78% <100.00%> (+<0.01%) ⬆️
lib_api_client 50.17% <ø> (ø)
lib_core 59.34% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ocketConnection/webSocketConnectionStateMachine.ts 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@screendriver screendriver changed the title feat(websocket-connection): add isolated online/offline xstate machine [WPB-23826] feat(websocket-connection): add isolated online/offline state machine [WPB-23826] Mar 6, 2026
@thomasuebel
Copy link

Did you consider weblegions ts-fsm over xstate? Recently read about ts-fsm and thought it was probably a good way to to go. Either way big fan of FSMs, so, this should serve as a great example on how ensure strict state transitions moving forward. +1

@screendriver
Copy link
Member Author

ts-fsm

Yes, I know ts-fsm but the last release is 8 years ago 🙈

zskhan
zskhan previously approved these changes Mar 6, 2026
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 6, 2026

@screendriver screendriver added this pull request to the merge queue Mar 6, 2026
Merged via the queue into dev with commit 65f1914 Mar 6, 2026
16 checks passed
@screendriver screendriver deleted the xstate branch March 6, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants