microsoft / microsoft/vscode-pull-request-github

Lost, overridden or misplaced pending comments

未关闭
#6,950 3 条评论 3 个 reaction 已指派 1 人 在 GitHub 查看

@alexr00 已经在做这个了。

开始于 2025年12月10日。

bug
主要语言
TypeScript
星标
2.6k
派生
796
平均合并
1 天 4 小时
30 天内合并 PR
46

描述

This heisenbug seems to appear when trying to add comments to pull request before it is submitted (PR review in pending state).

Sometimes when I am writing a series of comments in a PR one of the following happens:

  • comment contents are swapped/overridden or moved around in the file, for example when I add a comment to line 12 and 16, seemingly, unbeknownst to me, the comment 12 and 16 swap contents, 16 overrides 12 and duplicates the content or the comment moves around
  • comments are lost completely and don't synchronize properly (this can be seen when opening the comment, clicking "more" three dots and being unable to click "edit comment", because it's disabled along with the 3 other last options)
  • A comment is completely lost from a file (e.g. when I added it in VSCode, but it's not visible on github and later completely missing).
  • A comment moves from one file to another. For example It's added to the file A, and after a while appears in a place of another comment I tried adding later in file B.
  • When writing a series of comments (still pending to publish a review!), and when in the meantime a coworker makes edits to some files, some comments are lost, moved around to random lines, between files and some of them get duplicated.

Unfortunately I don't have much details, but I believe it occurs repeatedly when the sync of the comment to the repository is not immediate, and they get added in a random order messing everything up.

This also looks like a mix of issues between both VSCode PR extension and poor PR comment API on github side.

  • Extension version: 0.110.0
  • VSCode Version: 1.100.0
  • OS: Linux x64 6.11.0-25-generic
  • Repository Clone Configuration (single repository/fork of an upstream repository): single repository on enterprise hosted github.
  • Github Product (Github.com/Github Enterprise version x.x.x): Github Enterprise, probably 3.16.1

Steps to Reproduce:

Unfortunately, I didn't find a reliable way to reproduce. I propose adding artificial delay to sync comments for testing and making interleaved comment changes, edits and commits while some comments already exist and some are yet to be written. Preferably from another source as well (a coworker or another editor)

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。