Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 10, 2025

"Show Changes Since Last Review" was treating pending (not-yet-submitted) reviews as the reference point, causing the diff to reset when new commits arrived during an active review.

Changes

GraphQL Query (queriesShared.gql):

  • Changed from viewerLatestReview to reviews(last: 1, author: $author, states: [APPROVED, CHANGES_REQUESTED, COMMENTED, DISMISSED])
  • Explicitly excludes PENDING state

Implementation (pullRequestModel.ts):

  • Added author parameter (current user login) to query variables
  • Updated response parsing to access reviews.nodes[0] instead of viewerLatestReview

Types & Tests (graphql.ts, latestReviewCommitBuilder.ts):

  • Updated LatestReviewCommitResponse interface to reflect new query structure
  • Updated test builder to match new response shape

The fix ensures only submitted reviews are considered when computing diffs since last review.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • update.code.visualstudio.com
    • Triggering command: /opt/hostedtoolcache/node/20.19.6/x64/bin/node node ./out/src/test/runTests.js --grep getViewerLatestReviewCommit -git�� it s-errors/type.d.ts ndor/bin/sh it s/sourcemap-segm-c /opt/hostedtoolcgit diff --cached --name-only grep -l submodules | head -n 10 ./node_modules/memfs/lib/node/types/promises.d.ts tnet/tools/git it les/@jridgewell/-ne tnet/tools/grep grep (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Show Changes Since Last Review should not consider pending reviews as "Last Review"</issue_title>
<issue_description>- Extension version: 0.96.0

  • VSCode Version: 1.93.0
  • OS: Windows_NT x64 10.0.22621
  • 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. Submit a review on a PR
  2. Add new commits to PR
  3. Use the "Show Changes Since Last Review" button to begin reviewing latest changes
  4. Begin a review
  5. Add another new commit to the PR
  6. Pull the new changes into the review

Expected Behavior:
The union of the commits added in 2. and 5. should now be visible. Those commits represent the changes "since the last review".

Actual Behavior:
Upon pulling the new changes, only the commits from 5. are visible. The pending review is considered the "last review", even though it was never submitted. In my case, the new changes were pulled automatically while I was in the midst of a review, and the change list reset to the most recent commit, with no way to go back to the state of the code I was in the middle of reviewing.

Proposal:

  • Only consider submitted reviews for the "Show Changes Since Last Review" functionality.
  • Support selecting a set of commits and view changes to files from those commits (similar to GitHub.com functionality), so that I can manually get back to reviewing changes since a point in time.</issue_description>

<agent_instructions>Only consider the last submitted review when choosing the "last review"</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits December 10, 2025 11:29
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix handling of last review in changes display Exclude pending reviews from "Show Changes Since Last Review" Dec 10, 2025
Copilot AI requested a review from alexr00 December 10, 2025 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show Changes Since Last Review should not consider pending reviews as "Last Review"

2 participants