Skip to content

Fix text selection in tool call blocks - #53

Merged
wesm merged 3 commits into
kenn-io:mainfrom
mariusvniekerk:tool-select
Feb 26, 2026
Merged

Fix text selection in tool call blocks#53
wesm merged 3 commits into
kenn-io:mainfrom
mariusvniekerk:tool-select

Conversation

@mariusvniekerk

Copy link
Copy Markdown
Collaborator

Summary

  • Allow text selection inside tool call blocks by adding user-select: text to tool header buttons and skipping click handlers when a text selection exists
  • Prevents the virtual-row onclick (ordinal selection) and tool header onclick (collapse toggle) from firing when user is selecting text
  • Adds Playwright E2E regression tests for tool block expansion and text selection behavior

Test plan

  • Playwright E2E tests pass (29/29)
  • Manually verify text can be selected and copied inside expanded tool call blocks
  • Verify tool blocks still expand/collapse on plain click

🤖 Generated with Claude Code

mariusvniekerk and others added 3 commits February 26, 2026 02:21
The virtual-row onclick handler and ToolBlock button were consuming
clicks needed for text selection. Skip selectOrdinal and collapse
toggle when a text selection exists, and add user-select: text to the
tool header button so browsers allow drag-to-select.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds two Playwright tests:
- Verifies tool blocks expand on click and have user-select enabled
- Verifies text selection suppresses collapse/expand toggle

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@roborev-ci

roborev-ci Bot commented Feb 26, 2026

Copy link
Copy Markdown

roborev: Combined Review (8d2f29f)

Summary Verdict: All reviewers agree the code is clean, with no medium, high, or critical issues found.


Synthesized from 4 reviews (agents: codex, gemini | types: default, security)

@wesm
wesm merged commit 5957b73 into kenn-io:main Feb 26, 2026
6 checks passed
cursor Bot pushed a commit to diazMelgarejo/periscope that referenced this pull request Jun 1, 2026
## Summary
- Allow text selection inside tool call blocks by adding `user-select:
text` to tool header buttons and skipping click handlers when a text
selection exists
- Prevents the virtual-row onclick (ordinal selection) and tool header
onclick (collapse toggle) from firing when user is selecting text
- Adds Playwright E2E regression tests for tool block expansion and text
selection behavior

## Test plan
- [x] Playwright E2E tests pass (29/29)
- [ ] Manually verify text can be selected and copied inside expanded
tool call blocks
- [ ] Verify tool blocks still expand/collapse on plain click

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants