fix(browser): normalize wait timeouts#655
Open
hiSandog wants to merge 1 commit intojackwener:mainfrom
Open
Conversation
Astro-Han
reviewed
Apr 2, 2026
Contributor
Astro-Han
left a comment
There was a problem hiding this comment.
The 36kr wait improvement and the sinafinance fix both make sense. One thought on the approach:
WaitOptions.timeout is already defined as seconds, and only sinafinance/rolling-news.ts passes the wrong unit (10000 instead of 10). The simpler fix would be to just correct that one caller rather than introducing a unit-guessing function. Auto-detecting "is this seconds or milliseconds?" based on a >= 1000 threshold adds an implicit convention that could confuse future contributors — someone passing timeout: 1000 (1000 seconds) would silently get 1 second instead.
Enforcing one consistent unit (seconds, as already documented) and fixing the one wrong call site keeps the codebase simpler.
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
Testing
RUN v4.1.1 /Users/sandog/sandog/code/kaiyuan-space/opencli
Test Files 3 passed (3)
Tests 13 passed (13)
Start at 14:46:42
Duration 349ms (transform 82ms, setup 0ms, import 113ms, tests 259ms, environment 0ms)
RUN v4.1.1 /Users/sandog/sandog/code/kaiyuan-space/opencli
Test Files 2 passed (2)
Tests 4 passed (4)
Start at 14:46:42
Duration 79ms (transform 36ms, setup 0ms, import 42ms, tests 10ms, environment 0ms)