mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-01 10:33:25 +08:00
feat: add terminal panel components and Zustand store for state management
- Created a barrel export file for terminal panel components. - Implemented Zustand store for managing terminal panel UI state, including visibility, active terminal, view mode, and terminal ordering. - Added actions for opening/closing the terminal panel, setting the active terminal, changing view modes, and managing terminal order. - Introduced selectors for accessing terminal panel state properties.
This commit is contained in:
@@ -188,7 +188,7 @@ export function CliViewerPage() {
|
||||
const lastMessage = useNotificationStore(selectWsLastMessage);
|
||||
|
||||
// Active execution sync from server
|
||||
const { isLoading: isSyncing } = useActiveCliExecutions(true); // Always sync when page is open
|
||||
const { isLoading: _isSyncing } = useActiveCliExecutions(true); // Always sync when page is open
|
||||
const invalidateActive = useInvalidateActiveCliExecutions();
|
||||
|
||||
// Detect current layout type from store
|
||||
|
||||
@@ -7,7 +7,6 @@ import { describe, it, expect, beforeEach, vi } from 'vitest';
|
||||
import { render, screen, waitFor } from '@/test/i18n';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { CodexLensManagerPage } from './CodexLensManagerPage';
|
||||
import * as api from '@/lib/api';
|
||||
|
||||
// Mock api module
|
||||
vi.mock('@/lib/api', () => ({
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
} from 'lucide-react';
|
||||
import { Card } from '@/components/ui/Card';
|
||||
import { Button } from '@/components/ui/Button';
|
||||
import { TabsNavigation, type TabItem } from '@/components/ui/TabsNavigation';
|
||||
import { TabsNavigation } from '@/components/ui/TabsNavigation';
|
||||
import {
|
||||
AlertDialog,
|
||||
AlertDialogTrigger,
|
||||
@@ -30,7 +30,6 @@ import {
|
||||
import { OverviewTab } from '@/components/codexlens/OverviewTab';
|
||||
import { SettingsTab } from '@/components/codexlens/SettingsTab';
|
||||
import { AdvancedTab } from '@/components/codexlens/AdvancedTab';
|
||||
import { GpuSelector } from '@/components/codexlens/GpuSelector';
|
||||
import { ModelsTab } from '@/components/codexlens/ModelsTab';
|
||||
import { SearchTab } from '@/components/codexlens/SearchTab';
|
||||
import { SemanticInstallDialog } from '@/components/codexlens/SemanticInstallDialog';
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// Tests for the issue discovery page with i18n
|
||||
|
||||
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
||||
import { render, screen, waitFor } from '@/test/i18n';
|
||||
import { render, screen } from '@/test/i18n';
|
||||
import { DiscoveryPage } from './DiscoveryPage';
|
||||
import { useWorkflowStore } from '@/stores/workflowStore';
|
||||
import type { DiscoverySession } from '@/lib/api';
|
||||
|
||||
@@ -13,14 +13,13 @@ import {
|
||||
XCircle,
|
||||
BarChart3,
|
||||
Calendar,
|
||||
Filter,
|
||||
ListTree,
|
||||
History,
|
||||
List,
|
||||
Monitor,
|
||||
} from 'lucide-react';
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/Card';
|
||||
import { TabsNavigation, type TabItem } from '@/components/ui/TabsNavigation';
|
||||
import { TabsNavigation } from '@/components/ui/TabsNavigation';
|
||||
import { Badge } from '@/components/ui/Badge';
|
||||
import { Button } from '@/components/ui/Button';
|
||||
import { ExecutionMonitor } from './orchestrator/ExecutionMonitor';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// ========================================
|
||||
// Unified page for issues, queue, and discovery with tab navigation
|
||||
|
||||
import { useState, useCallback, useRef } from 'react';
|
||||
import { useState, useCallback } from 'react';
|
||||
import { useSearchParams } from 'react-router-dom';
|
||||
import { useIntl } from 'react-intl';
|
||||
import {
|
||||
|
||||
@@ -386,7 +386,7 @@ export function IssueManagerPage() {
|
||||
try {
|
||||
const result = await pullIssuesFromGitHub({ state: 'open', limit: 100 });
|
||||
await refetch();
|
||||
toast.success(formatMessage({ id: 'issues.messages.githubSyncSuccess' }, result));
|
||||
toast.success(formatMessage({ id: 'issues.messages.githubSyncSuccess' }, { ...result }));
|
||||
} catch (err) {
|
||||
console.error('GitHub sync failed:', err);
|
||||
toast.error(formatMessage({ id: 'issues.messages.githubSyncError' }));
|
||||
|
||||
@@ -15,11 +15,8 @@ import {
|
||||
ArrowLeft,
|
||||
FileEdit,
|
||||
Wrench,
|
||||
Calendar,
|
||||
Loader2,
|
||||
XCircle,
|
||||
CheckCircle,
|
||||
Clock,
|
||||
Code,
|
||||
Zap,
|
||||
ListTodo,
|
||||
@@ -31,7 +28,6 @@ import {
|
||||
Folder,
|
||||
MessageSquare,
|
||||
FileText,
|
||||
ChevronDown,
|
||||
ChevronRight,
|
||||
Ruler,
|
||||
Stethoscope,
|
||||
@@ -41,10 +37,8 @@ import { Flowchart } from '@/components/shared/Flowchart';
|
||||
import { Button } from '@/components/ui/Button';
|
||||
import { Badge } from '@/components/ui/Badge';
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/Card';
|
||||
import { Tabs, TabsContent } from '@/components/ui/Tabs';
|
||||
import { TabsNavigation } from '@/components/ui/TabsNavigation';
|
||||
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@/components/ui/Collapsible';
|
||||
import type { LiteTask } from '@/lib/api';
|
||||
|
||||
// ========================================
|
||||
// Type Definitions
|
||||
@@ -64,43 +58,6 @@ interface Exploration {
|
||||
content?: string;
|
||||
}
|
||||
|
||||
interface ExplorationAngle {
|
||||
findings: string[];
|
||||
recommendations: string[];
|
||||
patterns: string[];
|
||||
risks: string[];
|
||||
}
|
||||
|
||||
interface ImplementationTask {
|
||||
id: string;
|
||||
title: string;
|
||||
description?: string;
|
||||
status?: string;
|
||||
assignee?: string;
|
||||
}
|
||||
|
||||
interface Milestone {
|
||||
id: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
target_date?: string;
|
||||
}
|
||||
|
||||
interface DiscussionSolution {
|
||||
id: string;
|
||||
name: string;
|
||||
summary: string | { en: string; zh: string };
|
||||
feasibility: number;
|
||||
effort: 'low' | 'medium' | 'high';
|
||||
risk: 'low' | 'medium' | 'high';
|
||||
source_cli: string[];
|
||||
implementation_plan: {
|
||||
approach: string;
|
||||
tasks: ImplementationTask[];
|
||||
milestones: Milestone[];
|
||||
};
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// Main Component
|
||||
// ========================================
|
||||
|
||||
Reference in New Issue
Block a user