thread-master/docs/product/haixun-console/tasks/T017-mock-jobs.md

46 lines
846 B
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.

# T017 — Mock jobs + progress timer
> Status: `todo`
> Milestone: `M8`
> Est. change: `~150 lines`
## Goal
Job 列表/詳情;可啟動 demo jobtimer 推進 progress → succeeded/failed。
## Depends on
- T008可與 T016 平行,但建議在 T016 後)
## Inputs
- Spec §3.1、§5.3 demo_long_task、路由 `/app/jobs`
## Outputs
### 程式變更
| 路徑 | 動作 | 說明 |
|------|------|------|
| `apps/web/src/pages/JobsPage.tsx` | edit | |
| `apps/web/src/pages/JobDetailPage.tsx` | add | |
| `apps/web/src/data/mock/jobRunner.ts` | add | setInterval 推進 |
### 行為變更
- 狀態 badge
- 完成時可 emit 事件或直接寫 notification store
## Out of scope
- 真 worker
## Acceptance
- [ ] 可建立/看到 demo job 跑完
- [ ] `npm run build` 通過
```bash
cd apps/web && npm run build
```