fix(dashboard): prevent superseded dashboard loads from mutating state#301
Merged
Merged
Conversation
_loadDashboardDataInner could run with an outdated loadSeq while _dashboardLoadSeq had already advanced for a newly queued refresh. Mutations (status summary cache, error toasts) and writeOpenclawConfig ran before the final seq check, so a superseded wave could still clear shared state or persist normalized config after a newer load was requested. Bail out immediately after the first await and after the self-heal config re-read when the load is obsolete. Co-authored-by: 晴天 <1186258278@users.noreply.github.com>
15 tasks
1186258278
added a commit
that referenced
this pull request
May 28, 2026
See CHANGELOG.md for the full notes. Highlights: - feat(hermes): 50+ visual config panels covering session runtime, model management, terminal/sandbox, kanban, safety/privacy, display, browser, voice and toolsets — replaces hand-editing ~/.hermes/config.yaml. - feat(hermes): maintenance/upgrade controls (Update Backup, Session Store Maintenance, Curator Maintenance). - feat(channels): 14 new channels (iMessage / WhatsApp / Telegram / Discord plugin runtime / Signal / Microsoft Teams / LINE / Mattermost / Synology / Google Chat / Zalo / DingTalk / Tlon / IRC / Nostr / Twitch / Nextcloud Talk / ClickClack), unified channel editor, SecretRef preservation, multi-account save, generic diagnostics. - fix(hermes): critical upstream 0.14.0 missing pieces compensated (dashboard_auth stubs + web_dist index.html injected at install/update/ start; idempotent + self-yielding when upstream ships the real files). - fix(hermes): upgrade path now installs runtime extras (croniter / httpx / openai / aiohttp / websockets) to prevent post-upgrade Gateway crashes. - fix(hermes): hermes_venv_python now resolves uv-tool install paths so '可选依赖管理' / 多 Gateway 看板 stop falsely reporting 'venv not found'. - fix(hermes): group-chat page no longer renders run_id as the reply text; it now listens to hermes-run-done and reads payload.output. - fix: dashboard race condition (#301), Node.js nvm-managed version detection (#295), agent models sync with merged openclaw.json (#297). Hot-update minAppVersion bumped to 0.17.0 because src-tauri/src/lib.rs registers 40+ new Tauri commands — older desktop builds must NOT pull this frontend via hot-update or they will hit missing-command crashes.
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.
变更描述
修复仪表盘数据加载在「已排队更新加载」场景下的竞态:
_dashboardLoadSeq在每次调用loadDashboardData时就会递增,而_loadDashboardDataInner仍可能带着旧的loadSeq继续执行。原先在首轮await coreP之后、执行loadSeq校验之前,就会清空_dashboardStatusSummaryCache、弹出服务失败 toast,并在自愈路径中调用writeOpenclawConfig,导致已被更新的加载请求所淘汰的那一波仍可能污染全局缓存或写回 OpenClaw 配置。本次在第一波
await coreP之后立即校验loadSeq/page.isConnected,并在自愈路径中readOpenclawConfig再次await之后重复校验,避免淘汰中的加载产生副作用。同时更正了loadDashboardData上方误导性的「跳过本次」注释,与当前 Promise 链串行化行为一致。变更类型
测试清单
npm run build前端构建通过cargo checkRust 编译通过(当前环境 Cargo 1.83 解析依赖时因上游edition2024要求失败,与本次 JS 变更无关)node --test tests/*.test.js)相关 Issue
(自动化巡检;无关联 Issue 编号)
截图 (如涉及 UI 变更)
无 UI 变更。