Repository navigation
fix(ui): a mouse drag dismisses a toast instead of selecting its text - #1792
Merged
Merged
Conversation
Sonner aborts a swipe-to-dismiss once any text on the page is selected, and toast text was selectable, so dragging a toast with the mouse (the update notices in particular) highlighted it and left it on screen. Both Toasters (plan/annotate and code review) now give every toast select-none. The cost: the Auto-update failed toast's log path can no longer be selected to copy.
h-jennings
marked this pull request as ready for review
October 8, 2026 15:39
Every toast is select-none so a mouse drag dismisses it, but the auto-update failure names the path of update.log, which is worth copying. That one description line stays selectable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Toasts are hard to dismiss with a mouse. Their text is selectable, and Sonner stops a swipe-to-dismiss as soon as any text on the page is selected, so pressing on a toast and dragging it highlights the text and leaves the toast where it is. The update notices ("A new version of Plannotator is available", "Updated to vX") are where this shows up most.
What changed
Both
<Toaster>s (plan review / annotate inpackages/editor/App.tsx, code review inpackages/review-editor/App.tsx) now give every toastselect-nonethroughtoastOptions.className. Sonner merges it with each toast's own classes, so existing per-toast styling is unchanged.Before / after
Before: dragging the toast selects its text and it stays.
before.mp4
After: the same drag dismisses it.
after.mp4
Testing
bun run dev:review, openhttp://localhost:3001/?preview-update=9.9.9: the update toast appears after ~1.5s; a press-and-drag on its text dismisses it with nothing highlighted, and double-clicking the text selects nothing.bun run dev:hook, openhttp://localhost:3000/?preview-update=9.9.9: same in plan review.Notes
The "Auto-update failed" toast's log path can no longer be selected to copy.