refactor(ui): extract reconnect magic numbers into named constants#30435
Closed
NaturalTensor wants to merge 1 commit intoopenclaw:mainfrom
Closed
refactor(ui): extract reconnect magic numbers into named constants#30435NaturalTensor wants to merge 1 commit intoopenclaw:mainfrom
NaturalTensor wants to merge 1 commit intoopenclaw:mainfrom
Conversation
Contributor
Greptile SummaryExtracted four magic numbers from WebSocket reconnect logic into well-documented top-level constants ( Confidence Score: 5/5
Last reviewed commit: 3d51e3b |
Replace raw numeric literals in GatewayBrowserClient reconnect logic with documented top-level constants: - INITIAL_BACKOFF_MS (800) - MAX_BACKOFF_MS (15_000) - BACKOFF_MULTIPLIER (1.7) - CONNECT_QUEUE_DELAY_MS (750) No behavioral change; improves readability and maintainability. Closes openclaw#30402
Contributor
|
Thanks for the PR! Multiple PRs address the same gateway reconnect magic-numbers refactor (#30407, #30414, #30435, #30498, #31587). Keeping #30407 as the earliest submission. Closing this one to reduce noise. This is an AI-assisted triage review. If we got this wrong, feel free to reopen or start a new PR — happy to revisit. |
This was referenced Mar 2, 2026
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.
Summary
Extracts raw magic numbers in
GatewayBrowserClientreconnect logic into documented top-level constants:INITIAL_BACKOFF_MSMAX_BACKOFF_MSBACKOFF_MULTIPLIERCONNECT_QUEUE_DELAY_MSChanges
ui/src/ui/gateway.tsCloses #30402