Files
JARVIS/development-doc/plan/today-status-update/phase-ts-3-chat-today-status-integration.md

87 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Phase TS-3Chat 首页 Today Status 接真实数据
日期2026-04-08
状态:待实施
---
## 1. 阶段目标
把 Chat 首页 Today Status 从“真实统计 + mock 内容”升级为完整真实视图,让 Today Status 与 Schedule Center 使用同一份聚合真源。
---
## 2. 详细任务
### 2.1 useSidebarPlan 去 mock
**文件**
- `frontend/src/pages/chat/composables/useSidebarPlan.ts`
需要完成:
- 删除 `mockFocusItems`
- `sidebarFocusItems` 改为基于真实 `focus_tasks`
- 新增 `todayStatusQuadrants`
- 新增 `commanderSummary`
- 保留当前 `todayPlanCounters` 的真实聚合逻辑
### 2.2 KanbanPanel 真实化
**文件**
- `frontend/src/components/chat/KanbanPanel.vue`
需要完成:
- 去掉硬编码四象限数据
- 改为接收真实 `quadrants`
- emit 真实事件:
- `create-task`
- `open-task`
- `close`
- 页脚统计改为真实任务统计
### 2.3 chat 首页联动
**文件**
- `frontend/src/pages/chat/index.vue`
需要完成:
- Today Status 打开后加载真实 Kanban
- 任务创建 / 编辑 / 派发后触发 `loadSidebarPlanSnapshot()`
- 保持当前抽屉体验,不额外再造入口
---
## 3. 设计原则
1. **Today Status 与 Schedule Center 同源**
2. **KanbanPanel 做纯展示,不承载业务状态真源**
3. **以刷新真实聚合为准,不保留本地 fake 数据**
---
## 4. 核心文件清单
| 文件 | 操作 | 说明 |
|------|------|------|
| `frontend/src/pages/chat/composables/useSidebarPlan.ts` | 修改 | 删除 focus mock接真实聚合 |
| `frontend/src/components/chat/KanbanPanel.vue` | 修改 | 改成真实展示组件 |
| `frontend/src/pages/chat/index.vue` | 修改 | 连接 Today Status、Kanban、刷新逻辑 |
---
## 5. 验收标准
- [ ] Today Status 重点列表不再使用 mock
- [ ] Kanban 四象限显示真实任务
- [ ] 统计、重点、象限来自同一份聚合结果
- [ ] Chat 首页可以稳定刷新任务状态
---
## 6. 依赖关系
```text
依赖Phase TS-2
输出给Phase TS-4 / TS-5
```