mirror of https://github.com/openclaw/openclaw.git
Control UI: reconnect on seq gaps
This commit is contained in:
parent
15c3aa82bf
commit
1600c1726e
|
|
@ -211,6 +211,7 @@ Docs: https://docs.openclaw.ai
|
|||
- Memory/builtin: keep memory-file indexing active in FTS-only mode (no embedding provider) so forced reindexes no longer swap in an empty index and wipe existing memory chunks. (#42714) Thanks @asamimei.
|
||||
- CLI/status: detect node-only hosts in `openclaw status` and `openclaw status --all`, show the configured remote gateway target instead of a false local `ECONNREFUSED`, and suppress contradictory local-gateway diagnosis output.
|
||||
- Gateway/SQLite transient handling: keep unhandled `SQLITE_CANTOPEN`, `SQLITE_BUSY`, `SQLITE_LOCKED`, and `SQLITE_IOERR` failures non-fatal in the global rejection handler so macOS LaunchAgent restarts do not enter a crash-throttle loop. (#57018)
|
||||
- Control UI/gateway: reconnect the browser client when gateway event sequence gaps are detected, so stale non-chat state recovers automatically instead of only telling the user to refresh. (#23912) thanks @Olshansk.
|
||||
|
||||
## 2026.3.24
|
||||
|
||||
|
|
|
|||
|
|
@ -131,12 +131,17 @@ function createHost() {
|
|||
assistantAgentId: null,
|
||||
serverVersion: null,
|
||||
sessionKey: "main",
|
||||
basePath: "",
|
||||
chatMessage: "",
|
||||
chatMessages: [],
|
||||
chatAttachments: [],
|
||||
chatQueue: [],
|
||||
chatToolMessages: [],
|
||||
chatStreamSegments: [],
|
||||
chatStream: null,
|
||||
chatStreamStartedAt: null,
|
||||
chatRunId: null,
|
||||
chatSending: false,
|
||||
toolStreamById: new Map(),
|
||||
toolStreamOrder: [],
|
||||
toolStreamSyncTimer: null,
|
||||
|
|
@ -195,9 +200,9 @@ describe("connectGateway", () => {
|
|||
expect(host.lastError).toBeNull();
|
||||
|
||||
secondClient.emitGap(20, 24);
|
||||
expect(host.lastError).toBe(
|
||||
"event gap detected (expected seq 20, got 24); refresh recommended",
|
||||
);
|
||||
expect(gatewayClientInstances).toHaveLength(3);
|
||||
expect(secondClient.stop).toHaveBeenCalledTimes(1);
|
||||
expect(host.lastError).toBeNull();
|
||||
});
|
||||
|
||||
it("ignores stale client onEvent callbacks after reconnect", () => {
|
||||
|
|
|
|||
|
|
@ -264,8 +264,9 @@ export function connectGateway(host: GatewayHost) {
|
|||
if (host.client !== client) {
|
||||
return;
|
||||
}
|
||||
host.lastError = `event gap detected (expected seq ${expected}, got ${received}); refresh recommended`;
|
||||
host.lastError = `event gap detected (expected seq ${expected}, got ${received}); reconnecting`;
|
||||
host.lastErrorCode = null;
|
||||
connectGateway(host);
|
||||
},
|
||||
});
|
||||
host.client = client;
|
||||
|
|
|
|||
Loading…
Reference in New Issue