Repository navigation
fix: clear stale diagnostics after Gateway changes - #140426
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 5:40 PM ET / 21:40 UTC. ClawSweeper reviewWhat this changesClear Debug event history and Live activity previews when the selected Gateway or authenticated account changes, while preserving history during ordinary reconnects. Merge readiness✅ Ready for maintainer review The repair remains necessary on current main, and no introduced blocking defect was found. The verified test merge resolves the previous conflict concern. This maintainer-authored PR should remain open for the normal landing process. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI’s application Gateway store receives connection handshakes and event payloads. Its retained event history feeds Debug and Live activity, so retirement must reach both views when the connection identity changes. flowchart TD
A[Connection settings] --> C[Gateway history owner]
B[Authenticated handshake] --> C
C --> D{Identity changed?}
D -->|Yes| E[Clear history and previews]
D -->|No| F[Preserve reconnect history]
E --> G[Debug and Live activity]
F --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +80, Tests +425, Docs +1. Total +506 across 17 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep diagnostic retirement centralized in the Gateway store, with both views clearing on identity changes and retaining useful same-context reconnect history. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the path: receive an event from Gateway A, switch to B without reloading, and current main retains A’s event log. This reviewer did not execute that path. Is this the best way to solve the issue? Yes. Retiring history at its producer and notifying existing consumers is a focused repair that preserves ordinary reconnect behavior without adding configuration or durable-state changes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7921ec48f82d. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
e47b00c to
3a07271
Compare
|
Fixed: switching Gateway or authentication context clears stale Debug and Live activity diagnostics while ordinary reconnects preserve history. |
* commit '294df333c58f2da104eccffc623ccb3c4d43d4d8': (1802 commits) fix: clear stale diagnostics after Gateway changes (#140426) fix: keep plugin catalogs intact after discovery timeouts (#140441) perf(tui): prepare session picker rows once per overlay (#140462) refactor(config): reuse environment substitution for write-back (#140460) refactor(discord): remove retired auto-presence templates (#140463) fix(ui): finish roster refreshes during session activity (#140459) fix(setup): match prepared credentials to the model provider (#140461) fix: keep MiniMax discovery on the selected credential (#140438) refactor(tests): remove unused parent context cache reset (#140456) fix: avoid repeated xAI OAuth refresh during discovery (#140434) perf(routing): reuse prepared event session targets (#140454) fix(media): keep deferred audio and extraction providers discoverable (#139231) refactor(codex): remove redundant app-server forwarding (#140451) fix(test): avoid false native polling timeouts (#140119) test(gateway): retain saved source in reload fixtures (#140453) fix(gateway): reduce repeated model work when listing sessions (#140414) fix(feishu): fall back to post mode over table limit (#136382) fix: use the bundle-compatible Proxyline runtime under Bun (#140411) refactor(trace): reuse the canonical usage counter type (#140444) refactor(node-host): share execution policy result fields (#140446) ...
Clear stale Debug history and Live activity previews after Gateway or authentication changes while preserving ordinary reconnect history. Fixes openclaw#137108.
Fixes #137108
What Problem This Solves
Fixes an issue where operators switching Gateway connections continued to see diagnostic event payloads from the previous Gateway in Debug and Live activity.
Why This Change Was Made
Diagnostic history now retires when a different connection is selected or the accepted handshake changes authentication scope. Activity observes the same retirement while preserving incremental updates and expanded entries during unchanged reconnects.
User Impact
Switching Gateways or authentication context clears preceding diagnostic data, including when the new connection fails. Ordinary reconnects retain useful troubleshooting history.
Evidence
e47b00cb3496e7eccf6b586f5d534f7ac2bafee2.270762e51d6559dfb4ede3f9fd5d8d1aaa342ac4to follow the Control UI documentation split. Range-diff confirms the unchanged UI patch; all 15 UI source and test files are byte-identical, and the browser dependencies and authentication contracts are unchanged. Only the two documentation updates moved to their new canonical pages.Visual evidence
Gateway switch and mounted Activity account-change recording
137108-recording.webm
Visual verification
3a072714c5852e9c0d6c1121e8a4d7b74625dcd5