Repository navigation
fix(web): Cite shows for text selected by touch - #81
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Thanks for tackling the missing Cite action for touch selections and adding a focused browser regression test. OverviewSummaryThis change lets touch selections settle after long-press cancellation events and selection-handle adjustments, rather than relying on the desktop mouse-release path. It also documents the behavior in an ADR. I recommend fixing the explicit-dismissal regression before merging. Good points🟢 The browser test in Main Issues⚫️ [PROBLEM] |
|
Thanks for the follow-up, @Fryuni. This addresses the explicit-dismissal issue from the previous review. OverviewSummaryClearing I recommend merging this follow-up; no new blocking issues found in this push. I verified the code and test assertions, but did not execute the tests. Good points🟢 The regression test establishes an initial selection callback before checking that Escape, scrolling, and another selection-change notification produce no further callback, with timers advanced to flush scheduled work ( Main IssuesNone identified in this follow-up. |
Selecting assistant text in a mobile browser (seen on Chrome for Android) never showed the Cite button. A touch long-press fires
contextmenuandpointercancel, which both dismissed the selection action. The selection handles fire no pointer events afterwards, so themouseupthat shows the action on desktop never arrived.observeSelectionActionsnow remembers whether the last primary pointer was touch. For touch, it ignorescontextmenu, does not dismiss onpointercancel, and shows the action onceselectionchangeor scrolling has settled for 150 ms. Mouse and pen behaviour is unchanged. Recorded in ADR 0026.Verification
apps/web/src/lib/selectionActions.browser.test.tsreplays the long-press sequence (touchpointerdown,contextmenu,pointercancel, then a selection). It fails onmainand passes with the fix.vp run check:changedpasses.Done by Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code