Repository navigation
Description
English
Symptom
The e2e_shard (1/2) check can fail in e2e/quote-companion.spec.ts while asserting that .maka-quote-actions stays hidden during a drag selection:
Error: expect(locator).toBeHidden() failed
Locator: locator('.maka-quote-actions')
Expected: hidden
Received: visible
Observed in CI run 31154080906, job 92789739992. The other 55 tests in the shard passed, as did the other E2E shard, Windows baseline, typecheck, Runtime Host, workspace, and headless checks.
Cause
The test drives five mouse movements with a 90 ms driver-side pause after each movement and expects every movement to extend the 350 ms selection-settle timer. Once the pointer moves beyond the available text, however, the browser may stop emitting selectionchange because the selection itself no longer changes. Runner scheduling can then let the existing settle timer expire before mouse.up(), making the quote layer legitimately visible under the current event model while the test still expects it to be hidden.
This makes the assertion depend on driver and runner timing instead of an observable synchronization boundary. The failing PR did not modify use-message-selection-quote.ts, chat-view.tsx, or this E2E.
Expected fix
- define whether an unchanged selection with the pointer still held down is considered settled
- make the implementation and E2E use that explicit boundary
- avoid fixed driver-side delays as the correctness oracle
- preserve coverage that the layer does not flash during an actively changing selection
简体中文
现象
e2e_shard (1/2) 可能在 e2e/quote-companion.spec.ts 中失败:测试在拖选文本期间断言 .maka-quote-actions 保持隐藏,但实际浮层已经可见。
本次出现在 CI run 31154080906, job 92789739992。该 shard 的其余 55 项测试、另一个 E2E shard、Windows baseline、typecheck、Runtime Host、workspace 和 headless 检查均通过。
原因
测试通过 5 次鼠标移动和每次 90 ms 的 driver 侧等待模拟拖选,并假设每次移动都会重新开始 350 ms 的 selection-settle timer。但指针越过可选文本后,selection 本身可能不再变化,浏览器也就不再发送 selectionchange。当 CI runner 调度稍慢时,已有 timer 会在 mouse.up() 前到期;按照当前事件模型,quote layer 会正常出现,而测试仍要求它隐藏。
因此该断言依赖 driver 与 runner 时序,而不是明确、可观察的同步边界。触发失败的 PR 没有修改 use-message-selection-quote.ts、chat-view.tsx 或这条 E2E。
预期修复
- 明确“鼠标仍按下但 selection 不再变化”是否算 settled
- 让实现与 E2E 使用同一个显式边界
- 不再用固定的 driver 侧延时作为正确性判断依据
- 保留“selection 仍在变化时浮层不能闪现”的覆盖
Activity
me2seeks commentedon Aug 9, 2026
I can take this. I’ll make pointer release the explicit commit boundary for drag selection: selection changes while the pointer is held will only clear the affordance, and pointerup will arm the existing settle path. Keyboard and programmatic selection keep the current delay. Deterministic boundary coverage will own the timing contract, while the E2E will verify the browser pointer-event wiring in the real transcript DOM without driver-side sleeps.