]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
feat: add server-side refresh notification over WebSocket
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 25 Mar 2026 22:15:51 +0000 (23:15 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 25 Mar 2026 22:15:51 +0000 (23:15 +0100)
commita2edfbbcc36e126737531c805ae4b4b58ef67f0f
tree0de7723948a009196db74daf499167bcb4f768d9
parent7337563a60ab9b6172afca92b64fbc485e85e18f
feat: add server-side refresh notification over WebSocket

Bootstrap calls scheduleClientNotification() after each cache mutation.
A 500ms debounce collapses rapid updates into a single broadcast of
ProtocolNotification [ServerNotification.REFRESH] to all connected WS
clients. setChargingStationData/deleteChargingStationData return boolean
so callers only notify on actual change. Frontend responseHandler uses
isServerNotification/isProtocolResponse guards to dispatch messages.
src/charging-station/Bootstrap.ts
src/charging-station/ui-server/AbstractUIServer.ts
src/charging-station/ui-server/UIWebSocketServer.ts
src/types/UIProtocol.ts
src/types/index.ts
ui/web/src/composables/UIClient.ts
ui/web/src/types/UIProtocol.ts
ui/web/src/types/index.ts
ui/web/src/views/ChargingStationsView.vue
ui/web/tests/unit/UIClient.test.ts
ui/web/tests/unit/helpers.ts