build_campaign_timeline flattens a campaign's child Runs into offset-sorted
per-Run entries (distinct from the report's 12-bucket aggregation), reusing a
shared _run_window_offset口径 so both views place a run identically. Exposes
GET /campaigns/{id}/timeline and the api.ts type/call. (v0.6 ticket 06)
13 lines
1.1 KiB
Markdown
13 lines
1.1 KiB
Markdown
# 09 — ②活动计划时间轴预览
|
||
|
||
**What to build:** 在新增活动表单的计划编辑区上方,加一条只读时间轴预览:把当前表单里的每个计划条目按其窗口偏移画在代表窗口的水平轴上,颜色按场景稳定区分、标注重复次数,随用户编辑表单(增删条目、改偏移/场景/次数、改窗口长度)实时刷新。数据完全来自表单本地状态,无后端改动。复用 08 的共享时间轴组件,把计划条目适配成「带偏移的标记数组」。
|
||
|
||
**Blocked by:** 08(共享横向时间轴组件)。
|
||
|
||
**Status:** ready-for-agent
|
||
|
||
- [ ] 把表单的 `plan` 条目 + `window_seconds` + 场景名映射适配成 08 组件的 `markers`(offset=条目偏移、colorKey=scenario_id、badge=count、tooltip=场景名+偏移+次数)。
|
||
- [ ] 预览随表单状态实时重渲染(增删/改条目/改窗口即时反映)。
|
||
- [ ] 空计划时给出占位提示,不报错。
|
||
- [ ] `npx tsc --noEmit` + `npm run build` 通过;浏览器实操验证边编辑边看、颜色分场景、次数角标。
|