fix: Changes to Alive the Approval Session#994
Open
NirajC-Microsoft wants to merge 5 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request implements robust WebSocket keepalive mechanisms on both the frontend and backend to prevent idle timeouts, improves error handling and user feedback for plan approvals, and increases backend operation timeouts to reduce premature failures. The main changes are grouped below.
WebSocket Keepalive and Stability Improvements:
Added a periodic keepalive ("ping"/"pong") mechanism to the frontend
WebSocketServiceto prevent idle disconnects, including sending a "pong" every 30 seconds and ignoring keepalive messages in the message handler. The keepalive is started on connect and stopped on disconnect or close. (src/App/src/store/WebSocketService.tsx) [1] [2] [3] [4] [5] [6]The backend WebSocket handler now sends periodic "ping" messages every 30 seconds if no client message is received, preventing idle timeouts from Azure infrastructure or reverse proxies. (
src/backend/v4/api/router.py)Plan Approval Error Handling and User Feedback:
Improved the plan approval submission flow to handle backend timeouts or dropped WebSocket connections by attempting a reconnect and retrying once before failing, and updated user-facing error messages for clarity. (
src/App/src/pages/PlanPage.tsx)Enhanced the backend error message for plan approval when no active plan is found, informing users that the plan may have timed out and advising them to start a new task. (
src/backend/v4/api/router.py)Backend Timeout Configuration:
src/backend/v4/config/settings.py)Does this introduce a breaking change?
How to Test
What to Check
Verify that the following are valid
Other Information