AgentEvalTool/.scratch/v0.6/issues/10-expandable-row-timeline.md
sinohqb 8bc5aa6979 feat(campaign): add per-Run timeline seam + endpoint
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)
2026-07-31 16:49:04 +08:00

1.3 KiB
Raw Blame History

10 — ④活动列表行展开过程时间轴

What to build: 让活动列表的每一行可展开,展开区显示该活动的完整过程时间轴:调 GET /campaigns/{id}/timeline 取逐 Run 条目,用 08 的共享组件把每个子 Run 按「加速后窗口偏移」定位成节点,颜色表状态(完成/失败/运行中/取消hover 显场景/通过率/时延,点击节点跳到该子 Run 的报告(/reports?run={run_id})。展开的是进行中活动时,随现有 5s 轮询刷新,时间轴随新派生的子 Run 实时长出。

Blocked by: 06timeline 端点 + 类型、08共享横向时间轴组件

Status: ready-for-agent

  • 活动列表行改为 expandable;展开时按需拉取 campaignsApi.timeline(id)
  • 把 timeline 条目适配成 08 组件的 markersoffset=offset_seconds、colorKey/颜色=status、tooltip=场景+通过率+时延、onClick=跳报告)。
  • 节点点击跳 /reports?run={run_id}(复用现有跳转方式)。
  • 展开进行中活动时随现有 5s 轮询刷新时间轴;已完成活动只拉一次。
  • 空/无子 Run 活动给占位提示,不报错。
  • npx tsc --noEmit + npm run build 通过浏览器验证展开、状态配色、hover、跳转、进行中刷新。