Repository navigation
Description
On current main (bfcaea465), dismissing the chat action-bar "More" menu with a click that lands on the message's own Delete control deletes the message, with no confirmation. Ten separate dismissal gestures reach it.
Measured
tests/studio/probe_dismiss_guard.py driven against a vite dev server on an unmodified checkout, chromium, seeded thread of 10 assistant messages:
| gesture | assistant messages before | after | deleted |
|---|---|---|---|
| quick click | 10 | 9 | yes |
| held press | 10 | 9 | yes |
| press across a busy main thread | 10 | 9 | yes |
| held with a modifier | 10 | 9 | yes |
| held then Enter | 10 | 9 | yes |
| held then Space | 10 | 9 | yes |
| held Space then Space | 10 | 9 | yes |
| dismiss then Space | 10 | 9 | yes |
| touch tap | 10 | 9 | yes |
| held touch plus a second pointer | 10 | 9 | yes |
The menu closes in every one of them, so from the user's point of view the gesture is "close this menu" and the message silently goes.
Attribution, with a control
This arrived with #8992 (b0843382d), which set modal={false} on ActionBarMorePrimitive.Root in studio/frontend/src/components/assistant-ui/thread.tsx.
The same probe, same command, same fixture, on b0843382d^ (01cf3728c, the commit immediately before it): no case deletes anything, 10 messages before and 10 after in every gesture. The only non-zero exit there is touch_hold_second_pointer reporting the menu did not close, which is that case's precondition not being met against a modal menu, not a deletion.
So: modal parent, zero deletions. Non-modal child, ten.
Why it happens
A modal Radix menu writes pointer-events: none on <body> and marks the surrounding content aria-hidden, so the press that dismisses it cannot reach anything underneath. That shield is the thing modal={false} removes, and it was the only thing standing between a dismissing press and the Delete button sitting in the same action bar (thread.tsx:7032, tooltip="Delete message").
Nothing replaced it. grep -c MenuDismissGuard studio/frontend/src on main returns nothing.
The performance reasoning in #8992's own comment is correct and I am not disputing it: that inherited pointer-events write invalidates style for the whole document and is genuinely the bulk of the open-and-close cost on a long thread. The problem is only that removing the shield also removes the protection, and the protection needs replacing separately.
The fix already exists
#9051 carries studio/frontend/src/lib/menu-dismiss.ts, a dismissal guard that swallows exactly the press that closed a menu, plus probe_dismiss_guard.py (the probe used above) wired into CI as a gate. On that branch all of these cases report 10 before and 10 after and the probe exits 0.
Whoever picks this up has two options: take the guard from #9051, or revert modal={false} on that one menu until the guard lands. I would not leave main as it is in the meantime, since this is unconfirmed destruction of user content reachable by an ordinary click.
The probe was copied into the checkouts as an instrument only; no source file was modified in either arm, and both trees were otherwise clean.
Activity
danielhanchen commentedon Aug 28, 2026
This should be fixed now - sorry on the delay - please update Unsloth Studio to the latest via
curl -fsSL https://unsloth.ai/install.sh | shfor Linux, Mac, WSL orirm https://unsloth.ai/install.ps1 | iexfor Windows - if it's not fixed yet, it'll be in the next Studio release - if it's still not working after that, please open another issue - appreciate it again!Dismissing the chat action bar More menu no longer activates the control underneath it, so a stray click cannot delete a message.