diff --git a/docs/superpowers/specs/2026-03-18-automation-system-redesign.md b/docs/superpowers/specs/2026-03-18-automation-system-redesign.md index b94428b..c5230df 100644 --- a/docs/superpowers/specs/2026-03-18-automation-system-redesign.md +++ b/docs/superpowers/specs/2026-03-18-automation-system-redesign.md @@ -87,7 +87,7 @@ desktop/src/ ├── components/ │ ├── Automation/ # 新建目录 -│ │ ├── AutomationPanel.tsx # 统一入口 +│ │ ├── AutomationPanel.tsx # 统一入口(组合层) │ │ ├── AutomationCard.tsx # Hand/Workflow 卡片 │ │ ├── AutomationFilters.tsx # 分类筛选 │ │ ├── ScheduleEditor.tsx # 可视化调度器 @@ -96,14 +96,19 @@ desktop/src/ │ │ └── ApprovalQueue.tsx # 审批队列 │ └── HandsPanel.tsx # 重构为 AutomationPanel 入口 ├── store/ -│ ├── automationStore.ts # 新建:统一状态管理 -│ └── handStore.ts # 保留:逐步迁移 +│ ├── handStore.ts # 扩展:添加批量操作方法 +│ ├── workflowStore.ts # 保留:工作流状态 +│ └── automationCoordinator.ts # 新建:跨 store 协调层 ├── types/ -│ └── automation.ts # 新建:统一类型定义 +│ ├── hands.ts # 扩展:添加 CategoryType +│ └── automation.ts # 新建:类型适配器 └── hooks/ └── useAutomationEvents.ts # 新建:WebSocket 事件 Hook ``` +> **设计决策**: 不创建新的 `automationStore.ts`,而是扩展现有的 `handStore.ts` 和 `workflowStore.ts`, +> 通过轻量级的 `automationCoordinator.ts` 进行跨 store 协调。这遵循了现有代码库的模式。 + --- ## 三、核心组件设计