状态推送与中止记账迁入 (fix #327) - #356
Merged
Merged
Conversation
悬浮球视觉状态此前由内容脚本自行置位,中止记账散落各处。改为 编排模块单向推送(注入回调):中止推空闲、失败推错误、成功推 完成,全部渲染被拒不推完成态;主框架标志经注入,子框架不推送 但照常翻译。 Co-Authored-By: zhexuancai-uts <261878103+zhexuancai-uts@users.noreply.github.com>
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.
问题
悬浮球视觉状态由内容脚本自行置位,「中止不计入失败」的记账规则没有模块级语义,翻译中还原会误弹「所有引擎均失败」。
根因
状态推送与中止记账散落在内容脚本,状态机缺位。
修复
状态推送迁入编排模块:经注入回调单向推送(模块不操作 UI),中止推空闲态、引擎全失败推错误态、成功推完成态、全部渲染被拒不推完成态;主框架标志经注入提供,子框架不推送状态、不产生提示但照常执行翻译;还原恰在最后一批返回与整体返回之间同样报告为已中止。
验证
pnpm typecheck通过;新增 6 个状态推送单测(在飞还原推空闲非错误、批次间隙还原中止、全失败推错误、渲染被拒不推完成、注入回调可测、子框架不推送但翻译),pnpm test635 个用例全部通过;pnpm build正常。Closes #327