diff --git a/frontend/__tests__/components/features/chat/change-agent-button.test.tsx b/frontend/__tests__/components/features/chat/change-agent-button.test.tsx index fdc1ba1197..3b83e1f720 100644 --- a/frontend/__tests__/components/features/chat/change-agent-button.test.tsx +++ b/frontend/__tests__/components/features/chat/change-agent-button.test.tsx @@ -5,11 +5,6 @@ import { ChangeAgentButton } from "#/components/features/chat/change-agent-butto import { renderWithProviders } from "../../../../test-utils"; import { useConversationStore } from "#/stores/conversation-store"; -// Mock feature flag to enable planning agent -vi.mock("#/utils/feature-flags", () => ({ - USE_PLANNING_AGENT: () => true, -})); - // Mock WebSocket status vi.mock("#/hooks/use-unified-websocket-status", () => ({ useUnifiedWebSocketStatus: () => "CONNECTED", diff --git a/frontend/__tests__/components/features/chat/plan-preview.test.tsx b/frontend/__tests__/components/features/chat/plan-preview.test.tsx index 3e53ae7b09..119fe893a4 100644 --- a/frontend/__tests__/components/features/chat/plan-preview.test.tsx +++ b/frontend/__tests__/components/features/chat/plan-preview.test.tsx @@ -27,11 +27,6 @@ function renderPlanPreview(ui: React.ReactElement) { ); } -// Mock the feature flag to always return true (not testing feature flag behavior) -vi.mock("#/utils/feature-flags", () => ({ - USE_PLANNING_AGENT: vi.fn(() => true), -})); - // Mock i18n - need to preserve initReactI18next and I18nextProvider for test-utils vi.mock("react-i18next", async (importOriginal) => { const actual = await importOriginal(); diff --git a/frontend/__tests__/components/features/conversation/conversation-tabs.test.tsx b/frontend/__tests__/components/features/conversation/conversation-tabs.test.tsx index 447d282bd8..fbdf67d004 100644 --- a/frontend/__tests__/components/features/conversation/conversation-tabs.test.tsx +++ b/frontend/__tests__/components/features/conversation/conversation-tabs.test.tsx @@ -10,10 +10,6 @@ import { useConversationStore } from "#/stores/conversation-store"; const TASK_CONVERSATION_ID = "task-ec03fb2ab8604517b24af632b058c2fd"; const REAL_CONVERSATION_ID = "conv-abc123"; -vi.mock("#/utils/feature-flags", () => ({ - USE_PLANNING_AGENT: () => false, -})); - let mockConversationId = TASK_CONVERSATION_ID; vi.mock("#/hooks/use-conversation-id", () => ({ @@ -120,9 +116,7 @@ describe("ConversationTabs localStorage behavior", () => { // Verify localStorage was updated const storedState = JSON.parse( - localStorage.getItem( - `conversation-state-${REAL_CONVERSATION_ID}`, - )!, + localStorage.getItem(`conversation-state-${REAL_CONVERSATION_ID}`)!, ); expect(storedState.selectedTab).toBe("terminal"); expect(storedState.rightPanelShown).toBe(true); @@ -152,9 +146,7 @@ describe("ConversationTabs localStorage behavior", () => { // Verify localStorage was updated const storedState = JSON.parse( - localStorage.getItem( - `conversation-state-${REAL_CONVERSATION_ID}`, - )!, + localStorage.getItem(`conversation-state-${REAL_CONVERSATION_ID}`)!, ); expect(storedState.rightPanelShown).toBe(false); }); @@ -184,9 +176,7 @@ describe("ConversationTabs localStorage behavior", () => { // Verify localStorage was updated const storedState = JSON.parse( - localStorage.getItem( - `conversation-state-${REAL_CONVERSATION_ID}`, - )!, + localStorage.getItem(`conversation-state-${REAL_CONVERSATION_ID}`)!, ); expect(storedState.selectedTab).toBe("browser"); }); diff --git a/frontend/__tests__/components/v1/chat/event-message-plan-preview.test.tsx b/frontend/__tests__/components/v1/chat/event-message-plan-preview.test.tsx index 4f9af56ff4..60b1dc1cee 100644 --- a/frontend/__tests__/components/v1/chat/event-message-plan-preview.test.tsx +++ b/frontend/__tests__/components/v1/chat/event-message-plan-preview.test.tsx @@ -9,11 +9,6 @@ import { createPlanningObservationEvent, } from "test-utils"; -// Mock the feature flag -vi.mock("#/utils/feature-flags", () => ({ - USE_PLANNING_AGENT: vi.fn(() => true), -})); - // Mock useConfig vi.mock("#/hooks/query/use-config", () => ({ useConfig: () => ({ diff --git a/frontend/src/components/features/chat/change-agent-button.tsx b/frontend/src/components/features/chat/change-agent-button.tsx index f95e2b6a4f..2bd9f21503 100644 --- a/frontend/src/components/features/chat/change-agent-button.tsx +++ b/frontend/src/components/features/chat/change-agent-button.tsx @@ -9,7 +9,6 @@ import LessonPlanIcon from "#/icons/lesson-plan.svg?react"; import { useConversationStore } from "#/stores/conversation-store"; import { ChangeAgentContextMenu } from "./change-agent-context-menu"; import { cn } from "#/utils/utils"; -import { USE_PLANNING_AGENT } from "#/utils/feature-flags"; import { useAgentState } from "#/hooks/use-agent-state"; import { AgentState } from "#/types/agent-state"; import { useActiveConversation } from "#/hooks/query/use-active-conversation"; @@ -27,8 +26,6 @@ export function ChangeAgentButton() { const isWebSocketConnected = webSocketStatus === "CONNECTED"; - const shouldUsePlanningAgent = USE_PLANNING_AGENT(); - const { curAgentState } = useAgentState(); const { t } = useTranslation(); @@ -83,10 +80,7 @@ export function ChangeAgentButton() { }, [isAgentRunning, contextMenuOpen, isWebSocketConnected]); const isButtonDisabled = - isAgentRunning || - isCreatingConversation || - !isWebSocketConnected || - !shouldUsePlanningAgent; + isAgentRunning || isCreatingConversation || !isWebSocketConnected; // Handle Shift + Tab keyboard shortcut to cycle through modes useEffect(() => { @@ -151,10 +145,6 @@ export function ChangeAgentButton() { return ; }, [isExecutionAgent]); - if (!shouldUsePlanningAgent) { - return null; - } - return (