The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(desktop): trim #102840 salvage to two invariant tests
teknium13f4d29d91f15
diff --git a/apps/desktop/src/app/session/hooks/use-session-actions.test.tsx b/apps/desktop/src/app/session/hooks/use-session-actions.test.tsxindex 51f58c97d10..5b763559b56 100644--- a/apps/desktop/src/app/session/hooks/use-session-actions.test.tsx+++ b/apps/desktop/src/app/session/hooks/use-session-actions.test.tsx@@ -42,7 +42,6 @@ import {$selectedStoredSessionId,$sessions,$turnStartedAt,- $unlistedSessionOwnerRows,_resetSessionOwnerHintsForTests,getSessionOwnerHint,knownSessionOwner,@@ -86,7 +85,6 @@ import { NEW_CHAT_ROUTE, sessionRoute } from '../../routes'import type { ClientSessionState } from '../../types'import { useSessionActions } from './use-session-actions'-import { upsertOptimisticSession } from './use-session-actions/utils'import { useSessionStateCache } from './use-session-state-cache'vi.mock('@/hermes', async importOriginal => ({@@ -4220,50 +4218,6 @@ describe('openNewSessionTile unlisted owner (#102792)', () => {expect($sessionTiles.get().some(t => t.storedSessionId === STORED_UNLISTED)).toBe(true)})- it('stamps the exact connection tag for an unlisted tile created on a routed connection', async () => {- vi.mocked(requestGatewayForAgent).mockResolvedValue({- info: { cwd: '', model: 'test-model', skills: {}, tools: {} },- session_id: RUNTIME_SESSION_ID,- stored_session_id: STORED_UNLISTED- } as never)- const handle = await readyHandle(createRequestGateway())-- await act(async () => {- await handle.openNewSessionTile('center', { listed: false, route: { connectionId: 'conn-1', profile: 'omar' } })- })-- expect($sessions.get().some(s => sessionMatchesStoredId(s, STORED_UNLISTED))).toBe(false)- expect(knownSessionOwner(ownerLookupSessionRows(), STORED_UNLISTED)).toEqual(- expect.objectContaining({ connectionId: 'conn-1', profile: 'omar' })- )- })-- it('evicts the stub once a real row lists the same id', async () => {- const stored = 'stored-unlisted-102792-b'- const handle = await readyHandle(createRequestGateway(stored))-- await act(async () => {- await handle.openNewSessionTile('center', { listed: false, route: null })- })-- expect($unlistedSessionOwnerRows.get()).toHaveLength(1)-- // First send lists the draft through the normal optimistic upsert ...- upsertOptimisticSession(- {- info: { cwd: '', model: 'test-model', skills: {}, tools: {} },- session_id: RUNTIME_SESSION_ID,- stored_session_id: stored- } as never,- stored- )-- // ... which supersedes the stub instead of leaving a stale double.- expect($unlistedSessionOwnerRows.get()).toHaveLength(0)- expect($sessions.get().some(s => sessionMatchesStoredId(s, stored))).toBe(true)- expect(knownSessionOwner(ownerLookupSessionRows(), stored)).toBe('omar')- })-it('resolves the ephemeral runtime id through the stub for session.control.read without hitting ambient', async () => {const handle = await readyHandle(createRequestGateway())