qa: S8 scroll acceptance old red — collapsing the earliest run trace moves the reading anchor by 4079px
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 1h 7m
- Merged PRs (30d)
- 969
Description
## 红的签名(run 34222901107,SHA 92236df86)
```
[chat-read] › e2e/agent-workbench-scroll-acceptance.spec.ts:6:5
Error: expect(received).toBeLessThan(expected)
Expected: < 3
Received: 4079
37 | // Toggle the visible anchor with a real user click, without scrolling it.
38 | await anchor.getByTestId("run-trace-toggle").click();
> 39 | expect(Math.abs((await anchor.boundingBox())!.y - top)).toBeLessThan(3);
```
## 已经排除的
- **不是替身节奏**。PR #3071 把回环滚动替身改成按半步推进后,本条仍红——而且**红在第 39 行,不在流式那几条**:第 36 行「streaming must not move the reading anchor」(同一个 `top` 基准、同一个 `anchor`)在同一轮里**通过**了。也就是说:真实滚轮上滚到顶、流式增量持续到达期间锚点是稳的;把锚点自己折叠起来的那一次真实点击才把它挪走。
- **不是自动跟随的常规路径**。`apps/web/lib/chat-workbench/use-timeline-scroll.ts` 的贴底跟随与 `ResizeObserver` 补偿都以 `isAtBottom` 为前提,而第 30-33 行的真实 `page.mouse.wheel` 已经把它翻成 false(`scrollTop < 5` 的 poll 通过,且第 36 行的稳定断言正是它生效的证据)。
- **`RunTracePanel` 自己不滚**(`apps/web/components/chat/workbench/run-trace-panel.tsx` 全文无 `scrollIntoView` / `scrollTop` 写入;折叠只是 `hidden={!expanded}`)。
## 还没定案的
`4079` 这个量级约等于一整屏内容的高度,方向未知。两条还没分开的候选:
1. **`.first()` 不是稳定锚点**。`apps/web/components/chat/workbench/task-timeline.tsx` 里同一个 run 的 `RunTracePanel` 有**两个渲染位置**:run 还没有 assistant 消息时挂在整条时间线**末尾**的兜底块(`Object.entries(events).filter(([runId]) => !displayed.has(runId))`),assistant 消息一到就迁移到该消息**行内**(`TraceAssistant`)。这次迁移会改变 `run-trace-panel` 的 DOM 顺序,`getByTestId("run-trace-panel").first()` 在第 36 行与第 39 行之间可能解析到**不同的元素**——那样 `boundingBox().y` 的比较从一开始就不成立(spec 问题)。
2. **折叠时阅读位置真的没保住**(产品缺陷)——即 S8 验收条款本身没被满足。
这两条只能靠一次真实复现分开:需要在容器上同时取 `scrollTop` / `scrollHeight` 与被 `.first()` 解析到的那个节点的身份。
## 现在的状态
本轮不起本地 e2e 真栈、不自行 dispatch `e2e-full`(判据由 `qa/rolling-verification` 的专职 QA agent 统一出),所以到此**停下等 coordinator 派复现**。不用 `fixme` 掩盖,不改断言迁就现状。
车道无逐测试隔离、每趟约 25% 顺序相关红(#3047)。本条是**老红**、跨多趟稳定复现,不属于那 25%。
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with e2e/agent-workbench-scroll-acceptance.spec.ts:6 and reproduce run 34222901107 while recording scrollTop, scrollHeight, and the identity of the first run-trace-panel. Read apps/web/components/chat/workbench/task-timeline.tsx and run-trace-panel.tsx, then check use-timeline-scroll.ts. Done means the two possible causes are separated and the accepted behavior has a regression test without weakening the assertion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- playwright, typescript
- Domain
- frontend, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100