Skip to content

fix: Changes to Alive the Approval Session#994

Open
NirajC-Microsoft wants to merge 5 commits into
dev-v4from
psl-bug-43627
Open

fix: Changes to Alive the Approval Session#994
NirajC-Microsoft wants to merge 5 commits into
dev-v4from
psl-bug-43627

Conversation

@NirajC-Microsoft
Copy link
Copy Markdown
Contributor

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 WebSocketService to 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:

  • Increased the default backend timeout for waiting operations from 5 minutes (300 seconds) to 30 minutes (1800 seconds) to reduce the likelihood of premature timeouts during long-running workflows. (src/backend/v4/config/settings.py)

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 19, 2026

Coverage

Coverage Report •
FileStmtsMissCoverMissing
v4/config
   settings.py2201692%113, 162–164, 175, 195, 206–208, 249–250, 301–303, 328–329
TOTAL305638987% 

Tests Skipped Failures Errors Time
883 5 💤 0 ❌ 0 🔥 8.238s ⏱️

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.

1 participant