mirror of
https://github.com/stablyai/orca.git
synced 2026-10-13 00:02:54 +00:00
* fix(workspaces): keep remote creation from navigating paired viewers * fix(workspaces): revoke pending navigation after connection replacement * fix(workspaces): provision when the host renderer is unavailable * test: align navigation and cache-scan expectations with current behavior * fix(workspaces): provision broadcast creates without a host renderer
39 lines
1.4 KiB
TypeScript
39 lines
1.4 KiB
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { resolveRuntimeNavigationTarget } from './runtime-navigation'
|
|
|
|
describe('runtime navigation authority', () => {
|
|
it('denies paired-client fanout for legacy payloads', () => {
|
|
expect(resolveRuntimeNavigationTarget({ clientKind: 'runtime', notifyClients: true })).toBe(
|
|
'caller'
|
|
)
|
|
expect(resolveRuntimeNavigationTarget({ clientKind: 'mobile', notifyClients: true })).toBe(
|
|
'caller'
|
|
)
|
|
})
|
|
|
|
it('preserves legacy in-process routing and explicit intent', () => {
|
|
expect(resolveRuntimeNavigationTarget({ notifyClients: true })).toBe('all')
|
|
expect(resolveRuntimeNavigationTarget({ notifyClients: false })).toBe('caller')
|
|
expect(
|
|
resolveRuntimeNavigationTarget({
|
|
clientKind: 'runtime',
|
|
notifyClients: false,
|
|
navigation: 'host'
|
|
})
|
|
).toBe('host')
|
|
})
|
|
|
|
it('lets worktree operations default to the host without overriding paired or explicit intent', () => {
|
|
expect(resolveRuntimeNavigationTarget({ defaultTarget: 'host' })).toBe('host')
|
|
expect(resolveRuntimeNavigationTarget({ defaultTarget: 'host', notifyClients: false })).toBe(
|
|
'caller'
|
|
)
|
|
expect(resolveRuntimeNavigationTarget({ defaultTarget: 'host', clientKind: 'runtime' })).toBe(
|
|
'caller'
|
|
)
|
|
expect(resolveRuntimeNavigationTarget({ defaultTarget: 'host', navigation: 'clients' })).toBe(
|
|
'clients'
|
|
)
|
|
})
|
|
})
|