UI: extract magic numbers in GatewayBrowserClient reconnect logic into named constants (#30402)#30498
Closed
chengzhichao-xydt wants to merge 1 commit intoopenclaw:mainfrom
Closed
Conversation
…o named constants (openclaw#30402)
Contributor
Greptile SummaryClean refactoring that extracts WebSocket reconnect magic numbers into well-named constants with JSDoc comments. All four values (
Confidence Score: 5/5
Last reviewed commit: 619323c |
This was referenced Mar 2, 2026
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. |
18 tasks
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.
…o named constants (#30402)
Summary
GatewayBrowserClientuses raw magic numbers (800, 1.7, 15_000, 750) for WebSocket reconnect logic, with no names or comments.INITIAL_BACKOFF_MS,MAX_BACKOFF_MS,BACKOFF_MULTIPLIER,CONNECT_QUEUE_DELAY_MS) and added JSDoc comments.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
None.
Security Impact (required)
Yes, explain risk + mitigation: N/ARepro + Verification
Environment
Steps
ui/src/ui/gateway.tspnpm buildandpnpm check; both passExpected
Actual
Evidence
Human Verification (required)
Compatibility / Migration
Failure Recovery (if this breaks)
git revert <commit>ui/src/ui/gateway.tsRisks and Mitigations
None.