Skip to content

feat: add configurable timeout support#22

Merged
jsongo merged 4 commits intomainfrom
feat/configurable-timeout
Feb 17, 2026
Merged

feat: add configurable timeout support#22
jsongo merged 4 commits intomainfrom
feat/configurable-timeout

Conversation

@jsongo
Copy link
Owner

@jsongo jsongo commented Feb 10, 2026

Summary

  • 引入了 OPEN_MOTION_RENDER_TIMEOUT 环境变量,默认超时时间从 30s/120s 提升至 300,000ms (5分钟)。
  • render 命令添加了 --timeout CLI 参数(单位为 ms),优先级高于环境变量。
  • 在 Renderer 核心逻辑中统一应用该超时配置,覆盖了 page.gotopage.waitForLoadStatepage.waitForFunction 等关键步骤。
  • 升级所有包版本至 0.1.7

Test plan

  1. 运行 OPEN_MOTION_RENDER_TIMEOUT=1000 open-motion render ... 验证环境变量是否能正确触发 1s 超时。
  2. 运行 open-motion render ... --timeout 2000 验证 CLI 参数是否能正确触发 2s 超时。
  3. 验证在复杂构建或加载场景下,不再出现 30s 的 TimeoutError

🤖 Generated with Claude Code

@jsongo jsongo force-pushed the feat/configurable-timeout branch 2 times, most recently from 83cb136 to 84e2284 Compare February 11, 2026 16:45
- Add --timeout CLI option and OPEN_MOTION_RENDER_TIMEOUT env var
- Set default timeout to 300,000ms (5 minutes)
- Propagate timeout to Playwright's goto, waitForLoadState, and waitForFunction
- Use page.setDefaultTimeout and page.setDefaultNavigationTimeout in renderer
- Fix render hanging by only waiting for networkidle on first frame
- Fix init template by explicitly setting __OPEN_MOTION_READY__ in rendering mode
- Auto-detect pnpm for init template
- Bump version to 0.1.9

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@jsongo jsongo force-pushed the feat/configurable-timeout branch from 84e2284 to 1c7c752 Compare February 12, 2026 10:27
jsongo and others added 3 commits February 17, 2026 13:01
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove parentheses and use ; instead of && before pkill to ensure the server is killed even if the render command fails.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This adds global quick start instructions and specific examples for the render command
to the CLI help output using commander's addHelpText method.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@jsongo jsongo merged commit 2d4f777 into main Feb 17, 2026
1 check passed
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