修复启动器在用户未确认前自动执行动作,以及首次切换版本时确认区卡在加载状态的问题#5
Open
EEEEEEEEdison wants to merge 1 commit into
Open
Conversation
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.
问题描述
这个 PR 修复了启动器中的两个相关问题:
预期行为
启动器在用户未明确确认前,不应自动启动应用,也不应自动推进版本切换相关动作。
当用户第一次选择目标版本时,应立即正常显示升级/降级确认区。
原因分析
1. 未经用户确认的自动动作
启动器在首次加载应用状态时,会根据安装状态、版本状态和更新策略直接推导自动动作。
这会导致用户还没确认时,启动器就已经启动应用或者推进版本相关流程,交互上不够友好。
2. 首次切换版本时确认区卡在加载
前端会监听通用的
app-log事件来更新内联版本切换面板状态。但在用户尚未真正确认版本切换前,某些无关日志事件也会把面板错误地标记为“确认中”,导致确认按钮被提前隐藏,看起来像一直在加载。
修复内容
app.json的容错处理,避免状态文件异常时直接导致启动器加载失败修复效果