Change:
I only found an issue about deleted files microsoft/vscode-pull-request-github. Can't say this is unrelated, can't say this is the same. Extension version: v0.50.0 VSCode Version: 1.72.0 OS: Debian 11.5 Steps to Reproduce: a pull request that removes code the pull request in VSCode, and view the file with deleted lines to add a comment on a deleted line in diff-view, you can't. The "plus" sign doesn't show to add a comment on deleted lines. worse, if someone does it on github and adds a comment, it's not possible to view them properly on VSCode, and basically VSCode shows an empty file with the comment
Where are you opening the file from? Do you have the pull request checked out? If you see this with a pull request in a public repo, can you share a link to the pull request?
Thank you for taking a look at this issue. I honestly don't understand why more info is needed. I'm wondering whether you zero issues on your part? I don't know. Regardless, I created a test project for this: And there's a PR where I removed a line. I checked out the PR in VSCode: Observation No.1: If you go to the left and click on "Github Pull Request", you'll see the file that's been modified in the PR. Click on it, and you won't see the comment appearing besides the line number (which is usually the case when you add comments on lines). Observation No. 2: You can't add a comment over the old line number 3 (the red one), even though it's possible on github (which is what I did in github, and it's not viewable in VSCode). You can add a comment on the green line (which is normal behavior on both github and VSCode). Observation No. 3: If you go to the comments section at the bottom, and click on the comment (as shown in this screenshot: ), a mess will happen. I was able to see the comment once on a temporary page and I didn't understand what happened, but then ever since, I see the mess you see in the screenshot. Basically, anything you try to do with deleted lines is a mess. Trying to add comments on them in VSCode doesn't work. Reading comments from them that were on github doesn't work. All the best.
I you to that repo.
Correct, I no issues leaving and viewing comments on deleted lines. Thank you for the example repo, I'm looking into it.
Btw, the same issue also exists for a deleted file. So, a comment on a deleted file also doesn't show up in VSCode. This just happened with me today.
Thank you for all the details! With your screen shot I can see what the problem is. The comments widget doesn't work at all on deleted lines with the inline diff editor. Setting the following setting will get this working for you: . This is a nasty bug in VS Code, which I plan to fix in November.
I've completely disabled commenting for the left hand side of the diff editor when . Commenting is only supported when side by side is enabled.
OMG... why would you do that? Now I can't review anymore! I don't use side-by-side ever... now I'm wishing I never reported this bug!
Just to be clear, with all due respect. This isn't a solution, and I would appreciate you reverting whatever you did. Believe me, no one appreciates this. So previously I could comment on non-deleted lines, now I can't at all, unless I split the screen in a way that isn't convenient for my setup. I'm sorry but if I'm getting this right, then the least I can call this is crazy and if someone in my team does that they would be in trouble (no offense, I'm just being 100% honest), and I will assure you other issue(s) will be opened about this. Please just revert the changes that have been done in the name of making an incomplete fix and an imperfect perfection, and postpone fixing the issue until you can fix it properly. I really thank you for the great work you're doing, but this is crossing the line. Apologies for being harsh, but I'm shocked.
commenting is only disabled on the left hand side of the diff editor when using inline diffs. You can still comment on the right side.
Perhaps there's a misunderstanding. As long as I don't have to use split screen diff side by side view to be able to comment, then all good. Thanks again.
Verified that you can no longer add comments for deleted lines in the inline diff view. But found

Discussion:
import { ICursorSelectionChangedEvent } from 'vs/editor/common/cursorEvents'; import { CommentsPanel } from 'vs/workbench/contrib/comments/browser/commentsView'; import { withNullAsUndefined, withUndefinedAsNull } from 'vs/base/common/types'; <ins> import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; import { EditorInput } from 'vs/workbench/common/editor/editorInput'; import { URI } from 'vs/base/common/uri'; </ins> export const ID = 'editor.contrib.review';

@IQuickInputService private readonly quickInputService: IQuickInputService, @IViewsService private readonly viewsService: IViewsService, @IConfigurationService private readonly configurationService: IConfigurationService, <del> @IContextKeyService readonly contextKeyService: IContextKeyService </del> <ins> @IContextKeyService readonly contextKeyService: IContextKeyService, @IEditorService private readonly editorService: IEditorService </ins> ) { this._commentInfos = []; this._commentWidgets = [];

this._activeCursorHasCommentingRange.set(hasCommentingRange); } <ins> private isEditorInlineOriginal(editorURI: URI | undefined, activeEditor: EditorInput | undefined): activeEditor is DiffEditorInput { if (editorURI && activeEditor instanceof DiffEditorInput && !this.configurationService.getValue('diffEditor.renderSideBySide')) { return activeEditor.original.resource?.toString() === editorURI.toString(); } return false; } </ins> private beginCompute(): Promise<void> { this._computePromise = createCancelablePromise(token => { const editorURI = this.editor && this.editor.hasModel() && this.editor.getModel().uri;

if (!this.editor) { return; } <ins> const activeEditor = this.editorService.activeEditor; if (this.isEditorInlineOriginal(this.editor.getModel()?.uri, activeEditor)) { return; } </ins> const zoneWidget = this.instantiationService.createInstance(ReviewZoneWidget, this.editor, owner, thread, pendingComment); zoneWidget.display(thread.range.endLineNumber); this._commentWidgets.push(zoneWidget);