diff --git a/src/__tests__/renderer/components/ThinkingStatusPill.test.tsx b/src/__tests__/renderer/components/ThinkingStatusPill.test.tsx index 36850a20..6edd68b5 100644 --- a/src/__tests__/renderer/components/ThinkingStatusPill.test.tsx +++ b/src/__tests__/renderer/components/ThinkingStatusPill.test.tsx @@ -90,17 +90,12 @@ function createThinkingSession(overrides: Partial = {}): Session { } describe('ThinkingStatusPill', () => { - let consoleSpy: ReturnType; - beforeEach(() => { vi.useFakeTimers(); - // Suppress console.log for debug logging in component - consoleSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); }); afterEach(() => { vi.useRealTimers(); - consoleSpy.mockRestore(); }); describe('render conditions', () => { @@ -1332,48 +1327,6 @@ describe('ThinkingStatusPill', () => { }); }); - describe('debug logging', () => { - it('logs state check when busy sessions exist', () => { - const session = createThinkingSession(); - render( - - ); - - // Console.log should have been called with state check info - expect(consoleSpy).toHaveBeenCalledWith( - '[ThinkingStatusPill] State check:', - expect.objectContaining({ - thinkingCount: 1, - busySessionsCount: 1, - }) - ); - }); - - it('logs when sessions have busy tabs but session not busy', () => { - const busyTab = createMockAITab({ state: 'busy' }); - const session = createMockSession({ - state: 'idle', // Session is idle - aiTabs: [busyTab], // But has busy tab - }); - render( - - ); - - expect(consoleSpy).toHaveBeenCalledWith( - '[ThinkingStatusPill] State check:', - expect.objectContaining({ - sessionsWithBusyTabsCount: 1, - }) - ); - }); - }); - describe('component display names', () => { it('ThinkingStatusPill has correct displayName', () => { expect(ThinkingStatusPill.displayName).toBe('ThinkingStatusPill'); diff --git a/src/renderer/components/ImageDiffViewer.tsx b/src/renderer/components/ImageDiffViewer.tsx index 3fbf8a5a..de6d916c 100644 --- a/src/renderer/components/ImageDiffViewer.tsx +++ b/src/renderer/components/ImageDiffViewer.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react'; +import { useState, useEffect } from 'react'; import { ImageIcon, AlertCircle, Plus, Trash2 } from 'lucide-react'; import type { Theme } from '../types'; diff --git a/src/renderer/components/MermaidRenderer.tsx b/src/renderer/components/MermaidRenderer.tsx index 152dd7ec..224ba78c 100644 --- a/src/renderer/components/MermaidRenderer.tsx +++ b/src/renderer/components/MermaidRenderer.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useRef, useState } from 'react'; +import { useEffect, useRef, useState } from 'react'; import mermaid from 'mermaid'; import DOMPurify from 'dompurify'; diff --git a/src/renderer/components/ThinkingStatusPill.tsx b/src/renderer/components/ThinkingStatusPill.tsx index 41c7f1be..d80a1ed2 100644 --- a/src/renderer/components/ThinkingStatusPill.tsx +++ b/src/renderer/components/ThinkingStatusPill.tsx @@ -5,7 +5,7 @@ * * When AutoRun is active, shows a special AutoRun pill with total elapsed time instead. */ -import React, { memo, useState, useEffect } from 'react'; +import { memo, useState, useEffect } from 'react'; import { GitBranch } from 'lucide-react'; import type { Session, Theme, AITab, BatchRunState } from '../types'; import { formatTokensCompact } from '../utils/formatters'; @@ -288,23 +288,6 @@ function ThinkingStatusPillInner({ sessions, theme, onSessionClick, namedSession s => s.state === 'busy' && s.busySource === 'ai' ); - // DEBUG: Log all sessions' busy state to diagnose thinking pill disappearing - const busySessions = sessions.filter(s => s.state === 'busy'); - const sessionsWithBusyTabs = sessions.filter(s => s.aiTabs?.some(t => t.state === 'busy')); - if (busySessions.length > 0 || sessionsWithBusyTabs.length > 0) { - console.log('[ThinkingStatusPill] State check:', { - thinkingCount: thinkingSessions.length, - busySessionsCount: busySessions.length, - sessionsWithBusyTabsCount: sessionsWithBusyTabs.length, - details: sessions.map(s => ({ - id: s.id.substring(0, 8), - state: s.state, - busySource: s.busySource, - busyTabs: s.aiTabs?.filter(t => t.state === 'busy').map(t => t.id.substring(0, 8)) - })) - }); - } - if (thinkingSessions.length === 0) { return null; }