You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains 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
The builder eventually looses connection with our websocket backend, after a few minutes of inactivity.
This PR addes a heartbeat mechanism to allow the connection to remain in the background even with no user activitiy.
Changes 🏗️
The frontend sends a ping and backend responds with a pong
Checklist 📋
For code changes:
I have clearly listed my changes in the PR description
I have made a test plan
I have tested my changes according to the test plan:
...
Example test plan
Create from scratch and execute an agent with at least 3 blocks
Import an agent from file upload, and confirm it executes correctly
Upload agent to marketplace
Import an agent from marketplace and confirm it executes correctly
Edit an agent from monitor, and confirm it executes correctly
For configuration changes:
.env.example is updated or already compatible with my changes
docker-compose.yml is updated or already compatible with my changes
I have included a list of my configuration changes in the PR description (under Changes)
Examples of configuration changes
Changing ports
Adding new services that need to communicate with each other
Here are some key observations to aid the review process:
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review
Error Handling The heartbeat timeout reconnection logic may cause connection flapping if the server is temporarily slow to respond. Consider implementing exponential backoff for reconnection attempts.
Race Condition Multiple simultaneous reconnection attempts could occur if heartbeat timeout and onclose handler both trigger reconnects. Consider adding a reconnection state flag.
Resource Leak The heartbeat interval and timeout timers should be cleared when the websocket connection is closed or encounters an error to prevent memory leaks.
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.
The builder eventually looses connection with our websocket backend, after a few minutes of inactivity.
This PR addes a heartbeat mechanism to allow the connection to remain in the background even with no user activitiy.
Changes 🏗️
The frontend sends a ping and backend responds with a pong
Checklist 📋
For code changes:
Example test plan
For configuration changes:
.env.example
is updated or already compatible with my changesdocker-compose.yml
is updated or already compatible with my changesExamples of configuration changes