thread-master/docs/product/scout-topic-quality/tasks/T061-scout-live-refresh.md

55 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2026-08-13 02:22:24 +00:00
# T061 — Scout live 載入與完成提示
> Status: `done`
> Milestone: `M6`
> Est. change: `~170 lines`
## Goal
完成後ScoutPage 使用 live run APIsjob 完成只提示新批次且不下載全部 posts 或打斷目前頁面。
## Depends on
- T014、T060
## Inputs
- 讀取 / 依賴:
- 檔案:`apps/web/src/pages/ScoutPage.tsx`、`JobLiveContext.tsx`
- 既有能力 / APIlistRuns、listRunPosts、jobsRevision
- Spec 段落§4 流程 D/E、§9 #12/#13
## Outputs
### 程式變更(預期路徑)
| 路徑 | 動作 | 說明 |
|------|------|------|
| `apps/web/src/pages/ScoutPage.tsx` | edit | 移除剩餘全量 refreshPostsOnJobRevision接 live page loading 與 new-run banner。 |
| `apps/web/src/pages/ScoutPage.test.tsx` | edit | 以 live-shaped fake 驗證 job 完成、手動 refresh 與選取保持。 |
### 行為變更
- job revision 不自動切批次running run 顯示進度、不顯示半套 posts。
### API / 契約(若有)
- run result 只在選取 run/page 改變時請求。
## Out of scope
- 不改全域 JobsPage 或 websocket/polling 架構。
## Acceptance
- [x] 監看測試 call log沒有 listPosts 全量呼叫或非目前 run 的 result request。
- [x] 指令:
```bash
cd apps/web && npm test -- src/pages/ScoutPage.test.tsx
```
## Notes
TodayPage 可繼續呼叫舊 listPosts不在本 task 遷移。