feat: harness startup timing, wait counter and clearer update errors - #37
Merged
Merged
Conversation
…35) Issue #35 反馈「启动近两分钟」「自动更新像坏了」。实测捆绑运行时冷启动 <1s、更新链路无缺陷,根因指向用户侧杀毒扫描与裸错误文案。本提交不改变 启动速度,而是补齐可诊断性与用户感知: - 主进程度量 spawn→就绪耗时并落日志,>45s 输出慢启动提示 - 诊断白名单新增 Harness last startup 与 App update state 两个低敏字段 - 渲染层连接中/重启中显示「已等待 N 秒」,>45s 追加杀毒软件排除建议; HarnessStatus 新增 since 时间戳 - 移除「首次需 1-2 分钟」误导文案(加载层/状态菜单/新手引导) - 更新失败时识别网络类错误并给出代理/手动下载提示 验证:npm run verify 全过(typecheck + build + 100 tests,含新增诊断 字段测试);--smoke / --harness-smoke 端到端通过。
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.
Closes #35
背景
Issue #35 反馈「每次启动要将近两分钟」「自动更新插件好像坏了」。排查结论(详见
plans/issue-35-startup-perf.md):因此本 PR 不改启动速度,而是补齐可诊断性与用户感知。
改动
src/main/main.tssrc/core/diagnostics.tsHarness last startup、App update state两个低敏字段src/core/ipc.tsHarnessStatus.since状态时间戳src/renderer/renderer.tstests/diagnostics.test.mjs自审记录
.includes('已连接'),秒表只在等待态运行,不冲突let声明先于所有调用点求值buildDiagnosticText调用updater.status()无副作用(configure()有守卫)验证
npm run verify:typecheck + build + 100 tests 全过--smoke/--harness-smoke端到端通过