-
Notifications
You must be signed in to change notification settings - Fork 35
重做 Windows installer:统一结果页、WebSetup handoff 与 en/zh-CN 多语言 #677
Copy link
Copy link
Closed
Labels
area:releaseGitHub release workflow, versioning, milestones, and release automationGitHub release workflow, versioning, milestones, and release automationarea:runtimeRuntime manager, process lifecycle, and persisted stateRuntime manager, process lifecycle, and persisted stateenhancementNew feature or requestNew feature or requeststatus:implementable-nowReady to implement with current issue body and contextReady to implement with current issue body and context
Description
Metadata
Metadata
Assignees
Labels
area:releaseGitHub release workflow, versioning, milestones, and release automationGitHub release workflow, versioning, milestones, and release automationarea:runtimeRuntime manager, process lifecycle, and persisted stateRuntime manager, process lifecycle, and persisted stateenhancementNew feature or requestNew feature or requeststatus:implementable-nowReady to implement with current issue body and contextReady to implement with current issue body and context
背景
当前 Windows NSIS installer 体验明显偏原始:安装阶段只有
instfiles页面,成功/失败都通过额外MessageBox收尾,结果信息无法在主窗体内完成闭环;Admin UI与日志路径只是普通文本,也没有统一的结果页状态模型。实际体验上会出现:安装刚结束就突然弹出新的对话框,甚至在需要 WebSetup 时还会直接拉起浏览器,handoff 时机过早且割裂。当前实现更接近 bare NSIS 脚本而不是现代化的
MUI2 + 自定义结果页安装器。随着 packaged installer 语义已经开始收敛,这一层的用户交互也需要同步升级。目标
将 Windows installer 重做为基于
MUI2的向导式安装器,并用统一结果页承载安装结果、后续动作与辅助入口。范围
结果页统一模型
安装结束后不再弹出额外
MessageBox,而是在 installer 主窗体内显示单独结果页,统一覆盖以下状态:fresh install + setupRequiredfresh install + no setupRequiredreinstall / repair successfailureWebSetup handoff 语义
fresh install阶段 installer 只负责 binary 安装与最基础设置。Continue WebSetup。reinstall / repair只用于修复文件与基础状态,默认不启动 WebSetup。页面动作模型
fresh install + setupRequiredContinue WebSetupOpen LogsOpen Admin UIfresh install + no setupRequiredFinishOpen Admin UI、Open Logsreinstall / repair successFinishOpen Admin UI、Open LogsfailureFinishOpen Logs多语言
Windows installer 至少同时支持:
enzh-CN语言策略:
非目标
Page instfiles + MessageBox的旧收尾交互作为长期并存路径。设计约束
Page instfiles + MessageBox结构上做增量补丁。MUI2外壳 + 自定义结果页(可基于nsDialogs),而不是继续依赖 stock finish page 的最小改造。完成标准
MessageBox,而是进入主窗体结果页。fresh install + setupRequired时不会提前自动拉起浏览器,只有点击Continue WebSetup才会启动 WebSetup。reinstall / repair成功后不会启动 WebSetup。Admin UI/Logs在需要出现的状态下都以可点击动作提供。en与zh-CN下都能正常展示对应语言文案。调研结论
1. 当前 Windows installer 仍是 bare NSIS,不是 MUI2 向导流
已确认当前
deploy/windows/codex-remote-installer.nsi只有:Page instfilesMessageBoxAdmin UI/Logs只是字符串,不是页面内动作因此当前体验问题不是局部文案或样式问题,而是 installer UI 模型本身过旧。
2. 现有 Go contract 已足够支撑结果页,不存在必须先扩展后端的阻塞
packaged-install的结果文件已经稳定提供这些字段:modeadminURLsetupURLsetupRequiredlogPatherrorstartupModecurrentVersioncurrentTrackcurrentSlotpackaged-install-probe还额外提供:sameVersioninstallLocationEditablecurrentInstallBinDirsuggestedInstallBinDir这意味着:
packaged-install-probe并保留 probe 上下文,而不是强行往 result-file 里再补一层 Windows 私有字段。3.
Continue WebSetup不能仅靠最终结果里的setupRequired判断当前 ready 状态里
setupRequired=true的含义并不等同于“这是 fresh install 且应该走专属 WebSetup handoff”。它只是 daemon 启动后的 bootstrap 状态结果。所以 Windows 结果页的主动作必须按照:
probe.mode == first_install且result.setupRequired == true->Continue WebSetupprobe.mode == repair-> 不显示Continue WebSetup也就是说,WebSetup handoff 是否出现,需要由
probe.mode与result.setupRequired联合决定,而不是只看最终 result。4. 现有 CI 不覆盖 NSIS GUI installer 本体
当前仓库里:
scripts/check/smoke-install-release.ps1只验证install-release.ps1installer-smoke.yml的 Windows job 也只跑上述 PowerShell 安装脚本 smokerelease.yml虽然会构建 NSIS installer,但后续 smoke 仍然是install-release.sh因此当前 CI 能证明:
但不能证明:
5. 验证层最需要新增的是“installer 自身可观测性”,不一定是重型 GUI 自动化
真正缺的不是 release 下载 smoke,而是 NSIS 页面状态的回归保护。
当前最合理的验证方向是:
Continue WebSetup会触发 handoff相较直接引入脆弱的桌面点击自动化,这条路更稳定,也更适合长期 CI。
6. 多语言与页面内链接在 NSIS/MUI2 能力边界内可实现
已确认:
nsDialogs可做自定义页面与页面内控件nsDialogs自带Link控件,可用于页面内链接动作MUI2支持多语言资源组织;按当前需求,不需要增加安装器首屏语言选择,只需要按系统语言自动选择,并用LangString收拢所有用户文案当前没有发现需要额外引入第三方 installer framework 或重写为别的打包器的信号。
相关文档
docs/general/install-deploy-design.mddocs/implemented/non-linux-user-autostart-design.mdhttps://nsis.sourceforge.io/Docs/Modern%20UI%202/Readme.htmlhttps://nsis.sourceforge.io/Docs/nsDialogs/Readme.html涉及文件
deploy/windows/codex-remote-installer.nsiinternal/app/install/packaged_install.gointernal/app/install/packaged_install_result_file.gointernal/app/install/packaged_install_probe.gointernal/app/install/packaged_install*_test.goscripts/release/build-windows-nsis.shscripts/check/smoke-install-release.ps1.github/workflows/installer-smoke.yml.github/workflows/release.yml.github/workflows/dev-release.yml执行决策
#677作为未拆分直做单元建议范围
阶段 A:收敛 Windows installer 的内部状态模型
modesameVersioninstallLocationEditableOpen Admin UI是否显示Open Logs是否显示Continue WebSetup是否显示probe + result的联合判定规则,尤其是:阶段 B:把脚本迁移到 MUI2 + 自定义结果页
Page instfiles迁移到 MUI2 向导骨架nsDialogs自定义页面承载:Continue WebSetup/FinishOpen Admin UI/Open LogsMessageBox收尾Continue WebSetup点击后执行阶段 C:收敛多语言资源
LangString资源表en/zh-CN阶段 D:补齐 installer-specific 验证与 workflow 接入
Continue WebSetup是否只在预期状态出现en/zh-CN资源没有缺口阶段 E:文档与发布链收尾
release.yml/dev-release.yml的 installer 构建与 smoke 链路仍然完整实现参考
deploy/windows/codex-remote-installer.nsiinternal/app/install/packaged_install.gointernal/app/install/packaged_install_probe.godeploy/macos/InstallerApp/Sources/InstallerBridge.swiftscripts/check/smoke-install-release.ps1.github/workflows/installer-smoke.yml检查参考
setupRequired=true时,安装完成后不能自动弹浏览器Continue WebSetup才允许 handoff 给 WebSetupContinue WebSetupOpen Admin UI与Continue WebSetup不会同时出现MessageBoxen/zh-CN两套文案是否都有完整映射收尾参考
docs/general/install-deploy-design.md当前执行点
close-plan与finish --close两个 close-out 尾项packaged-install-probe新增-result-file输出,并补齐对应 Go 测试MUI2 + finish/result page模型,去掉额外MessageBoxprobe + result联合判定en/zh-CN两套LangStringscripts/check/smoke-windows-nsis-installer.ps1installer-smokeworkflow 新增 Windows NSIS 构建与 smoke 路径docs/general/install-deploy-design.md已同步新的 Windows packaged installer 语义go test ./...、bash scripts/check/go-file-length.sh、git diff --checksmoke-windows根因:NSISFileWrite会把 Unicode capture 文本按系统 ANSI code page 写出,导致中文文案在 smoke capture 中降成??fe4b91ff已推到masterInstaller Smokerun26714208258已全部通过,其中smoke-windowsjob78730184694成功完成Smoke test PowerShell installer与Smoke test Windows NSIS installer独立 verifier 结果:pass已以 comment 形式写回 issueclose-planfinish --closeHEAD与origin/master一致fe4b91ff(test: preserve NSIS unicode smoke capture)Installer Smokerun26714208258通过,URL:https://github.com/kxn/codex-remote-feishu/actions/runs/26714208258close-plan、finish --closebash .codex/skills/issue-workflow-guardrail/scripts/issuectl.sh close-plan --issue 677bash .codex/skills/issue-workflow-guardrail/scripts/issuectl.sh finish --issue 677 --close