You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
In progress comments are lost when updating after PR is merged #7556
Repository Clone Configuration (single repository/fork of an upstream repository): single repository
GitHub Product (GitHub.com/GitHub Enterprise version x.x.x): GitHub.com
Steps to Reproduce:
Start adding a review comment to a PR but don't save the comment.
Merge the PR.
When the PR state refreshes the comment field is closed and the comment is lost. However any pending submitted comments are still available and can be submitted.
On desktop, useReviewMode.merged defaults to false. When validateState sees the PR is merged, ReviewManager calls clear(true), which disposes ReviewCommentController (and the VS Code comment controller with it). That closes the file comment widget and drops any text that was only in the local input. Comments that were already part of a pending review on GitHub stay around, which matches what you described.
Before I open a PR, which direction do you prefer?
Warn before clearing if there are unsaved file-comment drafts
Auto-save those drafts into a pending review before clearing
Something else (e.g. keep the comment UI around briefly after merge)
Activity
alexr00 commentedon Aug 28, 2025
Is this in the comment widget which shows in a code file, or in the PR description webview?
diminutivesloop commentedon Aug 28, 2025
It happens with the file comment widget.
diptomistry commentedon Oct 6, 2026
I looked into this a bit.
On desktop,
useReviewMode.mergeddefaults to false. WhenvalidateStatesees the PR is merged,ReviewManagercallsclear(true), which disposesReviewCommentController(and the VS Code comment controller with it). That closes the file comment widget and drops any text that was only in the local input. Comments that were already part of a pending review on GitHub stay around, which matches what you described.Before I open a PR, which direction do you prefer?
Happy to implement whichever you want.
alexr00 commentedon Oct 8, 2026
Thanks for the investigation! Option 1: warn before clearing.
Warn before clearing review mode when unsaved comment drafts exist (m…