diff --git a/apps/desktop/src/app/chat/close-tab.test.ts b/apps/desktop/src/app/chat/close-tab.test.ts index 215f3b013f..ba0a7cc73a 100644 --- a/apps/desktop/src/app/chat/close-tab.test.ts +++ b/apps/desktop/src/app/chat/close-tab.test.ts @@ -138,6 +138,7 @@ describe('closeWorkspaceTab', () => { it('a focused remote bot screen swallows ⌘W: no terminal tab, no session tab closes', async () => { loadedMainOnly() const combo = await import('@/lib/keybinds/combo') + const spy = vi .spyOn(combo, 'isFocusWithin') .mockImplementation(selector => selector === '[data-remote-screen]' || selector === '[data-terminal]') diff --git a/apps/desktop/src/app/chat/transcript-backfill.test.ts b/apps/desktop/src/app/chat/transcript-backfill.test.ts index b717104cd3..38f9e7794f 100644 --- a/apps/desktop/src/app/chat/transcript-backfill.test.ts +++ b/apps/desktop/src/app/chat/transcript-backfill.test.ts @@ -133,6 +133,7 @@ describe('mergeOlderTranscriptPage', () => { chat('five', 5), chat('six', 6) ] + const fetched = [ chat('four-refetched', 4), chat('five-refetched', 5), diff --git a/apps/desktop/src/lib/sibling-ws-url.ts b/apps/desktop/src/lib/sibling-ws-url.ts index a6d83cc7b1..0157ea0de8 100644 --- a/apps/desktop/src/lib/sibling-ws-url.ts +++ b/apps/desktop/src/lib/sibling-ws-url.ts @@ -81,6 +81,7 @@ export async function resolveSiblingWsUrl( RESOLVE_TIMEOUT_MS, 'Timed out minting the gateway WebSocket URL' ) + const url = new URL(wsUrl) if (!url.pathname.endsWith('/api/ws')) { diff --git a/apps/desktop/src/plugins/hermes-bots/screen-autoraise.ts b/apps/desktop/src/plugins/hermes-bots/screen-autoraise.ts index 42ff289f66..4f5080cc28 100644 --- a/apps/desktop/src/plugins/hermes-bots/screen-autoraise.ts +++ b/apps/desktop/src/plugins/hermes-bots/screen-autoraise.ts @@ -70,6 +70,7 @@ export function botForEvent(roster: RosterRow[], event: Pick { it('applies lease events only from the owning host even when profile paths match', () => { setScreenStatus(botA, status) const view = renderHook(() => useScreenPortalState(botA)) + const human = { ...status.lease, holder: 'human' as const, diff --git a/apps/desktop/src/plugins/hermes-bots/screen-pane-lifecycle.test.tsx b/apps/desktop/src/plugins/hermes-bots/screen-pane-lifecycle.test.tsx index 7660666547..220bc11b2d 100644 --- a/apps/desktop/src/plugins/hermes-bots/screen-pane-lifecycle.test.tsx +++ b/apps/desktop/src/plugins/hermes-bots/screen-pane-lifecycle.test.tsx @@ -197,6 +197,7 @@ it('does not hand back while replacing a stream to reconnect the same viewer', a } const presented = (params as { viewer_id?: string } | undefined)?.viewer_id + const viewer_id = presented === 'this-viewer' ? 'this-viewer' : minted++ === 0 ? 'this-viewer' : 'replacement-viewer' @@ -218,8 +219,10 @@ it('re-attaches in watch mode after the bridge evicts us with 4000, with a bound const view = render() await waitFor(() => expect(sockets).toHaveLength(1)) await act(async () => {}) + const observes = () => vi.mocked(displayRequest).mock.calls.filter(([, method]) => method === 'display.observe').length + expect(observes()).toBe(1) act(() => { diff --git a/apps/desktop/src/plugins/hermes-bots/screen-pane.tsx b/apps/desktop/src/plugins/hermes-bots/screen-pane.tsx index 864db982bd..0dc6d21f54 100644 --- a/apps/desktop/src/plugins/hermes-bots/screen-pane.tsx +++ b/apps/desktop/src/plugins/hermes-bots/screen-pane.tsx @@ -330,6 +330,7 @@ export function BotScreenPane({ bot }: { bot: RosterRow }) { const result = await displayRequest<{ lease: DisplayLease }>(bot, 'display.lease.acquire', { viewer_id: viewer.id }) + setScreenLease(bot, result.lease) if (conn !== 'live') {