chore(task): archive 05-10-web-history-list-page
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{"_example": "Fill with {\"file\": \"<path>\", \"reason\": \"<why>\"}. Put spec/research files only — no code paths. Run `python3 .trellis/scripts/get_context.py --mode packages` to list available specs. Delete this line once real entries are added."}
|
||||
@@ -0,0 +1 @@
|
||||
{"_example": "Fill with {\"file\": \"<path>\", \"reason\": \"<why>\"}. Put spec/research files only — no code paths. Run `python3 .trellis/scripts/get_context.py --mode packages` to list available specs. Delete this line once real entries are added."}
|
||||
@@ -0,0 +1,76 @@
|
||||
# 历史解卦列表页面实现
|
||||
|
||||
## 目标
|
||||
实现完整的历史解卦列表页面功能,包括:
|
||||
1. Dashboard 卡片点击跳转到解卦结果页
|
||||
2. 重构 HistoryListPage 使用真实 API
|
||||
3. 快捷筛选和搜索功能
|
||||
|
||||
## 设计稿参考
|
||||
- `HomeHistoryListPage` (EH0fv) - 历史列表页面
|
||||
- `HistoryResultDetailPage` - 历史详情页面
|
||||
|
||||
## 实现步骤
|
||||
|
||||
### Step 1: Dashboard 卡片点击跳转
|
||||
**文件**: `web/src/components/Dashboard.tsx`
|
||||
|
||||
- [ ] 将历史卡片包装为可点击链接
|
||||
- [ ] 跳转到 `/{locale}/history/{threadId}`
|
||||
- [ ] 确保 `HistoryItem` 有正确的 `threadId` 字段
|
||||
|
||||
### Step 2: 重构 HistoryListPage
|
||||
**文件**: `web/src/components/HistoryListPage.tsx`
|
||||
|
||||
- [ ] 删除 mock 数据
|
||||
- [ ] 使用 `getAgentHistory()` API 获取真实数据
|
||||
- [ ] 实现页面布局:
|
||||
- Header: 返回按钮 + 标题 + 搜索框 + 筛选按钮
|
||||
- Stats: 总记录数 + 可追问数 + 最近解卦时间
|
||||
- Main: 左侧列表 + 右侧快捷筛选面板
|
||||
- [ ] 实现列表项点击跳转到详情页
|
||||
|
||||
### Step 3: 快捷筛选功能
|
||||
**文件**: `web/src/components/HistoryListPage.tsx`
|
||||
|
||||
- [ ] 全部 / 事业·学业 / 情感·财富 等分类筛选
|
||||
- [ ] 前端过滤实现
|
||||
- [ ] 显示各分类数量
|
||||
|
||||
### Step 4: 搜索功能
|
||||
**文件**: `web/src/components/HistoryListPage.tsx`
|
||||
|
||||
- [ ] 搜索问题或卦名
|
||||
- [ ] 前端过滤实现
|
||||
- [ ] 实时搜索响应
|
||||
|
||||
### Step 5: 历史详情页检查
|
||||
**文件**: `web/src/components/HistoryResultPage.tsx`
|
||||
|
||||
- [ ] 确保 URL 参数 `threadId` 正确接收
|
||||
- [ ] 根据 `threadId` 显示对应的解卦结果
|
||||
|
||||
## 数据结构
|
||||
|
||||
### HistoryItem
|
||||
```typescript
|
||||
interface HistoryItem {
|
||||
id: string;
|
||||
threadId: string;
|
||||
question: string;
|
||||
category: string;
|
||||
hexagram_name: string;
|
||||
rating: string;
|
||||
created_at: string;
|
||||
can_follow_up: boolean;
|
||||
}
|
||||
```
|
||||
|
||||
## API 使用
|
||||
- `getAgentHistory()` - 获取历史记录列表
|
||||
- `mapHistoryMessagesToItems()` - 转换数据格式
|
||||
|
||||
## 注意事项
|
||||
- 响应式设计支持
|
||||
- 国际化支持 (zh/en)
|
||||
- 参照设计稿调整样式
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"id": "web-history-list-page",
|
||||
"name": "web-history-list-page",
|
||||
"title": "实现历史解卦列表页面",
|
||||
"description": "实现历史解卦列表页面,包括:1. Dashboard卡片点击跳转 2. 重构HistoryListPage使用真实API 3. 快捷筛选和搜索功能",
|
||||
"status": "completed",
|
||||
"dev_type": null,
|
||||
"scope": null,
|
||||
"package": null,
|
||||
"priority": "P1",
|
||||
"creator": "claude",
|
||||
"assignee": "claude",
|
||||
"createdAt": "2026-05-10",
|
||||
"completedAt": "2026-05-10",
|
||||
"branch": null,
|
||||
"base_branch": "dev",
|
||||
"worktree_path": null,
|
||||
"commit": null,
|
||||
"pr_url": null,
|
||||
"subtasks": [],
|
||||
"children": [],
|
||||
"parent": null,
|
||||
"relatedFiles": [],
|
||||
"notes": "",
|
||||
"meta": {}
|
||||
}
|
||||
Reference in New Issue
Block a user