fix: close alignment review races and preserve local conversation state

This commit is contained in:
Codex committed 2026-10-21 04:55:11 +09:00
1 parent c7231be2c5
commit 37ddb2ce24
14 files changed
+203 -45

No files matched your search

+12
View File
@@ -67,6 +67,18 @@ async function main() {
await act(async () => click(other))
check(underlyingClicks === 1, 'only the dismissal click is consumed')
await render()
const otherChild = document.createElement('span')
otherChild.textContent = 'nested task title'
other.append(otherChild)
await act(async () => {
otherChild.dispatchEvent(new MouseEvent('pointerdown', { bubbles: true, cancelable: true, button: 0 }))
// Pointer-up on the row produces a click on the common ancestor, not the title.
click(other)
})
check(underlyingClicks === 1, 'retargeted outside click cannot select underlying task')
check(!document.querySelector('.task-popconfirm'), 'retargeted dismissal still closes')
otherChild.remove()
await render()
anchor.focus()
await act(async () => document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true, cancelable: true })))
check(document.activeElement === anchor, 'Escape restores anchor focus')