From 83c9c249519a7545fd5a410f39ca3cffcd3eba5f Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Fri, 18 Sep 2026 20:08:36 -0700 Subject: [PATCH] test: give two synthesised clicks the detail a real click carries 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) --- app/src/components/terminal/TerminalView.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/components/terminal/TerminalView.test.tsx b/app/src/components/terminal/TerminalView.test.tsx index 7fce0eb..723f0e8 100644 --- a/app/src/components/terminal/TerminalView.test.tsx +++ b/app/src/components/terminal/TerminalView.test.tsx @@ -1664,7 +1664,7 @@ describe("the link handler is wired into the terminal, and reads its live mode", await write("\x1b[?1002h"); wiredHandler().activate( - new MouseEvent("click", { button: 0 }), + new MouseEvent("click", { button: 0, detail: 1 }), "https://example.com/x", range, ); @@ -1679,7 +1679,7 @@ describe("the link handler is wired into the terminal, and reads its live mode", await act(async () => { wiredHandler().activate( - new MouseEvent("click", { button: 0 }), + new MouseEvent("click", { button: 0, detail: 1 }), "https://example.com/x", range, );