-
Notifications
You must be signed in to change notification settings - Fork 0
🐛 Fixed reply form showing parent comment author's details #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: coderabbit_combined_20260121_qodo_grep_cursor_copilot_base__fixed_reply_form_showing_parent_comment_authors_details_pr220
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -241,7 +241,7 @@ const Form: React.FC<FormProps> = ({ | |||||||||||||||||||
| const [progress, setProgress] = useState<Progress>('default'); | ||||||||||||||||||||
| const formEl = useRef(null); | ||||||||||||||||||||
|
|
||||||||||||||||||||
| const memberName = member?.name ?? comment?.member?.name; | ||||||||||||||||||||
| const memberName = member?.name; | ||||||||||||||||||||
|
|
||||||||||||||||||||
| if (progress === 'sending' || (memberName && isAskingDetails)) { | ||||||||||||||||||||
| // Force open | ||||||||||||||||||||
|
|
@@ -261,8 +261,8 @@ const Form: React.FC<FormProps> = ({ | |||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
| // Disable editing if the member doesn't have a name or when we are submitting the form | ||||||||||||||||||||
| editor.setEditable(!!memberName && progress !== 'sending'); | ||||||||||||||||||||
| }, [editor, memberName, progress]); | ||||||||||||||||||||
| editor.setEditable(!!member?.expertise && progress !== 'sending'); | ||||||||||||||||||||
| }, [editor, member, progress]); | ||||||||||||||||||||
|
|
||||||||||||||||||||
| return ( | ||||||||||||||||||||
| <form | ||||||||||||||||||||
|
|
@@ -289,7 +289,6 @@ const Form: React.FC<FormProps> = ({ | |||||||||||||||||||
| }; | ||||||||||||||||||||
|
|
||||||||||||||||||||
| type FormWrapperProps = { | ||||||||||||||||||||
| comment?: Comment; | ||||||||||||||||||||
| editor: Editor | null; | ||||||||||||||||||||
| isOpen: boolean; | ||||||||||||||||||||
| reduced: boolean; | ||||||||||||||||||||
|
|
@@ -298,7 +297,6 @@ type FormWrapperProps = { | |||||||||||||||||||
| }; | ||||||||||||||||||||
|
|
||||||||||||||||||||
| const FormWrapper: React.FC<FormWrapperProps> = ({ | ||||||||||||||||||||
| comment, | ||||||||||||||||||||
| editor, | ||||||||||||||||||||
| isOpen, | ||||||||||||||||||||
| reduced, | ||||||||||||||||||||
|
|
@@ -307,12 +305,12 @@ const FormWrapper: React.FC<FormWrapperProps> = ({ | |||||||||||||||||||
| }) => { | ||||||||||||||||||||
| const {member, dispatchAction} = useAppContext(); | ||||||||||||||||||||
|
|
||||||||||||||||||||
| const memberName = member?.name ?? comment?.member?.name; | ||||||||||||||||||||
| const memberExpertise = member?.expertise ?? comment?.member?.expertise; | ||||||||||||||||||||
| const memberName = member?.name; | ||||||||||||||||||||
| const memberExpertise = member?.expertise; | ||||||||||||||||||||
|
|
||||||||||||||||||||
| let openStyles = ''; | ||||||||||||||||||||
| if (isOpen) { | ||||||||||||||||||||
| const isReplyToReply = !!openForm?.in_reply_to_snippet; | ||||||||||||||||||||
| const isReplyToReply = !!openForm.in_reply_to_snippet; | ||||||||||||||||||||
| openStyles = isReplyToReply ? 'pl-[1px] pt-[68px] sm:pl-[44px] sm:pt-[56px]' : 'pl-[1px] pt-[48px] sm:pl-[44px] sm:pt-[40px]'; | ||||||||||||||||||||
|
Comment on lines
311
to
314
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, let's read the file to understand the context around lines 311-314
wc -l apps/comments-ui/src/components/content/forms/form.tsxRepository: qodo-benchmark/Ghost-combined-coderabbit Length of output: 142 🏁 Script executed: # Read the relevant section and surrounding context
sed -n '290,330p' apps/comments-ui/src/components/content/forms/form.tsxRepository: qodo-benchmark/Ghost-combined-coderabbit Length of output: 1204 🏁 Script executed: # Find the component's prop definition to check if openForm is optional
rg -n "interface.*Props|type.*Props|openForm.*:" apps/comments-ui/src/components/content/forms/form.tsx -A 20 -B 2Repository: qodo-benchmark/Ghost-combined-coderabbit Length of output: 3881 🏁 Script executed: # Find all FormWrapper usages to verify the issue
rg -n "FormWrapper" apps/comments-ui/src --type=tsx -B 2 -A 5Repository: qodo-benchmark/Ghost-combined-coderabbit Length of output: 111 🏁 Script executed: # Also check if OpenCommentForm type definition shows required vs optional fields
rg -n "OpenCommentForm" apps/comments-ui/src --type=tsx -B 2 -A 10Repository: qodo-benchmark/Ghost-combined-coderabbit Length of output: 111 🏁 Script executed: # Find all FormWrapper usages
rg -n "FormWrapper" apps/comments-ui/src -B 2 -A 5Repository: qodo-benchmark/Ghost-combined-coderabbit Length of output: 6049 🏁 Script executed: # Find OpenCommentForm type definition
rg -n "OpenCommentForm" apps/comments-ui/src -B 2 -A 10Repository: qodo-benchmark/Ghost-combined-coderabbit Length of output: 17498 🏁 Script executed: # Let's examine the main-form.tsx file more closely to understand the isOpen state
cat -n apps/comments-ui/src/components/content/forms/main-form.tsxRepository: qodo-benchmark/Ghost-combined-coderabbit Length of output: 4629 Guard optional Proposed fix- const isReplyToReply = !!openForm.in_reply_to_snippet;
+ const isReplyToReply = !!openForm?.in_reply_to_snippet;📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
|
|
||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verify editor editability gating on expertise (could block users without expertise).
This now disables editing for members who haven’t set expertise. If expertise is optional, users may be unable to type. Also the comment above mentions “name,” so either the logic or comment is out of sync. Please confirm the intended requirement.
🔧 Suggested adjustment (if editability should depend on name as before)
📝 Committable suggestion
🤖 Prompt for AI Agents