Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(conversations): register goal and todos reducers in chat test stores

Steven Enamakel84b55641e99b
diff --git a/app/src/features/conversations/aui/ChatConversationMap.test.tsx b/app/src/features/conversations/aui/ChatConversationMap.test.tsx
index a265806b79..2a586af436 100644
--- a/app/src/features/conversations/aui/ChatConversationMap.test.tsx
+++ b/app/src/features/conversations/aui/ChatConversationMap.test.tsx
@@ -1,3 +1,5 @@
+import threadGoalReducer from '../../../store/threadGoalSlice';
+import threadTodosReducer from '../../../store/threadTodosSlice';
/**
* The conversation map: `Cmd`/`Ctrl+F` find-in-conversation and assistant-ui's
* persistent turn rail, both scoped to the live `/chat`
@@ -32,6 +34,8 @@ function buildStore(messages: ThreadMessage[]) {
return configureStore({
reducer: combineReducers({
thread: threadReducer,
+ threadGoal: threadGoalReducer,
+ threadTodos: threadTodosReducer,
chatRuntime: chatRuntimeReducer,
mascot: mascotReducer,
runMode: runModeReducer,
diff --git a/app/src/features/conversations/components/AssistantUiChat.slots.test.tsx b/app/src/features/conversations/components/AssistantUiChat.slots.test.tsx
index 79781c7368..b3f593a66f 100644
--- a/app/src/features/conversations/components/AssistantUiChat.slots.test.tsx
+++ b/app/src/features/conversations/components/AssistantUiChat.slots.test.tsx
@@ -1,3 +1,5 @@
+import threadGoalReducer from '../../../store/threadGoalSlice';
+import threadTodosReducer from '../../../store/threadTodosSlice';
/**
* Composer slot identity on the assistant-ui chat surface.
*
@@ -29,6 +31,8 @@ function buildStore() {
return configureStore({
reducer: combineReducers({
thread: threadReducer,
+ threadGoal: threadGoalReducer,
+ threadTodos: threadTodosReducer,
chatRuntime: chatRuntimeReducer,
mascot: mascotReducer,
// The composer's `/plan` / `/build` commands read it (`useRunMode`).
diff --git a/app/src/features/conversations/components/AssistantUiChat.welcomeSuggestions.test.tsx b/app/src/features/conversations/components/AssistantUiChat.welcomeSuggestions.test.tsx
index 09fef520a9..23d0546b56 100644
--- a/app/src/features/conversations/components/AssistantUiChat.welcomeSuggestions.test.tsx
+++ b/app/src/features/conversations/components/AssistantUiChat.welcomeSuggestions.test.tsx
@@ -1,3 +1,5 @@
+import threadGoalReducer from '../../../store/threadGoalSlice';
+import threadTodosReducer from '../../../store/threadTodosSlice';
/**
* Welcome suggestion chips on the assistant-ui chat surface.
*
@@ -55,6 +57,8 @@ function buildStore(messages: ThreadMessage[]) {
return configureStore({
reducer: combineReducers({
thread: threadReducer,
+ threadGoal: threadGoalReducer,
+ threadTodos: threadTodosReducer,
chatRuntime: chatRuntimeReducer,
mascot: mascotReducer,
// The composer's `/plan` / `/build` commands read it (`useRunMode`).
diff --git a/app/src/features/conversations/components/ChatToolParts.approval.test.tsx b/app/src/features/conversations/components/ChatToolParts.approval.test.tsx
index 1f4935b2a4..de244564d6 100644
--- a/app/src/features/conversations/components/ChatToolParts.approval.test.tsx
+++ b/app/src/features/conversations/components/ChatToolParts.approval.test.tsx
@@ -1,3 +1,5 @@
+import threadGoalReducer from '../../../store/threadGoalSlice';
+import threadTodosReducer from '../../../store/threadTodosSlice';
/**
* The render half of the parked-approval repair.
*
@@ -88,7 +90,9 @@ function gatedPart(over: Record<string, unknown> = {}) {
function buildStore(approval?: PendingApproval) {
const store = configureStore({
- reducer: combineReducers({ thread: threadReducer, chatRuntime: chatRuntimeReducer }),
+ reducer: combineReducers({ thread: threadReducer,
+ threadGoal: threadGoalReducer,
+ threadTodos: threadTodosReducer, chatRuntime: chatRuntimeReducer }),
preloadedState: {
thread: {
threads: [],
diff --git a/app/src/features/conversations/components/aui/ChatSources.citations.test.tsx b/app/src/features/conversations/components/aui/ChatSources.citations.test.tsx
index 28656fed7f..dfdea25544 100644
--- a/app/src/features/conversations/components/aui/ChatSources.citations.test.tsx
+++ b/app/src/features/conversations/components/aui/ChatSources.citations.test.tsx
@@ -1,3 +1,5 @@
+import threadGoalReducer from '../../../../store/threadGoalSlice';
+import threadTodosReducer from '../../../../store/threadTodosSlice';
/**
* `[n]` in the model's own answer text becomes an inline citation marker
* (`elements/inline-citation.tsx`'s `CitationMarker`) instead of plain text,
@@ -50,6 +52,8 @@ function buildStore(message: ThreadMessage) {
return configureStore({
reducer: combineReducers({
thread: threadReducer,
+ threadGoal: threadGoalReducer,
+ threadTodos: threadTodosReducer,
chatRuntime: chatRuntimeReducer,
mascot: mascotReducer,
runMode: runModeReducer,
diff --git a/app/src/features/conversations/components/aui/ChatSources.test.tsx b/app/src/features/conversations/components/aui/ChatSources.test.tsx
index 926d727a98..2772bca720 100644
--- a/app/src/features/conversations/components/aui/ChatSources.test.tsx
+++ b/app/src/features/conversations/components/aui/ChatSources.test.tsx
@@ -1,3 +1,5 @@
+import threadGoalReducer from '../../../../store/threadGoalSlice';
+import threadTodosReducer from '../../../../store/threadTodosSlice';
/**
* Inline source list under a settled answer.
*
@@ -87,6 +89,8 @@ function buildStore(message: ThreadMessage = agentMessage()) {
return configureStore({
reducer: combineReducers({
thread: threadReducer,
+ threadGoal: threadGoalReducer,
+ threadTodos: threadTodosReducer,
chatRuntime: chatRuntimeReducer,
mascot: mascotReducer,
runMode: runModeReducer,
diff --git a/app/src/pages/__tests__/Conversations.auiComposerSurfaces.test.tsx b/app/src/pages/__tests__/Conversations.auiComposerSurfaces.test.tsx
index 00f5647a68..6bebf9995b 100644
--- a/app/src/pages/__tests__/Conversations.auiComposerSurfaces.test.tsx
+++ b/app/src/pages/__tests__/Conversations.auiComposerSurfaces.test.tsx
@@ -209,6 +209,7 @@ vi.mock('../../store/userScopedStorage', () => ({
userScopedStorage: {
getItem: vi.fn().mockResolvedValue(null),
setItem: vi.fn().mockResolvedValue(undefined),
+ removeItem: vi.fn().mockResolvedValue(undefined),
},
}));