Merge main after generic usage cache squash merge

This commit is contained in:
Brennan Benson
2026-11-12 02:18:57 -08:00
957 changed files with 10675 additions and 25770 deletions
+4 -4
View File
@@ -44,8 +44,8 @@ on:
- 'src/main/native-chat/subagent-entry-id-bounds.ts'
- 'src/main/native-chat/agent-session-journal/item-lifecycle/journal-payload-bounds.ts'
- 'src/main/native-chat/agent-session-journal/item-lifecycle/journal-reasoning-row.ts'
- 'src/main/claude/claude-internal-message-content.ts'
- 'src/main/claude/claude-stop-hook-feedback.ts'
- 'src/main/claude/structured/journal/claude-internal-message-content.ts'
- 'src/main/claude/structured/journal/claude-stop-hook-feedback.ts'
- 'src/main/claude/structured/journal/**'
- 'src/main/claude/__fixtures__/claude-adapter-capture-fold.jsonl'
- 'src/main/codex/app-server/codex-item-field-readers.ts'
@@ -132,8 +132,8 @@ on:
- 'src/main/native-chat/subagent-entry-id-bounds.ts'
- 'src/main/native-chat/agent-session-journal/item-lifecycle/journal-payload-bounds.ts'
- 'src/main/native-chat/agent-session-journal/item-lifecycle/journal-reasoning-row.ts'
- 'src/main/claude/claude-internal-message-content.ts'
- 'src/main/claude/claude-stop-hook-feedback.ts'
- 'src/main/claude/structured/journal/claude-internal-message-content.ts'
- 'src/main/claude/structured/journal/claude-stop-hook-feedback.ts'
- 'src/main/claude/structured/journal/**'
- 'src/main/claude/__fixtures__/claude-adapter-capture-fold.jsonl'
- 'src/main/codex/app-server/codex-item-field-readers.ts'
@@ -1,130 +0,0 @@
import { PUSH_LIMITS } from '@orca-cloud/push-contract/push-limits'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { PushDeviceRegistryStore, type PushDeviceUpsert } from './device-registry-store.js'
import { openInMemoryPushDatabase } from '../database/push-database.js'
import type { CloudDatabase as PushDatabase } from '@orca-cloud/cloud-database/cloud-database'
const OWNER = 'abcdefghijklmnop'
const OTHER = 'ponmlkjihgfedcba'
describe('push device registry store', () => {
let database: PushDatabase
let clock = 1_700_000_000_000
let devices: PushDeviceRegistryStore
beforeEach(async () => {
database = await openInMemoryPushDatabase()
clock = 1_700_000_000_000
devices = new PushDeviceRegistryStore(database, () => clock)
})
afterEach(async () => {
await database.close()
})
async function upsertOk(input: PushDeviceUpsert): Promise<string> {
const result = await devices.upsert(input)
if (!result.ok) throw new Error(`unexpected upsert refusal: ${result.reason}`)
return result.registrationId
}
function androidDevice(deviceId: string): PushDeviceUpsert {
return {
hostFingerprint: OWNER,
deviceId,
platform: 'android',
token: `token-${deviceId}`
}
}
it('keeps one registration per host and device while replacing the token', async () => {
const first = await upsertOk({
hostFingerprint: OWNER,
deviceId: 'device-1',
platform: 'ios',
token: 'a'.repeat(64),
apnsEnvironment: 'sandbox'
})
clock += 1_000
const second = await upsertOk({
hostFingerprint: OWNER,
deviceId: 'device-1',
platform: 'ios',
token: 'b'.repeat(64),
apnsEnvironment: 'production'
})
expect(second).toBe(first)
const registration = await devices.findById(first)
expect(registration).toMatchObject({
token: 'b'.repeat(64),
apnsEnvironment: 'production',
dead: false
})
expect(await devices.list(OWNER)).toHaveLength(1)
})
it('revives a registration that a re-registered token replaces', async () => {
const registrationId = await upsertOk({
hostFingerprint: OWNER,
deviceId: 'device-1',
platform: 'android',
token: 'token-one'
})
await devices.markDead((await devices.findById(registrationId))!)
expect((await devices.findById(registrationId))?.dead).toBe(true)
await upsertOk({
hostFingerprint: OWNER,
deviceId: 'device-1',
platform: 'android',
token: 'token-two'
})
expect(await devices.findById(registrationId)).toMatchObject({
token: 'token-two',
dead: false
})
})
it('lets only the owning host delete a registration', async () => {
const registrationId = await upsertOk({
hostFingerprint: OWNER,
deviceId: 'device-1',
platform: 'android',
token: 'token-one'
})
expect(await devices.deleteOwned(OTHER, registrationId)).toBe(false)
expect(await devices.findById(registrationId)).not.toBeNull()
expect(await devices.deleteOwned(OWNER, registrationId)).toBe(true)
expect(await devices.findById(registrationId)).toBeNull()
})
it('scopes lookups and listings to the owning host', async () => {
const owned = await upsertOk({
hostFingerprint: OWNER,
deviceId: 'device-1',
platform: 'android',
token: 'token-one'
})
const foreign = await upsertOk({
hostFingerprint: OTHER,
deviceId: 'device-2',
platform: 'android',
token: 'token-two'
})
const found = await devices.findOwned(OWNER, [owned, foreign])
expect([...found.keys()]).toEqual([owned])
expect(await devices.list(OTHER)).toEqual([
{ registrationId: foreign, deviceId: 'device-2', platform: 'android', dead: false }
])
expect(await devices.findOwned(OWNER, [])).toEqual(new Map())
})
it('counts the cap per host, not across the whole table', async () => {
for (let index = 0; index < PUSH_LIMITS.maxDevicesPerHost; index++) {
await upsertOk(androidDevice(`device-${index}`))
}
expect((await devices.upsert(androidDevice('extra'))).ok).toBe(false)
expect(
(await devices.upsert({ ...androidDevice('device-0'), hostFingerprint: OTHER })).ok
).toBe(true)
})
})
@@ -1,4 +1,3 @@
import { PUSH_LIMITS } from '@orca-cloud/push-contract/push-limits'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import {
answerPushHostChallenge,
@@ -27,21 +26,6 @@ describe('push host challenge store', () => {
await database.close()
})
it('rejects a challenge the moment its own ttl elapses', async () => {
const host = createPushHostKeypair(4)
const challenge = await store.issue(hostPublicKeyB64(host))
const proof = answerPushHostChallenge(challenge!, {
gatewayOrigin: GATEWAY_ORIGIN,
keypair: host,
now: () => clock
})!
clock += PUSH_LIMITS.challengeTtlMs + 1
await expect(store.verify(challenge!.challengeId, proof)).resolves.toEqual({
ok: false,
reason: 'expired'
})
})
it('refuses a wrong host: the box will not open and a foreign proof will not match', async () => {
const owner = createPushHostKeypair(6)
const intruder = createPushHostKeypair(7)
@@ -1,53 +0,0 @@
import { PUSH_LIMITS } from '@orca-cloud/push-contract/push-limits'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { PushHostSessionStore } from './host-session-store.js'
import { openInMemoryPushDatabase } from '../database/push-database.js'
import type { CloudDatabase as PushDatabase } from '@orca-cloud/cloud-database/cloud-database'
const HOST = 'abcdefghijklmnop'
describe('push host session store', () => {
let database: PushDatabase
let clock = 1_700_000_000_000
let sessions: PushHostSessionStore
beforeEach(async () => {
database = await openInMemoryPushDatabase()
clock = 1_700_000_000_000
sessions = new PushHostSessionStore(database, () => clock)
})
afterEach(async () => {
await database.close()
})
it('reports expiry separately from an unknown token', async () => {
const session = await sessions.create(HOST)
clock += PUSH_LIMITS.sessionTtlMs + 1
await expect(sessions.resolve(session.sessionToken)).resolves.toEqual({
ok: false,
reason: 'session_expired'
})
await expect(sessions.resolve('not-a-session')).resolves.toEqual({
ok: false,
reason: 'unknown_session'
})
})
it('keeps one live session per host and prunes it once expired', async () => {
const first = await sessions.create(HOST)
const second = await sessions.create(HOST)
// The earlier session is gone the moment its host proves again, so a flood
// of proofs leaves one row per host rather than one per proof.
await expect(sessions.resolve(first.sessionToken)).resolves.toEqual({
ok: false,
reason: 'unknown_session'
})
await expect(sessions.resolve(second.sessionToken)).resolves.toMatchObject({ ok: true })
const other = await sessions.create('ponmlkjihgfedcba')
await expect(sessions.resolve(second.sessionToken)).resolves.toMatchObject({ ok: true })
clock += PUSH_LIMITS.sessionTtlMs + 1
expect(await sessions.pruneExpired()).toBe(2)
await expect(sessions.resolve(other.sessionToken)).resolves.toMatchObject({ ok: false })
})
})
@@ -1,81 +0,0 @@
import { PUSH_LIMITS } from '@orca-cloud/push-contract/push-limits'
import { Hono } from 'hono'
import { describe, expect, it } from 'vitest'
import { ClientIpRateLimiter, clientIpRateLimit } from './client-ip-rate-limit.js'
const CAPACITY = PUSH_LIMITS.unauthenticatedRequestsPerMinutePerIp
function limiterApp(limiter: ClientIpRateLimiter, trustedProxyHops = 0): Hono {
const app = new Hono()
app.post('/probe', clientIpRateLimit(limiter, { trustedProxyHops }), (context) =>
context.json({ ok: true })
)
return app
}
describe('client ip rate limiter', () => {
it('buckets on the last forwarded hop, the only one the platform appended', async () => {
const app = limiterApp(new ClientIpRateLimiter({ now: () => 1_000 }))
for (let index = 0; index < CAPACITY; index++) {
await app.request('/probe', {
method: 'POST',
headers: { 'x-forwarded-for': `10.0.0.${index}, 203.0.113.7` }
})
}
const sameClient = await app.request('/probe', {
method: 'POST',
headers: { 'x-forwarded-for': '10.9.9.9, 203.0.113.7' }
})
expect(sameClient.status).toBe(429)
const otherClient = await app.request('/probe', {
method: 'POST',
headers: { 'x-forwarded-for': '10.0.0.1, 198.51.100.9' }
})
expect(otherClient.status).toBe(200)
})
it('skips the configured trusted proxies when counting from the right', async () => {
const app = limiterApp(new ClientIpRateLimiter({ now: () => 1_000, capacity: 1 }), 1)
// <client>, <cloud run>, <load balancer>: one trusted hop after the client.
const headers = { 'x-forwarded-for': '203.0.113.7, 10.0.0.1' }
expect((await app.request('/probe', { method: 'POST', headers })).status).toBe(200)
expect((await app.request('/probe', { method: 'POST', headers })).status).toBe(429)
expect(
(
await app.request('/probe', {
method: 'POST',
headers: { 'x-forwarded-for': '198.51.100.9, 10.0.0.1' }
})
).status
).toBe(200)
})
it('trusts nothing when the header is shorter than the configured depth', async () => {
const app = limiterApp(new ClientIpRateLimiter({ now: () => 1_000, capacity: 1 }), 1)
// Only one hop, so the client value the depth points at does not exist.
const headers = { 'x-forwarded-for': '203.0.113.7' }
expect((await app.request('/probe', { method: 'POST', headers })).status).toBe(200)
expect(
(
await app.request('/probe', {
method: 'POST',
headers: { 'x-forwarded-for': '198.51.100.9' }
})
).status
).toBe(429)
})
it('ignores spoofable x-real-ip and uses a single shared bucket', async () => {
const app = limiterApp(new ClientIpRateLimiter({ now: () => 1_000, capacity: 1 }))
expect(
(await app.request('/probe', { method: 'POST', headers: { 'x-real-ip': '198.51.100.9' } }))
.status
).toBe(200)
expect(
(await app.request('/probe', { method: 'POST', headers: { 'x-real-ip': '203.0.113.7' } }))
.status
).toBe(429)
expect((await app.request('/probe', { method: 'POST' })).status).toBe(429)
expect((await app.request('/probe', { method: 'POST' })).status).toBe(429)
})
})
@@ -1,9 +1,6 @@
import { PUSH_LIMITS } from '@orca-cloud/push-contract/push-limits'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { createPushHostKeypair } from '../host-auth/host-challenge-answering.test-fixture.js'
import type { CloudDatabase as PushDatabase } from '@orca-cloud/cloud-database/cloud-database'
import { createPushServer } from '../push-server.js'
import { createPushServerHarness, testPushConfig } from './push-server-harness.test-fixture.js'
import { createPushServerHarness } from './push-server-harness.test-fixture.js'
describe('push gateway authentication and device routes', () => {
let harness: Awaited<ReturnType<typeof createPushServerHarness>>
@@ -16,63 +13,6 @@ describe('push gateway authentication and device routes', () => {
await harness.close()
})
it('reports not ready when the database is unreachable', async () => {
const unreachable: PushDatabase = {
dialect: 'sqlite',
query: async () => {
throw new Error('no connection')
},
transaction: async (operation) => await operation(unreachable),
lockQuotaScope: async () => undefined,
tryLockScope: async () => true,
tryLockSharedScope: async () => true,
close: async () => undefined
}
const broken = createPushServer(testPushConfig(), unreachable, {
fcmAccessToken: async () => 'token',
fcmTransport: async () => ({ status: 200, body: '{}' })
})
expect((await broken.app.request('/health')).status).toBe(200)
expect((await broken.app.request('/ready')).status).toBe(503)
await broken.worker.stop()
})
it('completes challenge, session, register, list, delete', async () => {
const sessionToken = await harness.signIn(createPushHostKeypair(11))
const registrationId = await harness.registerAndroid(sessionToken)
const list = await harness.authorized('/v1/devices', {}, sessionToken)
expect(await list.json()).toEqual({
devices: [{ registrationId, deviceId: 'device-1', platform: 'android', dead: false }]
})
const deleted = await harness.authorized(
`/v1/devices/${registrationId}`,
{ method: 'DELETE' },
sessionToken
)
expect(deleted.status).toBe(204)
expect(await harness.server.devices.findById(registrationId)).toBeNull()
})
it('refuses a request with no bearer, a bogus bearer, and an expired session', async () => {
const sessionToken = await harness.signIn(createPushHostKeypair(12))
expect((await harness.server.app.request('/v1/devices')).status).toBe(401)
const bogus = await harness.authorized('/v1/devices', {}, 'nonsense')
expect(bogus.status).toBe(401)
expect(await bogus.json()).toEqual({ error: 'invalid_token' })
harness.advanceClock(PUSH_LIMITS.sessionTtlMs + 1)
const expired = await harness.authorized('/v1/devices', {}, sessionToken)
expect(expired.status).toBe(401)
expect(await expired.json()).toEqual({ error: 'session_expired' })
})
it('never returns the host fingerprint on the challenge itself', async () => {
const challenge = await harness.issueChallenge(createPushHostKeypair(22))
expect(challenge).not.toHaveProperty('hostFingerprint')
})
it('lets only the owning host delete a registration', async () => {
const ownerToken = await harness.signIn(createPushHostKeypair(14))
const intruderToken = await harness.signIn(createPushHostKeypair(15))
@@ -87,34 +27,4 @@ describe('push gateway authentication and device routes', () => {
expect(await forbidden.json()).toEqual({ error: 'not_found' })
expect(await harness.server.devices.findById(registrationId)).not.toBeNull()
})
it('replaces the token on a re-registration and keeps one registration id', async () => {
const sessionToken = await harness.signIn(createPushHostKeypair(23))
const first = await harness.registerAndroid(sessionToken)
const again = await harness.post(
'/v1/devices',
{
v: 1,
deviceId: 'device-1',
platform: 'android',
token: 'rotated_token:APA91b-newnewnewnewnewnewnewnewnewnew'
},
sessionToken
)
expect(await again.json()).toEqual({ registrationId: first })
expect(await harness.server.devices.findById(first)).toMatchObject({
token: 'rotated_token:APA91b-newnewnewnewnewnewnewnewnewnew'
})
})
it('rejects a malformed registration body', async () => {
const sessionToken = await harness.signIn(createPushHostKeypair(16))
const bad = await harness.post(
'/v1/devices',
{ v: 1, deviceId: 'device-1', platform: 'ios', token: 'not-hex' },
sessionToken
)
expect(bad.status).toBe(400)
expect(await bad.json()).toEqual({ error: 'invalid_request' })
})
})
@@ -1,10 +1,10 @@
import { PUSH_LIMITS } from '@orca-cloud/push-contract/push-limits'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import {
createPushHostKeypair,
hostPublicKeyB64
} from '../host-auth/host-challenge-answering.test-fixture.js'
import { createPushServerHarness, notification } from './push-server-harness.test-fixture.js'
import { createPushServerHarness } from './push-server-harness.test-fixture.js'
const CLIENT_IP = '203.0.113.7'
const OTHER_CLIENT_IP = '198.51.100.9'
@@ -48,42 +48,6 @@ describe('push gateway request limits', () => {
expect(await response.json()).toEqual({ error: 'request_too_large' })
})
it('still refuses an oversized body that declares a content length', async () => {
const body = oversizedChallengeBody()
const response = await harness.server.app.request('/v1/host/challenge', {
method: 'POST',
headers: {
'content-type': 'application/json',
'content-length': String(Buffer.byteLength(body))
},
body
})
expect(response.status).toBe(413)
expect(await response.json()).toEqual({ error: 'request_too_large' })
})
it('caps an authenticated oversized send as well', async () => {
const sessionToken = await harness.signIn(createPushHostKeypair(61))
const response = await harness.server.app.request(
new Request('http://push.test/v1/send', {
method: 'POST',
headers: {
'content-type': 'application/json',
authorization: `Bearer ${sessionToken}`
},
body: new ReadableStream<Uint8Array>({
start(controller) {
controller.enqueue(new TextEncoder().encode(oversizedChallengeBody()))
controller.close()
}
}),
duplex: 'half'
} as RequestInit)
)
expect(response.status).toBe(413)
expect(await response.json()).toEqual({ error: 'request_too_large' })
})
it('rate limits one client ip across both unauthenticated routes', async () => {
const body = JSON.stringify({
v: 1,
@@ -135,27 +99,6 @@ describe('push gateway request limits', () => {
expect(spoofed.status).toBe(429)
})
it('lets a throttled client back in once the window refills', async () => {
const body = JSON.stringify({
v: 1,
hostPublicKeyB64: hostPublicKeyB64(createPushHostKeypair(63))
})
const headers = { 'content-type': 'application/json', 'x-forwarded-for': CLIENT_IP }
for (let index = 0; index < PUSH_LIMITS.unauthenticatedRequestsPerMinutePerIp; index++) {
await harness.server.app.request('/v1/host/challenge', { method: 'POST', headers, body })
}
expect(
(await harness.server.app.request('/v1/host/challenge', { method: 'POST', headers, body }))
.status
).toBe(429)
harness.advanceClock(60_000)
expect(
(await harness.server.app.request('/v1/host/challenge', { method: 'POST', headers, body }))
.status
).toBe(200)
})
it('limits authenticated hosts independently behind the same IP', async () => {
const sessionToken = await harness.signIn(createPushHostKeypair(64))
const headers = { 'x-forwarded-for': CLIENT_IP }
@@ -175,43 +118,4 @@ describe('push gateway request limits', () => {
})
expect(challenge.status).toBe(200)
})
// Why: a database error carries the failing row in its message. The response
// and the log must both stop at the error's name.
it('answers an unexpected route failure with a bare 500 and logs only the name', async () => {
const sessionToken = await harness.signIn(createPushHostKeypair(66))
const warn = vi.spyOn(console, 'warn').mockImplementation(() => undefined)
try {
await harness.database.close()
const response = await harness.authorized('/v1/devices', {}, sessionToken)
expect(response.status).toBe(500)
expect(await response.json()).toEqual({ error: 'internal' })
const logged = warn.mock.calls.map((call) => String(call[0])).join('\n')
expect(logged).toContain('"event":"orca_push_request_failed"')
expect(logged).not.toContain('SELECT')
expect(logged).not.toContain('push_devices')
expect(harness.server.observability.consume().request_error).toBe(1)
} finally {
warn.mockRestore()
}
})
it('charges a repeated registration id once and returns one result', async () => {
const sessionToken = await harness.signIn(createPushHostKeypair(65))
const registrationId = await harness.registerAndroid(sessionToken)
const response = await harness.post(
'/v1/send',
{
v: 1,
registrationIds: [registrationId, registrationId, registrationId],
notification: notification()
},
sessionToken
)
expect(await response.json()).toEqual({ results: [{ registrationId, status: 'queued' }] })
expect(await harness.server.deliveryStore.pendingCount(registrationId)).toBe(1)
const [row] = await harness.database.query('SELECT COUNT(*) AS sends FROM push_events')
expect(Number(row?.sends)).toBe(1)
})
})
@@ -1,9 +1,6 @@
import { PushNotificationSchema } from '@orca-cloud/push-contract/send-messages'
import { PUSH_LIMITS } from '@orca-cloud/push-contract/push-limits'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { createPushHostKeypair } from '../host-auth/host-challenge-answering.test-fixture.js'
import {
APNS_TOKEN,
createPushServerHarness,
FCM_TOKEN,
notification
@@ -20,24 +17,6 @@ describe('push gateway send route', () => {
await harness.close()
})
it('rejects a batch over the registration cap', async () => {
const sessionToken = await harness.signIn(createPushHostKeypair(16))
const oversized = await harness.post(
'/v1/send',
{
v: 1,
registrationIds: Array.from(
{ length: PUSH_LIMITS.maxRegistrationIdsPerSend + 1 },
(_, index) => `reg-${index}`
),
notification: notification()
},
sessionToken
)
expect(oversized.status).toBe(400)
expect(await oversized.json()).toEqual({ error: 'invalid_request' })
})
it('queues a send, delivers it to fcm, and reports a dead token on the next send', async () => {
const sessionToken = await harness.signIn(createPushHostKeypair(17))
const registrationId = await harness.registerAndroid(sessionToken)
@@ -75,101 +54,6 @@ describe('push gateway send route', () => {
})
})
it('leaves a live registration alone when the provider reports a transient failure', async () => {
const sessionToken = await harness.signIn(createPushHostKeypair(24))
const registrationId = await harness.registerAndroid(sessionToken)
await harness.post(
'/v1/send',
{ v: 1, registrationIds: [registrationId], notification: notification() },
sessionToken
)
harness.setFcmResponse({
status: 503,
body: JSON.stringify({ error: { status: 'UNAVAILABLE', message: 'backend busy' } })
})
await harness.flushDeliveries()
expect(await harness.server.devices.findById(registrationId)).toMatchObject({ dead: false })
})
it('reports retries from the durable worker after the provider delay', async () => {
const token = await harness.signIn(createPushHostKeypair(26))
const registrationId = await harness.registerAndroid(token)
await harness.post(
'/v1/send',
{
v: 1,
registrationIds: [registrationId],
notification: notification()
},
token
)
harness.setFcmResponse({ status: 503, body: '{}' })
await harness.flushDeliveries()
expect(harness.server.observability.consume()).toMatchObject({
delivery_error: 1,
delivery_retry: 0
})
harness.advanceClock(10_000)
harness.setFcmResponse({ status: 200, body: '{}' })
await harness.server.worker.runDue()
expect(harness.server.observability.consume()).toMatchObject({
delivery_sent: 1,
delivery_retry: 1
})
})
it('sends a burst as individual APNs alerts grouped by the host thread', async () => {
const sessionToken = await harness.signIn(createPushHostKeypair(18))
const registration = await harness.post(
'/v1/devices',
{
v: 1,
deviceId: 'iphone-1',
platform: 'ios',
token: APNS_TOKEN,
apnsEnvironment: 'sandbox'
},
sessionToken
)
const { registrationId } = (await registration.json()) as { registrationId: string }
for (const seq of [1, 2, 3]) {
await harness.post(
'/v1/send',
{
v: 1,
registrationIds: [registrationId],
notification: notification({ notificationId: `note-${seq}`, notificationSeq: seq })
},
sessionToken
)
}
await harness.flushDeliveries()
expect(harness.apnsRequests).toHaveLength(3)
const bodies = harness.apnsRequests.map(
(request) =>
JSON.parse(request.body) as {
aps: { alert: { title: string; body: string }; 'thread-id': string }
orca: Record<string, unknown> & { notificationSeq: number }
}
)
expect(
harness.apnsRequests.every((request) => request.host === 'api.sandbox.push.apple.com')
).toBe(true)
expect(bodies.map((body) => body.aps.alert)).toEqual(
Array.from({ length: 3 }, () => ({
title: 'Agent needs input',
body: 'Waiting on your answer'
}))
)
expect(new Set(bodies.map((body) => body.aps['thread-id'])).size).toBe(1)
expect(bodies.map((body) => body.orca.notificationSeq).sort((a, b) => a - b)).toEqual([1, 2, 3])
expect(bodies.every((body) => !('coalescedCount' in body.orca))).toBe(true)
expect(bodies.every((body) => !('summaryMembers' in body.orca))).toBe(true)
expect(
new Set(harness.apnsRequests.map((request) => request.headers['apns-collapse-id'])).size
).toBe(3)
})
it('reports an error for a registration the host does not own', async () => {
const ownerToken = await harness.signIn(createPushHostKeypair(19))
const intruderToken = await harness.signIn(createPushHostKeypair(20))
@@ -188,29 +72,4 @@ describe('push gateway send route', () => {
})
expect(await harness.server.deliveryStore.pendingCount(registrationId)).toBe(0)
})
it('rate limits a host that exhausted its 15-minute allowance', async () => {
const sessionToken = await harness.signIn(createPushHostKeypair(21))
const registrationId = await harness.registerAndroid(sessionToken)
const hostFingerprint = (await harness.server.devices.findById(registrationId))!.hostFingerprint
for (let index = 0; index < PUSH_LIMITS.hostEventsPerWindow; index++) {
expect(
await harness.server.deliveryStore.accept(
hostFingerprint,
registrationId,
PushNotificationSchema.parse(
notification({ notificationId: `note-${index + 1000}`, notificationSeq: index + 1000 })
)
)
).toBe('queued')
}
const limited = await harness.post(
'/v1/send',
{ v: 1, registrationIds: [registrationId], notification: notification() },
sessionToken
)
expect(limited.status).toBe(200)
expect(await limited.json()).toEqual({ results: [{ registrationId, status: 'rate_limited' }] })
expect(await harness.server.deliveryStore.pendingCount(registrationId)).toBe(300)
})
})
@@ -1,46 +0,0 @@
import { afterEach, expect, it, vi } from 'vitest'
import { startPushBackground } from '../push-background.js'
import { createPushHostKeypair } from '../host-auth/host-challenge-answering.test-fixture.js'
import { createPushServerHarness, notification } from './push-server-harness.test-fixture.js'
const cleanups: (() => Promise<void>)[] = []
afterEach(async () => {
for (const cleanup of cleanups.splice(0)) {
await cleanup()
}
vi.useRealTimers()
vi.restoreAllMocks()
})
async function fixture() {
const h = await createPushServerHarness()
const token = await h.signIn(createPushHostKeypair(31))
const registrationId = await h.registerAndroid(token)
let stop = async () => {}
cleanups.push(async () => {
await stop()
await h.close()
})
vi.useFakeTimers()
return {
...h,
registrationId,
start: () => {
stop = startPushBackground({ mode: 'active' }, h.server)
},
send: (event = notification(), ids = [registrationId]) =>
h.post('/v1/send', { v: 1, registrationIds: ids, notification: event }, token),
invalid: () => h.post('/v1/send', { v: 1 }, token)
}
}
it('keeps concurrent accepted retries idempotent while automatic delivery runs', async () => {
const h = await fixture()
h.start()
await Promise.all(Array.from({ length: 10 }, () => h.send()))
await vi.waitFor(() => expect(h.fcmRequests).toHaveLength(1))
await h.send()
await h.server.worker.runDue()
expect(h.fcmRequests).toHaveLength(1)
expect(await h.server.deliveryStore.pendingCount(h.registrationId)).toBe(0)
})
@@ -1,6 +1,4 @@
import pg from 'pg'
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
import { ASSIGNMENT_CONNECTION_HEADROOM_QUERY } from './assignment-connection-headroom-query.js'
import { RelayAssignmentStore } from './assignment-store.js'
import {
openRelayDatabase,
@@ -9,7 +7,6 @@ import {
const databaseUrl = process.env.ORCA_RELAY_TEST_POSTGRES_URL
const describePostgres = databaseUrl ? describe : describe.skip
const headroomIndexName = 'relay_control_connection_reservation_headroom'
const cell = {
id: 'connection-headroom-postgres',
url: 'https://connection-headroom-postgres.example.com',
@@ -160,39 +157,6 @@ describePostgres('PostgreSQL assignment connection headroom', () => {
expect(Number(reservations[0]!.count)).toBe(1)
}, 15_000)
it('uses the composite headroom index when released history dominates', async () => {
await databases[0]!.query(
`INSERT INTO relay_control_connection_reservations
(reservation_id, idempotency_key, user_id, relay_host_id,
assignment_epoch, cell_id, state, created_at, timeout_at, updated_at)
SELECT 'headroom-plan-' || value, 'headroom-plan-' || value,
'connection-headroom-postgres-plan', 'plan-host-' || value,
1, ?, 'released', 1, 2, 1
FROM generate_series(1, 50000) AS value`,
[cell.id]
)
await databases[0]!.query(`ANALYZE relay_control_connection_reservations`)
const client = new pg.Client({ connectionString: databaseUrl })
await client.connect()
let reservationIndexPlan: Record<string, unknown> | undefined
try {
const plan = await client.query(
`EXPLAIN (FORMAT JSON) ${ASSIGNMENT_CONNECTION_HEADROOM_QUERY}`
)
reservationIndexPlan = findReservationHeadroomIndexPlan(
plan.rows[0]?.['QUERY PLAN']
)
} finally {
await client.end()
}
expect(reservationIndexPlan).toBeDefined()
expect(String(reservationIndexPlan?.['Index Cond'])).toContain('cell_id')
expect(String(reservationIndexPlan?.['Index Cond'])).toContain('state = ANY')
expect(reservationIndexPlan?.['Filter']).toBeUndefined()
})
it('deduplicates expired debt after a fresh PostgreSQL snapshot', async () => {
const now = 200
const store = new RelayAssignmentStore(databases[0]!, () => now, {
@@ -337,16 +301,3 @@ describePostgres('PostgreSQL assignment connection headroom', () => {
).toEqual([{ state: 'released' }])
})
})
function findReservationHeadroomIndexPlan(
value: unknown
): Record<string, unknown> | undefined {
if (value === null || typeof value !== 'object') return undefined
const record = value as Record<string, unknown>
if (!Array.isArray(value) && record['Index Name'] === headroomIndexName) return record
for (const child of Object.values(value)) {
const match = findReservationHeadroomIndexPlan(child)
if (match) return match
}
return undefined
}
@@ -157,14 +157,6 @@ describePostgres('a host leaving a dead reserve cell, on PostgreSQL', () => {
expect(await reservedOn(dead)).toEqual(reservedBefore)
})
it('hard crash with no dead-man trip: a ledger-only row moves too', async () => {
const host = nextHost()
await ledgerRow(host, 7)
await store.setCellAdmitMode(dead.id, 'reserve')
await killDeadCell()
expect(await hostAssign(host)).toMatchObject({ cellId: live.id, assignmentEpoch: 8 })
})
it('a seat ahead of the row: the move mints above it, and the revived cell\'s seat never wins the row back', async () => {
const host = nextHost()
await ledgerRow(host, 4)
@@ -45,9 +45,9 @@ ignores:
- '**/__fixtures__/**'
- 'src/shared/agent-launch/startup/claude-chat-entrypoint.ts'
- 'src/main/claude/claude-stream-json-connection.ts'
- 'src/main/claude/claude-agent-sdk-process-spawn.ts'
- 'src/main/claude/child-process/claude-agent-sdk-process-spawn.ts'
- 'src/main/claude/structured/launch/claude-structured-child-env.ts'
- 'src/main/claude/claude-model-catalog-probe.ts'
- 'src/main/claude/model-catalog/claude-model-catalog-probe.ts'
rule:
all:
- any:
@@ -67,9 +67,9 @@ ignores:
- '**/__fixtures__/**'
- 'src/shared/agent-launch/startup/claude-chat-entrypoint.ts'
- 'src/main/claude/claude-stream-json-connection.ts'
- 'src/main/claude/claude-agent-sdk-process-spawn.ts'
- 'src/main/claude/child-process/claude-agent-sdk-process-spawn.ts'
- 'src/main/claude/structured/launch/claude-structured-child-env.ts'
- 'src/main/claude/claude-model-catalog-probe.ts'
- 'src/main/claude/model-catalog/claude-model-catalog-probe.ts'
rule:
all:
- any:
@@ -16,7 +16,7 @@ export const MAIN_BUILD_ENTRY_POINTS: Record<string, string> = {
),
'computer-sidecar': resolve('src/main/computer/computer-sidecar.ts'),
'claude-conversation-fork-worker-entry': resolve(
'src/main/claude/claude-conversation-fork-worker-entry.ts'
'src/main/claude/transcripts/claude-conversation-fork-worker-entry.ts'
),
'stt-worker': resolve('src/main/speech/stt-worker.ts'),
'warp-theme-parser-worker': resolve('src/main/warp-themes/warp-theme-parser-worker.ts'),
+3 -42
View File
@@ -5,7 +5,6 @@
4 test-no-in-test-import-actual:src/main/bitbucket/credential-store.test.ts
1 test-no-in-test-import-actual:src/main/bitbucket/status-no-decrypt.test.ts
3 test-no-in-test-import-actual:src/main/claude-usage/scanner-scan.test.ts
1 test-no-in-test-import-actual:src/main/claude/claude-agent-sdk-process-spawn.test.ts
5 test-no-in-test-import-actual:src/main/daemon/endpoint/publication/testing/daemon-endpoint-publish.test.ts
1 test-no-in-test-import-actual:src/main/daemon/history/storage/testing/terminal-history-permissions.test.ts
1 test-no-in-test-import-actual:src/main/git/command-runner/process-capture/spawned-command-tree-kill.test.ts
@@ -28,14 +27,6 @@
3 test-no-in-test-import-actual:src/renderer/src/components/terminal-pane/snapshots/remote-snapshot-alt-screen-host-chain.test.ts
1 test-no-in-test-import-actual:src/renderer/src/hooks/useIpcEvents-agent-status-pane-teardown.test.ts
1 test-no-polling-loop:src/main/browser/cookies/browser-cookie-import-concurrency.test.ts
1 test-no-polling-loop:src/main/claude/claude-stop-ack-race.test.ts
1 test-no-polling-loop:src/main/claude/claude-stream-json-connection.test.ts
1 test-no-polling-loop:src/main/claude/claude-supervised-stop-real-cli.test.ts
1 test-no-polling-loop:src/main/claude/claude-supervised-stop.integration.test.ts
1 test-no-polling-loop:src/main/claude/structured/claude-structured-real-cli-fold.test.ts
1 test-no-polling-loop:src/main/claude/structured/claude-structured-real-cli-stop-task.test.ts
5 test-no-polling-loop:src/main/claude/structured/claude-structured-real-cli.test.ts
1 test-no-polling-loop:src/main/claude/structured/launch/claude-structured-real-cli-options.test.ts
1 test-no-polling-loop:src/main/codex/hooks/reconciliation/codex-hook-toggle-off-wins.test.ts
1 test-no-polling-loop:src/main/codex/structured/launch/codex-structured-real-cli-command-env.test.ts
1 test-no-polling-loop:src/main/daemon/providers/adapter/testing/daemon-self-retirement-respawn.test.ts
@@ -151,16 +142,6 @@
1 test-no-real-time-wait:src/main/browser/identity/wire-probes/browser-session-ua-wire-identity.electron.test.ts
1 test-no-real-time-wait:src/main/browser/network/tunnels/execution-route-socket-duplex.test.ts
1 test-no-real-time-wait:src/main/browser/network/tunnels/remote-browser-socks-server.test.ts
1 test-no-real-time-wait:src/main/claude/claude-agent-sdk-exit-proof.test.ts
1 test-no-real-time-wait:src/main/claude/claude-agent-sdk-user-message-queue.test.ts
1 test-no-real-time-wait:src/main/claude/claude-stop-ack-race.test.ts
1 test-no-real-time-wait:src/main/claude/claude-stream-json-connection.test.ts
1 test-no-real-time-wait:src/main/claude/claude-supervised-stop-real-cli.test.ts
1 test-no-real-time-wait:src/main/claude/claude-supervised-stop.integration.test.ts
2 test-no-real-time-wait:src/main/claude/structured/claude-structured-real-cli-fold.test.ts
2 test-no-real-time-wait:src/main/claude/structured/claude-structured-real-cli-stop-task.test.ts
5 test-no-real-time-wait:src/main/claude/structured/claude-structured-real-cli.test.ts
1 test-no-real-time-wait:src/main/claude/structured/launch/claude-structured-real-cli-options.test.ts
1 test-no-real-time-wait:src/main/codex/hooks/reconciliation/codex-hook-reconcile.test.ts
1 test-no-real-time-wait:src/main/codex/hooks/reconciliation/codex-hook-toggle-off-wins.test.ts
1 test-no-real-time-wait:src/main/codex/structured/launch/codex-structured-real-cli-command-env.test.ts
@@ -271,7 +252,6 @@
1 test-no-real-time-wait:tests/e2e/codex-ctrl-c-status.spec.ts
4 test-no-real-time-wait:tests/e2e/combined-diff-scroll-restore.spec.ts
1 test-no-real-time-wait:tests/e2e/computer-windows.e2e.ts
3 test-no-real-time-wait:tests/e2e/cross-version-wire/host-model-catalog-released-phone.unit.test.ts
1 test-no-real-time-wait:tests/e2e/cross-version-wire/legacy-relay-bridge.unit.test.ts
1 test-no-real-time-wait:tests/e2e/cross-version-wire/released-relay-daemon.ts
2 test-no-real-time-wait:tests/e2e/cross-version-wire/released-relay-transport.ts
@@ -427,7 +407,7 @@
2 test-no-wall-clock:src/main/agent-hooks/installation/scripts/managed-hook-timeout.test.ts
1 test-no-wall-clock:src/main/agent-hooks/server/testing/http/server-endpoint-file-lifecycle.test.ts
4 test-no-wall-clock:src/main/agent-hooks/server/testing/identity/server-launch-resume-identity.test.ts
5 test-no-wall-clock:src/main/agent-hooks/server/testing/replay/spool.test.ts
3 test-no-wall-clock:src/main/agent-hooks/server/testing/replay/spool.test.ts
3 test-no-wall-clock:src/main/agent-hooks/server/testing/structured-ingress/server-ingest-structured-status.test.ts
1 test-no-wall-clock:src/main/ai-vault/parse-cache/session-parse-cache-preview-upgrade.test.ts
2 test-no-wall-clock:src/main/ai-vault/scanners/copilot/session-scanner-copilot-parser.test.ts
@@ -440,16 +420,6 @@
2 test-no-wall-clock:src/main/antigravity/posix-hook-invocation.test.ts
2 test-no-wall-clock:src/main/browser/cookies/browser-cookie-import-partition-reland.electron.test.ts
2 test-no-wall-clock:src/main/browser/network/execution-routes/wsl-browser-network-execution-route.test.ts
1 test-no-wall-clock:src/main/claude/claude-background-wake-retention.test.ts
1 test-no-wall-clock:src/main/claude/claude-descendant-escalation-boundary.test.ts
1 test-no-wall-clock:src/main/claude/claude-folder-trust-file.test.ts
5 test-no-wall-clock:src/main/claude/claude-supervised-stop-real-cli.test.ts
6 test-no-wall-clock:src/main/claude/claude-supervised-stop.integration.test.ts
4 test-no-wall-clock:src/main/claude/structured/claude-structured-real-cli-fold.test.ts
1 test-no-wall-clock:src/main/claude/structured/claude-structured-real-cli-rewind.test.ts
3 test-no-wall-clock:src/main/claude/structured/claude-structured-real-cli-stop-task.test.ts
10 test-no-wall-clock:src/main/claude/structured/claude-structured-real-cli.test.ts
3 test-no-wall-clock:src/main/claude/structured/launch/claude-structured-real-cli-options.test.ts
1 test-no-wall-clock:src/main/codex-accounts/legacy-wsl-auth-drain/legacy-wsl-runtime-auth-drain-rollback-script.test.ts
6 test-no-wall-clock:src/main/codex/app-server/codex-app-server-client.test.ts
2 test-no-wall-clock:src/main/codex/structured/launch/codex-structured-real-cli-command-env.test.ts
@@ -467,9 +437,9 @@
2 test-no-wall-clock:src/main/external-conversations/external-conversation-cancel-settlement.test.ts
3 test-no-wall-clock:src/main/external-conversations/external-conversation-cancel.test.ts
2 test-no-wall-clock:src/main/git/command-runner/host-routing/git-command-resolution-windows-checkout.test.ts
2 test-no-wall-clock:src/main/git/command-runner/hosted-cli/runner-gh-account-binding.test.ts
1 test-no-wall-clock:src/main/git/refs/maintenance/pack-refs-lock-ownership.test.ts
2 test-no-wall-clock:src/main/git/refs/maintenance/repo-ref-maintenance-real-git.test.ts
2 test-no-wall-clock:src/main/git/command-runner/hosted-cli/runner-gh-account-binding.test.ts
1 test-no-wall-clock:src/main/git/source-control/blob-absence-real-git.test.ts
2 test-no-wall-clock:src/main/git/worktrees/catalog/worktree-created-description-real-git.test.ts
3 test-no-wall-clock:src/main/github/pr-refresh-coordinator-active-visible-priority.test.ts
@@ -524,10 +494,6 @@
1 test-no-wall-clock:src/main/runtime/agent-session/structured-child-records-switch.test.ts
1 test-no-wall-clock:src/main/runtime/mobile-cloud-relay/mobile-relay-e2ee.integration.test.ts
2 test-no-wall-clock:src/main/runtime/orchestration/mailbox/terminal-pointer/orchestration-codex-real-pty.integration.test.ts
2 test-no-wall-clock:src/main/runtime/orchestration/workers/archives/worker-output-archive.test.ts
3 test-no-wall-clock:src/main/runtime/orchestration/workers/archives/worker-terminal-archive-release.test.ts
4 test-no-wall-clock:src/main/runtime/orchestration/workers/archives/worker-terminal-archive-screen.test.ts
5 test-no-wall-clock:src/main/runtime/orchestration/workers/archives/worker-terminal-wrap-provenance.test.ts
1 test-no-wall-clock:src/main/runtime/push/push-device-registration-persistence.test.ts
1 test-no-wall-clock:src/main/runtime/push/push-registration-rpc.test.ts
1 test-no-wall-clock:src/main/runtime/push/push-unpair-persistence.test.ts
@@ -632,12 +598,7 @@
1 test-timeout-needs-reason:src/main/browser/guest-lifecycle/find/browser-find-frame-traversal.electron.test.ts
1 test-timeout-needs-reason:src/main/browser/identity/wire-probes/browser-session-ua-wire-identity-cross-context.electron.test.ts
1 test-timeout-needs-reason:src/main/browser/identity/wire-probes/browser-session-ua-wire-identity.electron.test.ts
1 test-timeout-needs-reason:src/main/claude/claude-agent-sdk-exit-proof.test.ts
1 test-timeout-needs-reason:src/main/claude/claude-background-run-isolation-real-cli.test.ts
2 test-timeout-needs-reason:src/main/claude/claude-status-line-windows.test.ts
1 test-timeout-needs-reason:src/main/claude/claude-stop-ack-race.test.ts
1 test-timeout-needs-reason:src/main/claude/structured/claude-structured-real-cli.test.ts
1 test-timeout-needs-reason:src/main/claude/windows-native-hook-registration.test.ts
1 test-timeout-needs-reason:src/main/claude/child-process/claude-agent-sdk-exit-proof.test.ts
2 test-timeout-needs-reason:src/main/codex/app-server/codex-app-server-teardown.integration.test.ts
1 test-timeout-needs-reason:src/main/codex/hooks/installation/hook-service-legacy-cleanup.test.ts
1 test-timeout-needs-reason:src/main/codex/structured/catalog/codex-model-catalog-probe.test.ts
+1 -1
View File
@@ -1,6 +1,6 @@
{
"src/main/plugins/panels/plugin-source-transpile-worker-entry.ts": "Dedicated worker-thread entry; blocking work stays off Electron main.",
"src/main/claude/claude-conversation-fork-worker-entry.ts": "Dedicated worker-thread entry; blocking work stays off Electron main.",
"src/main/claude/transcripts/claude-conversation-fork-worker-entry.ts": "Dedicated worker-thread entry; blocking work stays off Electron main.",
"src/main/speech/stt-worker.ts": "Dedicated utility/forked-process entry; speech work stays off Electron main.",
"src/main/warp-themes/warp-theme-parser-worker.ts": "Dedicated worker-thread entry; blocking work stays off Electron main.",
"src/main/ai-vault-search/worker/session-search-worker-entry.ts": "Dedicated worker-thread entry; blocking work stays off Electron main.",
+7 -7
View File
@@ -89,14 +89,14 @@
1 src/main/claude-accounts/runtime-auth/runtime-paths.ts
7 src/main/claude-accounts/sign-in/claude-account-folder.ts
3 src/main/claude/agent-view/agent-view-install.ts
1 src/main/claude/claude-diff-panel-auto-open.ts
14 src/main/claude/claude-folder-trust-file.ts
2 src/main/claude/claude-profile-hook-target.ts
1 src/main/claude/claude-rejected-api-key.ts
1 src/main/claude/claude-rewind-transcript.ts
1 src/main/claude/configuration/claude-diff-panel-auto-open.ts
14 src/main/claude/configuration/claude-folder-trust-file.ts
2 src/main/claude/hooks/claude-profile-hook-target.ts
1 src/main/claude/configuration/claude-rejected-api-key.ts
1 src/main/claude/transcripts/claude-rewind-transcript.ts
1 src/main/claude/hook-service.ts
3 src/main/claude/statusline-install.ts
6 src/main/claude/windows-hook-files.ts
3 src/main/claude/hooks/statusline-install.ts
6 src/main/claude/hooks/windows-hook-files.ts
1 src/main/cli/appimage/appimage-copy-pre-extraction.ts
3 src/main/cli/appimage/appimage-extracted-root.ts
1 src/main/cli/appimage/appimage-extraction-pruning.ts
@@ -329,70 +329,70 @@
"count": 1
},
{
"filePath": "mobile/src/tasks/mobile-smart-source-modes.ts",
"filePath": "mobile/src/new-workspace/source-selection/mobile-smart-source-modes.ts",
"kind": "object-property:label",
"text": "GitHub",
"dynamic": false,
"count": 1
},
{
"filePath": "mobile/src/tasks/mobile-smart-source-modes.ts",
"filePath": "mobile/src/new-workspace/source-selection/mobile-smart-source-modes.ts",
"kind": "object-property:label",
"text": "GitLab",
"dynamic": false,
"count": 1
},
{
"filePath": "mobile/src/tasks/mobile-smart-source-modes.ts",
"filePath": "mobile/src/new-workspace/source-selection/mobile-smart-source-modes.ts",
"kind": "object-property:label",
"text": "Jira",
"dynamic": false,
"count": 1
},
{
"filePath": "mobile/src/tasks/mobile-smart-source-modes.ts",
"filePath": "mobile/src/new-workspace/source-selection/mobile-smart-source-modes.ts",
"kind": "object-property:label",
"text": "Linear",
"dynamic": false,
"count": 1
},
{
"filePath": "mobile/src/tasks/mobile-tasks-create-drawers.tsx",
"filePath": "mobile/src/tasks/workspace-creation/mobile-tasks-create-drawers.tsx",
"kind": "jsx-attribute:placeholder",
"text": "lin_api_...",
"dynamic": false,
"count": 1
},
{
"filePath": "mobile/src/tasks/mobile-tasks-options.tsx",
"filePath": "mobile/src/tasks/task-list/mobile-tasks-options.tsx",
"kind": "object-property:label",
"text": "GitHub",
"dynamic": false,
"count": 1
},
{
"filePath": "mobile/src/tasks/mobile-tasks-options.tsx",
"filePath": "mobile/src/tasks/task-list/mobile-tasks-options.tsx",
"kind": "object-property:label",
"text": "GitLab",
"dynamic": false,
"count": 1
},
{
"filePath": "mobile/src/tasks/mobile-tasks-options.tsx",
"filePath": "mobile/src/tasks/task-list/mobile-tasks-options.tsx",
"kind": "object-property:label",
"text": "Jira",
"dynamic": false,
"count": 1
},
{
"filePath": "mobile/src/tasks/mobile-tasks-options.tsx",
"filePath": "mobile/src/tasks/task-list/mobile-tasks-options.tsx",
"kind": "object-property:label",
"text": "Linear",
"dynamic": false,
"count": 1
},
{
"filePath": "mobile/src/tasks/mobile-tasks-workspace-trust-drawers.tsx",
"filePath": "mobile/src/tasks/workspace-creation/mobile-tasks-workspace-trust-drawers.tsx",
"kind": "jsx-attribute:placeholder",
"text": "src/renderer packages/ui",
"dynamic": false,
File diff suppressed because one or more lines are too long
-1
View File
@@ -13,7 +13,6 @@
1 src/main/ipc/source-control/github-work-item-args.ts
1 src/main/ipc/source-control/gitlab-repo-access.ts
2 src/main/ipc/workspace-cleanup/workspace-cleanup-candidate.ts
1 src/main/ipc/workspace-cleanup/workspace-cleanup-disconnected-ssh.ts
1 src/main/ipc/worktrees-test-metadata-pruning-store.ts
1 src/main/ipc/worktrees/listing/authoritative-local-worktree-metadata-pruning.ts
1 src/main/ipc/worktrees/listing/register-host-catalog-handlers.ts
@@ -306,7 +306,6 @@
"src/cli/command-suggestion-destructive-families.test.ts": 226,
"src/cli/command-suggestion.test.ts": 68,
"src/cli/computer-tree-query.test.ts": 79,
"src/cli/format-recovery.test.ts": 413,
"src/cli/format.test.ts": 446,
"src/cli/handlers/account.test.ts": 849,
"src/cli/handlers/agent-hooks.test.ts": 1702,
@@ -1024,7 +1023,6 @@
"src/main/browser/routing/local-host-partitions/wsl-host-browser-route-partition.test.ts": 753,
"src/main/claude-accounts/sign-in/claude-account-folder.test.ts": 153,
"src/main/claude-accounts/claude-account-service.test.ts": 1207,
"src/main/claude-accounts/sign-in/claude-command-process-windows-only.test.ts": 90,
"src/main/claude-accounts/sign-in/claude-login-session.test.ts": 1048,
"src/main/claude-accounts/sign-in/claude-pasted-code-login.test.ts": 238,
"src/main/claude-accounts/profiles/setup/claude-profile-history-windows.test.ts": 121,
@@ -1036,7 +1034,6 @@
"src/main/claude-accounts/profiles/setup/claude-profile-setup.test.ts": 405,
"src/main/claude-accounts/profiles/wsl/claude-profile-wsl-router.test.ts": 919,
"src/main/claude-accounts/sign-in/claude-sign-in-browser.test.ts": 314,
"src/main/claude-accounts/runtime-auth/claude-structured-auth-policy.test.ts": 52,
"src/main/claude-accounts/runtime-auth/keychain-config-directory-aliases.test.ts": 51,
"src/main/claude-accounts/selection/runtime-selection.test.ts": 41,
"src/main/claude-accounts/sign-in/windows-command-invocation.test.ts": 48,
@@ -1056,62 +1053,62 @@
"src/main/claude/agent-view/agent-view-service.test.ts": 403,
"src/main/claude/claude-agent-sdk-contract-pins.test.ts": 3506,
"src/main/claude/claude-agent-sdk-exit-proof-identity.test.ts": 134,
"src/main/claude/claude-agent-sdk-exit-proof.test.ts": 8832,
"src/main/claude/claude-agent-sdk-import-boundary.test.ts": 546,
"src/main/claude/claude-agent-sdk-process-spawn.test.ts": 182,
"src/main/claude/claude-agent-sdk-user-message-queue.test.ts": 143,
"src/main/claude/child-process/claude-agent-sdk-exit-proof.test.ts": 8832,
"src/main/claude/sdk-transport/claude-agent-sdk-import-boundary.test.ts": 546,
"src/main/claude/child-process/claude-agent-sdk-process-spawn.test.ts": 182,
"src/main/claude/sdk-transport/claude-agent-sdk-user-message-queue.test.ts": 143,
"src/main/claude/claude-api-retry-row.test.ts": 901,
"src/main/claude/claude-background-run-isolation-real-cli.test.ts": 147,
"src/main/claude/claude-background-stop-records.test.ts": 1249,
"src/main/claude/claude-background-task-resume.test.ts": 54,
"src/main/claude/claude-background-task-terminal-frames.test.ts": 103,
"src/main/claude/background-tasks/claude-background-task-resume.test.ts": 54,
"src/main/claude/background-tasks/claude-background-task-terminal-frames.test.ts": 103,
"src/main/claude/claude-background-task-turn-resumption.test.ts": 325,
"src/main/claude/claude-background-wake-retention.test.ts": 1652,
"src/main/claude/claude-child-process-environment.test.ts": 52,
"src/main/claude/claude-child-work-decoder.test.ts": 110,
"src/main/claude/child-process/claude-child-process-environment.test.ts": 52,
"src/main/claude/child-work/claude-child-work-decoder.test.ts": 110,
"src/main/claude/claude-close-turn-end.test.ts": 970,
"src/main/claude/claude-command-lifecycle-frames.test.ts": 268,
"src/main/claude/claude-command-lifecycle.test.ts": 1107,
"src/main/claude/claude-command-turn.test.ts": 292,
"src/main/claude/claude-config-dir-pin.test.ts": 47,
"src/main/claude/structured/turns/claude-command-lifecycle-frames.test.ts": 268,
"src/main/claude/structured/turns/claude-command-lifecycle.test.ts": 1107,
"src/main/claude/structured/turns/claude-command-turn.test.ts": 292,
"src/main/claude/structured/launch/claude-config-dir-pin.test.ts": 47,
"src/main/claude/claude-context-model-switch.test.ts": 422,
"src/main/claude/claude-context-usage-restart.test.ts": 925,
"src/main/claude/claude-context-usage-unloaded-turn.test.ts": 4910,
"src/main/claude/claude-descendant-escalation-boundary.test.ts": 593,
"src/main/claude/claude-diff-panel-auto-open.test.ts": 117,
"src/main/claude/configuration/claude-diff-panel-auto-open.test.ts": 117,
"src/main/claude/claude-fold-steer-receipt.test.ts": 1019,
"src/main/claude/claude-folder-trust-file.test.ts": 762,
"src/main/claude/claude-hook-event-versions.test.ts": 137,
"src/main/claude/configuration/claude-folder-trust-file.test.ts": 762,
"src/main/claude/cli-capabilities/claude-hook-event-versions.test.ts": 137,
"src/main/claude/claude-informational-row.test.ts": 811,
"src/main/claude/claude-journal-turn-scope.test.ts": 254,
"src/main/claude/claude-model-catalog-probe.test.ts": 2098,
"src/main/claude/structured/journal/claude-journal-turn-scope.test.ts": 254,
"src/main/claude/model-catalog/claude-model-catalog-probe.test.ts": 2098,
"src/main/claude/claude-naming-invocation.test.ts": 334,
"src/main/claude/claude-plan-approval-mode.test.ts": 905,
"src/main/claude/claude-profile-hooks.test.ts": 371,
"src/main/claude/claude-provider-session-rename.test.ts": 597,
"src/main/claude/claude-provisional-row-corrections.test.ts": 67,
"src/main/claude/claude-request-end-wait.test.ts": 53,
"src/main/claude/claude-rewind-transcript.test.ts": 762,
"src/main/claude/hooks/claude-profile-hooks.test.ts": 371,
"src/main/claude/transcripts/claude-provider-session-rename.test.ts": 597,
"src/main/claude/subagents/claude-provisional-row-corrections.test.ts": 67,
"src/main/claude/structured/turns/claude-request-end-wait.test.ts": 53,
"src/main/claude/transcripts/claude-rewind-transcript.test.ts": 762,
"src/main/claude/claude-settings-schema-install.test.ts": 410,
"src/main/claude/claude-status-line-install.test.ts": 342,
"src/main/claude/hooks/claude-status-line-install.test.ts": 342,
"src/main/claude/claude-status-line-windows.test.ts": 273,
"src/main/claude/claude-stop-ack-race.test.ts": 1301,
"src/main/claude/claude-stream-json-connection-close.test.ts": 621,
"src/main/claude/claude-stream-json-connection.test.ts": 8687,
"src/main/claude/claude-streamed-text-checkpoints.test.ts": 59,
"src/main/claude/sdk-transport/claude-stream-json-connection.test.ts": 8687,
"src/main/claude/structured/journal/claude-streamed-text-checkpoints.test.ts": 59,
"src/main/claude/claude-structured-launch-home-perf.test.ts": 401,
"src/main/claude/claude-structured-result-control-overlap.test.ts": 1136,
"src/main/claude/claude-subagent-id-aliases.test.ts": 46,
"src/main/claude/subagents/claude-subagent-id-aliases.test.ts": 46,
"src/main/claude/claude-subagent-permission-request.test.ts": 3776,
"src/main/claude/claude-subagent-resume-after-restart.test.ts": 825,
"src/main/claude/subagents/claude-subagent-resume-after-restart.test.ts": 825,
"src/main/claude/claude-supervised-stop-real-cli.test.ts": 382,
"src/main/claude/claude-supervised-stop.integration.test.ts": 3821,
"src/main/claude/claude-transcript-catch-up.test.ts": 4017,
"src/main/claude/transcripts/claude-transcript-catch-up.test.ts": 4017,
"src/main/claude/claude-transcript-duration.test.ts": 1411,
"src/main/claude/claude-transcript-entry-uuid.test.ts": 38,
"src/main/claude/hook-service.test.ts": 329,
"src/main/claude/post-compact-hook-command.test.ts": 314,
"src/main/claude/statusline-script.test.ts": 257,
"src/main/claude/transcripts/claude-transcript-entry-uuid.test.ts": 38,
"src/main/claude/hooks/hook-service.test.ts": 329,
"src/main/claude/hooks/post-compact-hook-command.test.ts": 314,
"src/main/claude/hooks/statusline-script.test.ts": 257,
"src/main/claude/structured/claude-structured-content-parts.test.ts": 277,
"src/main/claude/structured/claude-structured-conversation-stop.test.ts": 884,
"src/main/claude/structured/claude-structured-dispatch-admission.test.ts": 426,
@@ -1153,7 +1150,7 @@
"src/main/claude/structured/launch/claude-structured-options.test.ts": 420,
"src/main/claude/structured/launch/claude-structured-provider-fallback.test.ts": 670,
"src/main/claude/structured/launch/claude-structured-real-cli-options.test.ts": 902,
"src/main/claude/windows-hook-files.test.ts": 356,
"src/main/claude/hooks/windows-hook-files.test.ts": 356,
"src/main/claude/windows-native-hook-registration.test.ts": 246,
"src/main/cli/appimage/appimage-copy-pre-extraction.test.ts": 328,
"src/main/cli/appimage/appimage-extraction-pruning-namespace.test.ts": 106,
@@ -1193,7 +1190,6 @@
"src/main/codex-accounts/legacy-wsl-auth-drain/legacy-wsl-runtime-auth-drain-apply-script.test.ts": 5936,
"src/main/codex-accounts/legacy-wsl-auth-drain/legacy-wsl-runtime-auth-drain-rollback-script.test.ts": 558,
"src/main/codex-accounts/credentials/managed-codex-auth-readiness.test.ts": 86,
"src/main/codex-accounts/runtime-home/routing/runtime-home-catalog-probe-prep.test.ts": 583,
"src/main/codex-accounts/runtime-home/legacy-host/runtime-home-legacy-migration.test.ts": 1147,
"src/main/codex-accounts/runtime-home/credentials/runtime-home-managed-auth-recovery.test.ts": 658,
"src/main/codex-accounts/runtime-home/credentials/runtime-home-mirror-login-copy.test.ts": 1012,
@@ -1201,7 +1197,6 @@
"src/main/codex-accounts/runtime-home/routing/runtime-home-real-home-lane-routing.test.ts": 879,
"src/main/codex-accounts/runtime-home/credentials/runtime-home-retained-auth-provenance.test.ts": 1404,
"src/main/codex-accounts/runtime-home/routing/runtime-home-service-per-account-migration.test.ts": 980,
"src/main/codex-accounts/runtime-home/routing/runtime-home-session-discovery-read-only.test.ts": 543,
"src/main/codex-accounts/runtime-home/routing/runtime-home-session-migration-pass.test.ts": 705,
"src/main/codex-accounts/runtime-home/credentials/runtime-home-system-default-mirror-readback.test.ts": 1493,
"src/main/codex-accounts/runtime-home/credentials/runtime-home-system-default-snapshot.test.ts": 1255,
@@ -2175,7 +2170,6 @@
"src/main/ipc/wsl/wsl-host-automation-wake-launch.test.ts": 939,
"src/main/ipc/wsl/wsl-host-handlers-user-actions.test.ts": 772,
"src/main/ipc/wsl/wsl-host-visible-work-windows.test.ts": 39,
"src/main/ipc/wsl/wsl-move-driver-handlers.test.ts": 432,
"src/main/ipc/wsl/wsl-move-handlers-setting-off.test.ts": 724,
"src/main/ipc/wsl/wsl-move-host-connect.test.ts": 984,
"src/main/ipc/wsl/wsl-move-partial-undo.test.ts": 939,
@@ -4874,7 +4868,6 @@
"src/renderer/src/components/plugins/page/PluginCommandReplacementRow.test.tsx": 1926,
"src/renderer/src/components/plugins/page/PluginDetailPage.test.tsx": 3367,
"src/renderer/src/components/plugins/page/PluginSettingsSection.test.tsx": 572,
"src/renderer/src/components/plugins/presentation/plugin-install-source.test.ts": 214,
"src/renderer/src/components/plugins/state/use-plugin-contribution-source.test.tsx": 1935,
"src/renderer/src/components/plugins/state/use-plugin-install-link.test.tsx": 518,
"src/renderer/src/components/plugins/state/use-plugin-page-navigation.test.tsx": 480,
@@ -5159,7 +5152,6 @@
"src/renderer/src/components/skills/SkillsPage.test.tsx": 3822,
"src/renderer/src/components/sparse/sparse-directory-entry-input.test.ts": 207,
"src/renderer/src/components/stats/usage-daily-chart.test.tsx": 333,
"src/renderer/src/components/stats/usage-overview-model.test.ts": 364,
"src/renderer/src/components/status-bar/ClaudeSwitcherMenu.owner-lifetime.test.tsx": 2317,
"src/renderer/src/components/status-bar/StatusBarUsageChangeNotices.test.tsx": 785,
"src/renderer/src/components/status-bar/UpdateStatusSegment.test.tsx": 2484,
@@ -5173,7 +5165,6 @@
"src/renderer/src/components/status-bar/resource-session-kill-confirmation.test.ts": 53,
"src/renderer/src/components/status-bar/resource-session-removal-render-budget.test.tsx": 290,
"src/renderer/src/components/status-bar/resource-usage-folder-merge.test.ts": 251,
"src/renderer/src/components/status-bar/usage-pool-label.test.ts": 170,
"src/renderer/src/components/status-bar/use-owner-usage-rate-limits.test.tsx": 462,
"src/renderer/src/components/status-bar/use-resource-memory-snapshot.test.tsx": 321,
"src/renderer/src/components/status-bar/use-resource-pty-actions.test.tsx": 879,
@@ -5238,7 +5229,6 @@
"src/renderer/src/components/task-page/task-page-cache-selectors.test.ts": 108,
"src/renderer/src/components/task-page/task-page-initial-selection-scaling.test.tsx": 1953,
"src/renderer/src/components/task-page/task-page-work-item-pagination.test.ts": 63,
"src/renderer/src/components/task-page/use-task-page-source-display.test.tsx": 5228,
"src/renderer/src/components/terminal-pane/layout/close/RunningTerminalCloseDialog.test.tsx": 2303,
"src/renderer/src/components/terminal-pane/account-restart/detached/account-restart-queue-progress.test.ts": 1988,
"src/renderer/src/components/terminal-pane/agent-completion/agent-completion-coordinator-attention-dispatch.test.ts": 301,
@@ -6186,7 +6176,6 @@
"src/shared/agent-status/process/agent-process-presence-platform.test.ts": 64,
"src/shared/agent-launch/startup/agent-prompt-injection.test.ts": 88,
"src/shared/agent-scratch-worktrees.test.ts": 61,
"src/shared/agent-session/agent-message-display-text.test.ts": 147,
"src/shared/agent-session/agent-session-approval-blocked-path.test.ts": 49,
"src/shared/agent-session/agent-session-attachments.test.ts": 46,
"src/shared/agent-session/agent-session-context-clear.test.ts": 222,
@@ -6254,7 +6243,6 @@
"src/shared/agent-status/transport/agent-status-osc.test.ts": 104,
"src/shared/agent-status/store/agent-status-store-reopen.test.ts": 199,
"src/shared/agent-status/title/agent-status-tracker-program-activity.test.ts": 77,
"src/shared/agent-launch/startup/agent-tui-input-clear.test.ts": 57,
"src/shared/ai-vault/resume/ai-vault-resume-command.test.ts": 70,
"src/shared/ai-vault/resume/ai-vault-resume-target.test.ts": 85,
"src/shared/ai-vault/scanning/ai-vault-scope-paths.test.ts": 73,
@@ -6265,7 +6253,6 @@
"src/shared/ai-vault/session-display/ai-vault-session-filters.test.ts": 176,
"src/shared/ai-vault/resume/ai-vault-ssh-resume-target.test.ts": 84,
"src/shared/ansi-escape-sequences-consumers.test.ts": 140,
"src/shared/ansi-escape-sequences.test.ts": 289,
"src/shared/antigravity-generation-plan.test.ts": 122,
"src/shared/automatic-work-run-marker.test.ts": 93,
"src/shared/automation-cron-dialect.test.ts": 65,
@@ -6298,7 +6285,6 @@
"src/shared/claude-background-task-status.test.ts": 315,
"src/shared/claude-model-list-probe.test.ts": 55,
"src/shared/claude-shell-function.test.ts": 220,
"src/shared/cli-runtime-pairing-inputs.test.ts": 64,
"src/shared/cloud-service-url.test.ts": 37,
"src/shared/coalescing-keyed-runner.test.ts": 119,
"src/shared/codebuddy-agent.test.ts": 301,
@@ -6333,7 +6319,6 @@
"src/shared/ephemeral-vm-recipe-checkout-mode.test.ts": 106,
"src/shared/ephemeral-vm-recipe-output-capture.test.ts": 287,
"src/shared/ephemeral-vm-recipe-process.test.ts": 198,
"src/shared/ephemeral-vm-recipe-repo-url.test.ts": 56,
"src/shared/ephemeral-vm-recipes.test.ts": 160,
"src/shared/ephemeral-vm-runtime-store-rollback.test.ts": 321,
"src/shared/ephemeral-vm-runtime-store.test.ts": 195,
@@ -6439,7 +6424,6 @@
"src/shared/keybindings-digit-index.test.ts": 110,
"src/shared/keybindings-double-tap.test.ts": 92,
"src/shared/keybindings-keyboard-layout.test.ts": 86,
"src/shared/keybindings-parse-cache.test.ts": 61,
"src/shared/keybindings-parsing.test.ts": 86,
"src/shared/keybindings-unassigned-actions.test.ts": 73,
"src/shared/kiro-home.test.ts": 39,
@@ -6577,7 +6561,6 @@
"src/shared/opencode-tui-plugin-install.test.ts": 82,
"src/shared/openssh-default-shell.test.ts": 54,
"src/shared/orca-browser-cli-commands.test.ts": 59,
"src/shared/orca-cli-command-name.test.ts": 41,
"src/shared/orca-hook-setup-config.test.ts": 38,
"src/shared/orca-session-address.test.ts": 154,
"src/shared/orca-yaml-alias-bounds.test.ts": 425,
@@ -6746,7 +6729,6 @@
"src/shared/remote-runtime/requests/remote-runtime-subscription-frame-router.test.ts": 143,
"src/shared/remote-runtime/requests/remote-runtime-subscription-request.test.ts": 646,
"src/shared/renderer-restart-preparation.test.ts": 197,
"src/shared/repo-display-labels.test.ts": 57,
"src/shared/repo-host-identity.test.ts": 45,
"src/shared/repo-icon.test.ts": 82,
"src/shared/repo-pack-index-scheduling.test.ts": 67,
@@ -6850,7 +6832,6 @@
"src/shared/terminal/protocol/queries/terminal-color-scheme-protocol.test.ts": 39,
"src/shared/terminal/input/terminal-composer-draft.test.ts": 73,
"src/shared/terminal/links/terminal-file-uri-link.test.ts": 51,
"src/shared/terminal/links/terminal-file-url-target.test.ts": 47,
"src/shared/terminal/links/terminal-github-pr-link-detector.test.ts": 61,
"src/shared/terminal/links/terminal-http-url-extraction.test.ts": 42,
"src/shared/terminal/input/terminal-input.test.ts": 85,
@@ -6926,7 +6907,6 @@
"src/shared/workspace-attachments/workspace-attachment-origins.test.ts": 42,
"src/shared/workspace-attachments/workspace-attachments.test.ts": 204,
"src/shared/workspace-cleanup/workspace-cleanup-browse-state-persistence.test.ts": 55,
"src/shared/workspace-last-active-switch-on.test.ts": 52,
"src/shared/workspace-layout/old-client/old-client-method-translation.test.ts": 352,
"src/shared/workspace-layout/old-client/old-client-pane-layout-translation.test.ts": 363,
"src/shared/workspace-layout/old-client/old-client-session-tabs-projection-owned-editor.test.ts": 178,
@@ -236,20 +236,6 @@ for (const engine of ['chromium', 'webkit']) {
expect(sealed.reported.join(' ')).not.toContain('script-src')
}, 180_000)
it('loads the artifact https images the directive admits, and still refuses its font', async (ctx) => {
// Await both images explicitly; bounded settle once observed background before element on loaded Chrome.
const read = await open(browser(), {
assets: assetServer.origin,
frameReady: 'images',
signal: ctx.signal
})
expect(read.pixel).toBe(ARTIFACT_RGB)
// img-src governs CSS background and img element; require both requests.
expect([...read.secureHits].sort()).toEqual(['/css-bg.png', '/img.png'])
// Same HTTPS origin still cannot load font; img-src admission must not widen font-src.
expect(read.secureHits).not.toContain('/probe.woff2')
}, 120_000)
it('sends no referrer with an admitted https image, which is the shell header doing it', async (ctx) => {
const sealed = await open(browser(), {
assets: assetServer.origin,
@@ -384,109 +370,6 @@ for (const engine of ['chromium', 'webkit']) {
expect(read.popups).toBe(0)
}, 120_000)
it("cannot reach the shell through a meta refresh at the embedder's own URL", async (ctx) => {
// Same-origin meta-refresh targets shell document; foreign-origin arm cannot prove shell-origin counter works.
const own = await open(browser(), {
signal: ctx.signal,
extra: { head: '<meta http-equiv="refresh" content="0;url=/">' }
})
// Require painted artifact before interpreting navigation refusal.
expect(own.pixelBefore).toBe(ARTIFACT_RGB)
// Link-to-/ control reads one on same counter, proving refresh zero is observable.
expect(own.ownOriginTopNavigations).toBe(0)
expect(own.topNavigations).toBe(0)
// Also reject self-frame shell-document fetch, which would embed session page inside preview.
expect(own.ownOriginFrameNavigations).toBe(0)
// No-policy/allow-same-origin control must navigate frame to shell / to prove observer is not blind.
const loose = await open(browser(), {
signal: ctx.signal,
csp: null,
sandbox: 'allow-scripts allow-same-origin allow-top-navigation',
extra: { head: '<meta http-equiv="refresh" content="0;url=/">' },
// Navigating arm no longer contains marker; await navigation instead of artifact readiness.
frameReady: 'load',
expectNavigation: 'frame'
})
expect(loose.ownOriginFrameNavigations).toBe(1)
// Test sandbox token alone with no CSP; navigation must never begin or report.
const tokenOnly = await open(browser(), {
signal: ctx.signal,
csp: null,
extra: { head: '<meta http-equiv="refresh" content="0;url=/">' }
})
expect(tokenOnly.pixelBefore).toBe(ARTIFACT_RGB)
expect(tokenOnly.ownOriginFrameNavigations).toBe(0)
expect(tokenOnly.ownOriginTopNavigations).toBe(0)
expect(tokenOnly.violations).toEqual([])
// Test CSP alone with allow-same-origin: frame-src none blocks request at embedder; engines leave different content, so assert no server request.
const policyOnly = await open(browser(), {
signal: ctx.signal,
sandbox: 'allow-scripts allow-same-origin allow-top-navigation',
extra: { head: '<meta http-equiv="refresh" content="0;url=/">' },
frameReady: 'load'
})
expect(policyOnly.ownOriginFrameNavigations).toBe(0)
expect(policyOnly.ownOriginTopNavigations).toBe(0)
expect(policyOnly.violations.join(' ')).toContain('frame-src')
}, 180_000)
it('hands up nothing without a tap, and nothing for a form or a new window', async (ctx) => {
const meta = await open(browser(), {
signal: ctx.signal,
extra: { head: `<meta http-equiv="refresh" content="0;url=${foreignOrigin}/meta.html">` }
})
expect(meta.topNavigations).toBe(0)
expect(meta.ownOriginTopNavigations).toBe(0)
const form = await open(browser(), {
signal: ctx.signal,
act: async ({ frame }) => {
await frame.click('#submit', { timeout: 2000 })
}
})
expect(form.actError).toBeNull()
expect(form.pixelBefore).toBe(ARTIFACT_RGB)
expect(form.topNavigations).toBe(0)
const blank = await open(browser(), {
signal: ctx.signal,
act: async ({ frame }) => {
await frame.click('#blanklink', { timeout: 2000 })
}
})
expect(blank.actError).toBeNull()
expect(blank.pixelBefore).toBe(ARTIFACT_RGB)
expect(blank.topNavigations).toBe(0)
expect(blank.popups).toBe(0)
const allowedForm = await open(browser(), {
signal: ctx.signal,
csp: null,
sandbox: 'allow-forms allow-top-navigation-by-user-activation',
expectNavigation: 'main-frame',
act: async ({ frame }) => {
await frame.click('#submit', { timeout: 2000 })
}
})
expect(allowedForm.pixelBefore).toBe(ARTIFACT_RGB)
expect(allowedForm.actError).toBeNull()
expect(allowedForm.topNavigations).toBe(1)
const allowedBlank = await open(browser(), {
signal: ctx.signal,
csp: null,
sandbox: 'allow-popups allow-popups-to-escape-sandbox',
act: async ({ page, frame }) => {
await Promise.all([
page.waitForEvent('popup', { timeout: 10_000 }),
frame.click('#blanklink', { timeout: 2000 })
])
}
})
expect(allowedBlank.pixelBefore).toBe(ARTIFACT_RGB)
expect(allowedBlank.actError).toBeNull()
expect(allowedBlank.popups).toBe(1)
}, 180_000)
// Force slow-arm diagnostic sampling branch; formerly unexecuted branch had out-of-scope name and no test/lint coverage.
// Force bounded navigation timeout after missed click; require useful diagnostic instead of exhausting whole case budget.
@@ -16,31 +16,12 @@ import { mobileWebAppDependenciesPresent } from '../mobile-web-app-bundle-depend
import {
createBundleServer,
installCspViolationRecorder,
installListenerRecorder,
readShellCsp
} from '../preview/mobile-web-app-render-harness.mjs'
const mobileDir = fileURLToPath(new URL('../../../../mobile', import.meta.url))
const componentDir = join(mobileDir, 'src/components')
const COMMANDS = [
{ label: 'H1', command: 'heading1', select: 'all', expect: 'h1' },
{ label: 'H2', command: 'heading2', select: 'all', expect: 'h2' },
{ label: 'H3', command: 'heading3', select: 'all', expect: 'h3' },
{ label: 'Bold', command: 'bold', select: 'word', expect: 'b,strong' },
{ label: 'Italic', command: 'italic', select: 'word', expect: 'i,em' },
{ label: 'Strike', command: 'strike', select: 'word', expect: 'strike,s,del' },
{ label: 'Bullet list', command: 'bulletList', select: 'all', expect: 'ul' },
{ label: 'Numbered list', command: 'orderedList', select: 'all', expect: 'ol' },
{ label: 'Checklist', command: 'taskList', select: 'all', expect: 'ul[data-type="taskList"]' },
{ label: 'Quote', command: 'quote', select: 'all', expect: 'blockquote' },
{ label: 'Inline code', command: 'inlineCode', select: 'word', expect: 'code' },
{ label: 'Code block', command: 'codeBlock', select: 'all', expect: 'pre' }
]
// Paragraph undoes another command; starting from p would prove nothing.
const PARAGRAPH = { label: 'Body', command: 'paragraph' }
// Serve inserted image locally: nonexistent URL logs WebKit load failure; successful paint proves shipped CSP admits it.
const IMAGE_PATH = '/inserted.png'
const URL_COMMANDS = [
@@ -151,21 +132,6 @@ function Harness() {
createRoot(document.getElementById('root')).render(createElement(Harness))
`
// Install ReactNativeWebView recorder before bundle: absence alone cannot prove editor JSON avoids shell bridge if bridge object never existed.
function installBridgeObjectRecorder() {
globalThis.__orcaBridgeReads = []
const bridge = {
postMessage: (message) => globalThis.__orcaBridgeReads.push(`post ${String(message)}`)
}
Object.defineProperty(globalThis, 'ReactNativeWebView', {
configurable: true,
get: () => {
globalThis.__orcaBridgeReads.push('read')
return bridge
}
})
}
const bundles = mobileWebAppDependenciesPresent()
const describeEditor = bundles ? describe : describe.skip
@@ -256,9 +222,7 @@ async function openPage(browser) {
}
})
page.on('pageerror', (error) => consoleErrors.push(`pageerror: ${error.message}`))
await page.addInitScript(installBridgeObjectRecorder)
await page.addInitScript(installCspViolationRecorder)
await page.addInitScript(installListenerRecorder, { selector: '#editor' })
await page.goto(`${origin}/`, { waitUntil: 'domcontentloaded' })
await page.waitForFunction(() => document.body.dataset.ready === 'yes')
await page.waitForSelector('#first-surface #editor')
@@ -326,89 +290,7 @@ describeEditor(
afterAll(() => browser?.close())
it('mounts the document, reports ready through the seam and never touches the bridge', async () => {
const { page, consoleErrors } = await openPage(browser)
try {
await setContent(page, '# Title', '<h1>Title</h1>')
expect(await readSurface(page)).toBe('<h1>Title</h1>')
// Initial markup proves document ready reached controller and pushed content through seam.
expect(await page.evaluate(() => globalThis.__orcaBridgeReads)).toEqual([])
expect(await page.evaluate(() => globalThis.__orcaCspViolations)).toEqual([])
expect(consoleErrors).toEqual([])
// No editor occlusion report: screen’s web module already measures viewport, so reporting twice would lift bar twice.
expect(await page.evaluate(() => globalThis.__orcaEditor.insets)).toEqual([])
} finally {
await page.close()
}
}, 600_000)
it('runs every one of the fifteen commands against the document', async () => {
const { page, consoleErrors } = await openPage(browser)
try {
for (const [index, entry] of COMMANDS.entries()) {
const body = bodyFor(index)
await setContent(page, body, `<p>${body}</p>`)
// Require command effect absent beforehand or undelivered command could pass on previous document.
expect(
await page.evaluate(
(selector) =>
document.querySelector('#first-surface #editor')?.querySelector(selector),
entry.expect
),
`${entry.label} was already applied before it ran`
).toBeNull()
await select(page, entry.select)
await press(page, entry.label)
await page.waitForFunction(
(selector) =>
document.querySelector('#first-surface #editor')?.querySelector(selector) !==
null,
entry.expect,
{ timeout: 15_000 }
)
}
// Paragraph must undo another block type; it is a no-op on p.
await setContent(page, '# Title', '<h1>Title</h1>')
await select(page, 'all')
await press(page, PARAGRAPH.label)
await page.waitForFunction(
() =>
document.querySelector('#first-surface #editor')?.querySelector('h1') === null &&
document.querySelector('#first-surface #editor')?.querySelector('p') !== null,
null,
{ timeout: 15_000 }
)
expect(await page.evaluate(() => globalThis.__orcaCspViolations)).toEqual([])
expect(consoleErrors).toEqual([])
} finally {
await page.close()
}
}, 600_000)
// Both engines nest unordered list inside existing p; inline paragraph serialization once dropped bullet when saved.
it('edits and selects under the shipped document style, which makes other text unselectable', async () => {
const { page, consoleErrors } = await openPage(browser)
try {
await setContent(page, 'alpha', '<p>alpha</p>')
const word = page.locator('#first-surface #editor p')
await word.click()
await page.keyboard.press('End')
await page.keyboard.type(' bravo')
await page.waitForFunction(
() =>
document.querySelector('#first-surface #editor p')?.textContent === 'alpha bravo'
)
// Use browser gesture: a scripted Range bypasses body user-select:none.
await page.evaluate(() => window.getSelection()?.removeAllRanges())
await word.dblclick()
expect(await page.evaluate(() => window.getSelection()?.toString().trim())).not.toBe('')
expect(consoleErrors).toEqual([])
} finally {
await page.close()
}
}, 600_000)
it('reports a typed bullet list as a list, and renders that markdown back as one', async () => {
const { page, consoleErrors } = await openPage(browser)
@@ -29,7 +29,7 @@ export const ORCAD_CHILD_ENTRY_POINTS = {
'src/main/worker-thread-child-process/worker-thread-child-process-entry.ts',
claudeProfileSetup:
'src/main/claude-accounts/profiles/setup/claude-profile-setup-worker-entry.ts',
claudeConversationFork: 'src/main/claude/claude-conversation-fork-worker-entry.ts',
claudeConversationFork: 'src/main/claude/transcripts/claude-conversation-fork-worker-entry.ts',
sttWorker: 'src/main/speech/stt-worker.ts',
computerSidecar: 'src/main/computer/computer-sidecar.ts'
}
@@ -14,7 +14,12 @@ if (!baseline) {
}
async function load(file, contents) {
const result = await build({
stdin: { contents, loader: 'ts', resolveDir: dirname(resolve(file)) },
stdin: {
contents,
sourcefile: resolve(file),
loader: 'ts',
resolveDir: dirname(resolve(file))
},
bundle: true,
platform: 'node',
format: 'esm',
@@ -28,6 +33,23 @@ async function load(file, contents) {
bundler.onResolve({ filter: /mobile-tasks-dependencies$/ }, () => ({
path: resolve('mobile/src/theme/mobile-theme.ts')
}))
const relocatedImports = new Map([
[
resolve('mobile/src/tasks/mobile-tasks-hosted-review'),
resolve('mobile/src/tasks/hosted-review/mobile-tasks-hosted-review.ts')
],
[
resolve('mobile/src/tasks/mobile-tasks-item-mapping'),
resolve('mobile/src/tasks/item-detail/mobile-tasks-item-mapping.ts')
]
])
bundler.onResolve({ filter: /^\./ }, (args) => {
if (args.importer !== resolve(originalFile)) {
return
}
const target = relocatedImports.get(resolve(args.resolveDir, args.path))
return target ? { path: target } : undefined
})
}
}
]
@@ -36,17 +58,24 @@ async function load(file, contents) {
`data:text/javascript;base64,${Buffer.from(result.outputFiles[0].text).toString('base64')}`
)
}
const file = 'mobile/src/tasks/mobile-tasks-reviewer-linear.ts'
const originalFile = 'mobile/src/tasks/mobile-tasks-reviewer-linear.ts'
const file = 'mobile/src/tasks/item-detail/mobile-tasks-reviewer-linear.ts'
const original = await load(
file,
execFileSync('git', ['show', `${baseline}:${file}`], { encoding: 'utf8', windowsHide: true })
originalFile,
execFileSync('git', ['show', `${baseline}:${originalFile}`], {
encoding: 'utf8',
windowsHide: true
})
)
const current = await load(file, readFileSync(file, 'utf8'))
const sorterRef = process.argv[3]
const sorter = sorterRef
? await load(
file,
execFileSync('git', ['show', `${sorterRef}:${file}`], { encoding: 'utf8', windowsHide: true })
originalFile,
execFileSync('git', ['show', `${sorterRef}:${originalFile}`], {
encoding: 'utf8',
windowsHide: true
})
)
: original
const results = []
@@ -14,7 +14,12 @@ if (!baseline) {
}
async function load(file, contents) {
const result = await build({
stdin: { contents, loader: 'ts', resolveDir: dirname(resolve(file)) },
stdin: {
contents,
sourcefile: resolve(file),
loader: 'ts',
resolveDir: dirname(resolve(file))
},
bundle: true,
platform: 'node',
format: 'esm',
@@ -28,6 +33,23 @@ async function load(file, contents) {
bundler.onResolve({ filter: /mobile-tasks-dependencies$/ }, () => ({
path: resolve('mobile/src/theme/mobile-theme.ts')
}))
const relocatedImports = new Map([
[
resolve('mobile/src/tasks/mobile-tasks-hosted-review'),
resolve('mobile/src/tasks/hosted-review/mobile-tasks-hosted-review.ts')
],
[
resolve('mobile/src/tasks/mobile-tasks-item-mapping'),
resolve('mobile/src/tasks/item-detail/mobile-tasks-item-mapping.ts')
]
])
bundler.onResolve({ filter: /^\./ }, (args) => {
if (args.importer !== resolve(originalFile)) {
return
}
const target = relocatedImports.get(resolve(args.resolveDir, args.path))
return target ? { path: target } : undefined
})
}
}
]
@@ -36,10 +58,11 @@ async function load(file, contents) {
`data:text/javascript;base64,${Buffer.from(result.outputFiles[0].text).toString('base64')}`
)
}
const file = 'mobile/src/tasks/mobile-tasks-reviewer-linear.ts'
const originalFile = 'mobile/src/tasks/mobile-tasks-reviewer-linear.ts'
const file = 'mobile/src/tasks/item-detail/mobile-tasks-reviewer-linear.ts'
const before = await load(
file,
execFileSync('git', ['show', `${baseline}:${file}`], { encoding: 'utf8' })
originalFile,
execFileSync('git', ['show', `${baseline}:${originalFile}`], { encoding: 'utf8' })
)
const after = await load(file, readFileSync(file, 'utf8'))
const results = []
@@ -14,7 +14,12 @@ if (!baseline) {
}
async function load(file, contents) {
const result = await build({
stdin: { contents, loader: 'ts', resolveDir: dirname(resolve(file)) },
stdin: {
contents,
sourcefile: resolve(file),
loader: 'ts',
resolveDir: dirname(resolve(file))
},
bundle: true,
platform: 'node',
format: 'esm',
@@ -28,6 +33,19 @@ async function load(file, contents) {
bundler.onResolve({ filter: /mobile-tasks-dependencies$/ }, () => ({
path: resolve('mobile/src/theme/mobile-theme.ts')
}))
const relocatedImports = new Map([
[
resolve('mobile/src/tasks/mobile-tasks-item-mapping'),
resolve('mobile/src/tasks/item-detail/mobile-tasks-item-mapping.ts')
]
])
bundler.onResolve({ filter: /^\./ }, (args) => {
if (args.importer !== resolve(originalFile)) {
return
}
const target = relocatedImports.get(resolve(args.resolveDir, args.path))
return target ? { path: target } : undefined
})
}
}
]
@@ -36,10 +54,11 @@ async function load(file, contents) {
`data:text/javascript;base64,${Buffer.from(result.outputFiles[0].text).toString('base64')}`
)
}
const file = 'mobile/src/tasks/mobile-tasks-repository-presentation.ts'
const originalFile = 'mobile/src/tasks/mobile-tasks-repository-presentation.ts'
const file = 'mobile/src/tasks/repositories/mobile-tasks-repository-presentation.ts'
const before = await load(
file,
execFileSync('git', ['show', `${baseline}:${file}`], { encoding: 'utf8' })
originalFile,
execFileSync('git', ['show', `${baseline}:${originalFile}`], { encoding: 'utf8' })
)
const after = await load(file, readFileSync(file, 'utf8'))
const repos = new Map()
@@ -33,8 +33,7 @@ const NODE_RUNTIME_INCLUDE = [
'config/scripts/test-runtime/dom/happy-dom-mutation-observer-retention.test.ts',
// These reach Node SQLite through a shared helper or a dynamic import, which the scan skips.
'src/main/agent-hooks/server/testing/providers/codex/server-codex-session-start.test.ts',
'src/main/claude/claude-transcript-catch-up.test.ts',
'src/main/claude/claude-transcript-duration.test.ts',
'src/main/claude/transcripts/claude-transcript-catch-up.test.ts',
'tests/e2e/native-chat-startup-option-pickers.unit.test.ts',
'src/main/ai-vault/transcripts/session-document-consumer-replacement.test.ts',
'src/main/ai-vault-search/indexing/session-search-dependent-transcripts.test.ts',
@@ -42,12 +41,8 @@ const NODE_RUNTIME_INCLUDE = [
'src/main/runtime/rpc/server/orchestration-cli-subprocess.test.ts',
'src/main/runtime/orchestration/mailbox/terminal-pointer/orchestration-mailbox-delivery.test.ts',
'src/main/runtime/orchestration/mailbox/routing/orchestration-mailbox-routing.test.ts',
'src/main/runtime/orchestration/workers/archives/worker-terminal-archive-release.test.ts',
'src/main/runtime/orchestration/workers/archives/worker-terminal-archive-screen.test.ts',
'src/main/runtime/orchestration/workers/archives/worker-terminal-wrap-provenance.test.ts',
'tests/e2e/cross-version-wire/agent-session-clear-old-client.unit.test.ts',
'tests/e2e/cross-version-wire/agent-session-clear-old-tab-mirror.unit.test.ts',
'tests/e2e/cross-version-wire/host-model-catalog-released-phone.unit.test.ts',
'src/main/pi/rpc/rpc-session-startup.test.ts',
'src/main/acp/session/acp-structured-omp-recordings.test.ts',
'src/main/native-chat/agent-session-wire/host/testing/structured-agent-session-clear-queued-command.test.ts',
@@ -153,11 +148,11 @@ const NODE_RUNTIME_INCLUDE = [
'src/main/ipc/filesystem/watchers/filesystem-watcher-ignore-real.test.ts',
'src/main/ipc/runtime-environments/runtime-environment-preference.test.ts',
'src/renderer/src/components/emulator-pane/emulator-device-frame-visibility.test.tsx',
'src/main/claude/claude-agent-sdk-contract-pins.test.ts',
'config/scripts/desktop-distribution/runtime-verification/process-host-dev-rebuild.test.ts',
'config/scripts/test-runtime/node-worker/vitest-node-runtime-pool.test.ts',
// Reopen WAL-backed row caches read-only, which Bun on macOS cannot.
'src/main/agent-hooks/server/testing/identity/server-hook-session-binding.test.ts',
'src/main/agent-hooks/server/testing/persistence/server-last-status-claude-model.test.ts',
'tests/e2e/helpers/persisted-profile-state.unit.test.ts',
'src/main/runtime/push/notifications/mobile-notification-dismissal-store.test.ts',
'src/main/runtime/push/notifications/mobile-notification-dismissal-read-failure.test.ts',
@@ -251,7 +251,7 @@ const CROSS_VERSION_WIRE_PREFIXES = [
'src/main/native-chat/agent-model-catalog/agent-model-catalog-lister.ts',
'src/main/native-chat/agent-model-catalog/agent-model-catalog-listing-waiters.ts',
'src/main/native-chat/agent-model-catalog/agent-model-catalog-probe-runner.ts',
'src/main/claude/claude-model-catalog-probe.ts',
'src/main/claude/model-catalog/claude-model-catalog-probe.ts',
'src/main/runtime/agent-session/records/agent-session-record-store',
'src/main/runtime/agent-session/records/agent-session-recovery-capsule',
'src/shared/agent-session-resume-marker',
@@ -320,7 +320,7 @@ export const PR_E2E_SOURCE_ROUTES = [
MANAGED_SSH_HARNESS.test(file) ||
file === 'tests/e2e/fixtures/structured-claude-stub.cjs' ||
(isProductSource(file) &&
/^src\/(?:main\/(?:claude\/claude-(?:stream-json-connection|stream-json-exit-error|structured-session-exit-lifecycle)|native-chat\/agent-session-wire\/structured-agent-session-failure-text)|renderer\/src\/components\/native-chat\/structured-agent-session-delivery-notices)\.ts$/.test(
/^src\/(?:main\/(?:claude\/(?:claude-(?:stream-json-connection|structured-session-exit-lifecycle)|sdk-transport\/claude-stream-json-exit-error)|native-chat\/agent-session-wire\/structured-agent-session-failure-text)|renderer\/src\/components\/native-chat\/structured-agent-session-delivery-notices)\.ts$/.test(
file
))
},
@@ -170,12 +170,9 @@ export const WINDOWS_BOUNDARY_TESTS = [
'src/shared/windows-batch-spawn.win32.test.ts',
'src/main/claude/structured/launch/claude-structured-child-env.test.ts',
'src/main/agent-hooks/installation/commands/windows-hook-payload-delivery.test.ts',
'src/main/agent-hooks/installation/scripts/managed-hook-stdin-lifecycle.test.ts',
'src/main/jcode/hook-gate-script.test.ts',
'src/main/agent-hooks/installation/commands/windows-native-hook-exe-hosts.test.ts',
'src/main/claude/windows-native-hook-registration.test.ts',
'src/main/agent-hooks/installation/commands/windows-batch-hook-launcher.test.ts',
'src/main/claude/claude-status-line-windows.test.ts',
'src/main/codex/hooks/installation/windows-hook-command.test.ts',
'src/main/codex/hooks/installation/hook-service-managed-install.test.ts',
'src/main/windows/windows-pty-job.win32.test.ts',
+2 -1
View File
@@ -24,7 +24,8 @@ A plugin adds highlighting for a language through `contributes.syntaxes` in `orc
surrounding pairs. Every marker is printable text on one line. Auto-closing and surrounding
pairs are at most 8 characters, because the editor types them as you type. Comment markers and
brackets can be up to 128. `validate:plugin` refuses an entry that breaks these limits; Orca
skips just that entry and loads the rest.
skips just that entry and loads the rest. Without `autoClosingPairs`, Orca auto-closes only the
brackets that fit in 8 characters.
- A plugin can contribute up to 16 syntaxes. Scope names must be unique within the plugin.
## How Orca uses it
+18 -3
View File
@@ -5,7 +5,7 @@ description: Pair the Orca mobile app to your desktop to monitor agents and unst
import { Callout } from '@/components/docs/prose'
The Orca mobile companion is an iOS/Android app that pairs with your desktop Orca and gives you a read-mostly view of running agents — agent status, recent terminal scrollback, and the controls you actually want from a phone (replying to a prompt, sleeping a worktree, reviewing source control, switching agent accounts). Pairing is one-time and the desktop is always the source of truth.
The Orca mobile companion is an iOS/Android app that pairs with your desktop Orca and lets you monitor and control running agents — agent status, recent terminal scrollback, terminal input, source control, and agent accounts. Pairing establishes persistent access to the selected host; the desktop remains the source of truth.
<Callout title="Beta">
The mobile companion is in beta. Install iOS from the [App
@@ -36,13 +36,28 @@ The mobile app is intentionally not a full editor — it's a remote control for
## Pairing
1. On desktop, open Orca's pairing flow from the account / status menu. Orca shows a one-time pairing code.
1. On desktop, open Orca's pairing flow from the account / status menu. Orca shows a pairing code. Treat it as a secret and share it only with the device you want to authorize.
1. On mobile, open the Orca companion app and choose **Pair**, then paste the code. (You can also follow a deep link from the desktop directly into the mobile pairing screen.)
1. Prefer **Orca Relay** for pairing when it is available — sign-in is required for Relay only. The local network address picker is optional on Relay (expand it when you want a LAN fast path); LAN pairing still needs an address.
1. The pairing exchange establishes a device token for that phone; keep desktop reachable on the path you chose.
Closing the desktop app drops a direct/LAN session until you reopen it. Relay-backed pairing follows the desktop Relay connection — reopen desktop if the host goes offline.
Current desktop UI pairing offers expire after 10 minutes for mobile and one hour for runtime clients. A paired device's authorization persists beyond the offer's expiry until revoked. Headless offers and older versions can have different lifetimes; do not assume every code is single-use or expires automatically. Regenerate an unused code if it may have been exposed.
### Access and trust
A paired phone can read workspace files, send terminal input, and control agents on the paired host and connected remote runtimes made available through it. Pairing is not an enterprise read-only or per-repository sandbox. Use a host account with access appropriate to the phone's user, and protect the phone with its OS lock and your organization's device controls.
The paired desktop can deliver mobile web UI and JavaScript independently of a mobile store update. These assets travel through the authenticated paired connection and are checked against manifest hashes. The desktop is part of the phone's trust boundary; these checks do not provide a separate publisher signature or store review for every downloaded UI bundle.
### Revoke a phone or respond to a lost device
1. On each paired desktop, open the Mobile settings and remove the phone from the paired-device list. Confirm the operation succeeds; removing a saved host on the phone is not a substitute for host-side revocation.
1. Host-side revocation removes the device authorization and closes its active connections on that host. Relay credential cleanup is queued durably and requires connectivity to reach the service. Remote runtimes receive updated delegated-device grants when synchronization succeeds. If a host is offline or cleanup has not completed, restrict its network access until revocation is confirmed; there is no guaranteed immediate revocation across offline hosts.
1. For a lost phone, use your device-management tools to lock or wipe it and review any separately granted host or provider access. Revoking Orca access does not remotely erase files, screenshots, clipboard contents, or other data already saved on the phone.
1. If you suspect a pairing code was shared, regenerate it and review paired devices on the affected host before pairing a replacement phone.
## Chat UI
For chat-capable agents (Claude, Codex, and others Orca recognizes), mobile can open the session in **Chat UI** instead of the raw terminal — the same idea as desktop's [Chat UI](/docs/agents/native-chat): a readable transcript, composer, permissions/questions, and image attachments.
@@ -122,7 +137,7 @@ For a direct LAN or Tailscale connection, allow the paired desktop's listening p
### Common issues
- **Stuck spinner on a worktree** — the phone tracks a heartbeat from the desktop agent process. If the desktop says idle but the phone shows working, force-refresh the worktree row to sync state.
- **Pairing fails** — make sure your desktop and phone are signed into the same Orca account. Pairing codes expire after a few minutes; generate a fresh one if it's been sitting on the screen.
- **Pairing fails** — Relay requires desktop sign-in; local-only pairing requires a reachable LAN or Tailscale endpoint. Generate a fresh code if an offer has expired, and check the connection mode and host address.
- **Authentication failed / pairing invalid** — the desktop no longer accepts this device token (for example after desktop cleared paired devices). Try **Retry** on the banner first (transient rejections can recover without re-pairing). If it keeps failing, use **Re-pair** from desktop, or **Remove** the host and pair again.
- **Update Orca Mobile / Update Orca on your computer** — the phone and desktop speak a versioned mobile protocol. If either side is too old, mobile blocks that host and points you at the App Store (iOS), [GitHub Releases](https://github.com/stablyai/orca/releases) (Android APK or desktop), then back to hosts. After updating, refresh the connection; if the message stays, remove the host and pair again.
- **A chat tab says Update mobile** — the session was started in desktop Chat UI, and this phone's app is too old to show it (the tab opens to an empty pane). Update the mobile app, then reconnect to the host so it sees the new app. If the app is already up to date and the tab still says Update mobile after reconnecting, report it with your mobile app version and desktop Orca version.
+21
View File
@@ -29,3 +29,24 @@ Pick a custom desktop notification sound per category under [Settings → Notifi
Supported formats: MP3, WAV, OGG, M4A, AAC, FLAC. One file applies to all delivered desktop notifications.
When you use a custom sound, set its playback volume from the same settings pane.
## Disable mobile push from a host
Set `ORCA_MOBILE_PUSH_MODE` in the environment of each desktop or remote runtime
that sends mobile push, then restart that host:
- `full` (default): existing notification titles, bodies and navigation identifiers.
- `disabled`: no alert or test sends and no new push registration from that host.
Existing registration deletion and queued cleanup still run. This does not
itself erase historical gateway/provider records or disable live in-app events.
An unrecognized nonempty value disables push delivery. This is a host configuration,
not a centrally enforced organization policy. Users who control the host environment
can change it. It applies to that host's push gateway traffic, not local desktop
notifications or direct/Relay application content. Every sending host needs the
setting; older Orca versions do not implement it. OS notification permissions and
lock-screen preview settings are separate controls.
There is no generic-content mode: enabled push may include project/agent text and
identifiers. Disabling phone lock-screen previews does not stop that content from
reaching the push gateway and APNs/FCM.
+1
View File
@@ -89,6 +89,7 @@
"usesCleartextTraffic": true,
"allowBackup": false,
"permissions": ["RECORD_AUDIO", "MODIFY_AUDIO_SETTINGS"],
"blockedPermissions": ["android.permission.SYSTEM_ALERT_WINDOW"],
"package": "com.stably.orca.mobile",
"versionCode": 28,
"googleServicesFile": "./google-services.json"
@@ -1,21 +0,0 @@
package expo.modules.orcagziputf8codec
import org.junit.Assert.assertNull
import org.junit.Test
class StrictUtf8Test {
@Test
fun `hands back to JS what TextDecoder would repair or strip`() {
val refused = listOf(
byteArrayOf(0xef.toByte(), 0xbb.toByte(), 0xbf.toByte(), 0x41),
byteArrayOf(0xc0.toByte(), 0x80.toByte()),
byteArrayOf(0xed.toByte(), 0xa0.toByte(), 0x80.toByte()),
byteArrayOf(0x41, 0xe2.toByte(), 0x82.toByte()),
byteArrayOf(0x80.toByte()),
byteArrayOf(0xf5.toByte(), 0x80.toByte(), 0x80.toByte(), 0x80.toByte())
)
for (bytes in refused) {
assertNull(decodeStrictUtf8(bytes))
}
}
}
@@ -3,7 +3,7 @@ import Foundation
// The codec's decisions, compiled and run without a device, from the module directory:
//
// swiftc -O -o /tmp/gzip-utf8-codec-checks ios/BoundedGunzip.swift \
// ios/StrictUtf8.swift tests/GzipUtf8CodecChecks.swift && /tmp/gzip-utf8-codec-checks
// tests/GzipUtf8CodecChecks.swift && /tmp/gzip-utf8-codec-checks
@main struct GzipUtf8CodecChecks {
static var failures = 0
@@ -37,14 +37,6 @@ import Foundation
check(actual == expected, "gunzip: \(name)")
}
let refused: [[UInt8]] = [
[0xef, 0xbb, 0xbf, 0x41], [0xc0, 0x80], [0xed, 0xa0, 0x80], [0x41, 0xe2, 0x82], [0x80],
[0xf5, 0x80, 0x80, 0x80],
]
for input in refused {
check(decodeStrictUtf8(Data(input)) == nil, "utf8: refuses \(input)")
}
print(failures == 0 ? "all checks passed" : "\(failures) check(s) failed")
exit(failures == 0 ? 0 : 1)
}
@@ -0,0 +1,101 @@
{
"goldenFormatVersion": 6,
"operation": "session.tab-close",
"family": "session.tab-close",
"namedDeltas": [],
"values": {
"3e15def58214": {
"activeHandle": "terminal-1",
"sessionTabs": [
{
"id": "tab-1",
"isActive": true,
"terminal": "terminal-1",
"title": "Terminal",
"type": "terminal"
}
],
"terminals": [
{
"handle": "terminal-1",
"isActive": true,
"title": "Terminal"
}
]
},
"50a46af5cf5c": {
"name": "session.tabs.close#1",
"ordinal": 2,
"json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"session.tabs.close\",\"params\":{\"worktree\":\"id:workspace-1\",\"tabId\":\"tab-1\",\"reason\":\"user\"}}"
},
"b8970b98f1e3": {
"name": "toast",
"ordinal": 3,
"value": {
"message": "Couldn't close the tab. Orca on your computer is still loading. Try again in a moment."
}
},
"d1730750ac1c": {
"name": "session.tabs.close#1",
"ordinal": 1,
"args": [
{
"name": "method",
"value": "session.tabs.close"
},
{
"name": "params",
"value": {
"reason": "user",
"tabId": "tab-1",
"worktree": "id:workspace-1"
}
},
{
"name": "options",
"value": {
"$rpc": "absent"
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"error": {
"code": "runtime_unavailable",
"message": "runtime_unavailable"
},
"id": "frame-1",
"ok": false
}
}
},
"eb79a9b3682a": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"$rpc": "undefined"
}
}
},
"recording": {
"scenario": "session-tab-close-host-unavailable-tells-user",
"checkpoints": [
{
"id": "kept",
"observation": {
"sender": ["d1730750ac1c"],
"payloads": ["50a46af5cf5c"],
"settlements": {
"close-tab": "eb79a9b3682a"
},
"state": "3e15def58214",
"effects": ["b8970b98f1e3"]
}
}
]
}
}
@@ -4,6 +4,13 @@
"family": "session.tab-close",
"namedDeltas": [],
"values": {
"26d1891758e0": {
"name": "toast",
"ordinal": 3,
"value": {
"message": "Couldn't close the tab. Try again."
}
},
"3e15def58214": {
"activeHandle": "terminal-1",
"sessionTabs": [
@@ -84,7 +91,7 @@
"close-terminal": "eb79a9b3682a"
},
"state": "3e15def58214",
"effects": []
"effects": ["26d1891758e0"]
}
}
]
+139 -84
View File
@@ -153,7 +153,7 @@
"id": "b2",
"operation": "project.update-metadata",
"family": "project-explicit-false",
"sites": ["mobile/src/tasks/use-mobile-tasks-project-metadata-actions.tsx"],
"sites": ["mobile/src/tasks/project-board/use-mobile-tasks-project-metadata-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -192,7 +192,7 @@
"id": "b3",
"operation": "linear.issue-detail",
"family": "linear-detail-barrier",
"sites": ["mobile/src/tasks/use-mobile-tasks-item-detail-loading.tsx"],
"sites": ["mobile/src/tasks/item-detail/use-mobile-tasks-item-detail-loading.tsx"],
"schedules": ["issue-first", "peer-pending"],
"steps": [
{
@@ -300,7 +300,7 @@
"id": "settings-task-write",
"operation": "settings.task-preferences",
"family": "settings-best-effort",
"sites": ["mobile/src/tasks/use-mobile-tasks-client-settings-actions.tsx"],
"sites": ["mobile/src/tasks/screen-state/use-mobile-tasks-client-settings-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -1307,7 +1307,7 @@
"id": "settings-task-hydration-fulfilled",
"operation": "settings.task-hydration",
"family": "settings.task-hydration",
"sites": ["mobile/src/tasks/use-mobile-tasks-runtime-hydration.tsx"],
"sites": ["mobile/src/tasks/screen-state/use-mobile-tasks-runtime-hydration.tsx"],
"schedules": ["settings-first"],
"steps": [
{
@@ -1406,7 +1406,7 @@
"id": "settings-task-hydration-refused",
"operation": "settings.task-hydration",
"family": "settings.task-hydration",
"sites": ["mobile/src/tasks/use-mobile-tasks-runtime-hydration.tsx"],
"sites": ["mobile/src/tasks/screen-state/use-mobile-tasks-runtime-hydration.tsx"],
"schedules": ["settings-first"],
"steps": [
{
@@ -1500,7 +1500,7 @@
"id": "settings-task-hydration-transport-error",
"operation": "settings.task-hydration",
"family": "settings.task-hydration",
"sites": ["mobile/src/tasks/use-mobile-tasks-runtime-hydration.tsx"],
"sites": ["mobile/src/tasks/screen-state/use-mobile-tasks-runtime-hydration.tsx"],
"schedules": ["settings-first"],
"steps": [
{
@@ -1701,7 +1701,9 @@
"id": "settings-task-workspace-fulfilled",
"operation": "settings.task-workspace",
"family": "settings.task-workspace",
"sites": ["mobile/src/tasks/use-mobile-tasks-workspace-create-actions.tsx"],
"sites": [
"mobile/src/tasks/workspace-creation/use-mobile-tasks-workspace-create-actions.tsx"
],
"schedules": ["settings-first"],
"steps": [
{
@@ -1742,7 +1744,9 @@
"id": "settings-task-workspace-refused",
"operation": "settings.task-workspace",
"family": "settings.task-workspace",
"sites": ["mobile/src/tasks/use-mobile-tasks-workspace-create-actions.tsx"],
"sites": [
"mobile/src/tasks/workspace-creation/use-mobile-tasks-workspace-create-actions.tsx"
],
"schedules": ["settings-first"],
"steps": [
{
@@ -1778,7 +1782,9 @@
"id": "settings-task-workspace-transport-error",
"operation": "settings.task-workspace",
"family": "settings.task-workspace",
"sites": ["mobile/src/tasks/use-mobile-tasks-workspace-create-actions.tsx"],
"sites": [
"mobile/src/tasks/workspace-creation/use-mobile-tasks-workspace-create-actions.tsx"
],
"schedules": ["settings-first"],
"steps": [
{
@@ -1811,7 +1817,9 @@
"id": "settings-task-workspace-create-linear",
"operation": "settings.task-workspace-create",
"family": "settings.task-workspace-create",
"sites": ["mobile/src/tasks/use-mobile-tasks-workspace-create-actions.tsx"],
"sites": [
"mobile/src/tasks/workspace-creation/use-mobile-tasks-workspace-create-actions.tsx"
],
"schedules": [],
"steps": [
{
@@ -1884,7 +1892,9 @@
"id": "settings-task-workspace-create-pr-start-point",
"operation": "settings.task-workspace-create",
"family": "settings.task-workspace-create",
"sites": ["mobile/src/tasks/use-mobile-tasks-workspace-create-actions.tsx"],
"sites": [
"mobile/src/tasks/workspace-creation/use-mobile-tasks-workspace-create-actions.tsx"
],
"schedules": [],
"steps": [
{
@@ -3016,7 +3026,7 @@
"id": "settings-task-hydration-refuse-after-data",
"operation": "settings.task-hydration",
"family": "settings.task-hydration",
"sites": ["mobile/src/tasks/use-mobile-tasks-runtime-hydration.tsx"],
"sites": ["mobile/src/tasks/screen-state/use-mobile-tasks-runtime-hydration.tsx"],
"schedules": ["success-then-refused"],
"steps": [
{
@@ -5224,7 +5234,7 @@
"id": "tw-create-retry-created",
"operation": "tasks.worktree-create-retry",
"family": "worktree.create-retry",
"sites": ["mobile/src/tasks/worktree-create-retry.ts"],
"sites": ["mobile/src/new-workspace/creation/worktree-create-retry.ts"],
"schedules": [],
"steps": [
{
@@ -5257,7 +5267,7 @@
"id": "tw-create-retry-warning-kept",
"operation": "tasks.worktree-create-retry",
"family": "worktree.create-retry",
"sites": ["mobile/src/tasks/worktree-create-retry.ts"],
"sites": ["mobile/src/new-workspace/creation/worktree-create-retry.ts"],
"schedules": [],
"steps": [
{
@@ -5290,7 +5300,7 @@
"id": "tw-create-retry-name-collision",
"operation": "tasks.worktree-create-retry",
"family": "worktree.create-retry",
"sites": ["mobile/src/tasks/worktree-create-retry.ts"],
"sites": ["mobile/src/new-workspace/creation/worktree-create-retry.ts"],
"schedules": [],
"steps": [
{
@@ -5341,7 +5351,7 @@
"id": "tw-create-retry-unretryable-refusal",
"operation": "tasks.worktree-create-retry",
"family": "worktree.create-retry",
"sites": ["mobile/src/tasks/worktree-create-retry.ts"],
"sites": ["mobile/src/new-workspace/creation/worktree-create-retry.ts"],
"schedules": [],
"steps": [
{
@@ -5372,7 +5382,7 @@
"id": "tw-create-retry-ambiguous-while-connected",
"operation": "tasks.worktree-create-retry",
"family": "worktree.create-retry",
"sites": ["mobile/src/tasks/worktree-create-retry.ts"],
"sites": ["mobile/src/new-workspace/creation/worktree-create-retry.ts"],
"schedules": [],
"steps": [
{
@@ -5400,7 +5410,7 @@
"id": "tw-create-retry-ambiguous-after-drop",
"operation": "tasks.worktree-create-retry",
"family": "worktree.create-retry",
"sites": ["mobile/src/tasks/worktree-create-retry.ts"],
"sites": ["mobile/src/new-workspace/creation/worktree-create-retry.ts"],
"schedules": [],
"steps": [
{
@@ -5426,7 +5436,7 @@
"id": "tw-create-retry-ambiguous-without-idempotency",
"operation": "tasks.worktree-create-retry",
"family": "worktree.create-retry",
"sites": ["mobile/src/tasks/worktree-create-retry.ts"],
"sites": ["mobile/src/new-workspace/creation/worktree-create-retry.ts"],
"schedules": [],
"steps": [
{
@@ -5457,8 +5467,8 @@
"operation": "tasks.worktree-create-retry",
"family": "worktree.agent-launch-create",
"sites": [
"mobile/src/tasks/worktree-create-retry.ts",
"mobile/src/tasks/agent-launch-request.ts"
"mobile/src/new-workspace/creation/worktree-create-retry.ts",
"mobile/src/session/agent-launch/agent-launch-request.ts"
],
"schedules": [],
"steps": [
@@ -5513,7 +5523,7 @@
"id": "tw-capabilities-advertised",
"operation": "tasks.worktree-capabilities",
"family": "worktree.runtime-capabilities",
"sites": ["mobile/src/tasks/worktree-create-capability.ts"],
"sites": ["mobile/src/new-workspace/creation/worktree-create-capability.ts"],
"schedules": [],
"steps": [
{
@@ -5545,7 +5555,7 @@
"id": "tw-capabilities-legacy-idempotency",
"operation": "tasks.worktree-capabilities",
"family": "worktree.runtime-capabilities",
"sites": ["mobile/src/tasks/worktree-create-capability.ts"],
"sites": ["mobile/src/new-workspace/creation/worktree-create-capability.ts"],
"schedules": [],
"steps": [
{
@@ -5573,7 +5583,7 @@
"id": "tw-capabilities-cutover-retried",
"operation": "tasks.worktree-capabilities",
"family": "worktree.runtime-capabilities",
"sites": ["mobile/src/tasks/worktree-create-capability.ts"],
"sites": ["mobile/src/new-workspace/creation/worktree-create-capability.ts"],
"schedules": [],
"steps": [
{
@@ -5615,7 +5625,7 @@
"id": "tw-hosted-base-resolved",
"operation": "tasks.composer-hosted-base",
"family": "worktree.hosted-base",
"sites": ["mobile/src/tasks/composer-source-base-resolve.ts"],
"sites": ["mobile/src/new-workspace/source-selection/composer-source-base-resolve.ts"],
"schedules": [],
"steps": [
{
@@ -5667,7 +5677,7 @@
"id": "tw-hosted-base-soft-error",
"operation": "tasks.composer-hosted-base",
"family": "worktree.hosted-base",
"sites": ["mobile/src/tasks/composer-source-base-resolve.ts"],
"sites": ["mobile/src/new-workspace/source-selection/composer-source-base-resolve.ts"],
"schedules": [],
"steps": [
{
@@ -5718,7 +5728,7 @@
"id": "tw-setup-hook-trust-approved",
"operation": "tasks.setup-hook-trust",
"family": "worktree.setup-hook-trust",
"sites": ["mobile/src/tasks/setup-hook-trust.ts"],
"sites": ["mobile/src/new-workspace/creation/setup-hook-trust.ts"],
"schedules": [],
"steps": [
{
@@ -5753,7 +5763,7 @@
"id": "tw-setup-hook-trust-always",
"operation": "tasks.setup-hook-trust",
"family": "worktree.setup-hook-trust",
"sites": ["mobile/src/tasks/setup-hook-trust.ts"],
"sites": ["mobile/src/new-workspace/creation/setup-hook-trust.ts"],
"schedules": [],
"steps": [
{
@@ -5795,7 +5805,7 @@
"id": "tw-smart-search-all-providers",
"operation": "tasks.smart-source-search",
"family": "tasks.smart-source-search",
"sites": ["mobile/src/tasks/smart-source-search-requests.ts"],
"sites": ["mobile/src/new-workspace/source-selection/smart-source-search-requests.ts"],
"schedules": [],
"steps": [
{
@@ -5985,7 +5995,7 @@
"id": "tw-smart-search-linear-listed",
"operation": "tasks.smart-source-search",
"family": "tasks.smart-source-search",
"sites": ["mobile/src/tasks/smart-source-search-requests.ts"],
"sites": ["mobile/src/new-workspace/source-selection/smart-source-search-requests.ts"],
"schedules": [],
"steps": [
{
@@ -6040,7 +6050,7 @@
"id": "tw-smart-search-gitlab-provider-error",
"operation": "tasks.smart-source-search",
"family": "tasks.smart-source-search",
"sites": ["mobile/src/tasks/smart-source-search-requests.ts"],
"sites": ["mobile/src/new-workspace/source-selection/smart-source-search-requests.ts"],
"schedules": [],
"steps": [
{
@@ -6105,7 +6115,7 @@
"id": "tw-paste-lookup-resolved",
"operation": "tasks.paste-lookup",
"family": "tasks.paste-lookup",
"sites": ["mobile/src/tasks/smart-source-paste-intent.ts"],
"sites": ["mobile/src/new-workspace/source-selection/smart-source-paste-intent.ts"],
"schedules": [],
"steps": [
{
@@ -6224,7 +6234,7 @@
"id": "tw-paste-lookup-slug-unsupported",
"operation": "tasks.paste-lookup",
"family": "tasks.paste-lookup",
"sites": ["mobile/src/tasks/smart-source-paste-intent.ts"],
"sites": ["mobile/src/new-workspace/source-selection/smart-source-paste-intent.ts"],
"schedules": [],
"steps": [
{
@@ -6260,7 +6270,7 @@
"id": "tw-paste-lookup-slug-refused",
"operation": "tasks.paste-lookup",
"family": "tasks.paste-lookup",
"sites": ["mobile/src/tasks/smart-source-paste-intent.ts"],
"sites": ["mobile/src/new-workspace/source-selection/smart-source-paste-intent.ts"],
"schedules": [],
"steps": [
{
@@ -6299,7 +6309,9 @@
"id": "tw-workspace-source-presets",
"operation": "tasks.workspace-source",
"family": "tasks.workspace-source",
"sites": ["mobile/src/tasks/use-mobile-tasks-workspace-source-effects.tsx"],
"sites": [
"mobile/src/tasks/workspace-creation/use-mobile-tasks-workspace-source-effects.tsx"
],
"schedules": [],
"steps": [
{
@@ -6354,7 +6366,9 @@
"id": "tw-workspace-source-presets-refused",
"operation": "tasks.workspace-source",
"family": "tasks.workspace-source",
"sites": ["mobile/src/tasks/use-mobile-tasks-workspace-source-effects.tsx"],
"sites": [
"mobile/src/tasks/workspace-creation/use-mobile-tasks-workspace-source-effects.tsx"
],
"schedules": [],
"steps": [
{
@@ -6383,7 +6397,9 @@
"id": "tw-workspace-sparse-saved",
"operation": "tasks.workspace-sparse",
"family": "tasks.workspace-sparse",
"sites": ["mobile/src/tasks/use-mobile-tasks-workspace-sparse-actions.tsx"],
"sites": [
"mobile/src/tasks/workspace-creation/use-mobile-tasks-workspace-sparse-actions.tsx"
],
"schedules": [],
"steps": [
{
@@ -6441,7 +6457,9 @@
"id": "tw-workspace-sparse-missing-preset",
"operation": "tasks.workspace-sparse",
"family": "tasks.workspace-sparse",
"sites": ["mobile/src/tasks/use-mobile-tasks-workspace-sparse-actions.tsx"],
"sites": [
"mobile/src/tasks/workspace-creation/use-mobile-tasks-workspace-sparse-actions.tsx"
],
"schedules": [],
"steps": [
{
@@ -6486,7 +6504,7 @@
"id": "tw-workspace-ssh-connected",
"operation": "tasks.workspace-ssh",
"family": "tasks.workspace-ssh",
"sites": ["mobile/src/tasks/use-mobile-tasks-workspace-ssh-state.tsx"],
"sites": ["mobile/src/tasks/workspace-creation/use-mobile-tasks-workspace-ssh-state.tsx"],
"schedules": [],
"steps": [
{
@@ -6565,7 +6583,7 @@
"id": "tw-workspace-ssh-not-ready",
"operation": "tasks.workspace-ssh",
"family": "tasks.workspace-ssh",
"sites": ["mobile/src/tasks/use-mobile-tasks-workspace-ssh-state.tsx"],
"sites": ["mobile/src/tasks/workspace-creation/use-mobile-tasks-workspace-ssh-state.tsx"],
"schedules": [],
"steps": [
{
@@ -6636,7 +6654,7 @@
"id": "tw-workspace-ssh-connect-refused",
"operation": "tasks.workspace-ssh",
"family": "tasks.workspace-ssh",
"sites": ["mobile/src/tasks/use-mobile-tasks-workspace-ssh-state.tsx"],
"sites": ["mobile/src/tasks/workspace-creation/use-mobile-tasks-workspace-ssh-state.tsx"],
"schedules": [],
"steps": [
{
@@ -6703,7 +6721,7 @@
"id": "tw-workspace-ssh-local-agents",
"operation": "tasks.workspace-ssh-local",
"family": "tasks.workspace-ssh-local",
"sites": ["mobile/src/tasks/use-mobile-tasks-workspace-ssh-state.tsx"],
"sites": ["mobile/src/tasks/workspace-creation/use-mobile-tasks-workspace-ssh-state.tsx"],
"schedules": [],
"steps": [
{
@@ -6729,7 +6747,7 @@
"id": "tw-task-preferences-resume-write",
"operation": "settings.task-preferences",
"family": "settings-best-effort",
"sites": ["mobile/src/tasks/use-mobile-tasks-client-settings-actions.tsx"],
"sites": ["mobile/src/tasks/screen-state/use-mobile-tasks-client-settings-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -12348,7 +12366,7 @@
"id": "tk-item-detail-github",
"operation": "tasks.item-detail-github",
"family": "tasks.item-detail-github",
"sites": ["mobile/src/tasks/use-mobile-tasks-item-detail-loading.tsx"],
"sites": ["mobile/src/tasks/item-detail/use-mobile-tasks-item-detail-loading.tsx"],
"schedules": [],
"steps": [
{
@@ -12516,7 +12534,7 @@
"id": "tk-item-detail-github-reactions",
"operation": "tasks.item-detail-github",
"family": "tasks.item-detail-github",
"sites": ["mobile/src/tasks/use-mobile-tasks-item-detail-loading.tsx"],
"sites": ["mobile/src/tasks/item-detail/use-mobile-tasks-item-detail-loading.tsx"],
"schedules": [],
"steps": [
{
@@ -12606,7 +12624,7 @@
"id": "tk-item-detail-gitlab",
"operation": "tasks.item-detail-gitlab",
"family": "tasks.item-detail-gitlab",
"sites": ["mobile/src/tasks/use-mobile-tasks-item-detail-loading.tsx"],
"sites": ["mobile/src/tasks/item-detail/use-mobile-tasks-item-detail-loading.tsx"],
"schedules": [],
"steps": [
{
@@ -12653,7 +12671,7 @@
"id": "tk-item-detail-gitlab-reactions",
"operation": "tasks.item-detail-gitlab",
"family": "tasks.item-detail-gitlab",
"sites": ["mobile/src/tasks/use-mobile-tasks-item-detail-loading.tsx"],
"sites": ["mobile/src/tasks/item-detail/use-mobile-tasks-item-detail-loading.tsx"],
"schedules": [],
"steps": [
{
@@ -12715,7 +12733,7 @@
"id": "tk-item-detail-linear",
"operation": "tasks.item-detail-linear",
"family": "tasks.item-detail-linear",
"sites": ["mobile/src/tasks/use-mobile-tasks-item-detail-loading.tsx"],
"sites": ["mobile/src/tasks/item-detail/use-mobile-tasks-item-detail-loading.tsx"],
"schedules": [],
"steps": [
{
@@ -12783,7 +12801,7 @@
"id": "tk-item-detail-metadata",
"operation": "tasks.item-detail-metadata",
"family": "tasks.item-detail-metadata",
"sites": ["mobile/src/tasks/use-mobile-tasks-item-detail-metadata-effects.tsx"],
"sites": ["mobile/src/tasks/item-detail/use-mobile-tasks-item-detail-metadata-effects.tsx"],
"schedules": [],
"steps": [
{
@@ -12799,7 +12817,7 @@
"id": "tk-linear-team-context",
"operation": "tasks.linear-team-context",
"family": "tasks.linear-team-context",
"sites": ["mobile/src/tasks/use-mobile-tasks-list-and-detail-effects.tsx"],
"sites": ["mobile/src/tasks/task-list/use-mobile-tasks-list-and-detail-effects.tsx"],
"schedules": [],
"steps": [
{
@@ -12861,7 +12879,7 @@
"id": "tk-provider-load",
"operation": "tasks.provider-load",
"family": "tasks.provider-load",
"sites": ["mobile/src/tasks/use-mobile-tasks-provider-load-actions.tsx"],
"sites": ["mobile/src/tasks/task-list/use-mobile-tasks-provider-load-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -12991,7 +13009,7 @@
"id": "tk-list-gitlab-todos",
"operation": "tasks.task-list-gitlab-todos",
"family": "tasks.task-list-gitlab-todos",
"sites": ["mobile/src/tasks/use-mobile-tasks-task-list-loading.tsx"],
"sites": ["mobile/src/tasks/task-list/use-mobile-tasks-task-list-loading.tsx"],
"schedules": [],
"steps": [
{
@@ -13035,7 +13053,7 @@
"id": "tk-list-gitlab-items",
"operation": "tasks.task-list-gitlab-items",
"family": "tasks.task-list-gitlab-items",
"sites": ["mobile/src/tasks/use-mobile-tasks-task-list-loading.tsx"],
"sites": ["mobile/src/tasks/task-list/use-mobile-tasks-task-list-loading.tsx"],
"schedules": [],
"steps": [
{
@@ -13085,7 +13103,7 @@
"id": "tk-list-linear",
"operation": "tasks.task-list-linear",
"family": "tasks.task-list-linear",
"sites": ["mobile/src/tasks/use-mobile-tasks-task-list-loading.tsx"],
"sites": ["mobile/src/tasks/task-list/use-mobile-tasks-task-list-loading.tsx"],
"schedules": [],
"steps": [
{
@@ -13192,7 +13210,7 @@
"id": "tk-list-linear-switch-back",
"operation": "tasks.task-list-linear",
"family": "tasks.task-list-linear",
"sites": ["mobile/src/tasks/use-mobile-tasks-task-list-loading.tsx"],
"sites": ["mobile/src/tasks/task-list/use-mobile-tasks-task-list-loading.tsx"],
"schedules": [],
"steps": [
{
@@ -13352,7 +13370,7 @@
"id": "tk-linear-connect",
"operation": "tasks.linear-connect",
"family": "tasks.linear-connect",
"sites": ["mobile/src/tasks/use-mobile-tasks-task-pagination-actions.tsx"],
"sites": ["mobile/src/tasks/task-list/use-mobile-tasks-task-pagination-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -13384,7 +13402,7 @@
"id": "tk-create-github",
"operation": "tasks.task-create-github",
"family": "tasks.task-create-github",
"sites": ["mobile/src/tasks/use-mobile-tasks-task-create-actions.tsx"],
"sites": ["mobile/src/tasks/task-list/use-mobile-tasks-task-create-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -13442,7 +13460,7 @@
"id": "tk-create-gitlab",
"operation": "tasks.task-create-gitlab",
"family": "tasks.task-create-gitlab",
"sites": ["mobile/src/tasks/use-mobile-tasks-task-create-actions.tsx"],
"sites": ["mobile/src/tasks/task-list/use-mobile-tasks-task-create-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -13478,7 +13496,7 @@
"id": "tk-create-linear",
"operation": "tasks.task-create-linear",
"family": "tasks.task-create-linear",
"sites": ["mobile/src/tasks/use-mobile-tasks-task-create-actions.tsx"],
"sites": ["mobile/src/tasks/task-list/use-mobile-tasks-task-create-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -13517,7 +13535,7 @@
"id": "tk-item-comment-github",
"operation": "tasks.item-comment-github",
"family": "tasks.item-comment-github",
"sites": ["mobile/src/tasks/use-mobile-tasks-hosted-comment-review-actions.tsx"],
"sites": ["mobile/src/tasks/item-detail/use-mobile-tasks-hosted-comment-review-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -13563,7 +13581,7 @@
"id": "tk-item-review-github",
"operation": "tasks.item-review-github",
"family": "tasks.item-review-github",
"sites": ["mobile/src/tasks/use-mobile-tasks-hosted-comment-review-actions.tsx"],
"sites": ["mobile/src/tasks/item-detail/use-mobile-tasks-hosted-comment-review-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -13651,7 +13669,7 @@
"id": "tk-item-comment-gitlab",
"operation": "tasks.item-comment-gitlab",
"family": "tasks.item-comment-gitlab",
"sites": ["mobile/src/tasks/use-mobile-tasks-hosted-comment-review-actions.tsx"],
"sites": ["mobile/src/tasks/item-detail/use-mobile-tasks-hosted-comment-review-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -13695,7 +13713,7 @@
"id": "tk-item-comment-gitlab-mr",
"operation": "tasks.item-comment-gitlab-mr",
"family": "tasks.item-comment-gitlab-mr",
"sites": ["mobile/src/tasks/use-mobile-tasks-hosted-comment-review-actions.tsx"],
"sites": ["mobile/src/tasks/item-detail/use-mobile-tasks-hosted-comment-review-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -13739,7 +13757,7 @@
"id": "tk-item-checks-files",
"operation": "tasks.item-checks-files-github",
"family": "tasks.item-checks-files",
"sites": ["mobile/src/tasks/use-mobile-tasks-github-check-file-actions.tsx"],
"sites": ["mobile/src/tasks/item-detail/use-mobile-tasks-github-check-file-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -13928,7 +13946,7 @@
"id": "tk-item-reply-merge",
"operation": "tasks.item-reply-merge-github",
"family": "tasks.item-reply-merge",
"sites": ["mobile/src/tasks/use-mobile-tasks-github-reply-merge-actions.tsx"],
"sites": ["mobile/src/tasks/item-detail/use-mobile-tasks-github-reply-merge-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -14062,7 +14080,7 @@
"id": "tk-item-merge-gitlab",
"operation": "tasks.item-merge-gitlab",
"family": "tasks.item-merge-gitlab",
"sites": ["mobile/src/tasks/use-mobile-tasks-github-reply-merge-actions.tsx"],
"sites": ["mobile/src/tasks/item-detail/use-mobile-tasks-github-reply-merge-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -14100,7 +14118,7 @@
"id": "tk-item-status-gitlab",
"operation": "tasks.item-status-gitlab",
"family": "tasks.item-status-gitlab",
"sites": ["mobile/src/tasks/use-mobile-tasks-gitlab-github-status-actions.tsx"],
"sites": ["mobile/src/tasks/item-detail/use-mobile-tasks-gitlab-github-status-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -14239,7 +14257,7 @@
"id": "tk-item-status-gitlab-mr",
"operation": "tasks.item-status-gitlab-mr",
"family": "tasks.item-status-gitlab-mr",
"sites": ["mobile/src/tasks/use-mobile-tasks-gitlab-github-status-actions.tsx"],
"sites": ["mobile/src/tasks/item-detail/use-mobile-tasks-gitlab-github-status-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -14277,7 +14295,7 @@
"id": "tk-item-metadata-github",
"operation": "tasks.item-metadata-github",
"family": "tasks.item-metadata-github",
"sites": ["mobile/src/tasks/use-mobile-tasks-hosted-metadata-actions.tsx"],
"sites": ["mobile/src/tasks/item-detail/use-mobile-tasks-hosted-metadata-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -14319,7 +14337,7 @@
"id": "tk-item-metadata-gitlab",
"operation": "tasks.item-metadata-gitlab",
"family": "tasks.item-metadata-gitlab",
"sites": ["mobile/src/tasks/use-mobile-tasks-hosted-metadata-actions.tsx"],
"sites": ["mobile/src/tasks/item-detail/use-mobile-tasks-hosted-metadata-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -14360,7 +14378,7 @@
"id": "tk-item-metadata-gitlab-mr",
"operation": "tasks.item-metadata-gitlab-mr",
"family": "tasks.item-metadata-gitlab-mr",
"sites": ["mobile/src/tasks/use-mobile-tasks-hosted-metadata-actions.tsx"],
"sites": ["mobile/src/tasks/item-detail/use-mobile-tasks-hosted-metadata-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -14431,7 +14449,7 @@
"id": "tk-linear-item",
"operation": "tasks.linear-item-actions",
"family": "tasks.linear-item",
"sites": ["mobile/src/tasks/use-mobile-tasks-linear-item-actions.tsx"],
"sites": ["mobile/src/tasks/providers/linear/use-mobile-tasks-linear-item-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -14532,7 +14550,9 @@
"id": "tk-project-repo-slugs",
"operation": "tasks.project-repo-slugs",
"family": "tasks.project-repo-slugs",
"sites": ["mobile/src/tasks/use-mobile-tasks-project-repository-resolution.tsx"],
"sites": [
"mobile/src/tasks/project-board/use-mobile-tasks-project-repository-resolution.tsx"
],
"schedules": [],
"steps": [
{
@@ -14562,7 +14582,7 @@
"id": "tk-project-board-load",
"operation": "tasks.project-board-load",
"family": "tasks.project-board-load",
"sites": ["mobile/src/tasks/use-mobile-tasks-project-loading-actions.tsx"],
"sites": ["mobile/src/tasks/project-board/use-mobile-tasks-project-loading-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -14722,7 +14742,7 @@
"id": "tk-project-row-detail",
"operation": "tasks.project-row-detail",
"family": "tasks.project-row-detail",
"sites": ["mobile/src/tasks/use-mobile-tasks-project-detail-loading.tsx"],
"sites": ["mobile/src/tasks/project-board/use-mobile-tasks-project-detail-loading.tsx"],
"schedules": [],
"steps": [
{
@@ -14775,7 +14795,7 @@
"id": "tk-project-row-metadata-load",
"operation": "tasks.project-row-metadata-load",
"family": "tasks.project-row-metadata-load",
"sites": ["mobile/src/tasks/use-mobile-tasks-project-metadata-loading.tsx"],
"sites": ["mobile/src/tasks/project-board/use-mobile-tasks-project-metadata-loading.tsx"],
"schedules": [],
"steps": [
{
@@ -14847,7 +14867,7 @@
"id": "tk-project-row-fields",
"operation": "tasks.project-row-fields",
"family": "tasks.project-row-fields",
"sites": ["mobile/src/tasks/use-mobile-tasks-project-metadata-actions.tsx"],
"sites": ["mobile/src/tasks/project-board/use-mobile-tasks-project-metadata-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -14931,7 +14951,7 @@
"id": "tk-project-row-review-checks",
"operation": "tasks.project-row-review-checks",
"family": "tasks.project-row-review-checks",
"sites": ["mobile/src/tasks/use-mobile-tasks-project-review-check-actions.tsx"],
"sites": ["mobile/src/tasks/project-board/use-mobile-tasks-project-review-check-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -15054,7 +15074,7 @@
"id": "tk-project-row-threads",
"operation": "tasks.project-row-threads",
"family": "tasks.project-row-threads",
"sites": ["mobile/src/tasks/use-mobile-tasks-project-thread-reply-actions.tsx"],
"sites": ["mobile/src/tasks/project-board/use-mobile-tasks-project-thread-reply-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -15185,7 +15205,9 @@
"id": "tk-project-row-comments-issue",
"operation": "tasks.project-row-comments-issue",
"family": "tasks.project-row-comments-issue",
"sites": ["mobile/src/tasks/use-mobile-tasks-project-workspace-comment-actions.tsx"],
"sites": [
"mobile/src/tasks/project-board/use-mobile-tasks-project-workspace-comment-actions.tsx"
],
"schedules": [],
"steps": [
{
@@ -15275,7 +15297,9 @@
"id": "tk-project-row-comments-pr",
"operation": "tasks.project-row-comments-pr",
"family": "tasks.project-row-comments-pr",
"sites": ["mobile/src/tasks/use-mobile-tasks-project-workspace-comment-actions.tsx"],
"sites": [
"mobile/src/tasks/project-board/use-mobile-tasks-project-workspace-comment-actions.tsx"
],
"schedules": [],
"steps": [
{
@@ -15313,7 +15337,7 @@
"id": "tk-project-row-files-merge",
"operation": "tasks.project-row-files-merge",
"family": "tasks.project-row-files-merge",
"sites": ["mobile/src/tasks/use-mobile-tasks-project-file-merge-actions.tsx"],
"sites": ["mobile/src/tasks/project-board/use-mobile-tasks-project-file-merge-actions.tsx"],
"schedules": [],
"steps": [
{
@@ -19362,6 +19386,37 @@
}
]
},
{
"id": "session-tab-close-host-unavailable-tells-user",
"operation": "session.tab-close",
"family": "session.tab-close",
"sites": ["mobile/src/session/tabs/use-mobile-session-close-actions.ts"],
"schedules": [],
"steps": [
{
"action": "close-tab",
"id": "close-tab"
},
{
"complete": "session.tabs.close#1",
"params": {
"reason": "user",
"tabId": "tab-1",
"worktree": "id:workspace-1"
},
"reply": {
"ok": false,
"error": {
"code": "runtime_unavailable",
"message": "runtime_unavailable"
}
}
},
{
"checkpoint": "kept"
}
]
},
{
"id": "review-mark-reviewed-persists",
"operation": "session.diff-review-actions",
@@ -20890,7 +20945,7 @@
"id": "tasks-route-repo-list",
"operation": "tasks.route-repo-list",
"family": "tasks.route-repo-list",
"sites": ["mobile/src/tasks/use-mobile-tasks-route-and-item-state.tsx"],
"sites": ["mobile/src/tasks/screen-state/use-mobile-tasks-route-and-item-state.tsx"],
"schedules": [],
"steps": [
{
@@ -20937,7 +20992,7 @@
"id": "linear-select-workspace",
"operation": "linear.select-workspace-picker",
"family": "linear.select-workspace-picker",
"sites": ["mobile/src/tasks/mobile-tasks-filter-pickers.tsx"],
"sites": ["mobile/src/tasks/screen/mobile-tasks-filter-pickers.tsx"],
"schedules": [],
"steps": [
{
+1 -1
View File
@@ -11,7 +11,7 @@ import {
} from './automation-target-inventory'
import { Switch, Text, View } from 'react-native'
import { formatAutomationSchedule } from './automation-schedule-label'
import { mobileTuiAgentLabel } from '../tasks/mobile-tui-agents'
import { mobileTuiAgentLabel } from '../agents/mobile-tui-agents'
import type { MobileAutomationRow } from './automation-reply-schema'
import { AutomationButton, AutomationMetadata } from './AutomationControls'
import { automationDate } from './automation-run-presentation'
@@ -1,7 +1,7 @@
import { Text, View } from 'react-native'
import { useMobileTranslation } from '../i18n/use-mobile-translation'
import { useMobileColorScheme } from '../theme/use-mobile-color-scheme'
import { mobileTuiAgentLabel } from '../tasks/mobile-tui-agents'
import { mobileTuiAgentLabel } from '../agents/mobile-tui-agents'
import { AutomationMetadata } from './AutomationControls'
import type { AutomationDraft } from './automation-draft'
import type { AutomationTargets } from './automation-target-inventory'
+1 -1
View File
@@ -12,7 +12,7 @@ import { useAutomationTargetDrafts } from './use-automation-target-drafts'
import { Text, View } from 'react-native'
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import type { MobileAutomation } from './automation-reply-schema'
import { mobileTuiAgentLabel } from '../tasks/mobile-tui-agents'
import { mobileTuiAgentLabel } from '../agents/mobile-tui-agents'
import type { MobileNewTabAgentOption } from '../session/agent-launch/mobile-new-tab-agent-options'
import { AutomationAdvancedFields } from './AutomationAdvancedFields'
import { AutomationButton, AutomationChoice, AutomationField } from './AutomationControls'
+4 -163
View File
@@ -1,122 +1,12 @@
import {
loadAutomationTargets,
automationSetupKey,
workspaceMatchesSetup
} from './automation-target-inventory'
import { loadAutomationTargets, workspaceMatchesSetup } from './automation-target-inventory'
import { describe, expect, it } from 'vitest'
import { AutomationUpdate } from '../../../src/shared/rpc-contract/automation-params'
import { automationListSchema, runsPageSchema } from './automation-reply-schema'
import { mobileTuiAgentLabel } from '../tasks/mobile-tui-agents'
import {
automationCreateParams,
automationDraftPatch,
automationUpdateParams,
newAutomationDraft,
validateAutomationDraft
} from './automation-draft'
import {
automationClient,
automationTargets,
savedAutomation,
savedRun
} from './automation-test-fixtures'
import { automationUpdateParams, newAutomationDraft } from './automation-draft'
import { automationClient, automationTargets, savedAutomation } from './automation-test-fixtures'
describe('mobile automation host contracts', () => {
it('rejects changed blank grace, accepts explicit zero and preserves an untouched saved value', () => {
const saved = savedAutomation()
const original = newAutomationDraft(saved)
for (const grace of ['', ' ']) {
expect(validateAutomationDraft({ ...original, grace }, 2, saved)).toBe(
'Missed-run grace must be zero or a positive number of minutes.'
)
}
expect(validateAutomationDraft({ ...original, grace: '0' }, 2, saved)).toBeNull()
expect(automationDraftPatch({ ...original, grace: '0' }, original)).toEqual({})
const untouched = { ...saved, missedRunGraceMinutes: 720 }
const draft = newAutomationDraft(untouched)
expect(validateAutomationDraft(draft, 2, untouched)).toBeNull()
expect(validateAutomationDraft({ ...draft, grace: '0' }, 2, untouched)).toBeNull()
expect(
automationUpdateParams(untouched.id, { ...draft, grace: '0' }, draft, automationTargets())
.updates
).toEqual({ missedRunGraceMinutes: 0 })
expect(
automationUpdateParams(saved.id, { ...draft, name: 'Rename' }, draft, automationTargets())
.updates
).toEqual({ name: 'Rename' })
})
it('keeps target host identity and expands the managed inventory past the initial range', async () => {
const base = automationTargets().setups[0]!
const setups = [base, { ...base, hostId: 'ssh:builder' as const }]
const worktrees = Array.from({ length: 202 }, (_, i) => ({
id: `repo-1::/repo/${i}`,
repoId: 'repo-1',
path: `/repo/${i}`,
displayName: `Workspace ${i}`,
hostId: 'ssh:builder'
}))
const port = automationClient((method, params) => {
if (method === 'project.list') {
return { projects: [{ id: base.projectId, displayName: 'Project' }] }
}
if (method === 'projectHostSetup.list') {
return { setups }
}
if (method === 'repo.list') {
return {
repos: [
{ id: base.repoId, displayName: 'Local', path: base.path },
{ id: base.repoId, displayName: 'SSH', path: base.path, connectionId: 'builder' }
]
}
}
if (method === 'ssh.listTargetSummaries') {
return { targets: [{ id: 'builder', label: 'Builder', generation: 7 }] }
}
if (method === 'worktree.list') {
const limit =
params &&
typeof params === 'object' &&
'limit' in params &&
typeof params.limit === 'number'
? params.limit
: 200
return {
worktrees: worktrees.slice(0, limit),
totalCount: worktrees.length,
truncated: limit < worktrees.length,
hostScope: { hostIds: ['ssh:builder'], omittedHostIds: ['local'] }
}
}
throw new Error(`Unexpected method: ${method}`)
})
const initial = await loadAutomationTargets(port.client)
expect(initial.setups).toHaveLength(2)
expect(initial.coverage).toMatchObject({
totalCount: 202,
truncated: true,
hostScope: { omittedHostIds: ['local'] }
})
const complete = await loadAutomationTargets(port.client, initial.coverage.totalCount)
expect(complete.workspaces).toHaveLength(202)
const selected = complete.setups.find((setup) => setup.hostId === 'ssh:builder')!
const draft = {
...newAutomationDraft(),
name: 'SSH',
prompt: 'Review',
agentId: 'codex' as const,
setupId: automationSetupKey(selected),
workspaceMode: 'existing' as const,
workspaceId: complete.workspaces[201]!.worktreeId
}
expect(automationCreateParams(draft, complete)).toMatchObject({
runContext: { hostId: 'ssh:builder', path: '/repo' },
workspace: 'id:repo-1::/repo/201',
destination: { selector: { kind: 'ssh', targetId: 'builder', targetGeneration: 7 } }
})
})
it('resolves legacy inventory only from a unique repo host and never assumes local', async () => {
const setup = automationTargets().setups[0]!
let repos: {
@@ -184,53 +74,4 @@ describe('mobile automation host contracts', () => {
reuseSession: true
})
})
it('keeps every row a newer host sends that this build can read, never the whole list', () => {
const row = (id: string, fields: Record<string, unknown> = {}) => ({
...savedAutomation(),
id,
...fields
})
const owner = (automationId: string, selector: unknown = { kind: 'self' }) => ({
automationId,
selector
})
const rows = automationListSchema.parse({
automations: [
row('known'),
row('newer-agent', { agentId: 'future-agent' }),
row('newer-surface', { surface: 'canvas' }),
row('newer-mode', { workspaceMode: 'cloud_per_run' }),
row('newer-owner'),
row('duplicate-owner'),
row('missing-owner')
],
items: [
owner('known'),
owner('newer-agent'),
{ ...owner('newer-surface'), usageSummary: { lastRunAt: 'yesterday' } },
owner('newer-mode'),
owner('newer-owner', { kind: 'cloud' }),
owner('duplicate-owner'),
owner('duplicate-owner')
]
})
expect(rows.map((entry) => entry.automation.id)).toEqual([
'known',
'newer-agent',
'newer-surface'
])
expect(rows[2]?.item.usageSummary).toBeUndefined()
expect(rows[0]?.automation.futureField).toBe('keep me')
expect(mobileTuiAgentLabel(rows[1]!.automation.agentId)).toBe('future-agent')
expect(automationListSchema.safeParse({ automations: [] }).success).toBe(false)
const newerHost = {
...savedRun('newer-host'),
runContext: { hostId: 'cloud:1', repoId: 'r', path: '/r' }
}
expect(
runsPageSchema
.parse({ runs: [savedRun(), newerHost, { id: 'unreadable' }] })
.runs.map((run) => run.runContext?.hostId ?? run.id)
).toEqual(['run-old', 'cloud:1'])
})
})
@@ -13,7 +13,7 @@ import {
normalizeSetupHookTrust,
readRepoHooksSetupCommand,
wasSetupHookPreviouslyApproved
} from '../tasks/setup-hook-trust'
} from '../new-workspace/creation/setup-hook-trust'
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import type { AutomationDraft } from './automation-draft'
import { AutomationDraftValidationError } from './automation-error'
@@ -3,7 +3,7 @@ import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react
import type { ComponentProps } from 'react'
import type { PersistedTrustedOrcaHooks } from '../../../src/shared/orca-yaml-hook-types'
import type { OrcaHookTrustDrawer, OrcaHookTrustPrompt } from '../components/OrcaHookTrustDrawer'
import { persistSetupHookTrustApproval } from '../tasks/setup-hook-trust'
import { persistSetupHookTrustApproval } from '../new-workspace/creation/setup-hook-trust'
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import { prepareAutomationSetup } from './automation-setup-preparation'
import type { AutomationDraft } from './automation-draft'
+1 -1
View File
@@ -5,7 +5,7 @@ import { Terminal } from 'lucide-react-native'
import Svg, { Defs, G, LinearGradient, Path, Stop } from 'react-native-svg'
import { colors, radii } from '../theme/mobile-theme'
import { useMobileColorScheme } from '../theme/use-mobile-color-scheme'
import { MOBILE_AGENT_CATALOG } from '../tasks/mobile-agent-catalog'
import { MOBILE_AGENT_CATALOG } from '../agents/mobile-agent-catalog'
import { MOBILE_AGENT_ICON_ASSETS } from './mobile-agent-icon-assets'
import { ClaudeIcon, OpenAIIcon } from './AgentIcons'
@@ -1,6 +1,6 @@
import { Text, View } from 'react-native'
import { useMobileTranslation } from '../i18n/use-mobile-translation'
import type { WorkspaceCreateSetupDecision } from '../tasks/workspace-create-params'
import type { SetupDecision as WorkspaceCreateSetupDecision } from '../../../src/shared/worktree/create-types'
import { useMobileColorScheme } from '../theme/use-mobile-color-scheme'
import { MobileSwitch } from './MobileSwitch'
import { ListGroup, ListRow } from './list/ListGroup'
@@ -1,7 +1,7 @@
import { Pressable, Text, View } from 'react-native'
import { useMobileTranslation } from '../i18n/use-mobile-translation'
import type { WorkspaceSshGate } from '../tasks/workspace-ssh-gate'
import { workspaceSshStatusLabel } from '../tasks/workspace-ssh-gate'
import type { WorkspaceSshGate } from '../new-workspace/creation/workspace-ssh-gate'
import { workspaceSshStatusLabel } from '../new-workspace/creation/workspace-ssh-gate'
import { newWorktreeFormStyles as styles } from './new-worktree-form-styles'
import { useMobileColorScheme } from '../theme/use-mobile-color-scheme'
import { pressedStyle } from '../theme/mobile-theme'
@@ -1,7 +1,7 @@
import { Text, View } from 'react-native'
import { useMobileTranslation } from '../i18n/use-mobile-translation'
import type { WorkspaceCreateSetupDecision } from '../tasks/workspace-create-params'
import type { useMobileComposerSource } from '../tasks/use-mobile-composer-source'
import type { SetupDecision as WorkspaceCreateSetupDecision } from '../../../src/shared/worktree/create-types'
import type { useMobileComposerSource } from '../new-workspace/source-selection/use-mobile-composer-source'
import { useMobileColorScheme } from '../theme/use-mobile-color-scheme'
import { AutoHeight } from './AutoHeight'
import { TextField } from './composer-input/TextField'
@@ -1,9 +1,9 @@
import { Text, View } from 'react-native'
import { FolderGit2 } from 'lucide-react-native'
import { useMobileTranslation } from '../i18n/use-mobile-translation'
import type { WorkspaceCreateSetupDecision } from '../tasks/workspace-create-params'
import type { WorkspaceSshGate } from '../tasks/workspace-ssh-gate'
import type { useMobileComposerSource } from '../tasks/use-mobile-composer-source'
import type { SetupDecision as WorkspaceCreateSetupDecision } from '../../../src/shared/worktree/create-types'
import type { WorkspaceSshGate } from '../new-workspace/creation/workspace-ssh-gate'
import type { useMobileComposerSource } from '../new-workspace/source-selection/use-mobile-composer-source'
import { useMobileColorScheme } from '../theme/use-mobile-color-scheme'
import { BottomDrawer } from './bottom-drawer/BottomDrawer'
import { MobileLoadErrorState, MobileStateView } from './MobileStateView'
+8 -5
View File
@@ -5,11 +5,14 @@ import { getRepoExecutionHostId, parseExecutionHostId } from '../../../src/share
import { getProjectIdentityKey } from '../../../src/shared/project-host-setup-projection'
import { shouldPreserveWorkspaceSourceOnRepoChange } from '../../../src/shared/new-workspace/workspace-source'
import { useMobileTranslation } from '../i18n/use-mobile-translation'
import type { SmartModeAvailabilityInput } from '../tasks/mobile-smart-source-modes'
import { deriveRepoSlug, type PasteRepoCandidate } from '../tasks/smart-source-paste-intent'
import { useMobileComposerSource } from '../tasks/use-mobile-composer-source'
import { useNewWorktreeRuntimeCapabilities } from '../tasks/worktree-create-capability'
import { useWorktreeCreateBasePrefetch } from '../tasks/use-worktree-create-base-prefetch'
import type { SmartModeAvailabilityInput } from '../new-workspace/source-selection/mobile-smart-source-modes'
import {
deriveRepoSlug,
type PasteRepoCandidate
} from '../new-workspace/source-selection/smart-source-paste-intent'
import { useMobileComposerSource } from '../new-workspace/source-selection/use-mobile-composer-source'
import { useNewWorktreeRuntimeCapabilities } from '../new-workspace/creation/worktree-create-capability'
import { useWorktreeCreateBasePrefetch } from '../new-workspace/creation/use-worktree-create-base-prefetch'
import { useHostDescriptor } from '../host-descriptors/host-descriptor-store'
import { isSameMobileWorkspaceRepo } from '../worktree/new-workspace-dialog-repo-selection'
import {
@@ -1,9 +1,9 @@
import { View } from 'react-native'
import { getRepoExecutionHostId } from '../../../src/shared/execution-host'
import { useMobileTranslation } from '../i18n/use-mobile-translation'
import type { SmartModeAvailabilityInput } from '../tasks/mobile-smart-source-modes'
import type { PasteRepoCandidate } from '../tasks/smart-source-paste-intent'
import type { useMobileComposerSource } from '../tasks/use-mobile-composer-source'
import type { SmartModeAvailabilityInput } from '../new-workspace/source-selection/mobile-smart-source-modes'
import type { PasteRepoCandidate } from '../new-workspace/source-selection/smart-source-paste-intent'
import type { useMobileComposerSource } from '../new-workspace/source-selection/use-mobile-composer-source'
import { HostKindIcon } from './HostKindIcon'
import { MobileAgentIcon } from './MobileAgentIcon'
import type { NewWorktreeAgentOption } from './new-worktree-agent-selection'
@@ -1,5 +1,5 @@
import { CaseSensitive, GitBranch, Sparkles } from 'lucide-react-native'
import type { SmartModeIcon } from '../tasks/mobile-smart-source-modes'
import type { SmartModeIcon } from '../new-workspace/source-selection/mobile-smart-source-modes'
import { TaskProviderLogo } from './TaskProviderLogo'
// Provider modes use brand SVGs; neutral modes use lucide glyphs.
@@ -1,5 +1,5 @@
import { Text, View } from 'react-native'
import type { MobileComposerSource } from '../tasks/use-mobile-composer-source'
import type { MobileComposerSource } from '../new-workspace/source-selection/use-mobile-composer-source'
import { colors, spacing } from '../theme/mobile-theme'
import { themedStyleSheet } from '../theme/themed-styles'
import { useMobileColorScheme } from '../theme/use-mobile-color-scheme'
@@ -8,9 +8,12 @@ import {
type TextInputInstance
} from 'react-native'
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import type { SmartWorkspaceSourceRow as SourceRow } from '../../../src/shared/new-workspace/smart-workspace-source-results'
import type { JiraSite, JiraSiteSelection } from '../../../src/shared/jira/jira-types'
import { isBlockingJiraUrlIntent } from '../../../src/shared/new-workspace/smart-workspace-source-results'
import {
isBlockingJiraUrlIntent,
type SmartWorkspaceSourceRow as SourceRow,
type SmartNameMode
} from '../../../src/shared/new-workspace/smart-workspace-source-results'
import {
MR_STATE_FILTER_OPTIONS,
resolveAvailableSmartModes,
@@ -18,14 +21,14 @@ import {
SMART_MODE_OPTIONS,
type SmartModeAvailabilityInput,
type SmartModeOption
} from '../tasks/mobile-smart-source-modes'
import type { MrStateFilter, SmartNameMode } from '../tasks/mobile-composer-source-types'
} from '../new-workspace/source-selection/mobile-smart-source-modes'
import type { MrStateFilter } from '../new-workspace/source-selection/mobile-composer-source-types'
import {
lookupGitHubItemByOwnerRepo,
type PasteRepoCandidate
} from '../tasks/smart-source-paste-intent'
import { useSmartWorkspaceSource } from '../tasks/use-smart-workspace-source'
import type { MobileComposerSource } from '../tasks/use-mobile-composer-source'
} from '../new-workspace/source-selection/smart-source-paste-intent'
import { useSmartWorkspaceSource } from '../new-workspace/source-selection/use-smart-workspace-source'
import type { MobileComposerSource } from '../new-workspace/source-selection/use-mobile-composer-source'
import { colors, pressedStyle } from '../theme/mobile-theme'
import { useMobileColorScheme } from '../theme/use-mobile-color-scheme'
import { useMobileTranslation } from '../i18n/use-mobile-translation'
@@ -7,8 +7,8 @@ import {
GitPullRequest,
X
} from 'lucide-react-native'
import type { SmartNameSelection } from '../tasks/mobile-composer-source-types'
import type { MobileComposerSource } from '../tasks/use-mobile-composer-source'
import type { SmartNameSelection } from '../new-workspace/source-selection/mobile-composer-source-types'
import type { MobileComposerSource } from '../new-workspace/source-selection/use-mobile-composer-source'
import { colors, spacing, pressedStyle } from '../theme/mobile-theme'
import { themedStyleSheet } from '../theme/themed-styles'
import { useMobileColorScheme } from '../theme/use-mobile-color-scheme'
@@ -1,8 +1,8 @@
import type { TuiAgent } from '../../../src/shared/agent-launch/catalog/tui-agent'
import { translate } from '../i18n/mobile-i18n'
import { MOBILE_AGENT_CATALOG } from '../tasks/mobile-agent-catalog'
import { isMobileTuiAgentEnabled } from '../tasks/mobile-tui-agents'
import { pickWorkspaceAgent } from '../tasks/workspace-agent-selection'
import { MOBILE_AGENT_CATALOG } from '../agents/mobile-agent-catalog'
import { isMobileTuiAgentEnabled } from '../agents/mobile-tui-agents'
import { pickWorkspaceAgent } from '../new-workspace/creation/workspace-agent-selection'
export type NewWorktreeRuntimeSettings = {
defaultTuiAgent?: TuiAgent | 'blank' | null
@@ -1,7 +1,7 @@
import type { ExecutionHostId } from '../../../src/shared/execution-host'
import type { Repo as SharedRepo } from '../../../src/shared/repo-types'
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import type { SetupHookTrust } from '../tasks/setup-hook-trust'
import type { SetupHookTrust } from '../new-workspace/creation/setup-hook-trust'
import { resolveRepoBadgeColor } from '../../../src/shared/repo-badge-color'
export type MobileWorkspaceRepo = Pick<SharedRepo, 'id' | 'displayName' | 'path'> &
@@ -1,5 +1,5 @@
import { useState } from 'react'
import { isMobileTuiAgentEnabled } from '../tasks/mobile-tui-agents'
import { isMobileTuiAgentEnabled } from '../agents/mobile-tui-agents'
import {
NEW_WORKTREE_AGENT_OPTIONS,
NEW_WORKTREE_BLANK_AGENT,
@@ -5,22 +5,22 @@ import type { RetiredNameRegistry } from '../../../src/shared/worktree/retired-n
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import { folderCreateBusyMessage, uncertainCreateMessage } from './new-workspace-create-copy'
import { triggerError, triggerSuccess } from '../platform/haptics'
import type { WorktreeCreateParent } from '../tasks/worktree-create-retry'
import { createBlankWorkspace } from '../tasks/blank-workspace-create'
import { isMobileTuiAgentEnabled } from '../tasks/mobile-tui-agents'
import type { WorktreeCreateParent } from '../new-workspace/creation/worktree-create-retry'
import { createBlankWorkspace } from '../new-workspace/creation/blank-workspace-create'
import { isMobileTuiAgentEnabled } from '../agents/mobile-tui-agents'
import {
isSetupHookTrusted,
persistSetupHookTrustApproval,
wasSetupHookPreviouslyApproved,
type SetupHookTrust
} from '../tasks/setup-hook-trust'
import { createWorkspaceFromComposerSource } from '../tasks/source-workspace-create'
import { normalizeWorkspaceAgent } from '../tasks/workspace-agent-selection'
import type { WorkspaceCreateSetupDecision } from '../tasks/workspace-create-params'
import type { AgentLaunchSupport } from '../tasks/agent-launch-request'
import type { WorkspaceSshGate } from '../tasks/workspace-ssh-gate'
import type { useMobileComposerSource } from '../tasks/use-mobile-composer-source'
import type { WorktreeCreateIdempotencySupport } from '../tasks/worktree-create-idempotency-policy'
} from '../new-workspace/creation/setup-hook-trust'
import { createWorkspaceFromComposerSource } from '../new-workspace/creation/source-workspace-create'
import { normalizeWorkspaceAgent } from '../new-workspace/creation/workspace-agent-selection'
import type { SetupDecision as WorkspaceCreateSetupDecision } from '../../../src/shared/worktree/create-types'
import type { AgentLaunchSupport } from '../session/agent-launch/agent-launch-request'
import type { WorkspaceSshGate } from '../new-workspace/creation/workspace-ssh-gate'
import type { useMobileComposerSource } from '../new-workspace/source-selection/use-mobile-composer-source'
import type { WorktreeCreateIdempotencySupport } from '../new-workspace/creation/worktree-create-idempotency-policy'
import {
pickPreferredNewWorktreeAgent,
type NewWorktreeAgentOption,
@@ -5,12 +5,12 @@ import {
remoteAgentDetectionRead,
sshRepoConnectRun,
sshRepoStateRead
} from '../tasks/mobile-workspace-source-operations'
} from '../new-workspace/creation/mobile-workspace-source-operations'
import {
deriveWorkspaceSshGate,
type WorkspaceSshGate,
type WorkspaceSshRecord
} from '../tasks/workspace-ssh-gate'
} from '../new-workspace/creation/workspace-ssh-gate'
type DetectedAgentIdsState = {
client: RpcClient
@@ -4,7 +4,10 @@ import type { PersistedTrustedOrcaHooks } from '../../../src/shared/orca-yaml-ho
import type { RpcAcceptedResult } from '../transport/rpc/rpc-accepted-result'
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import type { RpcResponse } from '../transport/rpc/rpc-wire-types'
import { taskLinearStatusRead, taskPreflightRead } from '../tasks/mobile-task-runtime-operations'
import {
taskLinearStatusRead,
taskPreflightRead
} from '../tasks/screen-state/mobile-task-runtime-operations'
import {
filterAvailableTaskProviders,
normalizeVisibleTaskProviders,
@@ -13,9 +16,9 @@ import {
import {
readJiraConnectionProbeReply,
type MobileJiraConnection
} from '../tasks/jira-mobile-connection'
import { jiraConnectionStatusProbe } from '../tasks/mobile-jira-operations'
import { useMobileJiraConnectionState } from '../tasks/use-mobile-jira-connection-state'
} from '../tasks/providers/jira/jira-mobile-connection'
import { jiraConnectionStatusProbe } from '../tasks/providers/jira/mobile-jira-operations'
import { useMobileJiraConnectionState } from '../tasks/providers/jira/use-mobile-jira-connection-state'
import type { NewWorktreeRuntimeSettings } from './new-worktree-agent-selection'
import { newWorkspaceUiStateRead } from './new-workspace-operations'
@@ -1,9 +1,12 @@
import { useCallback, useEffect, useState } from 'react'
import { getRepoExecutionHostId } from '../../../src/shared/execution-host'
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import { normalizeSetupHookTrust, readRepoHooksSetupCommand } from '../tasks/setup-hook-trust'
import {
normalizeSetupHookTrust,
readRepoHooksSetupCommand
} from '../new-workspace/creation/setup-hook-trust'
import { newWorkspaceSetupHooksRead } from './new-workspace-operations'
import type { WorkspaceCreateSetupDecision } from '../tasks/workspace-create-params'
import type { SetupDecision as WorkspaceCreateSetupDecision } from '../../../src/shared/worktree/create-types'
import type { MobileWorkspaceRepo, SetupHookDetails } from './new-worktree-modal-types'
type SetupScriptValues = {
@@ -7,6 +7,66 @@ function entry(id: number): ConnectionLogEntry {
}
describe('connection log buffer', () => {
it('discards history without a pending hydration or late event restoring it', async () => {
let resolveLoad: (entries: readonly ConnectionLogEntry[]) => void = () => {}
let persisted: readonly ConnectionLogEntry[] = [entry(1)]
const store = createConnectionLogStore(3, {
load: () =>
new Promise((resolve) => {
resolveLoad = resolve
}),
save: async (_hostId, entries) => {
persisted = entries
}
})
const hydration = store.hydrate('host-a')
store.append('host-a', entry(2))
await store.discard('host-a')
resolveLoad([entry(1)])
await hydration
store.append('host-a', entry(3))
await store.flush()
expect(store.get('host-a')).toEqual([])
expect(persisted).toEqual([])
})
it('discards history after an older in-flight save finishes', async () => {
let finishSave: () => void = () => {}
let markSaveStarted: () => void = () => {}
const saveStarted = new Promise<void>((resolve) => {
markSaveStarted = resolve
})
let persisted: readonly ConnectionLogEntry[] = []
let holdNextSave = false
const store = createConnectionLogStore(3, {
load: async () => [],
save: async (_hostId, entries) => {
if (holdNextSave) {
holdNextSave = false
markSaveStarted()
await new Promise<void>((resolve) => {
finishSave = resolve
})
}
persisted = entries
}
})
await store.hydrate('host-a')
await store.flush()
holdNextSave = true
store.append('host-a', entry(1))
await saveStarted
const cleared = store.discard('host-a')
finishSave()
await cleared
expect(store.get('host-a')).toEqual([])
expect(persisted).toEqual([])
})
it('redacts credentials before retaining or persisting an event', async () => {
const save = vi.fn(async () => {})
const store = createConnectionLogStore(3, {
@@ -8,6 +8,8 @@ const PERSISTENCE_RETRY_DELAY_MS = 200
export type ConnectionLogStore = {
append: (hostId: string, entry: ConnectionLogEntry) => void
/** Drops and persists empty history; later appends for the removed host are ignored. */
discard: (hostId: string) => Promise<void>
flush: () => Promise<void>
get: (hostId: string) => readonly ConnectionLogEntry[]
hydrate: (hostId: string) => Promise<void>
@@ -27,6 +29,8 @@ export function createConnectionLogStore(
const listenersByHost = new Map<string, Set<() => void>>()
const hydratedHosts = new Set<string>()
const hydrationFailedHosts = new Set<string>()
// Removed host ids are never reused, so late events from closing clients must not recreate history.
const discardedHosts = new Set<string>()
const hydrationByHost = new Map<string, Promise<void>>()
const activeSaveByHost = new Map<string, Promise<void>>()
const dirtyHosts = new Set<string>()
@@ -133,6 +137,9 @@ export function createConnectionLogStore(
const pending = persistence
.load(hostId)
.then((stored) => {
if (hydratedHosts.has(hostId)) {
return
}
const live = entriesByHost.get(hostId) ?? []
const seen = new Set<string>()
const merged: ConnectionLogEntry[] = []
@@ -163,6 +170,9 @@ export function createConnectionLogStore(
return {
append(hostId, entry) {
if (discardedHosts.has(hostId)) {
return
}
let entries = entriesByHost.get(hostId)
if (!entries) {
entries = []
@@ -176,6 +186,15 @@ export function createConnectionLogStore(
.catch(() => {})
},
async discard(hostId) {
discardedHosts.add(hostId)
entriesByHost.delete(hostId)
hydratedHosts.add(hostId)
hydrationFailedHosts.delete(hostId)
notify(hostId)
await flushHost(hostId)
},
flush: async () => {
await Promise.all([...entriesByHost.keys()].map((hostId) => flushHost(hostId)))
},
@@ -24,6 +24,11 @@ export const connectionLogStore = createConnectionLogStore(200, {
}
})
export async function discardConnectionLogs(hostId: string): Promise<void> {
sessionStartedHosts.delete(hostId)
await connectionLogStore.discard(hostId)
}
export function recordConnectionRevival(
hostId: string,
reason: 'app-resume' | 'network-change'
@@ -8,7 +8,7 @@ import {
// All ownership reads must succeed before a write: refusal or malformed replies abort with a named error rather than risking the wrong host.
// Reuse the Tasks runtime-status operation; this gate needs the same fields.
export { taskRuntimeStatusRead as fileOwnershipRuntimeStatusRead } from '../tasks/mobile-task-runtime-operations'
export { taskRuntimeStatusRead as fileOwnershipRuntimeStatusRead } from '../tasks/screen-state/mobile-task-runtime-operations'
export const fileOwnershipWorktreeRead = bindDeferredRpcOperation(
defineRpcOperation({
@@ -16,7 +16,7 @@ import { formatAutomationSchedule } from '../../automations/automation-schedule-
import { AgentSpinner } from '../../components/AgentSpinner'
import { MobileSwitch } from '../../components/MobileSwitch'
import { useMobileTranslation } from '../../i18n/use-mobile-translation'
import { mobileTuiAgentLabel } from '../../tasks/mobile-tui-agents'
import { mobileTuiAgentLabel } from '../../agents/mobile-tui-agents'
import { colors } from '../../theme/mobile-theme'
import { themedStyleSheet } from '../../theme/themed-styles'
import { useMobileColorScheme } from '../../theme/use-mobile-color-scheme'
@@ -1,4 +1,5 @@
import type { QueryClient } from '@tanstack/react-query'
import { discardConnectionLogs } from '../diagnostics/connection/persisted-connection-log-store'
import { wipeHostStore } from '../device-store/device-store'
import {
deleteHostPageCache,
@@ -31,4 +32,5 @@ export async function removeHostAndCloseClient(
void forgetHostUpdateFailures(hostId).catch(() => undefined)
void deleteHostPageCache(hostId).catch(() => undefined)
void wipeHostStore(hostId).catch(() => undefined)
void discardConnectionLogs(hostId).catch(() => undefined)
}
@@ -7,7 +7,7 @@ import { canUseRepoWideTrust } from '../../../src/shared/orca-hook-trust-entries
import {
persistOrcaHookTrustApproval,
wasOrcaHookPreviouslyApproved
} from '../tasks/setup-hook-trust'
} from '../new-workspace/creation/setup-hook-trust'
import { triggerError, triggerSuccess } from '../platform/haptics'
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import { buildWorktreeRemoveRequest } from './worktree-remove-request'
+4
View File
@@ -2498,6 +2498,10 @@
"useAttachmentInputLeaseGate": {
"reconnecting": "Anhängen fehlgeschlagen (erneuter Verbindungsaufbau)"
},
"useCloseActions": {
"closeFailed": "Der Tab konnte nicht geschlossen werden. Versuche es erneut.",
"closeFailedDesktopNotReady": "Der Tab konnte nicht geschlossen werden. Orca wird auf deinem Computer noch geladen. Versuche es gleich noch einmal."
},
"useContentCreateActions": {
"browserCommandFailed": "Browser-Befehl fehlgeschlagen",
"browserCreateFailed": "Browser konnte nicht erstellt werden",
+4
View File
@@ -2545,6 +2545,10 @@
"copyFailed": "Couldn't copy",
"selectionCleared": "Selection cleared (scrolled out of buffer)"
},
"useCloseActions": {
"closeFailed": "Couldn't close the tab. Try again.",
"closeFailedDesktopNotReady": "Couldn't close the tab. Orca on your computer is still loading. Try again in a moment."
},
"useContentCreateActions": {
"noteCreateFailed": "Failed to create markdown note",
"untitledNoteCreateFailed": "Unable to create untitled markdown note",
+4
View File
@@ -2568,6 +2568,10 @@
"useAttachmentInputLeaseGate": {
"reconnecting": "No se pudo adjuntar (reconectando)"
},
"useCloseActions": {
"closeFailed": "No se pudo cerrar la pestaña. Inténtalo de nuevo.",
"closeFailedDesktopNotReady": "No se pudo cerrar la pestaña. Orca todavía se está cargando en tu ordenador. Vuelve a intentarlo en un momento."
},
"useContentCreateActions": {
"browserCommandFailed": "No se pudo ejecutar el comando del navegador",
"browserCreateFailed": "No se pudo crear el navegador",
+4
View File
@@ -2568,6 +2568,10 @@
"useAttachmentInputLeaseGate": {
"reconnecting": "Échec de l'ajout (reconnexion en cours)"
},
"useCloseActions": {
"closeFailed": "Impossible de fermer l’onglet. Réessayez.",
"closeFailedDesktopNotReady": "Impossible de fermer l’onglet. Orca est encore en cours de chargement sur votre ordinateur. Réessayez dans un instant."
},
"useContentCreateActions": {
"browserCommandFailed": "Échec de la commande du navigateur",
"browserCreateFailed": "Échec de la création du navigateur",
+4
View File
@@ -2494,6 +2494,10 @@
"useAttachmentInputLeaseGate": {
"reconnecting": "添付に失敗しました(再接続中)。"
},
"useCloseActions": {
"closeFailed": "タブを閉じられませんでした。もう一度お試しください。",
"closeFailedDesktopNotReady": "タブを閉じられませんでした。コンピューターの Orca はまだ読み込み中です。少ししてからもう一度お試しください。"
},
"useContentCreateActions": {
"browserCommandFailed": "ブラウザコマンドの実行に失敗しました。",
"browserCreateFailed": "ブラウザの作成に失敗しました。",
+4
View File
@@ -2494,6 +2494,10 @@
"useAttachmentInputLeaseGate": {
"reconnecting": "첨부 실패 (다시 연결 중)"
},
"useCloseActions": {
"closeFailed": "탭을 닫지 못했습니다. 다시 시도하세요.",
"closeFailedDesktopNotReady": "탭을 닫지 못했습니다. 컴퓨터에서 Orca를 아직 불러오는 중입니다. 잠시 후 다시 시도하세요."
},
"useContentCreateActions": {
"browserCommandFailed": "브라우저 명령 실행에 실패했습니다.",
"browserCreateFailed": "브라우저를 만들지 못했습니다.",
+4
View File
@@ -2941,6 +2941,10 @@
"useAttachmentInputLeaseGate": {
"reconnecting": "Falha ao anexar (reconectando)"
},
"useCloseActions": {
"closeFailed": "Não foi possível fechar a aba. Tente novamente.",
"closeFailedDesktopNotReady": "Não foi possível fechar a aba. O Orca ainda está carregando no seu computador. Tente novamente em instantes."
},
"useContentCreateActions": {
"browserCommandFailed": "Falha no comando do navegador",
"browserCreateFailed": "Falha ao criar o navegador",
+4
View File
@@ -2638,6 +2638,10 @@
"useAttachmentInputLeaseGate": {
"reconnecting": "Не удалось прикрепить (повторное подключение)"
},
"useCloseActions": {
"closeFailed": "Не удалось закрыть вкладку. Попробуйте ещё раз.",
"closeFailedDesktopNotReady": "Не удалось закрыть вкладку. Orca на компьютере ещё загружается. Попробуйте ещё раз через минуту."
},
"useContentCreateActions": {
"browserCommandFailed": "Не удалось выполнить команду браузера",
"browserCreateFailed": "Не удалось создать вкладку браузера",
+4
View File
@@ -2498,6 +2498,10 @@
"useAttachmentInputLeaseGate": {
"reconnecting": "Eklenemedi (yeniden bağlanılıyor)"
},
"useCloseActions": {
"closeFailed": "Sekme kapatılamadı. Tekrar deneyin.",
"closeFailedDesktopNotReady": "Sekme kapatılamadı. Orca bilgisayarınızda hâlâ yükleniyor. Birazdan tekrar deneyin."
},
"useContentCreateActions": {
"browserCommandFailed": "Tarayıcı komutu çalıştırılamadı",
"browserCreateFailed": "Tarayıcı oluşturulamadı",
+4
View File
@@ -2494,6 +2494,10 @@
"useAttachmentInputLeaseGate": {
"reconnecting": "加入附件失敗(重新連線中)"
},
"useCloseActions": {
"closeFailed": "無法關閉分頁。請再試一次。",
"closeFailedDesktopNotReady": "無法關閉分頁。電腦上的 Orca 仍在載入中,請稍後再試。"
},
"useContentCreateActions": {
"browserCommandFailed": "瀏覽器命令執行失敗",
"browserCreateFailed": "建立瀏覽器失敗",
+4
View File
@@ -2500,6 +2500,10 @@
"useAttachmentInputLeaseGate": {
"reconnecting": "添加附件失败(重新连接中)"
},
"useCloseActions": {
"closeFailed": "无法关闭标签页。请重试。",
"closeFailedDesktopNotReady": "无法关闭标签页。电脑上的 Orca 仍在加载,请稍后重试。"
},
"useContentCreateActions": {
"browserCommandFailed": "浏览器命令执行失败",
"browserCreateFailed": "创建浏览器失败",
@@ -1,118 +0,0 @@
import { expect, it } from 'vitest'
import { captureBridgeError } from './bridge/bridge-error-capture'
import { BridgeHostRequests as LegacyHostRequests } from './bridge-host-requests.legacy.test-fixture'
import { readBridgeClientMessage } from './bridge/bridge-envelope'
import { createPageClient, INIT, GRANTS } from './bridge/bridge-page-client-test-harness'
import { createFakeRpcClient, rpcSuccess } from './bridge-host-test-fakes'
import { withGitHubTargetOperation } from '../tasks/github-work-item-operation'
// The forwarder is the pinned pre-fence implementation; its envelope parser is unchanged since that build.
function pair(options: { capable?: boolean; switchAfterCheck?: boolean } = {}) {
const physical = createFakeRpcClient()
const calls: { method: string; args: readonly unknown[] }[] = []
const effects: string[] = []
let endpoint = 'A'
physical.sendRequest = async (...args) => {
const [method, params] = args
calls.push({ method, args })
if (method === 'status.get') {
const response = rpcSuccess('status', {
runtimeId: 'A',
hostDescriptor: { installationId: 'A' },
capabilities: options.capable === false ? [] : ['github.exact-work-item-target.v1']
})
if (options.switchAfterCheck) {
endpoint = 'pre-fence-B'
}
return response
}
if (method === 'github.updateIssue') {
const exact =
params && typeof params === 'object' && 'ownerRepo' in params ? params.ownerRepo : null
effects.push(endpoint === 'A' && exact ? 'fork' : 'upstream')
return rpcSuccess('mutation', { ok: true })
}
return rpcSuccess('optional', null)
}
let host!: LegacyHostRequests
const page = createPageClient({
send: (json) => {
const read = readBridgeClientMessage(json)
if (!read.ok) {
throw new Error(`old parser refused: ${read.refusal}`)
}
if (read.message.type === 'request') {
host.open(read.message)
}
}
})
host = new LegacyHostRequests({
client: physical,
isIdTaken: () => false,
sendReply: (id, payload) => page.deliver({ v: 1, type: 'reply', id, payload }),
sendError: (id, error) =>
page.deliver({ v: 1, type: 'error', id, error: captureBridgeError(error) }),
capExceeded: (message) => new Error(message),
serveNative: async () => rpcSuccess('native', null),
readClientIdentity: () => 'phone'
})
page.deliver({ ...INIT, grants: { ...GRANTS, native: ['rpcEnvelope'] } })
return {
page,
host,
calls,
effects,
close: () => {
page.client.close()
host.closeAll(false)
}
}
}
async function closeIssue(fixture: ReturnType<typeof pair>) {
return withGitHubTargetOperation({
client: fixture.page.client,
params: { repo: 'id:clone' },
ownerRepo: { owner: 'fork', repo: 'widgets' },
send: async (client, exact, options) =>
client.sendRequest(
'github.updateIssue',
{ repo: 'id:clone', number: 93, updates: { state: 'closed' }, ...exact },
options
)
})
}
it('a checked capable endpoint still closes through the actual old parser/forwarder without a phone grant or accessor', async () => {
const f = pair()
try {
expect(await closeIssue(f)).toMatchObject({ ok: true, result: { ok: true } })
expect(f.calls.map((call) => call.method)).toEqual(['status.get', 'github.updateIssue'])
expect(f.calls[1].args[1]).toMatchObject({
repo: 'id:clone',
ownerRepo: { owner: 'fork', repo: 'widgets' },
updates: { state: 'closed' }
})
expect(f.calls[1].args[2]).toMatchObject({
envelope: { expectedRuntimeSource: { sourceId: 'A', runtimeId: 'A' } }
})
expect(f.calls[1].args[2]).not.toHaveProperty('beforeSend')
expect(f.effects).toEqual(['fork'])
await f.page.client.sendRequest('optional.no-params')
await f.page.client.sendRequest('optional.params', { value: 1 })
expect(f.calls.slice(2).map((call) => call.args)).toEqual([
['optional.no-params'],
['optional.params', { value: 1 }]
])
} finally {
f.close()
}
})
it('an old server is refused before unsafe generic send even through the old shell', async () => {
const f = pair({ capable: false })
try {
await expect(closeIssue(f)).rejects.toThrow('Update Orca')
expect(f.calls.map((call) => call.method)).toEqual(['status.get'])
expect(f.effects).toEqual([])
} finally {
f.close()
}
})
@@ -1,9 +1,6 @@
import { beforeEach, describe, expect, it, vi } from 'vitest'
import { readShellRefusalCode } from './bridge-host-errors'
import {
BRIDGE_MEDIA_MAX_LIVE_HANDLES,
BRIDGE_MEDIA_READ_MAX_BYTES
} from './bridge/bridge-media-verbs'
import { BRIDGE_MEDIA_MAX_LIVE_HANDLES } from './bridge/bridge-media-verbs'
import { MEDIA_HANDLE_TTL_MS, MediaHandleRegistry, type StagedMedia } from './media-handle-registry'
const staged = (index: number, byteLength = 3000): StagedMedia => ({
@@ -37,24 +34,6 @@ describe('minting handles', () => {
})
})
it('answers one item per staged file, each with a handle of its own', () => {
const items = registry.mint([staged(1), staged(2)])
expect(items.map((item) => item.mime)).toEqual(['image/png', 'image/png'])
expect(items.map((item) => item.byteLength)).toEqual([3000, 3000])
expect(items[0]?.handle).not.toBe(items[1]?.handle)
expect(registry.liveCount()).toBe(2)
})
it('carries the pixel dimensions only when the picker reported them', () => {
const [withSize, withoutSize] = registry.mint([
staged(1),
{ uri: 'file:///cache/a.pdf', mime: 'application/pdf', byteLength: 12 }
])
expect(withSize).toMatchObject({ width: 10, height: 8 })
expect(withoutSize).not.toHaveProperty('width')
expect(withoutSize).not.toHaveProperty('height')
})
it('refuses a pick that would pass the live-handle cap, and stages nothing of it', () => {
registry.mint(Array.from({ length: BRIDGE_MEDIA_MAX_LIVE_HANDLES }, (_, i) => staged(i)))
const extra = staged(99)
@@ -84,36 +63,6 @@ describe('reading a handle', () => {
registry = new MediaHandleRegistry({ now: () => clock, discard: (uri) => deleted.push(uri) })
})
it('answers the byte range a chunk covers, and says which one ends the file', () => {
const [item] = registry.mint([staged(1, 1000)])
const handle = item?.handle ?? ''
expect(registry.read(handle, 0, 400)).toEqual({
uri: 'file:///cache/orca-media-1.png',
start: 0,
end: 400,
eof: false
})
expect(registry.read(handle, 600, 400)).toMatchObject({ start: 600, end: 1000, eof: true })
})
it('shortens the last chunk rather than reading past the file', () => {
const [item] = registry.mint([staged(1, 1000)])
expect(registry.read(item?.handle ?? '', 900, 400)).toMatchObject({ end: 1000, eof: true })
})
it('reads an empty staged file once, and calls it the end', () => {
const [item] = registry.mint([staged(1, 0)])
expect(registry.read(item?.handle ?? '', 0, 400)).toMatchObject({ start: 0, end: 0, eof: true })
})
it('never hands back more than one chunk, whatever length it was asked for', () => {
// Call the registry directly to prove its own chunk bound even when no wire schema runs.
const [item] = registry.mint([staged(1, BRIDGE_MEDIA_READ_MAX_BYTES * 3)])
const range = registry.read(item?.handle ?? '', 0, BRIDGE_MEDIA_READ_MAX_BYTES * 3)
expect(range.end).toBe(BRIDGE_MEDIA_READ_MAX_BYTES)
expect(range.eof).toBe(false)
})
it('refuses a read at or past the end of a file that had bytes', () => {
const [item] = registry.mint([staged(1, 1000)])
const handle = item?.handle ?? ''
@@ -157,39 +106,6 @@ describe('ending a handle', () => {
registry = new MediaHandleRegistry({ now: () => 1_000, discard: (uri) => deleted.push(uri) })
})
it('deletes the staged file and says it released one', () => {
const [item] = registry.mint([staged(1)])
expect(registry.release(item?.handle ?? '')).toBe(true)
expect(deleted).toEqual(['file:///cache/orca-media-1.png'])
expect(registry.liveCount()).toBe(0)
})
it('answers false for a handle the TTL already expired, as the wire contract says', () => {
// Release must sweep before lookup so expired handles report released:false as the wire contract promises.
let clock = 1_000
const swept: string[] = []
const ageing = new MediaHandleRegistry({
now: () => clock,
discard: (uri) => swept.push(uri)
})
const [item] = ageing.mint([staged(1)])
clock += MEDIA_HANDLE_TTL_MS + 1
expect(ageing.release(item?.handle ?? '')).toBe(false)
expect(swept).toEqual(['file:///cache/orca-media-1.png'])
})
it('is gone at exactly the TTL, not one millisecond after', () => {
let clock = 1_000
const ageing = new MediaHandleRegistry({ now: () => clock, discard: () => {} })
const [item] = ageing.mint([staged(1)])
const handle = item?.handle ?? ''
clock += MEDIA_HANDLE_TTL_MS - 1
expect(ageing.liveCount()).toBe(1)
clock += 1
expect(ageing.liveCount()).toBe(0)
expect(ageing.release(handle)).toBe(false)
})
it('answers false for a handle it no longer holds, rather than refusing', () => {
// Repeated/expired release is normal during unmount, whose caller cannot know which handles survived.
const [item] = registry.mint([staged(1)])
@@ -199,15 +115,6 @@ describe('ending a handle', () => {
expect(deleted).toHaveLength(1)
})
it('releases everything at once, which is what the session end and the unmount call', () => {
registry.mint([staged(1), staged(2), staged(3)])
registry.releaseAll()
expect(deleted).toHaveLength(3)
expect(registry.liveCount()).toBe(0)
registry.releaseAll()
expect(deleted).toHaveLength(3)
})
it('keeps going when the device refuses to delete one staged file', () => {
const warn = vi.spyOn(console, 'warn').mockImplementation(() => {})
try {
@@ -1,17 +1,14 @@
import type { TuiAgent } from '../../../src/shared/agent-launch/catalog/tui-agent'
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import type { TuiAgent } from '../../../../src/shared/agent-launch/catalog/tui-agent'
import type { RpcClient } from '../../transport/rpc/rpc-client-contract'
import {
createWorktreeWithNameRetry,
type WorktreeCreateParent,
type WorktreeCreateResult
} from './worktree-create-retry'
import type { WorktreeCreateAgentLaunch } from './agent-launch-request'
import type { WorktreeCreateAgentLaunch } from '../../session/agent-launch/agent-launch-request'
import type { WorktreeCreateIdempotencyProbe } from './worktree-create-idempotency-policy'
import {
startupAgentCreateFields,
type WorkspaceCreateParams,
type WorkspaceCreateSetupDecision
} from './workspace-create-params'
import { startupAgentCreateFields, type WorkspaceCreateParams } from './workspace-create-params'
import type { SetupDecision as WorkspaceCreateSetupDecision } from '../../../../src/shared/worktree/create-types'
export async function createBlankWorkspace(args: {
client: RpcClient
@@ -2,16 +2,16 @@ import * as z from 'zod'
import {
isAgentLaunchResult,
type AgentLaunchResult
} from '../../../src/shared/agent-launch/contracts/agent-launch-intent'
import { bindDeferredRpcOperation, defineRpcOperation } from '../transport/rpc/rpc-operation'
import { rpcResultVariant } from '../transport/rpc/rpc-operation-result-reader'
import { connectionHostStatusRead } from '../query/host-status-query'
} from '../../../../src/shared/agent-launch/contracts/agent-launch-intent'
import { bindDeferredRpcOperation, defineRpcOperation } from '../../transport/rpc/rpc-operation'
import { rpcResultVariant } from '../../transport/rpc/rpc-operation-result-reader'
import { connectionHostStatusRead } from '../../query/host-status-query'
import {
agentLaunchCreateReceiptSchema,
worktreeCreateReceiptSchema,
worktreeHostedBaseSchema
} from './workspace-create-reply-schema'
import { taskRuntimeStatusSchema } from './task-runtime-reply-schema'
import { taskRuntimeStatusSchema } from '../../tasks/screen-state/task-runtime-reply-schema'
// Replay receipts retain the full shared launch guard; create-time status shares the Tasks schema with different acceptance.
@@ -1,5 +1,5 @@
import { bindDeferredRpcOperation, defineRpcOperation } from '../transport/rpc/rpc-operation'
import { rpcResultVariant } from '../transport/rpc/rpc-operation-result-reader'
import { bindDeferredRpcOperation, defineRpcOperation } from '../../transport/rpc/rpc-operation'
import { rpcResultVariant } from '../../transport/rpc/rpc-operation-result-reader'
import {
detectedAgentIdsSchema,
repoSetupHooksSchema,
@@ -1,9 +1,9 @@
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import type { RpcResponse } from '../transport/rpc/rpc-wire-types'
import { isRpcDeliveryUnknown } from '../transport/rpc/rpc-delivery-ambiguity'
import { waitForRpcClientReconnected } from '../transport/rpc/rpc-client-reconnect-wait'
import '../transport/connection/stable-logical-rpc-client'
import { isLogicalClientCutoverError } from '../transport/connection/logical-client-cutover-error'
import type { RpcClient } from '../../transport/rpc/rpc-client-contract'
import type { RpcResponse } from '../../transport/rpc/rpc-wire-types'
import { isRpcDeliveryUnknown } from '../../transport/rpc/rpc-delivery-ambiguity'
import { waitForRpcClientReconnected } from '../../transport/rpc/rpc-client-reconnect-wait'
import '../../transport/connection/stable-logical-rpc-client'
import { isLogicalClientCutoverError } from '../../transport/connection/logical-client-cutover-error'
import {
getWorktreeCreateReplayWindowMs,
type WorktreeCreateIdempotencySupport
@@ -1,12 +1,12 @@
import type { PersistedTrustedOrcaHooks } from '../../../src/shared/orca-yaml-hook-types'
import type { PersistedTrustedOrcaHooks } from '../../../../src/shared/orca-yaml-hook-types'
import {
canUseRepoWideTrust,
type OrcaHookTrustKind,
withOrcaHookRepoAlwaysTrusted,
withOrcaHookScriptConfirmed
} from '../../../src/shared/orca-hook-trust-entries'
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import { taskUiStateWrite } from './mobile-task-runtime-operations'
} from '../../../../src/shared/orca-hook-trust-entries'
import type { RpcClient } from '../../transport/rpc/rpc-client-contract'
import { taskUiStateWrite } from '../../tasks/screen-state/mobile-task-runtime-operations'
export type SetupHookTrust = {
contentHash: string
@@ -1,24 +1,27 @@
import type { TuiAgent } from '../../../src/shared/agent-launch/catalog/tui-agent'
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import { resolveComposerMrBase, resolveComposerPrBase } from './composer-source-base-resolve'
import type { MobileComposerCreateSelection } from './mobile-composer-source-types'
import type { TuiAgent } from '../../../../src/shared/agent-launch/catalog/tui-agent'
import type { RpcClient } from '../../transport/rpc/rpc-client-contract'
import {
resolveComposerMrBase,
resolveComposerPrBase
} from '../source-selection/composer-source-base-resolve'
import type { MobileComposerCreateSelection } from '../source-selection/mobile-composer-source-types'
import { resolveMobileWorkspaceCreateName } from './mobile-workspace-name'
import type { WorkspaceAgentChoice } from './workspace-agent-selection'
import { toTaskItem } from './composer-work-item-task'
import { toTaskItem } from '../source-selection/composer-work-item-task'
import {
startupAgentCreateFields,
buildTaskWorkspaceCreateParams,
type WorkspaceCreateParams,
type WorkspaceCreateSetupDecision
type WorkspaceCreateParams
} from './workspace-create-params'
import type { SetupDecision as WorkspaceCreateSetupDecision } from '../../../../src/shared/worktree/create-types'
import {
createWorktreeWithNameRetry,
type WorktreeCreateParent,
type WorktreeCreateResult
} from './worktree-create-retry'
import type { WorktreeCreateAgentLaunch } from './agent-launch-request'
import type { WorktreeCreateAgentLaunch } from '../../session/agent-launch/agent-launch-request'
import type { WorktreeCreateIdempotencyProbe } from './worktree-create-idempotency-policy'
import { getClientWorktreeCreateCandidate } from '../../../src/shared/new-workspace/worktree-create-retry-policy'
import { getClientWorktreeCreateCandidate } from '../../../../src/shared/new-workspace/worktree-create-retry-policy'
// Host resolution applies agent permission flags and shell quoting.
export type WorkspaceCreateAgentBundle = {
@@ -0,0 +1,17 @@
import { describe, expect, it } from 'vitest'
import { parseSparsePresetDirectories } from './sparse-preset-draft'
describe('parseSparsePresetDirectories', () => {
it('normalizes textarea input into unique repo-relative directories', () => {
expect(
parseSparsePresetDirectories(`
src\\renderer
packages/ui/
src/renderer
`)
).toEqual({
directories: ['src/renderer', 'packages/ui'],
error: null
})
})
})
@@ -1,4 +1,4 @@
import { translate } from '../i18n/mobile-i18n'
import { translate } from '../../i18n/mobile-i18n'
const WINDOWS_DRIVE_PATH_PATTERN = /^[A-Za-z]:/
@@ -1,6 +1,6 @@
import { useEffect } from 'react'
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import type { MobileComposerCreateSelection } from './mobile-composer-source-types'
import type { RpcClient } from '../../transport/rpc/rpc-client-contract'
import type { MobileComposerCreateSelection } from '../source-selection/mobile-composer-source-types'
import { worktreeCreateBasePrefetch } from './mobile-workspace-create-operations'
function worktreeCreatePrefetchBase(
@@ -1,13 +1,13 @@
import type { TuiAgent } from '../../../src/shared/agent-launch/catalog/tui-agent'
import { translate } from '../i18n/mobile-i18n'
import type { TuiAgent } from '../../../../src/shared/agent-launch/catalog/tui-agent'
import { translate } from '../../i18n/mobile-i18n'
import {
filterEnabledMobileTuiAgents,
isMobileTuiAgentEnabled,
pickMobileTuiAgent
} from './mobile-tui-agents'
import { isTuiAgent as isMobileTuiAgent } from '../../../src/shared/agent-launch/catalog/tui-agent-config'
import { TUI_AGENT_AUTO_PICK_ORDER as MOBILE_TUI_AGENT_AUTO_PICK_ORDER } from '../../../src/shared/agent-launch/catalog/tui-agent-selection'
import { TUI_AGENT_DISPLAY_NAMES as MOBILE_TUI_AGENT_LABELS } from '../../../src/shared/agent-launch/catalog/tui-agent-display-names'
} from '../../agents/mobile-tui-agents'
import { isTuiAgent as isMobileTuiAgent } from '../../../../src/shared/agent-launch/catalog/tui-agent-config'
import { TUI_AGENT_AUTO_PICK_ORDER as MOBILE_TUI_AGENT_AUTO_PICK_ORDER } from '../../../../src/shared/agent-launch/catalog/tui-agent-selection'
import { TUI_AGENT_DISPLAY_NAMES as MOBILE_TUI_AGENT_LABELS } from '../../../../src/shared/agent-launch/catalog/tui-agent-display-names'
export type WorkspaceAgentChoice = TuiAgent | 'blank'

Some files were not shown because too many files have changed in this diff Show More