Cmd+Enter on a single inbox report opens Create PR dialog#1892
Merged
Conversation
Mirrors the existing Create PR run-action button so the keyboard shortcut and the click target stay in sync. Generated-By: PostHog Code Task-Id: 35931fe5-864a-4502-89a5-b0a98c8e7f21
Generated-By: PostHog Code Task-Id: c5674c04-c95c-4bfe-bfcf-248a921b4aae
jonathanlab
approved these changes
May 19, 2026
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
apps/code/src/renderer/features/inbox/components/detail/ReportDetailPane.tsx:303
The `[contenteditable='true']` selector only matches elements that explicitly set `contenteditable="true"`. Many rich-text editors (ProseMirror, CodeMirror, Slate, Tiptap) set the attribute as `contenteditable` (bare attribute) or `contenteditable=""`, which HTML treats as true but the CSS attribute selector `[contenteditable='true']` won't match. If any future dialog renders such an editor, Cmd+Enter would fire the task-creation shortcut unexpectedly.
```suggestion
target?.closest("input, select, textarea, [contenteditable]:not([contenteditable='false'])")
```
Reviews (1): Last reviewed commit: "resolve merge: port cmd+enter handler to..." | Re-trigger Greptile |
| } | ||
| const target = e.target as HTMLElement | null; | ||
| if ( | ||
| target?.closest("input, select, textarea, [contenteditable='true']") |
Contributor
There was a problem hiding this comment.
The
[contenteditable='true'] selector only matches elements that explicitly set contenteditable="true". Many rich-text editors (ProseMirror, CodeMirror, Slate, Tiptap) set the attribute as contenteditable (bare attribute) or contenteditable="", which HTML treats as true but the CSS attribute selector [contenteditable='true'] won't match. If any future dialog renders such an editor, Cmd+Enter would fire the task-creation shortcut unexpectedly.
Suggested change
| target?.closest("input, select, textarea, [contenteditable='true']") | |
| target?.closest("input, select, textarea, [contenteditable]:not([contenteditable='false'])") |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/inbox/components/detail/ReportDetailPane.tsx
Line: 303
Comment:
The `[contenteditable='true']` selector only matches elements that explicitly set `contenteditable="true"`. Many rich-text editors (ProseMirror, CodeMirror, Slate, Tiptap) set the attribute as `contenteditable` (bare attribute) or `contenteditable=""`, which HTML treats as true but the CSS attribute selector `[contenteditable='true']` won't match. If any future dialog renders such an editor, Cmd+Enter would fire the task-creation shortcut unexpectedly.
```suggestion
target?.closest("input, select, textarea, [contenteditable]:not([contenteditable='false'])")
```
How can I resolve this? If you propose a fix, please make it concise.Generated-By: PostHog Code Task-Id: c5674c04-c95c-4bfe-bfcf-248a921b4aae
Generated-By: PostHog Code Task-Id: c5674c04-c95c-4bfe-bfcf-248a921b4aae
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.
Summary
ReportDetailPanethat fires the samehandleOpenCloudConfirmcallback as the inline "Create PR" button.canCreateImplementationPr).Test plan
Created with PostHog Code