Skip to content

In progress comments are lost when updating after PR is merged #7556

Closed

Description

  • Extension version: 0.116.0
  • VSCode Version: 1.103.0
  • OS: Darwin arm64 24.5.0
  • 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:

  1. Start adding a review comment to a PR but don't save the comment.
  2. 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.

Activity

  1. alexr00 commented on Aug 28, 2025

    @alexr00
    Member

    Is this in the comment widget which shows in a code file, or in the PR description webview?

  2. diminutivesloop commented on Aug 28, 2025

    @diminutivesloop
    Author

    Is this in the comment widget which shows in a code file, or in the PR description webview?

    It happens with the file comment widget.

  3. added
    bugIssue identified by VS Code Team member as probable bug
    and removed
    info-neededIssue requires more information from poster
    on Dec 11, 2025
  4. diptomistry commented on Oct 6, 2026

    @diptomistry
    Contributor

    I looked into this a bit.

    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?

    1. Warn before clearing if there are unsaved file-comment drafts
    2. Auto-save those drafts into a pending review before clearing
    3. Something else (e.g. keep the comment UI around briefly after merge)

    Happy to implement whichever you want.

  5. alexr00 commented on Oct 8, 2026

    @alexr00
    Member

    Thanks for the investigation! Option 1: warn before clearing.

  6. added a commit that references this issue on Oct 29, 2026
    fc58859
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions