Repository navigation
feat(desktop): 启动超过 30 秒时显示已等待时间和日志目录 - #241
Merged
Merged
Conversation
插件(例如轮询扫码登录的插件)可能让 Host 等待几分钟,启动页一直只转圈, 用户分不清是卡住还是在等。超过 30 秒后,在启动页底部显示已等待的秒数、 可能的原因和本机日志目录,启动页消失时提示随之移除。 提示文字由主进程通过 eduwork:boot-hint 同步返回,只接受主窗口主框架的 请求,内容只有固定文案和日志目录,不含 Host 状态。 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
问题
插件可能让 Host 启动等上几分钟,例如轮询扫码登录的插件,或网络不通时的请求。这期间启动页(BootPage)一直只转圈,用户分不清是卡住了还是在等待,也不知道该把什么发给管理员。
改动
dsh-electron/src/boot-hint-preload.cjs:构建时追加到
preload-app.ts,和已有的boot-brand-preload.cjs一样,只在dsh-app://app的主框架中运行。启动页(
[data-dsh-boot])存在超过 30 秒后,在页面底部显示:启动页消失时,提示随之移除,定时器也会停止。
eduwork:boot-hint,返回desktopStartupHint()。eduwork:boot-brand相同。build-shell.mjs:把这个 preload 加入适配器哈希记录,把startup-hint.mjs加入复制列表。测试
dsh-electron/tests/startup-hint.test.mjs,在 VM 中运行这个 preload,覆盖三种情况:node --test dsh-electron/tests/*.test.mjs:257 通过,0 失败。source-receipt.json已刷新(保留 createdAt),audit-eduwork-distribution --verify-receipt无错误,check-source-docs无问题。🤖 Generated with Claude Code