Skip to content

refactor(socket): extract protocol handlers#4728

Draft
AlCalzone wants to merge 14 commits into
alcalzone-backend-refactor-http-runtimefrom
alcalzone-backend-refactor-socket-handlers
Draft

refactor(socket): extract protocol handlers#4728
AlCalzone wants to merge 14 commits into
alcalzone-backend-refactor-http-runtimefrom
alcalzone-backend-refactor-socket-handlers

Conversation

@AlCalzone

@AlCalzone AlCalzone commented Jul 11, 2026

Copy link
Copy Markdown
Member

Moves Socket.IO request handling into typed protocol modules.

  • Keeps event names, rooms, acknowledgement envelopes, argument order, timing, and dynamic API behavior unchanged.
  • Resolves collaborators per call so restarts cannot leave stale handlers.
  • Review focus: wire compatibility, first/last-client lifecycle, and production persistence paths.

Part of #4722. Stacked on #4727.

@coveralls

coveralls commented Jul 11, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 29565570304

Warning

No base build found for commit a45df40 on alcalzone-backend-refactor-http-runtime.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 40.578%

Details

  • Patch coverage: 13 uncovered changes across 4 files (118 of 131 lines covered, 90.08%).

Uncovered Changes

File Changed Covered %
api/socket/znifferApi.ts 29 21 72.41%
api/socket/mqttApi.ts 15 12 80.0%
api/socket/hassApi.ts 30 29 96.67%
api/socket/registerSocketApi.ts 16 15 93.75%
Total (8 files) 131 118 90.08%

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 6805
Covered Lines: 2953
Line Coverage: 43.39%
Relevant Branches: 4339
Covered Branches: 1569
Branch Coverage: 36.16%
Branches in Coverage %: Yes
Coverage Strength: 26.82 hits per line

💛 - Coveralls

@AlCalzone
AlCalzone marked this pull request as draft July 11, 2026 21:11
@AlCalzone
AlCalzone force-pushed the alcalzone-backend-refactor-http-runtime branch 2 times, most recently from 1f8cc4d to 774c2e5 Compare July 16, 2026 05:06
@AlCalzone
AlCalzone force-pushed the alcalzone-backend-refactor-socket-handlers branch from fc3970a to 428aa02 Compare July 16, 2026 05:51
@AlCalzone
AlCalzone force-pushed the alcalzone-backend-refactor-http-runtime branch from fbbb9b9 to f83b9ad Compare July 16, 2026 11:54
@AlCalzone
AlCalzone force-pushed the alcalzone-backend-refactor-socket-handlers branch from 428aa02 to 122277f Compare July 16, 2026 12:14
@AlCalzone
AlCalzone force-pushed the alcalzone-backend-refactor-http-runtime branch from f83b9ad to aa5a974 Compare July 16, 2026 18:48
@AlCalzone
AlCalzone force-pushed the alcalzone-backend-refactor-socket-handlers branch from 122277f to ac5c083 Compare July 16, 2026 18:56
@AlCalzone
AlCalzone force-pushed the alcalzone-backend-refactor-http-runtime branch from aa5a974 to a45df40 Compare July 17, 2026 08:00
AlCalzone and others added 14 commits July 17, 2026 10:04
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@AlCalzone
AlCalzone force-pushed the alcalzone-backend-refactor-socket-handlers branch from ac5c083 to b9dd3b4 Compare July 17, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants