mirror of
https://github.com/stablyai/orca.git
synced 2026-09-23 08:02:31 +00:00
A remote Orca server whose workspace window is closed keeps answering status RPC, so Settings > Available Hosts showed "Ready" and the status bar showed "Connected" while every graph-backed operation failed. Adds the shared predicate `isRuntimeWorkspaceWindowClosed` (`graphStatus !== 'ready' && desktopWindowStatus === 'openable'`) and one host-health derivation with a new `workspace-window-closed` state, consumed by both surfaces. Hosts that omit `desktopWindowStatus` are unaffected, so the connected-host count and overall dot do not regress. Fixes #12350 Co-authored-by: gatsby74 <gatsby74@users.noreply.github.com>
15 lines
777 B
TypeScript
15 lines
777 B
TypeScript
import type { RuntimeStatus } from './runtime-types'
|
|
|
|
// Why: a headed Orca server keeps answering status.get after its workspace window
|
|
// closes, so "a status came back" is not evidence that graph-backed workspace work
|
|
// will succeed there. desktopWindowStatus is only 'openable' when no live renderer
|
|
// window exists (orca-runtime.ts:4806), so pairing it with a non-ready graph is the
|
|
// narrow "reachable, but nothing can run" signal: a graph-ready headless serve
|
|
// (#6844) and hosts that omit desktopWindowStatus (older builds) stay untouched.
|
|
export function isRuntimeWorkspaceWindowClosed(status: RuntimeStatus | null | undefined): boolean {
|
|
if (!status) {
|
|
return false
|
|
}
|
|
return status.graphStatus !== 'ready' && status.desktopWindowStatus === 'openable'
|
|
}
|