Repository navigation
Mahika - 🔥 echo requestId for every timer action [BE] - #2474
Conversation
|
vidiyala99
left a comment
There was a problem hiding this comment.
Reviewed at 505d63c. All 9 tests in src/websockets/TimerService/clientsHandler.spec.js pass locally, including the new GET_TIMER echo cases.
The change is small and safe on its own. A requestId is echoed only when the client sends one. On development the frontend sends one only with STOP_TIMER and matches replies by exact id, so the existing stop confirmation is unchanged. Tabs that didn't send an id ignore the field. Approving.
One thing for merge planning: this PR is only needed for OneCommunityGlobal/HighestGoodNetworkApp#5788. I requested changes there tonight. Once this echo is live, a retry after a failed save gets "started: false" back from GET_TIMER, and the form throws the time away. Also, #5788 and OneCommunityGlobal/HighestGoodNetworkApp#5778 fix the same timer bug and conflict with each other. If #5778 is the one that merges, this PR isn't needed. If #5788 merges, merge this one only after its retry issue is fixed.
|
Thank you all, merging! |



Description
Before logging time from the Timer, the frontend now checks the timer's current state with the server (GET_TIMER) and waits for the server to reply with the same requestId. The server only did this for STOP_TIMER, so that check always waited the full 5-second timeout before every time log. This makes the server echo requestId for any action, so the check comes back right away.
Related PRS (if any):
Required by the frontend PR: OneCommunityGlobal/HighestGoodNetworkApp#5788
Merge order: this PR first, then OneCommunityGlobal/HighestGoodNetworkApp#5751, then the frontend PR above.
Main changes explained:
How to test:
Screenshots or videos of changes:
N/A, backend only.
Note:
None.