thread-master/docs/product/opportunity-inbox/tasks/T823-sweep-funnel-mock-ux-g...

58 lines
1.7 KiB
Markdown
Raw Permalink Normal View History

2026-08-13 02:22:24 +00:00
# T823 — sweep funnel mock and ux gate tests
> Status: `done`
> Milestone: `M2`
> Est. change: `~180 lines`
## Goal
完成後 mock 巡邏結果能說清楚每階段數量、點數與 partialblockedfailed並完成 Phase B UX gate 的自動驗收基礎。
## Depends on
- T821、T822、T813
## Inputs
- `apps/web/src/pages/RadarWatchesPage.tsx`
- `apps/web/src/pages/RadarOpportunitiesPage.tsx`
- `apps/web/src/data/fixtures/radarInbox.ts`
- Spec §5.3§5.4、§6.3§6.4、驗收 #14#15、#19
## Outputs
### 程式變更(預期路徑)
| 路徑 | 動作 | 說明 |
|------|------|------|
| `apps/web/src/components/radar/SweepFunnelSummary.tsx` | add | hit/dedupe/prefilter/cache/judge/created/deferred/credits |
| `apps/web/src/data/mock/radarRepo.ts` | edit | 完整 sweep result mock |
| `apps/web/src/pages/ProductRadarLiveFlow.test.tsx` | edit | inboxmappreviewsweep flow |
| `apps/web/src/pages/RadarOpportunitiesPage.test.tsx` | edit | UX gate scenarios |
### 行為變更
- 0 hit、全排除、partial_budget、blocked_budget、failed 都有原因與下一步。
### API / 契約(若有)
- funnel 欄位與 T800T801 一致;不把 merged 當 created。
## Out of scope
- 不寫 Phase C worker 或真 AI。
## Acceptance
- [x] mock flow 可在三分鐘內完成查看、處理、預覽、巡邏結果對帳。
- [x] M1M2 測試綠;使用者已明確要求「全部執行」,視為 UX gate 批准後繼續。
- [ ] 指令:
```bash
cd apps/web && npm run test -- ProductRadarLiveFlow RadarOpportunitiesPage && npm run build
```
## Notes
這是 Phase B 最後一題;完成後停在使用者 UX 批准,不直接進後端。