Skip to content

Allow selecting text in the query Messages output#74

Merged
GordonBeeming merged 2 commits into
mainfrom
gb/messages-selectable
Jun 30, 2026
Merged

Allow selecting text in the query Messages output#74
GordonBeeming merged 2 commits into
mainfrom
gb/messages-selectable

Conversation

@GordonBeeming

Copy link
Copy Markdown
Owner

Summary

  • The app sets user-select: none on body (desktop chrome feel) and only input/textarea/pre opt back in, so the Messages tab's error/print text couldn't be selected or copied.
  • Added select-text to the Messages container so its subtree re-enables text selection. The results grid keeps its own cell-selection and copy behaviour.

Test plan

  • npx tsc --noEmit clean
  • npm run build clean
  • Run a query that errors/prints → Messages tab text is selectable and Cmd+C copies it; results grid cell selection unaffected

The app sets user-select: none on body for a desktop feel, and only inputs/
textarea/pre opt back in, so the Messages tab's error/print text couldn't be
selected or copied. Add `select-text` to the Messages container to re-enable
selection for that subtree. The results grid keeps its own cell-selection and
copy behaviour.

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: GitButler <gitbutler@gitbutler.com>
@GordonBeeming GordonBeeming marked this pull request as ready for review June 30, 2026 13:48
Copilot AI review requested due to automatic review settings June 30, 2026 13:48

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds the select-text class to the messages container in QueryResultsTable.tsx to allow users to select and copy message/error text. The reviewer pointed out that using a single-line comment (//) inside parenthesized JSX expressions is risky and suggested replacing it with a standard JSX comment ({/* ... */}) inside the div to avoid potential syntax errors during future refactoring.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/features/query/components/QueryResultsTable.tsx Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restores standard text selection/copy behavior specifically for the Query “Messages” output area, while keeping the rest of the app’s desktop-like user-select: none behavior intact.

Changes:

  • Added Tailwind’s select-text utility to the Messages container so message/error text can be selected and copied.
  • Added an inline explanatory comment near the Messages container.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/features/query/components/QueryResultsTable.tsx Outdated
Address review feedback: the explanatory comment was a // line comment in JSX
expression position, which a formatter could merge into the element and comment
it out. Fold it into the existing {/* Messages */} JSX comment, matching the
file's comment style.

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: GitButler <gitbutler@gitbutler.com>
@GordonBeeming GordonBeeming merged commit 80ef4ef into main Jun 30, 2026
4 checks passed
@GordonBeeming GordonBeeming deleted the gb/messages-selectable branch June 30, 2026 14:25
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.

2 participants