diff --git a/packages/client/ui-trajectory/tests/views.client.spec.tsx b/packages/client/ui-trajectory/tests/views.client.spec.tsx index b54a0089df..5095175049 100644 --- a/packages/client/ui-trajectory/tests/views.client.spec.tsx +++ b/packages/client/ui-trajectory/tests/views.client.spec.tsx @@ -276,17 +276,22 @@ async function bench(snapshot = historySnapshot(NODES)) { const conversationStore = createSnapshotStore(conversationSnapshot(snapshot)) const uiConversation = new UiConversation(ctx, runtime.sessions) const { events, views } = uiConversation - const targetSources: ConversationTargetSources = { + // Only the targets this trajectory bench binds; a typed lookup keeps the map + // non-exhaustive so other packages' targets need no dependency here. + const targetSources: Partial = { chat: createSnapshotStore(undefined), trajectory: trajectoryStore, 'tool-todo-history': createSnapshotStore(undefined), - perf: createSnapshotStore(undefined), } const binding: ConversationBinding = { snapshot: conversationStore, openTurn: createSnapshotStore(undefined), activate: () => {}, - target: target => targetSources[target], + target: (target) => { + const source = targetSources[target] + if (source === undefined) throw new Error(`trajectory bench has no source for target "${target}"`) + return source + }, } vi.spyOn(uiConversation, 'binding').mockReturnValue(binding) // The conversation entry's role: declare the ring, then seed the chat entry.