AgentEvalTool/.scratch/v0.6/issues/07-reverse-timescale-input.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

15 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 07 — ①时间倍速反向输入
**What to build:** 让用户在新增活动时按「耗时」而非「倍速」思考。表单把裸的「时间倍速」输入换成「窗口长度(预设 6/12/24/48/72h」+「希望加速后多久跑完」两项,系统实时派生并只读展示倍速与「加速后约 X 完成」;提交时前端把派生出的 `time_scale` 放进现有 payload**后端 API 契约与 `time_scale` 语义完全不变**)。「实时」开关一键设为真实墙钟(倍速 ×1、禁用目标耗时输入。目标耗时若 > 窗口(倍速 <1表单校验拦截活动列表/详情处也改用加速后约 X 完成展示取代裸 `×N`
**Blocked by:** —— 可立即开始不依赖后端改动)。
**Status:** ready-for-agent
- [ ] 新增纯 util `campaignTime.ts``deriveTimeScale(windowSeconds, targetSeconds)` `acceleratedDuration(windowSeconds, timeScale)`作为唯一口径
- [ ] 新增表单窗口长度下拉 + 目标加速耗时数值+单位默认分钟+「实时开关只读展示派生倍速与加速后约 X 完成」。
- [ ] 校验目标耗时 窗口长度倍速 1违反时拦截并给出提示US-4)。
- [ ] 提交仍发 `time_scale``POST /campaigns` 契约不变
- [ ] 活动列表与详情用 `acceleratedDuration` 展示加速后约 X 完成」,替换裸倍速列
- [ ] `npx tsc --noEmit` + `npm run build` 通过浏览器实操验证派生/实时开关/校验/列表展示