Commit Graph

1727 Commits

Author SHA1 Message Date
catlog22
369b470969 feat: enhance CoordinatorEmptyState and ThemeSelector with gradient utilities and improved layout 2026-02-04 23:06:00 +08:00
catlog22
de989aa038 feat: unify CLI output handling and enhance theme variables
- Updated `CliStreamMonitorNew`, `CliStreamMonitorLegacy`, and `CliViewerPage` components to prioritize `unitContent` from payloads, falling back to `data` when necessary.
- Enhanced `colorGenerator` to include legacy variables for compatibility with shadcn/ui.
- Refactored orchestrator index to unify node exports under a single module.
- Improved `appStore` to clear both new and legacy CSS variables when applying themes.
- Added new options to CLI execution for raw and final output modes, improving programmatic output handling.
- Enhanced `cli-output-converter` to normalize cumulative delta frames and avoid duplication in streaming outputs.
- Introduced a new unified workflow specification for prompt template-based workflows, replacing the previous multi-type node system.
- Added tests for CLI final output handling and streaming output converter to ensure correct behavior in various scenarios.
2026-02-04 22:57:41 +08:00
catlog22
4ee165119b refactor: unify node types into a single PromptTemplate model
- Removed individual node components (SlashCommandNode, FileOperationNode, etc.) and replaced them with a unified PromptTemplateNode.
- Updated flow types and interfaces to reflect the new single node type system.
- Refactored flow execution logic to handle the new unified model, simplifying node execution and context handling.
- Adjusted UI components to support the new PromptTemplateNode, including instruction display and context references.
- Cleaned up legacy code related to removed node types and ensured compatibility with the new structure.
2026-02-04 22:22:27 +08:00
catlog22
113c14970f feat: add CommandCombobox component for selecting slash commands and update PropertyPanel to use it
refactor: remove unused liteTasks localization from common.json and zh/common.json
refactor: consolidate liteTasks localization into lite-tasks.json and zh/lite-tasks.json
refactor: simplify MultiCliTab type in LiteTaskDetailPage
refactor: enhance task display in LiteTasksPage with additional metadata
2026-02-04 19:24:31 +08:00
catlog22
7b2ac46760 refactor: streamline store access in useWebSocket by consolidating state retrieval into getStoreState function 2026-02-04 18:00:06 +08:00
catlog22
346c87a706 refactor: optimize useWebSocket hook by consolidating store references and improving handler stability 2026-02-04 17:29:30 +08:00
catlog22
e260a3f77b feat: enhance theme customization and UI components
- Implemented a new color generation module to create CSS variables based on a single hue value, supporting both light and dark modes.
- Added unit tests for the color generation logic to ensure accuracy and robustness.
- Replaced dropdown location filter with tab navigation in RulesManagerPage and SkillsManagerPage for improved UX.
- Updated app store to manage custom theme hues and states, allowing for dynamic theme adjustments.
- Sanitized notification content before persisting to localStorage to prevent sensitive data exposure.
- Refactored memory retrieval logic to handle archived status more flexibly.
- Improved Tailwind CSS configuration with new gradient utilities and animations.
- Minor adjustments to SettingsPage layout for better visual consistency.
2026-02-04 17:20:40 +08:00
catlog22
88616224e0 refactor: remove redundant usage guidelines from workflow documentation 2026-02-04 17:18:56 +08:00
catlog22
6e6c2b9e09 fix: add mountedRef guard to useWebSocket to prevent setState on unmounted component
- Add mountedRef to track component mount state in useWebSocket hook
- Guard handleMessage callback to return early if component is unmounted
- Set mountedRef.current = false in useEffect cleanup function

This addresses finding perf-011 about potential memory leaks from setState
on unmounted components. The mounted ref provides a defensive check to
ensure no state updates occur after component unmount.

Related: code review group G03 - Critical Memory Leaks
2026-02-04 17:05:20 +08:00
catlog22
2bfce150ec feat: enhance RecommendedMcpWizard with icon mapping; improve ExecutionTab accessibility; refine NavGroup path matching; update fetchSkills to include enabled status; add loading and error messages to localization 2026-02-04 16:38:18 +08:00
catlog22
ac95ee3161 feat: update CLI mode toggle for improved UI and functionality; refactor RecommendedMcpWizard API call; add new localization strings for installation wizard and tools 2026-02-04 15:26:36 +08:00
catlog22
8454ae4f41 feat: add quick install templates and index status to CLI hooks and home locales
feat: enhance MCP manager with interactive question feature and update locales

feat: implement tags and available models management in settings page

fix: improve process termination logic in stop command for React frontend

fix: update view command to default to 'js' frontend

feat: add Recommended MCP Wizard component for dynamic server configuration
2026-02-04 15:24:34 +08:00
catlog22
341331325c feat: Enhance A2UI with RadioGroup and Markdown support
- Added support for RadioGroup component in A2UI, allowing single selection from multiple options.
- Implemented Markdown parsing in A2UIPopupCard for better content rendering.
- Updated A2UIPopupCard to handle different question types and improved layout for multi-select and single-select questions.
- Introduced new utility functions for handling disabled items during installation.
- Enhanced installation process to restore previously disabled skills and commands.
- Updated notification store and related tests to accommodate new features.
- Adjusted Vite configuration for better development experience.
2026-02-04 13:45:47 +08:00
catlog22
1a05551d00 feat(a2ui): enhance A2UI notification handling and multi-select support 2026-02-04 11:11:55 +08:00
catlog22
c6093ef741 feat: add CLI Command Node and Prompt Node components for orchestrator
- Implemented CliCommandNode component for executing CLI tools with AI models.
- Implemented PromptNode component for constructing AI prompts with context.
- Added styling for mode and tool badges in both components.
- Enhanced user experience with command and argument previews, execution status, and error handling.

test: add comprehensive tests for ask_question tool

- Created direct test for ask_question tool execution.
- Developed end-to-end tests to validate ask_question tool integration with WebSocket and A2UI surfaces.
- Implemented simple and integrated WebSocket tests to ensure proper message handling and surface reception.
- Added tool registration test to verify ask_question tool is correctly registered.

chore: add WebSocket listener and simulation tests

- Added WebSocket listener for A2UI surfaces to facilitate testing.
- Implemented frontend simulation test to validate complete flow from backend to frontend.
- Created various test scripts to ensure robust testing of ask_question tool functionality.
2026-02-03 23:10:36 +08:00
catlog22
a806d70d9b refactor: remove lite-plan-c workflow and update orchestrator UI components
- Deleted the lite-plan-c workflow file to streamline the planning process.
- Updated orchestrator localization files to include new variable picker and multi-node selector messages.
- Modified PropertyPanel to support new execution modes and added output variable input fields.
- Enhanced SlashCommandNode to reflect changes in execution modes.
- Introduced MultiNodeSelector component for better node selection management.
- Added VariablePicker component for selecting variables with improved UX.
2026-02-03 21:24:34 +08:00
catlog22
9bb50a13fa feat(websocket): integrate A2UI message handling and answer callback registration 2026-02-03 21:18:19 +08:00
catlog22
bb4cd0529e feat(codex): add parallel execution workflows with worktree support
Add three new workflow commands for parallel development:

- collaborative-plan-parallel.md: Planning with execution group assignment
  - Supports automatic/balanced/manual group assignment strategies
  - Assigns codex instances and branch names per group
  - Detects cross-group conflicts and dependencies

- unified-execute-parallel.md: Worktree-based group execution
  - Executes tasks in isolated Git worktrees (.ccw/worktree/{group-id}/)
  - Enables true parallel execution across multiple codex instances
  - Simplified focus on execution only

- worktree-merge.md: Dependency-aware worktree merging
  - Merges completed worktrees in dependency order
  - Handles cross-group file conflicts
  - Optional worktree cleanup after merge

Key improvements:
- True parallel development via Git worktrees (vs branch switching)
- Clear separation of concerns (plan → execute → merge)
- Support for multi-codex coordination
2026-02-03 21:17:45 +08:00
catlog22
a8385e2ea5 feat: Enhance Project Overview and Review Session pages with improved UI and functionality
- Updated ProjectOverviewPage to enhance the guidelines section with better spacing, larger icons, and improved button styles.
- Refactored ReviewSessionPage to unify filter controls, improve selection actions, and enhance the findings list with a new layout.
- Added dimension tabs and severity filters to the SessionsPage for better navigation and filtering.
- Improved SessionDetailPage to utilize a mapping for status labels, enhancing internationalization support.
- Refactored TaskListTab to remove unused priority configuration code.
- Updated store types to better reflect session metadata structure.
- Added a temporary JSON file for future use.
2026-02-03 20:58:03 +08:00
catlog22
37ba849e75 feat: add CLI Viewer Page with multi-pane layout and state management
- Implemented the CliViewerPage component for displaying CLI outputs in a configurable multi-pane layout.
- Integrated Zustand for state management, allowing for dynamic layout changes and tab management.
- Added layout options: single, split horizontal, split vertical, and 2x2 grid.
- Created viewerStore for managing layout, panes, and tabs, including actions for adding/removing panes and tabs.
- Added CoordinatorPage barrel export for easier imports.
2026-02-03 17:28:26 +08:00
catlog22
b63e254f36 fix(frontend): fix button icon and text layout in help page
- Add inline-flex items-center to all button links for proper icon alignment
- Add flex-shrink-0 to all icons to prevent shrinking
- Change support buttons container to flex-wrap for better responsiveness
- Ensure icons and text stay on same line in all buttons
2026-02-03 15:14:15 +08:00
catlog22
86b1a15671 feat(frontend): optimize help page layout and add i18n support
- Add Chinese and English translations for help page
- Fix button overlapping issues with responsive layouts
- Improve icon and button positioning with flexbox
- Add proper spacing and breakpoints for mobile/tablet/desktop
- Make cards consistent with flexbox layout
- Ensure all buttons have proper whitespace-nowrap
- Use flex-shrink-0 for icons to prevent squashing
2026-02-03 15:07:14 +08:00
catlog22
39b80b3386 feat: initialize monorepo with package.json for CCW workflow platform 2026-02-03 14:42:20 +08:00
catlog22
5483a72e9f feat: add Accordion component for UI and Zustand store for coordinator management
- Implemented Accordion component using Radix UI for collapsible sections.
- Created Zustand store to manage coordinator execution state, command chains, logs, and interactive questions.
- Added validation tests for CLI settings type definitions, ensuring type safety and correct behavior of helper functions.
2026-02-03 10:02:40 +08:00
catlog22
bcb4af3ba0 feat(commands): add ccw-plan and ccw-test coordinators with arrow-style documentation
- Add ccw-plan.md: Planning coordinator with 10 modes (lite/multi-cli/full/plan-verify/replan + cli/issue/rapid-to-issue/brainstorm-with-file/analyze-with-file)
- Add ccw-test.md: Test coordinator with 4 modes (gen/fix/verify/tdd) and auto-iteration support
- Refactor ccw-debug.md: Convert JavaScript pseudocode to arrow instruction format for better readability
- Fix command format: Use /ccw* skill call syntax instead of ccw* across all command files

Key features:
- CLI integration for quick analysis and recommendations
- Issue workflow integration (rapid-to-issue bridge)
- With-File workflows for documented multi-CLI collaboration
- Consistent arrow-based flow diagrams across all coordinators
- TodoWrite tracking with mode-specific prefixes (CCWP/CCWT/CCWD)
- Dual tracking system (TodoWrite + status.json)
2026-02-02 21:41:56 +08:00
catlog22
545679eeb9 Refactor execution modes and CLI integration across agents
- Updated code-developer, tdd-developer, and test-fix-agent to streamline execution modes based on task.meta.execution_config.method.
- Removed legacy command handling and introduced CLI handoff for 'cli' execution method.
- Enhanced buildCliHandoffPrompt to include task JSON path and improved context handling.
- Updated task-generate-agent and task-generate-tdd to reflect new execution method mappings and removed command field from implementation_approach.
- Improved CLI settings validation in CliSettingsModal with format and length checks.
- Added localization for new CLI settings messages in English and Chinese.
- Enhanced GPU selector to use localized strings for GPU types.
- Introduced TypeScript LSP setup documentation for better user guidance.
2026-02-02 19:21:30 +08:00
catlog22
2305e7b8e7 feat(tests): add verification script for execution ID with output analysis 2026-02-02 11:55:12 +08:00
catlog22
48871f0d9e feat(tests): add CLI API response format tests and output format detection 2026-02-02 11:46:12 +08:00
catlog22
a54246a46f feat: add API settings page for managing providers, endpoints, cache, model pools, and CLI settings
feat: implement semantic install dialog for CodexLens with GPU mode selection
feat: add radio group component for GPU mode selection
feat: update navigation and localization for API settings and semantic install
2026-02-02 11:16:19 +08:00
catlog22
e4b627bc76 fix(hooks): fix EventGroup undefined component error
- Add Play icon import for SessionStart trigger type
- Add SessionStart case to getEventIcon function
- Add SessionStart case to getEventColor function with purple color
- Add default cases to both functions to prevent undefined returns

Fixes runtime error: 'Element type is invalid: expected a string or class/function but got: undefined' in EventGroup component
2026-02-02 10:56:45 +08:00
catlog22
392f89f62f fix(i18n): fix JSON structure and add missing Chinese translations for API Settings
- Fix duplicate validation key in common section
- Fix messages section nesting (should be sibling to common, not child)
- Add missing Chinese translations:
  - providers.showDisabled/hideDisabled/showAll
  - endpoints.showDisabled/showAll
  - common.showAll
2026-02-02 10:52:43 +08:00
catlog22
1beb98366b refactor(frontend): change API Settings from sidebar to horizontal tabs layout
Refactor ApiSettingsPage to use horizontal Tabs component like CodexLens page,
replacing the previous vertical sidebar navigation.

Changes:
- Replace Card-based sidebar with horizontal TabsList/TabsTrigger components
- Remove split-panel layout (sidebar + main panel)
- Use TabsContent to wrap each tab's content
- Import and use Tabs, TabsList, TabsTrigger, TabsContent from ui/Tabs
- Add api-settings.json import to en/zh locale index files for i18n support

Layout comparison:
- Before: Vertical sidebar (lg:w-64) with Card + nav buttons
- After: Horizontal tabs (TabsList) with tab triggers
2026-02-02 10:49:21 +08:00
catlog22
c522681c4c fix(frontend): fix i18n and runtime error in EndpointList
Fix hardcoded English labels in cache strategy display and prevent runtime
error when filePatterns is undefined.

Changes:
- Replace hardcoded "TTL:", "Max:", "Patterns:" with formatMessage calls
- Add optional chaining for filePatterns.length to prevent undefined error
- Add "filePatterns" i18n key to en/zh api-settings.json
2026-02-02 10:46:36 +08:00
catlog22
abce912ee5 feat(frontend): implement comprehensive API Settings Management Interface
Implement a complete API Management Interface for React frontend with split-
panel layout, migrating all features from legacy JS frontend.

New Features:
- API Settings page with 5 tabs: Providers, Endpoints, Cache, Model Pools, CLI Settings
- Provider Management: CRUD operations, multi-key rotation, health checks, test connection
- Endpoint Management: CRUD operations, cache strategy configuration, enable/disable toggle
- Cache Settings: Global configuration, statistics display, clear cache functionality
- Model Pool Management: CRUD operations, auto-discovery feature, provider exclusion
- CLI Settings Management: Provider-based and Direct modes, full CRUD support
- Multi-Key Settings Modal: Manage API keys with rotation strategies and weights
- Manage Models Modal: View and manage models per provider (LLM and Embedding)
- Sync to CodexLens: Integration handler for provider configuration sync

Technical Implementation:
- Created 12 new React components in components/api-settings/
- Extended lib/api.ts with 460+ lines of API client functions
- Created hooks/useApiSettings.ts with 772 lines of TanStack Query hooks
- Added RadioGroup UI component for form selections
- Implemented unified error handling with useNotifications across all operations
- Complete i18n support (500+ keys in English and Chinese)
- Route integration (/api-settings) and sidebar navigation

Code Quality:
- All acceptance criteria from plan.json verified
- Code review passed with Gemini (all 7 IMPL tasks complete)
- Follows existing patterns: Shadcn UI, TanStack Query, react-intl, Lucide icons
2026-02-01 23:58:04 +08:00
catlog22
690597bae8 fix(cli): fix codex review command argument handling
- Fix prompt incorrectly passed to codex review with target flags (--uncommitted/--base/--commit)
- Remove unsupported --skip-git-repo-check flag from codex review command
- Fix TypeScript type error in codex-lens.ts (missing 'installed' property)

Codex CLI constraint: --uncommitted/--base/--commit and [PROMPT] are mutually exclusive.
2026-02-01 23:51:58 +08:00
catlog22
e5252f8a77 feat: add useApiSettings hook for managing API settings, including providers, endpoints, cache, and model pools
- Implemented hooks for CRUD operations on providers and endpoints.
- Added cache management hooks for cache stats and settings.
- Introduced model pool management hooks for high availability and load balancing.
- Created localization files for English and Chinese translations of API settings.
2026-02-01 23:14:55 +08:00
catlog22
b76424feef fix(frontend): show empty state placeholders for quality rules and learnings in view mode
- Modify conditional rendering logic to always display section headers in view mode
- Add empty state placeholders when quality_rules/learnings arrays are empty
- Add localization keys for empty state messages in English and Chinese
- Improves UX by making these features visible even when no entries exist

Related files:
- ccw/frontend/src/pages/ProjectOverviewPage.tsx
- ccw/frontend/src/locales/en/project-overview.json
- ccw/frontend/src/locales/zh/project-overview.json
2026-02-01 23:11:46 +08:00
catlog22
76967a7350 feat: enhance workflow commands with dynamic analysis, multi-agent parallel exploration, and best practices
- analyze-with-file: Add dynamic direction generation from dimensions, support up to 4 parallel agent perspectives, enable cli-explore-agent parallelization
- brainstorm-with-file: Add dynamic direction generation from dimensions, add Agent-First guideline for complex tasks
- collaborative-plan-with-file: Add Understanding phase guidelines to prioritize latest documentation and resolve ambiguities with user clarification

Key improvements:
- Dimension-Direction Mapping replaces hard-coded options, enabling task-aware direction recommendations
- Multi-perspective parallel exploration (Analysis Perspectives, up to 4) with synthesis
- cli-explore-agent supports parallel execution per perspective for richer codebase context
- Agent-First principle: delegate complex tasks (code analysis, implementation) to agents/CLI instead of main process analysis
- Understanding phase emphasizes latest documentation discovery and clarification of ambiguities before planning
2026-02-01 22:51:04 +08:00
catlog22
7dcc0a1c05 feat: update usage recommendations across multiple workflow commands to require user confirmation and improve clarity 2026-02-01 22:04:26 +08:00
catlog22
5fb910610a fix(frontend): resolve URL path inconsistency caused by localStorage race condition
Fixed the issue where accessing the React frontend via ccw view with a URL path
parameter would load a different workspace due to localStorage rehydration race
condition.

Root cause: zustand persist's onRehydrateStorage callback automatically called
switchWorkspace with the cached projectPath before AppShell could process the
URL parameter.

Changes:
- workflowStore.ts: Remove automatic switchWorkspace from onRehydrateStorage
- AppShell.tsx: Centralize initialization logic with clear priority order:
  * Priority 1: URL ?path= parameter (explicit user intent)
  * Priority 2: localStorage fallback (implicit cache)
  * Added isWorkspaceInitialized state lock to prevent duplicate execution

Fixes: URL showing ?path=/new/path but loading /old/path from cache
2026-02-01 18:35:51 +08:00
catlog22
d46406df4a feat: Add CodexLens Manager Page with tabbed interface for managing CodexLens features
feat: Implement ConflictTab component to display conflict resolution decisions in session detail

feat: Create ImplPlanTab component to show implementation plan with modal viewer in session detail

feat: Develop ReviewTab component to display review findings by dimension in session detail

test: Add end-to-end tests for CodexLens Manager functionality including navigation, tab switching, and settings validation
2026-02-01 17:45:38 +08:00
catlog22
8dc115a894 feat(codex): convert 4 workflow commands to Codex prompt format with serial execution
Convert parallel multi-agent/multi-CLI workflows to Codex-compatible serial execution:

- brainstorm-with-file: Parallel Creative/Pragmatic/Systematic perspectives → Serial CLI execution
- analyze-with-file: cli-explore-agent + parallel CLI → Native tools (Glob/Grep/Read) + serial Gemini CLI
- collaborative-plan-with-file: Parallel sub-agents → Serial domain planning loop
- unified-execute-with-file: DAG-based parallel wave execution → Serial task-by-task execution

Key Technical Changes:
- YAML header: Remove 'name' and 'allowed-tools' fields
- Variables: $ARGUMENTS → $TOPIC/$TASK/$PLAN
- Task agents: Task() calls → ccw cli commands with --tool flag
- Parallel execution: Parallel Task/Bash calls → Sequential loops
- Session format: Match existing Codex prompt structure

Pattern: For multi-step workflows, use explicit wait points with " Wait for completion before proceeding"
2026-02-01 17:20:00 +08:00
catlog22
e9789e747a feat: update unified-execute-with-file command for sequential execution and improved dependency handling 2026-02-01 15:35:41 +08:00
catlog22
0342976c51 feat: add JSON detection utility for various formats
- Implemented a utility function `detectJsonInLine` to identify and parse JSON data from different formats including direct JSON, tool calls, tool results, embedded JSON, and code blocks.
- Introduced `JsonDetectionResult` interface to standardize the detection results.
- Added a new test results file to track the status of tests.
2026-02-01 15:17:03 +08:00
catlog22
f196b76064 chore(tests): remove obsolete test results and reports 2026-02-01 11:16:17 +08:00
catlog22
44cc4cad0f chore(tests): add gitignore for test results and reports 2026-02-01 11:16:00 +08:00
catlog22
fc1471396c feat(e2e): generate comprehensive E2E tests and fix TypeScript compilation errors
- Add 23 E2E test spec files covering 94 API endpoints across business domains
- Fix TypeScript compilation errors (file casing, duplicate export, implicit any)
- Update Playwright deprecated API calls (getByPlaceholderText -> getByPlaceholder)
- Tests cover: dashboard, sessions, tasks, workspace, loops, issues-queue, discovery,
  skills, commands, memory, project-overview, session-detail, cli-history,
  cli-config, cli-installations, lite-tasks, review, mcp, hooks, rules,
  index-management, prompt-memory, file-explorer

Test coverage: 100% domain coverage (23/23 domains)
API coverage: 94 endpoints across 23 business domains
Quality gates: 0 CRITICAL issues, all anti-patterns passed

Note: 700+ timeout tests require backend server (port 3456) to pass
2026-02-01 11:15:11 +08:00
catlog22
cf401d00e1 feat(cli-stream-monitor): add JSON card components and refactor tab UI
Add new components for CLI stream monitoring with JSON visualization:
- ExecutionTab: simplified tab with status indicator and active styling
- JsonCard: collapsible card for JSON data with type-based styling (6 types)
- JsonField: recursive JSON field renderer with color-coded values
- OutputLine: auto-detects JSON and renders appropriate component
- jsonDetector: smart JSON detection supporting 5 formats

Refactor CliStreamMonitorLegacy to use new components:
- Replace inline tab rendering with ExecutionTab component
- Replace inline output rendering with OutputLine component
- Add Badge import for active count display
- Fix type safety with proper id propagation

Component features:
- Type-specific styling for tool_call, metadata, system, stdout, stderr, thought
- Collapsible content (show 3 fields by default, expandable)
- Copy button and raw JSON view toggle
- Timestamp display
- Auto-detection of JSON in output lines

Fixes:
- Missing jsonDetector.ts file
- Type mismatch between OutputLine (6 types) and JsonCard (4 types)
- Unused isActive prop in ExecutionTab
2026-02-01 11:14:33 +08:00
catlog22
b66d20f5a6 Merge branch 'main' of https://github.com/catlog22/Claude-Code-Workflow 2026-01-31 23:12:45 +08:00
catlog22
a2206df50f feat: add CliStreamMonitor and related components for CLI output streaming
- Implemented CliStreamMonitor component for real-time CLI output monitoring with multi-execution support.
- Created JsonFormatter component for displaying JSON content in various formats (text, card, inline).
- Added utility functions for JSON detection and formatting in jsonUtils.ts.
- Introduced LogBlock utility functions for styling CLI output lines.
- Developed a new Collapsible component for better UI interactions.
- Created IssueHubPage for managing issues, queue, and discovery with tab navigation.
2026-01-31 23:12:39 +08:00