Skip to content

feat: add context menu support for editable fields#1870

Merged
jonathanlab merged 1 commit into
mainfrom
add-right-click-functionality-to-chat-box
Apr 23, 2026
Merged

feat: add context menu support for editable fields#1870
jonathanlab merged 1 commit into
mainfrom
add-right-click-functionality-to-chat-box

Conversation

@jonathanlab
Copy link
Copy Markdown
Contributor

now you can right click > paste


Created with PostHog Code

Generated-By: PostHog Code
Task-Id: b318a92e-0eeb-4cd9-8602-e64a1ee35c09
@jonathanlab jonathanlab enabled auto-merge (squash) April 23, 2026 15:30
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 23, 2026

Prompt To Fix All With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/message-editor/components/PromptInput.tsx
Line: 277-279

Comment:
**stopPropagation applied to entire InputGroup, not just the editor**

`handleContextMenu` unconditionally stops propagation on the `InputGroup` wrapper, which also encloses the send button and the `AttachmentsBar`. Right-clicking those sub-elements will suppress the Radix context menu without triggering the Electron native menu either (since `params.isEditable` will be `false` for a button/non-editable area), leaving the user with no context menu at all. This matches the pattern used by `SessionView`'s handler — which only stops propagation when the target is actually an editable element — so aligning the two would be more consistent.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "feat: add context menu support for edita..." | Re-trigger Greptile

Comment on lines 277 to 279
onClick={handleContainerClick}
onContextMenu={handleContextMenu}
className={`h-auto bg-card ${isBashMode ? "ring-1 ring-blue-9" : ""}`}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 stopPropagation applied to entire InputGroup, not just the editor

handleContextMenu unconditionally stops propagation on the InputGroup wrapper, which also encloses the send button and the AttachmentsBar. Right-clicking those sub-elements will suppress the Radix context menu without triggering the Electron native menu either (since params.isEditable will be false for a button/non-editable area), leaving the user with no context menu at all. This matches the pattern used by SessionView's handler — which only stops propagation when the target is actually an editable element — so aligning the two would be more consistent.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/message-editor/components/PromptInput.tsx
Line: 277-279

Comment:
**stopPropagation applied to entire InputGroup, not just the editor**

`handleContextMenu` unconditionally stops propagation on the `InputGroup` wrapper, which also encloses the send button and the `AttachmentsBar`. Right-clicking those sub-elements will suppress the Radix context menu without triggering the Electron native menu either (since `params.isEditable` will be `false` for a button/non-editable area), leaving the user with no context menu at all. This matches the pattern used by `SessionView`'s handler — which only stops propagation when the target is actually an editable element — so aligning the two would be more consistent.

How can I resolve this? If you propose a fix, please make it concise.

@jonathanlab jonathanlab merged commit f0c45a0 into main Apr 23, 2026
15 checks passed
@jonathanlab jonathanlab deleted the add-right-click-functionality-to-chat-box branch April 23, 2026 15:40
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