Skip to content

fix(chat): selection actions stay dismissed after a click on app chrome - #386

Merged
emirhanyesilgul merged 1 commit into
pacifio:0.4.1from
emirhanyesilgul:emirhanyesilgul/selection-actions-stay-dismissed
Oct 7, 2026
Merged

emirhanyesilgul merged 1 commit into
pacifio:0.4.1from
emirhanyesilgul:emirhanyesilgul/selection-actions-stay-dismissed

Conversation

@emirhanyesilgul

@emirhanyesilgul emirhanyesilgul commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

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. pointerdown dismissed the toolbar, then pointerup re-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, selectionchange clears it, and readSelection does nothing while it's set. Escape, scroll and resize go through the same dismiss(), 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/chat 708 passed, full bun run test in the pre-push hook.

After a sidebar click, the selection is kept and the actions stay hidden:

After a sidebar click: selection kept, no actions

Checklist

  • Targets the current version branch (0.4.1)
  • New behaviour has a test; a bug fix has a test that fails without it
  • You've run the app and used the change in a window

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ee1e2665-a9f1-4e56-8a02-a82452011178

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

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
emirhanyesilgul force-pushed the emirhanyesilgul/selection-actions-stay-dismissed branch from 72306f4 to 3779f20 Compare October 7, 2026 21:06
@emirhanyesilgul
emirhanyesilgul merged commit 65fea45 into pacifio:0.4.1 Oct 7, 2026
9 checks passed
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