test: give two synthesised clicks the detail a real click carries
Secret Scan / scan (push) Successful in 4s
Build App (Preview) / compute-version (pull_request) Successful in 9s
Secret Scan / scan (pull_request) Successful in 4s
Build App (Preview) / create-release (pull_request) Successful in 1s
Build App (Preview) / build-macos (pull_request) Successful in 2m43s
Build App (Preview) / build-linux (pull_request) Successful in 7m58s
Build App (Preview) / build-windows (pull_request) Successful in 4m54s
Build App (Preview) / prune-previews (pull_request) Successful in 1s

The previous commit tightened the gate's click-count check from `> 1` to
`!== 1`, which two tests in the wiring block did not survive: they built
`new MouseEvent("click", { button: 0 })` directly rather than through the
`click()` helper, so `detail` defaulted to 0 and the gate refused them.

The gate is right and the tests were wrong -- a mouseup derived from a real
click always carries `detail >= 1`, and 0 is exactly the synthetic-event
shape the tightening was for. Both now pass `detail: 1`.

I pushed the previous commit without noticing this, having read a truncated
test summary that hid the failure.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-18 20:08:36 -07:00
co-authored by Claude Opus 5
parent c6f9c1d43f
commit 83c9c24951
@@ -1664,7 +1664,7 @@ describe("the link handler is wired into the terminal, and reads its live mode",
await write("\x1b[?1002h"); await write("\x1b[?1002h");
wiredHandler().activate( wiredHandler().activate(
new MouseEvent("click", { button: 0 }), new MouseEvent("click", { button: 0, detail: 1 }),
"https://example.com/x", "https://example.com/x",
range, range,
); );
@@ -1679,7 +1679,7 @@ describe("the link handler is wired into the terminal, and reads its live mode",
await act(async () => { await act(async () => {
wiredHandler().activate( wiredHandler().activate(
new MouseEvent("click", { button: 0 }), new MouseEvent("click", { button: 0, detail: 1 }),
"https://example.com/x", "https://example.com/x",
range, range,
); );