Skip to content

fix(windows): 启动 gate pollHotkeyStatus 加 10s 超时 (closes #163)#172

Merged
appergb merged 1 commit into
mainfrom
fix/issue-163-windows-startup-gate-timeout
May 2, 2026
Merged

fix(windows): 启动 gate pollHotkeyStatus 加 10s 超时 (closes #163)#172
appergb merged 1 commit into
mainfrom
fix/issue-163-windows-startup-gate-timeout

Conversation

@appergb
Copy link
Copy Markdown
Collaborator

@appergb appergb commented May 2, 2026

摘要

Closes #163

Windows 上 hotkey hook 永远 starting(反作弊/EDR/UAC 拦)→ 前端 `while(!cancelled)` 死循环 → UI 卡 "正在启动" 灰屏。

修复

`App.tsx:60` 加 50 × 200ms = 10s 上限:超时强 `setGate('ready')`,让用户能进 Permissions 页看 hotkey_status.lastError。

测试

  • npm run build ✅
  • 非 Windows 路径不动

@codex review。

Windows 上 OS 拒绝低层键盘 hook 安装(反作弊/EDR/UAC 拦)时,
hotkey 永远 starting → 前端 while(!cancelled) 永不退出 → UI 卡 "正在启动" 灰屏。

加 50 × 200ms = 10s 上限:超时后强 setGate('ready'),让用户能进 Permissions
页看 hotkey_status.lastError 处理(页面已能显示错误 + 重试入口)。

非 Windows 路径不变。

测试:
- npm run build ✅
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @appergb, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@appergb appergb merged commit e0614e3 into main May 2, 2026
2 checks passed
@appergb appergb deleted the fix/issue-163-windows-startup-gate-timeout branch May 2, 2026 02:43
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.

[windows] hotkey hook 永远 starting 时启动 gate 死锁,主窗口卡 "正在启动" 灰屏

1 participant