fix(desktop): observe foreground promotion failures

Co-authored-by: Josh Tsai <bounce12340@users.noreply.github.com>
This commit is contained in:
Cursor Agent
2026-09-04 01:32:24 +00:00
committed by kshitij
parent 4f1fbc47cd
commit d196983b5d
+11 -7
View File
@@ -521,13 +521,17 @@ async function openSecondary(entry: Secondary, spawnPriority: SpawnPriority = 'b
if (spawnPriority === 'foreground') {
// Hydration may already own this dial as a background slot wait. Kick a
// foreground IPC so main can promote it onto the reserved slot.
void (entry.connectionId && desktop.getConnectionFor
? desktop.getConnectionFor({
connectionId: entry.connectionId,
profile: entry.profile,
priority: 'foreground'
})
: desktop.getConnection(entry.profile, { priority: 'foreground' }))
void (
(
entry.connectionId && desktop.getConnectionFor
? desktop.getConnectionFor({
connectionId: entry.connectionId,
profile: entry.profile,
priority: 'foreground'
})
: desktop.getConnection(entry.profile, { priority: 'foreground' })
).catch(() => undefined)
)
}
await entry.connectPromise