Skip to content

fix(config): 原生配置保存未确认时显示实际状态 - #2150

Merged
jinghero merged 3 commits into
AUTO-MAS-Project:release/v5.9-stablefrom
jinghero:backport/v5.9-stable-1965
Nov 24, 2026
Merged

jinghero merged 3 commits into
AUTO-MAS-Project:release/v5.9-stablefrom
jinghero:backport/v5.9-stable-1965

Conversation

@jinghero

@jinghero jinghero commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

摘要

验证

  • Windows 11、Node.js 24.19.0,提交 8ac95b267。yarn test src/composables/useNativeGuiSession.test.ts 通过 3 项,覆盖停止响应无保存凭据和稍晚到达的写回失败通知。yarn typecheck 通过。
  • 真实原生脚本会话未复测。

回补 AUTO-MAS-Project#1965 到 5.9 正式版。

(cherry picked from commit abb36a9)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T02:58:48.197233Z 8ac95b2 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added 模块: 调度 按更新日志碎片自动设置 类型: 修复 按更新日志碎片自动设置 labels Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

总体结论:修改后合并

看了 14b3391。错误消息先到时,这次修复能压住误报;消息晚到就压不住。

[结果反馈 · P2] 保存失败消息晚到,界面仍会报“已保存”(阻断合并)

保存动作拿到停止接口的 200 后只等 300 毫秒。停止接口没有返回保存结果,像 MAA 写回失败走的是另一条 WebSocket 通知。错误帧如果晚于这 300 毫秒,页面会先亮出成功,再解绑旧订阅。用同一会话的明确保存结果决定提示;拿不到结果时只说“已关闭,保存未确认”。现有测试在停止请求返回前就送了错误,建议再覆盖延迟到达。

写进去了,才说存好了。dot酱

停止任务只确认会话已关闭。原生配置保存和超时收尾统一提示实际可确认的状态。
@jinghero jinghero changed the title fix(composables): 配置保存失败时停止误报已保存 fix(config): 原生配置保存未确认时显示实际状态 Nov 24, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 77507ffb4a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

throw new Error(response.message || t(keys.stopFailed))
}
clearSession(keepDiscardFrames)
clearSession()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Retain discard subscriptions while teardown frames arrive

When a save's HTTP stop response arrives before its WebSocket teardown frames, this call now immediately removes the discard subscription. MAA's ScriptConfig.final_task() can reject the entire edit with structure, unreadable, or not_written; the delayed discard frame is then ignored, so the user loses the discard/recovery dialog and sees only the generic “saving could not be confirmed” toast. Replaying a stop response followed by a discard frame 10 ms later shows the parent displaying the warning and this revision dropping it. Preserve the result subscriptions through teardown rather than removing the previous grace handling; Scripts.vue::stopConfigSession has the same regression.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

总体结论:修改后合并

77507ff 已把没有凭据的“已保存”改成“保存结果未确认”,上一轮的误报修了。现在有一条新的回归要拦一下。

[结果反馈 · P2] 停止请求一返回,就会丢掉晚到的配置丢弃原因(阻断合并)

账号设置会话和脚本列表都在停止返回后解绑通知。两条消息走的是不同连接;如果 MAA 的“本次改动已丢弃”晚一点到,原来会告诉用户是配置结构变化、文件读不了还是没写出,现在只剩一句“未确认”。先把界面关掉也没关系,保留旧任务 ID 的结果订阅到有明确结果或到期,让晚到的具体原因还能弹出来;别改回猜成功。补一条停止先返回、丢弃随后到的测试,并确认不串到下一次会话。

不误报成功,也别把丢弃原因丢了。dot酱

停止响应后短暂保留会话通知。没有写回结果时仍只提示未确认。
@jinghero
jinghero merged commit e89a7e7 into AUTO-MAS-Project:release/v5.9-stable Nov 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

模块: 调度 按更新日志碎片自动设置 类型: 修复 按更新日志碎片自动设置

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant