fix(consult): progress timeline shows only real steps, not the answer outline (BUG-1145)
The answer outline (think.plan / thinking.section) was drawn as four think rows and ticked done as soon as the chart calculation started. The reducer now keeps the outline only as calculate-row detail; live and history views share it. Product chose option B on 2026-10-01. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4f2nya58RoRu4yEmJgRGE
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f1a169cb93
commit
c0f059125b
@@ -0,0 +1,34 @@
|
||||
# PROGRESS · 普通对话进度栏去掉回答提纲行(2026-10-01)
|
||||
|
||||
任务书:`docs/tasks/TASK-consult-timeline-no-plan-20261001.md`;BUG-1145。
|
||||
|
||||
## 实现
|
||||
|
||||
- `frontend/src/lib/consultation-run-timeline.ts`:
|
||||
- `think.plan` 直接返回原状态(不再生成提纲行)。
|
||||
- `thinking.section` 只把领域与对照项累积到新增的 `calculateHints`,经 `applyCalculateHints` 补到计算行;`tool.started` 建计算行时也补上(提纲在算盘前下发,原 `enrichCalculate` 在实时流里因计算行尚不存在而落空,历史重建里才有明细;现在两边一致)。
|
||||
- `answer.delta` 同时把计算行收口为完成(原来由 `thinking.section` 顺手收口)。
|
||||
- `consultationTimelineFromSettled`:有思考文本就发一条 `thinking.delta`,删掉「把思考文本挂到最后一条提纲行」的补丁。
|
||||
- 服务端 `think.plan` / `thinking.section` 照发(公共事件合同、`consultation-agentic-runtime` 测试锁定 `think.plan` 存在;客户端已不再用它画行)。`thinkPlanSteps` 仍被服务端与测试使用,未删。
|
||||
|
||||
## 改动的断言(原值 / 新值 / 原因)
|
||||
|
||||
| 测试 | 原值 | 新值 | 原因 |
|
||||
| --- | --- | --- | --- |
|
||||
| `consultation-run-timeline.test.ts` 首条(改名为 “…then the first write (no outline row)”) | 行种类 `["method","calculate","think","write"]`,第 3 行「先回答你问的这件事」已完成 | 行种类 `["method","calculate","write"]`,不存在该标签行;写作行下标 3→2 | BUG-1145:提纲不是步骤,产品选 B 去掉 |
|
||||
|
||||
新增三条:算盘前提纲不成行且只有方法行完成;整轮结束无 think 行、无 live 行;历史重建同形且计算行有明细。三条与改写的一条在修前代码上均失败(已实测:4 fail),修后通过。
|
||||
|
||||
## 门禁(Node 22.14)
|
||||
|
||||
| 项 | 基线 `f1a169cb` | 分支 |
|
||||
| --- | --- | --- |
|
||||
| tsc | — | 0 |
|
||||
| lint | — | 0 error / 126 warning |
|
||||
| npm test | 4,851 条,fail 24 | 4,854 条,fail 24(同名) |
|
||||
| build `/` | — | Static |
|
||||
| `.next/static` js gzip 合计 | 1,632,680 B | 1,632,662 B(−18 B) |
|
||||
|
||||
## 环境缺口
|
||||
|
||||
- 浏览器级(真机看进度栏)留给 `docs/testing/consult-plain-answer-20261001.md` 第 10 步。
|
||||
@@ -400,3 +400,4 @@
|
||||
- **实现合入 `staging` 的同一次推送里,必须同时把状态板那一行改掉。** 2026-09-16 的对账发现 10 份早已合入的单仍写着「待领取 / 待验收」,会导致重复派活。
|
||||
| `TASK-consult-plain-answer-20261001.md` | `PROGRESS-consult-plain-answer-20261001.md` | 普通对话「还是废话」:09-17 四步开场形状(格局名 → 谁推谁修 → 扮演哪个象)逼出谜语,问父母时爸妈被揉成一段;产品授权推翻该形状,改成先答 + 按问题里的对象分段 + 人话自检 + 空宫不单独下结论 + 父母卡标 mother/father(BUG-1132~1134) | **已实现,待 Claude 验收**(fork 子代理直接执行);未推 staging、未部署;模型对比为环境缺口,真机清单 `docs/testing/consult-plain-answer-20261001.md` | 分支 `codex/consult-plain-answer-20261001` |
|
||||
| `TASK-consult-answer-clock-20261001.md` | `PROGRESS-consult-answer-clock-20261001.md` | 普通对话答题时钟 70 s 容不下推理模型(v4-pro 77 s),无出生分钟路线只受 110 s 工具钟管;产品定 5 分钟防卡死(BUG-1142) | **已实现,待 Claude 验收**(直接执行) | 分支 `codex/consult-answer-clock-20261001` |
|
||||
| `TASK-consult-timeline-no-plan-20261001.md` | `PROGRESS-consult-timeline-no-plan-20261001.md` | 普通对话进度栏提前打勾:回答提纲在算盘前就作为四行步骤显示并全部打勾(BUG-1145);产品选 B 去掉提纲行,只显示真实步骤 | **实现完成,待 Claude 验收**(直接执行) | 分支 `codex/consult-timeline-no-plan-20261001` |
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# TASK · 普通对话进度栏去掉回答提纲行(2026-10-01)
|
||||
|
||||
- 基线:`origin/staging` `f1a169cb`
|
||||
- 分支 / worktree:`codex/consult-timeline-no-plan-20261001` / `.worktrees/consult-timeline-no-plan-20261001`
|
||||
- 模式:直接执行(产品 10-01 选 B 后明确要求直接做),Claude 派子代理实现、Claude 独立验收
|
||||
- BUG:BUG-1145
|
||||
|
||||
## 事故实证
|
||||
|
||||
产品 10-01 真机截图:问「我跟我父母的关系怎么样」,进度栏「读取分析方法」之后立刻出现「先回答你问的这件事 / 把判断钉在盘上 / 时间窗口怎么看 / 这周可以做什么」四行且全部打勾,最下面「正在计算本命盘…」仍在转。
|
||||
|
||||
## 根因
|
||||
|
||||
`frontend/src/lib/stream-agent-response.ts` `flushThinkingPlan` 在第一个流块就下发回答提纲(`think.plan` + 每节 `thinking.section`);`frontend/src/lib/consultation-run-timeline.ts` `reduceConsultationTimeline` 把每节做成 live think 行,`completeLiveThink` 在下一个事件到来时把它们全标完成。提纲不是走过的步骤,却按步骤渲染。
|
||||
|
||||
## 决策记录
|
||||
|
||||
产品 10-01 在两案中选 **B:去掉提纲行,只显示真实步骤**(读取分析方法 → 计算本命盘 → 正在写 → 完成)。未选 A(提纲等算完再出现、按正文标题逐条打勾),原因:BUG-1132 之后回答按人分段、两节可省,提纲与正文对不上;产品偏好「多余入口宁可删除」。
|
||||
|
||||
## 硬红线
|
||||
|
||||
1. 只改渲染层(timeline reducer);服务端事件、`thinkingPlan`、`applyThinkingSectionProgress`、存档字段、API / DB 结构不动。
|
||||
2. 生时校正进度栏不动(它不用这个 reducer,只共用行类型与组件)。
|
||||
3. `page.tsx` 不增长;不加 spinner / 骨架。
|
||||
|
||||
## 任务与验收
|
||||
|
||||
- T1 reducer:`think.plan` 不改状态;`thinking.section` 只暂存计算行明细并在计算行出现时补上;正文开始时计算行收口。验收:新增回归测试在修前失败、修后通过。
|
||||
- T2 历史重建与实时同形(`consultationTimelineFromSettled` 走同一 reducer;思考文本改走 `thinking.delta` 行)。验收:历史重建测试。
|
||||
- T3 记录:BUG_HISTORY、CHANGELOG、DESIGN.md、真机清单第 10 步、本任务书与进度记录、索引。
|
||||
- 门禁:tsc 0;lint 0 error;`npm test` 失败名单与基线同名;`next build` `/` Static;首屏 gzip ±2%。
|
||||
Reference in New Issue
Block a user