Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion mobile/app/h/[hostId]/session/[worktreeId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4099,7 +4099,8 @@ export default function SessionScreen() {
try {
const response = await client.sendRequest('session.tabs.close', {
worktree: `id:${worktreeId}`,
tabId: tab.id
tabId: tab.id,
intent: 'user'
})
if (response.ok) {
if (tab.type === 'terminal' && typeof tab.terminal === 'string') {
Expand Down
9 changes: 9 additions & 0 deletions mobile/src/transport/protocol-compat.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import { describe, expect, it } from 'vitest'
import { evaluateCompat } from './protocol-compat'

describe('evaluateCompat', () => {
it('allows the current mobile app to connect to the ownership-fenced desktop', () => {
expect(
evaluateCompat({
desktopProtocolVersion: 4,
desktopMinCompatibleMobileVersion: 4
})
).toEqual({ kind: 'ok' })
})

it('allows the current mobile app to connect before a protocol-2 desktop updates', () => {
expect(
evaluateCompat({
Expand Down
4 changes: 3 additions & 1 deletion mobile/src/transport/protocol-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@
// server feature added at a specific runtime protocol version. This
// triggers a hard-block screen for users paired to older servers.

export const MOBILE_PROTOCOL_VERSION = 3
// Why: desktop protocol 4 fences clients that could confuse mirror teardown
// with explicit terminal close; mobile only sends close from explicit UI actions.
export const MOBILE_PROTOCOL_VERSION = 4
export const MIN_COMPATIBLE_DESKTOP_VERSION = 2
Loading
Loading