Conversation
…ields and every toolbar Follow-ups from the #1955 review: - Only a selection inside an attached file's viewer (.ib-view), or a selection toolbar showing, keeps the paste where it is. A word double-clicked in a thread message or on a choice's label comments on nothing, and used to turn the fix off, so the dictation was lost. - sight(): a field scrolled out of its pane (outside an ancestor that clips it) is off screen, and only the field or something inside it counts as the field on top; the pane that holds it no longer does. - Every [data-pn-annotation-toolbar-row] is checked, not only the first. Tests: an e2e (double-click a word in the message, then dictate: the words land in the reply box; fails on the #1955 build), and unit tests for a word selected outside a file view, a hidden toolbar before a showing one, and a field clipped out of its pane. Co-Authored-By: Claude <noreply@anthropic.com>
…an open comment box #1959 narrowed the selection guard to .ib-view, which left the guided review (.ib-viewer) out. A reviewer who left an inline guide comment open, selected other code, then dictated had the paste go into the earlier comment box; before #1959 it was blocked. ANNOTATABLE_VIEW is now '.ib-view, .ib-viewer'. The guide's diff lives in Pierre's shadow root, and headless Chromium and WebKit both report that selection on the document as collapsed, anchored at the shadow host's parent, while toString() still holds the words. So the guard now reads the words, not isCollapsed; the retargeted anchor sits inside .ib-viewer and is found by closest(). Checked in headless Chromium and WebKit with the bundled module: before, the paste went to the comment box; now focus stays put. Unit test added (fails on the previous module). Co-Authored-By: Claude <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.
Follow-up to #1955, with the reviewer's three non-blocking points.
1. A selected word no longer turns the fix off.
pageSelectionused to respect any browser selection on the page. A word double-clicked in a thread message, or a choice's label, selects it, so the next dictated ⌘V was left alone and lost. Now only these keep the paste where it is: a selection inside an attached file's viewer (.ib-view, where it can be commented on), or a selection toolbar showing.2.
sight(): a field clipped out of its pane is off screen. A field scrolled out of its pane but still inside the window used to hit the pane that holds it, andhit.contains(field)counted that as on top. Now an ancestor whose overflow clips the field is checked (clippedOut), and only the field or something inside it counts as the hit.3. Every
[data-pn-annotation-toolbar-row]is checked, not just the first, so a hidden toolbar earlier in the DOM no longer hides a showing one.Tests
tests/e2e/inbox-dictation-paste.spec.ts: double-click a word in the agent's message, then dictate; the words land in the reply box. It fails on the Inbox: dictated (pasted) text no longer goes missing in the reply box #1955 build (Received: "Reading first. ") and passes here.packages/inbox/pasteTarget.test.ts:The three new tests fail against the Inbox: dictated (pasted) text no longer goes missing in the reply box #1955 module. The selection is now cleared between tests.
Results
DOM_TESTS=1 bun test --isolate packages/inboxpasses (543).