Skip to content

The agent that grows with you

test(desktop): typecheck the new Screen pane and install-card tests

teknium1cf8cea7704e4
diff --git a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/input-requests.test.ts b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/input-requests.test.ts
index 78ecb004622..295021096b4 100644
--- a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/input-requests.test.ts
+++ b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/input-requests.test.ts
@@ -8,7 +8,7 @@ import type { GatewayEventContext } from './types'
vi.mock('@/store/native-notifications', () => ({ dispatchNativeNotification: vi.fn() }))
-function context(type: string, requestId: string, routedSession: string | null): GatewayEventContext {
+function context(type: GatewayEventContext['event']['type'], requestId: string, routedSession: string | null): GatewayEventContext {
const payload = { request_id: requestId, profile_key: '/home/h/.hermes' }
return {
deps: { updateSessionState: vi.fn() } as unknown as GatewayEventContext['deps'],
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 bf7509b4c80..973466956c0 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
@@ -9,7 +9,7 @@ const sockets = vi.hoisted(
() => [] as Array<{ closeCodes: number[]; closed: boolean; close: (code?: number) => void; serverClose: (code: number) => void }>
)
-const rfbs = vi.hoisted(() => [] as Array<{ emit: (type: string, detail?: unknown) => void }>)
+const rfbs = vi.hoisted(() => [] as Array<{ emit: (type: string, detail?: unknown) => void; viewOnly?: boolean }>)
const retention = vi.hoisted(() => ({ held: 0 }))
vi.mock('@hermes/plugin-sdk', async () => {
@@ -63,6 +63,7 @@ vi.mock('./screen-connection', async importActual => ({
vi.mock('@novnc/novnc', () => ({
default: class {
private listeners = new Map<string, Array<(event: { detail?: unknown }) => void>>()
+ viewOnly = true
constructor(
_target: HTMLElement,
private socket: { close: () => void }