diff --git a/mobile/src/files/native-host-file-explorer-operations.ts b/mobile/src/files/native-host-file-explorer-operations.ts index 157daeb30ad..a75bbc2d708 100644 --- a/mobile/src/files/native-host-file-explorer-operations.ts +++ b/mobile/src/files/native-host-file-explorer-operations.ts @@ -16,8 +16,7 @@ export function nativeHostFileExplorerOperations(client: RpcClient): HostFileExp if (response.ok) { return { kind: 'directory', - entries: response.result as MobileDirEntry[], - truncated: false + entries: response.result as MobileDirEntry[] } } // Why: desktops that predate the files.readDir mobile allowlist entry still serve the diff --git a/mobile/src/session/host-session-terminal-operations.ts b/mobile/src/session/host-session-terminal-operations.ts index 594a84b5293..e9b2e8b788c 100644 --- a/mobile/src/session/host-session-terminal-operations.ts +++ b/mobile/src/session/host-session-terminal-operations.ts @@ -1,56 +1,3 @@ -import type { TerminalOscLinkRange } from '../../../src/shared/terminal-osc-link-ranges' - -export type HostSessionTerminalData = string | Uint8Array - -export type HostSessionTerminalStreamEvent = - | { - type: 'subscribed' - cols?: number - rows?: number - } - | { - type: 'scrollback' - cols: number - rows: number - serialized: HostSessionTerminalData - preserveScroll?: boolean - throughSequence?: number - displayMode?: 'auto' | 'desktop' | 'phone' - oscLinks?: TerminalOscLinkRange[] - seq?: number - } - | { - type: 'data' - chunk: HostSessionTerminalData - throughSequence?: number - seq?: number - } - | { - type: 'resized' - cols: number - rows: number - serialized?: HostSessionTerminalData - throughSequence?: number - displayMode?: 'auto' | 'desktop' | 'phone' - oscLinks?: TerminalOscLinkRange[] - seq?: number - } - | { - type: 'metadata' - displayMode?: 'auto' | 'desktop' | 'phone' - cwd?: string - } - | { type: 'end' | 'error' } - -export type HostSessionTerminalSubscribeArgs = { - workspaceId: string - terminalId: string - clientId: string | null - viewport: { cols: number; rows: number } | null | undefined - visible: boolean - capabilities: { terminalBinaryStream: 1; mobileInputLeaseOnly?: 1 } -} - export type HostSessionTerminalOperations = { sendInput( terminalId: string, diff --git a/mobile/src/session/native-host-session-tab-operations.test.ts b/mobile/src/session/native-host-session-tab-operations.test.ts index 24175343a70..91594f3502b 100644 --- a/mobile/src/session/native-host-session-tab-operations.test.ts +++ b/mobile/src/session/native-host-session-tab-operations.test.ts @@ -42,6 +42,17 @@ describe('native host session tab operations', () => { await expect(operations.close('workspace-1', 'tab-1')).resolves.toBe(true) }) + it('prunes a close the host refused, as main did', async () => { + const operations = nativeHostSessionTabOperations({ + sendRequest: vi.fn().mockResolvedValue({ + ok: true, + result: { closed: true, refused: true, refusalReason: 'live-host-pty' } + }) + } as unknown as RpcClient) + + await expect(operations.close('workspace-1', 'tab-1')).resolves.toBe(true) + }) + it('reports a close the host refused at the transport', async () => { const operations = nativeHostSessionTabOperations({ sendRequest: vi.fn().mockResolvedValue({ ok: false, error: { code: 'x', message: 'no' } })