-
Notifications
You must be signed in to change notification settings - Fork 35
对齐 macOS installer:结果页、WebSetup handoff 与跨平台页面模型 #678
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
背景
当前 macOS packaged installer 已经有比 Windows 更完整的 GUI 框架,但它的页面设计、按钮语义和最终 handoff 方式,和刚收敛出来的 Windows installer 新模型并不一致。
当前已确认的偏移包括:
Continue WebSetup与Finish日志路径 / 管理页 / WebSetup直接塞进 detail 文本,而不是和结果页动作区形成统一模型随着
#677已经把 Windows installer 的结果页状态模型、WebSetup handoff 语义与多语言方向收口,macOS installer 也应对齐到同一套产品模型,避免两个平台在“安装完成后到底发生什么”上继续分叉。关联 issue:
目标
让 macOS packaged installer 的页面设计与行为语义,对齐到
#677中确定的统一 installer 结果页模型。范围
统一结果页模型
macOS 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页面设计对齐
非目标
完成标准
fresh install + setupRequired时才显示Continue WebSetup。reinstall / repair成功后不显示Continue WebSetup,也不会自动启动 WebSetup。Open Admin UI与Continue WebSetup不会同时出现。failure仍在 installer 主窗口内完成收尾,不跳出额外割裂式交互。#677约定的统一模型对齐。调研结论
1. 当前成功/失败页行为与
#677已收敛模型不一致InstallerApp.beginInstall()在拿到成功结果后,会在进入成功页前直接打开setupURL。InstallerApp.primaryAction()在成功页里仍然直接打开setupURL或adminURL,而不是落在统一的结果页动作模型里。failure页主按钮当前是重新检查,本质仍是重新 probe,而不是用统一的结果页收尾语义完成 handoff。2. 结果页状态模型存在结构性缺口,不只是文案漂移
ScreenState.success目前只携带PackagedInstallResultValue。PackagedInstallResultValue不包含sameVersion,因此一旦安装执行结束,结果页就丢失了“同版本重装修复”和“升级修复”的判别上下文。InstallerLaunchPlan,没有一个由probe + install result共同派生出来的结果页 view model。3. 页面结构本身还没有进入统一的“摘要 / 动作 / 辅助信息”模型
successDetail(...)直接把日志路径、管理页 URL、WebSetup URL 堆进 detail 文本。Open Logs动作模型。4. 当前验证面不足以覆盖完成标准 7
installer-smoke.yml里的 macOS 路径只负责打包 DMG、检查文件存在和 checksum,不覆盖 installer 运行态和 handoff 行为。swiftc直接编译源码,没有现成的 Swift test target 或结果页逻辑 harness。计划结论
本 issue 采用“先收口结果页模型,再改 UI,再补验证”的方案,不走最小补丁。
核心实现判断如下:
InstallerApp.swift里继续散落 success/failure 特判。probe + result决定:InstallerApp.swift只负责消费该模型和渲染 AppKit 页面,不再自己决定业务语义。建议范围
阶段 A:结果页状态模型收口
目标:把当前 success / failure 的分散判定,收口为一层可测试的单一结果页模型。
建议文件边界:
deploy/macos/InstallerApp/Sources/InstallerResultPageModel.swiftFoundation依赖,不引入Cocoadeploy/macos/InstallerApp/Sources/InstallerModels.swiftScreenState从当前.success(...)/.failure(...)过渡到统一结果页状态承载PackagedInstallResultValuedeploy/macos/InstallerApp/Sources/InstallerApp.swiftplan.probe + summary.result派生结果页模型openURL(...)primaryAction()改为只执行模型描述的主动作收口要求:
fresh install + setupRequired->Continue WebSetupfresh install + no setupRequired->Finish + Open Admin UI + Open Logsrepair same-version->Finish + Open Admin UI + Open Logsrepair upgrade->Finish + Open Admin UI + Open Logsfailure->Finish + Open Logs阶段 B:结果页 UI 与 handoff 语义收口
目标:让 AppKit 结果页真正对齐统一的“摘要区 / 动作区 / 辅助信息区”模型。
建议修改:
deploy/macos/InstallerApp/Sources/InstallerApp.swiftOpen Admin UI与Open Logs改成明确独立动作,不再埋在 detail 文本里InstallerApp.primaryAction()Continue WebSetup才会打开浏览器并 handoffFinishInstallerApp.secondaryAction()语义要求:
Continue WebSetup后 handoffOpen Admin UI与Continue WebSetup互斥阶段 C:验证路径收口
目标:给
#678补一条稳定、可重复、无需 GUI 猜测的自动化语义验证路径。建议文件边界:
scripts/check/smoke-macos-installer-result-model.shswiftc编译一个临时 harnessdeploy/macos/InstallerApp/Sources/InstallerModels.swiftdeploy/macos/InstallerApp/Sources/InstallerResultPageModel.swift.github/workflows/installer-smoke.ymldocs/general/install-deploy-design.md最小自动化覆盖:
fresh install + setupRequiredfresh install + no setupRequiredrepair same-versionfailure自动化断言内容:
Continue WebSetupOpen Admin UIFinish + Open Logs执行决策
#678作为未拆分直做单元。执行快照
close-plan,随后执行finish --close。#677已确定的 Windows 结果页与 handoff 基线InstallerResultPageModel.swift,由probe + result派生结果页状态、主动作、辅助动作和辅助信息ScreenState已切到统一的.result(InstallerResultPageModel)承载setupURL的旧逻辑已移除scripts/check/smoke-macos-installer-result-model.sh:Linux 下做结构 smoke,macOS 下做 Swift 语义 harnessOpen Admin UI/Open Logs已切成显式辅助动作InstallerBridge已补openFilePath(...),可打开日志路径installer-smokeworkflow 已接入新的 macOS result-model smokedocs/general/install-deploy-design.md已同步 macOS 结果页与验证语义master:b574e721、eceda751、99bb1010Installer Smokerun26715070829已成功完成,含build-macos-packaged-installerjob 与Smoke macOS installer result modelstepissuecomment-4587004131close-planfinish --closeHEAD与origin/master一致99bb1010(test: cover mac installer result model smoke)Installer Smokerun26715070829全绿close-plan、finish --closebash .codex/skills/issue-workflow-guardrail/scripts/issuectl.sh close-plan --issue 678bash .codex/skills/issue-workflow-guardrail/scripts/issuectl.sh finish --issue 678 --close相关文档
docs/general/install-deploy-design.mddocs/implemented/non-linux-user-autostart-design.md涉及文件
deploy/macos/InstallerApp/Sources/InstallerApp.swiftdeploy/macos/InstallerApp/Sources/InstallerBridge.swiftdeploy/macos/InstallerApp/Sources/InstallerModels.swiftdeploy/macos/InstallerApp/Sources/InstallerResultPageModel.swift(新增)internal/app/install/packaged_install.gointernal/app/install/packaged_install_probe.goscripts/release/build-macos-installer-app.shscripts/check/smoke-macos-installer-result-model.sh(新增).github/workflows/installer-smoke.yml实现参考
deploy/macos/InstallerApp/Sources/InstallerApp.swiftprimaryAction()beginInstall()render()deploy/macos/InstallerApp/Sources/InstallerModels.swiftInstallerProbeResultPackagedInstallResultValueScreenStatedeploy/macos/InstallerApp/Sources/InstallerBridge.swiftprobe()runInstall(...)parseResultFile(...)scripts/release/build-macos-installer-app.shswiftc直接编译所有 Swift sources 的事实边界.github/workflows/installer-smoke.ymldocs/general/install-deploy-design.md检查参考
fresh install + setupRequired只在结果页显示Continue WebSetup,安装完成瞬间不自动开浏览器。Continue WebSetup与Open Admin UI不同时出现。收尾参考
docs/general/install-deploy-design.md。#677/#678的平台对齐结论是否仍一致。