Conversation
diffle lets a reviewer comment on any tree file, but a GitHub review comment on an unchanged file is accepted by the API and then shown nowhere: the Files tab only renders the pull request's diff, so the comment silently vanishes. Reported on #160 for file threads and line threads alike. The exporter now leaves such threads out with the reason `outside the diff`, which the client's skip toast and the all-skipped 400 already surface, and the comment card disables its GitHub button on those threads with a title saying why. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01APKj1AFTW3wEnoeL4VnnhX
Two more ways a thread reached GitHub and went nowhere, reported on #169: - The panel's "All" button posted every open thread, so threads on unchanged files were only caught by the server's skip. It now counts them out up front: its title says how many will be skipped, it is disabled when nothing would show on GitHub, and each such row carries an "outside the diff" mark while export is on. - A line thread on a changed file but beyond GitHub's three lines of context, placed after expanding the diff or with a wider --context, drew a 422 from the API. The exporter now checks each line thread against the file's patch with GitHub's own context, provided by the session, and skips it as "outside the diff hunks". A failing gh call also used to surface only the first stderr line, which for a 422 is just the status. The full stderr and response body now go to the server's stderr, and the toast carries every stderr line. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01APKj1AFTW3wEnoeL4VnnhX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub accepts review comments on unchanged files but never displays them, causing reviewers to lose those comments. This change prevents posting threads on files outside the PR's diff and provides clear feedback to users.
Changes
ChangedFiletype to represent files in the PR diff; updatedExportInputto requiresnap.changedbuildReview()to accept achangedset of file paths and skip threads anchored outside the diff with reason'outside the diff'inDiffcheck inCommentCardto disable the GitHub export button for threads on unchanged files, with a tooltip explaining whyCHANGEDset,changedFile()helper,snapshotOf()helper) to support diff-aware testingbuildReview()calls to pass thechangedparameterImplementation details
buildReview()now filters threads by checkingchanged.has(t.anchor.path)before including themsnapshot.changedfrom store state to determine if a thread's file is in the diffhttps://claude.ai/code/session_01APKj1AFTW3wEnoeL4VnnhX