Skip to content

Studio: the full-size round opens after the press that selected it is released - #1055

Merged
danielrispler merged 1 commit into
mainfrom
fix/round-full-light-dismiss
Dec 2, 2026
Merged

danielrispler merged 1 commit into
mainfrom
fix/round-full-light-dismiss

Conversation

@danielrispler

Copy link
Copy Markdown
Owner

Summary

Switching to a session with an open round made the full-size window flash open and vanish. A row selects on pointerdown, so showModal() ran while the button was still down; the release landed outside the dialog and closedby="any" (Chrome light dismiss) closed it. Introduced by #998 (709159194).

 drawRoundView
-  if (!dialog.open) dialog.showModal()
+  if (!dialog.open)
+    opensAfterPress = pressed
+    if (!pressed) dialog.showModal()
+
+on pointerup / pointercancel (document, capture)
+  pressed = false
+  if (opensAfterPress) setTimeout(redraw, 0)   // after the click

Root cause evidence from a DevTools probe on the real page: pointerdown at 24459 ms, dialog open at 24505, close event at 24548, and no close() call from page code.

Evidence

  • Before: a round that opens while a pointer press is down opens after its release, not under it fails: not opened under the press.
    After: the same test passes; npm run check is green (1108 node tests pass, 1 skipped).
  • Not verified in real Chrome with a physical press (the test DOM can't light-dismiss); confidence about 85%.

Outside review

skipped: no risk match. Correctness pass: reviewed by hand; one low risk noted below.

Merge Danger

Door: two-way

Blast Radius: the full-size round window only. If a pointerup never arrives (e.g. a Mac right-click context menu), pressed stays true and the dialog waits for the next release before opening.

🤖 Generated with Claude Code

… released

A row selects on pointerdown, so the round's dialog opened under the held button; the release landed outside it and closedby="any" light-dismissed it ~90 ms later. The dialog now waits for the release (#998 regression).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@danielrispler
danielrispler merged commit df35bae into main Dec 2, 2026
14 of 18 checks passed
@danielrispler
danielrispler deleted the fix/round-full-light-dismiss branch December 2, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant