thread-master/docs/product/scout-topic-quality/tasks/T013-scout-result-time-page...

57 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2026-08-13 02:22:24 +00:00
# T013 — 結果分頁與貼文時間
> Status: `done`
> Milestone: `M1`
> Est. change: `~180 lines`
## Goal
完成後,所選 run 只載入目前結果頁,列與明細正確顯示貼文時間/未知及掃入時間。
## Depends on
- T012
## Inputs
- 讀取 / 依賴:
- 檔案:`apps/web/src/pages/ScoutPage.tsx`、`apps/web/src/lib/time.ts`
- 既有能力 / APIScoutRepo.listRunPosts、Pager、formatLocalDateTime
- Spec 段落§4 流程 E、§9 #7#9
## Outputs
### 程式變更(預期路徑)
| 路徑 | 動作 | 說明 |
|------|------|------|
| `apps/web/src/pages/ScoutPage.tsx` | edit | 將 client pageSlice 換成 result page fetch顯示 posted_atunknowncreated_at。 |
| `apps/web/src/pages/ScoutPage.test.tsx` | edit | 驗證時間文案、未知置底契約與翻結果頁。 |
### 行為變更
- 結果預設每頁 8前端不重排 server 的 score 順序;換頁選第一筆。
### API / 契約(若有)
- posted_at 為貼文時間created_at 只能標為掃入時間。
## Out of scope
- 不處理 live HTTP mapping不新增相關性排序切換。
## Acceptance
- [x] 每列與明細必有貼文時間或「貼文時間未知」。
- [ ] 指令:
```bash
cd apps/web && npm test -- src/pages/ScoutPage.test.tsx
```
驗收結果:`npm run build`、ScoutPage 2 tests passed。
## Notes
不得因 JavaScript ns 精度在前端重新排序 server page。