Skip to content

Commit a4d838e

Browse files
committed
fix(mothership): terminal predicate import must not pull the session barrel into the client
The #9 dedup pointed use-chat (a 'use client' graph) at the session BARREL, which reaches ioredis via the buffer — Next resolved 'dns' in a client bundle and the whole dev server 500ed. Client consumers deep-import the client-safe contract module; the barrel export stays for the server. Caught by an end-to-end smoke, not by tsc/vitest/boundary-check — none of them walk the client bundle graph. Claude-Session: https://claude.ai/code/session_01CgaxNAaeD3taGdghbXn17w
1 parent 244fe66 commit a4d838e

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ import {
5656
import { MOTHERSHIP_CHAT_API_PATH } from '@/lib/mothership/constants'
5757
import { sendMothershipMessage } from '@/lib/mothership/events'
5858
import { MothershipStreamV1ToolOutcome } from '@/lib/mothership/generated/mothership-stream-v1'
59-
import { isTerminalStreamStatus } from '@/lib/mothership/request/session'
60-
import { parsePersistedStreamEventEnvelopeJson } from '@/lib/mothership/request/session/contract'
59+
import {
60+
isTerminalStreamStatus,
61+
parsePersistedStreamEventEnvelopeJson,
62+
} from '@/lib/mothership/request/session/contract'
6163
import type { FilePreviewSession } from '@/lib/mothership/request/session/file-preview-session-contract'
6264
import { canDisplayResource } from '@/lib/mothership/resources/availability'
6365
import {

apps/sim/lib/mothership/chat/effective-transcript.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
MothershipStreamV1ToolOutcome,
1414
MothershipStreamV1ToolPhase,
1515
} from '@/lib/mothership/generated/mothership-stream-v1'
16-
import { isTerminalStreamStatus } from '@/lib/mothership/request/session'
16+
import { isTerminalStreamStatus } from '@/lib/mothership/request/session/contract'
1717
import type { FilePreviewSession } from '@/lib/mothership/request/session/file-preview-session-contract'
1818
import type { StreamBatchEvent } from '@/lib/mothership/request/session/types'
1919
import {

0 commit comments

Comments
 (0)