Repository navigation
fix(chat): selection actions stay dismissed after a click on app chrome - #386
Merged
emirhanyesilgul merged 1 commit intoOct 7, 2026
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Clicking a non-selectable part of the app (the sidebar, the chat list, the transcript gutter) dismissed Cite/Comment on pointerdown but left the selection in place, so the pointerup re-read it and the toolbar came back. A dismissed selection now stays dismissed until the selection changes. Escape, scroll and resize go through the same path, so a later click elsewhere no longer revives the toolbar after those either.
emirhanyesilgul
force-pushed
the
emirhanyesilgul/selection-actions-stay-dismissed
branch
from
October 7, 2026 21:06
72306f4 to
3779f20
Compare
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.
What?
After #380, clicking a non-selectable part of the app (the sidebar, the chat list, the transcript gutter) no longer brings the Cite/Comment actions back.
Why?
Found while testing #380 on Windows (comment). App chrome is
user-select: none, so a click there doesn't collapse the selection.pointerdowndismissed the toolbar, thenpointerupre-read the still-valid selection and showed it again. Not Windows-specific.How?
A dismissed selection stays dismissed until the selection changes:
dismiss()sets a flag,selectionchangeclears it, andreadSelectiondoes nothing while it's set. Escape, scroll and resize go through the samedismiss(), so a later click elsewhere no longer revives the toolbar after those either. A new drag, a double-click or Shift+Arrow changes the selection, so the toolbar comes back as before.New test: a press on chrome and on the viewport, then Escape followed by a click elsewhere, keep the toolbar hidden while the selection stays. Fails without the fix.
Verified on Windows 11 in Atlas Dev: a sidebar click and a gutter click dismiss and stay dismissed; Escape then a sidebar click stays dismissed; Shift+Arrow brings it back; Cite still works.
src/features/chat708 passed, fullbun run testin the pre-push hook.After a sidebar click, the selection is kept and the actions stay hidden:
Checklist
0.4.1)