From 4c1ba8f1b16c6712341e72aded23d65d0f745e6f Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Wed, 3 Dec 2025 17:33:23 +0700 Subject: [PATCH] chore: remove investigation logging from performance work MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove debug logging and render counters added during performance investigation. All performance issues have been resolved by: - Moving drafts to top-level store - Moving agentLastActivity to top-level store - Using granular Zustand selectors throughout - Eliminating useDaemonSession hook 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- packages/app/src/components/agent-input-area.tsx | 6 ------ packages/app/src/components/agent-status-bar.tsx | 6 +----- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/packages/app/src/components/agent-input-area.tsx b/packages/app/src/components/agent-input-area.tsx index 829e39b7f..b3eb3ff5b 100644 --- a/packages/app/src/components/agent-input-area.tsx +++ b/packages/app/src/components/agent-input-area.tsx @@ -86,30 +86,24 @@ type DictationToastConfig = { export function AgentInputArea({ agentId, serverId }: AgentInputAreaProps) { const { theme } = useUnistyles(); - // [INVESTIGATION] Using granular selectors for WebSocket connection status const ws = useSessionStore((state) => state.sessions[serverId]?.ws); - // [INVESTIGATION] Select only the specific agent (not all agents) const agent = useSessionStore((state) => state.sessions[serverId]?.agents?.get(agentId) ); - // [INVESTIGATION] Get draft input - drafts are at TOP LEVEL (not in session) const getDraftInput = useSessionStore((state) => state.getDraftInput); const saveDraftInput = useSessionStore((state) => state.saveDraftInput); - // [INVESTIGATION] Get queued messages for this agent - use stable empty array const queuedMessagesRaw = useSessionStore((state) => state.sessions[serverId]?.queuedMessages?.get(agentId) ); const queuedMessages = queuedMessagesRaw ?? EMPTY_ARRAY; - // [INVESTIGATION] Get methods const methods = useSessionStore((state) => state.sessions[serverId]?.methods); const sendAgentMessage = methods?.sendAgentMessage; const cancelAgentRun = methods?.cancelAgentRun; - // [INVESTIGATION] Use store action directly for setQueuedMessages const setQueuedMessages = useSessionStore((state) => state.setQueuedMessages); // Noop fallback for sendAgentAudio (required by useDictation) diff --git a/packages/app/src/components/agent-status-bar.tsx b/packages/app/src/components/agent-status-bar.tsx index a29006689..682505509 100644 --- a/packages/app/src/components/agent-status-bar.tsx +++ b/packages/app/src/components/agent-status-bar.tsx @@ -1,7 +1,7 @@ import { View, Text, Pressable } from "react-native"; import { StyleSheet, useUnistyles } from "react-native-unistyles"; import { ChevronDown } from "lucide-react-native"; -import { useState, useRef } from "react"; +import { useState } from "react"; import { ModeSelectorModal } from "./mode-selector-modal"; import { useSessionStore } from "@/stores/session-store"; @@ -11,10 +11,6 @@ interface AgentStatusBarProps { } export function AgentStatusBar({ agentId, serverId }: AgentStatusBarProps) { - // INVESTIGATION: Log rerenders - const renderCountRef = useRef(0); - renderCountRef.current++; - console.log(`[INVESTIGATION] AgentStatusBar render #${renderCountRef.current}`, { agentId, serverId }); const { theme } = useUnistyles(); // Select only the specific agent (not all agents)