fix: surface disconnect reason, switch health probe to /global/health (#978)
- event-pipeline: onDisconnect now carries a reason tag (ws_closed:code=N, ws_error_frame, ws_closed_before_ready, sse_error) - useConfigStore: store lastDisconnectReason, clear on reconnect - send guards: embed reason in Connection lost toast so we can tell which path tripped - lifecycle: isOpenCodeProcessHealthy hits /global/health (healthy flag) with 5s timeout instead of /session with 2s, avoids false restarts under stream load
This commit is contained in:
committed by
GitHub
parent
8e86891d8e
commit
5ec7f46105
@@ -1347,7 +1347,7 @@ export function SyncProvider(props: {
|
||||
handleEvent(directory, payload, childStores, routingIndex)
|
||||
},
|
||||
onReconnect: () => {
|
||||
useConfigStore.setState({ isConnected: true })
|
||||
useConfigStore.setState({ isConnected: true, lastDisconnectReason: null })
|
||||
for (const [dir, store] of childStores.children) {
|
||||
if (reconnectResyncing.has(dir)) continue
|
||||
if (getReconnectCandidateSessionIds(store.getState()).length === 0) continue
|
||||
@@ -1362,8 +1362,8 @@ export function SyncProvider(props: {
|
||||
})
|
||||
}
|
||||
},
|
||||
onDisconnect: () => {
|
||||
useConfigStore.setState({ isConnected: false })
|
||||
onDisconnect: (reason) => {
|
||||
useConfigStore.setState({ isConnected: false, lastDisconnectReason: reason })
|
||||
},
|
||||
})
|
||||
return cleanup
|
||||
|
||||
Reference in New Issue
Block a user