Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 10, 2025

  • Understand the current implementation of "Show Changes Since Last Review"
  • Modify GraphQL query to exclude PENDING reviews
  • Update TypeScript types for the new query response
  • Update getViewerLatestReviewCommit method to use submitted reviews only
  • Update test builder for the new structure
  • Fix test builder compilation errors
  • Fix GraphQL query to get latest review using 'last: 1'
  • Verify linting and hygiene checks pass
  • Code review completed - no issues found
  • Security scan completed - no vulnerabilities found
  • Reverted unintentional API proposal changes

Summary

Successfully fixed "Show Changes Since Last Review" to only consider submitted reviews (APPROVED, CHANGES_REQUESTED, COMMENTED, DISMISSED), excluding PENDING reviews.

Changes:

  • Modified GraphQL LatestReviewCommit query to use reviews field with state filtering
  • Updated to use last: 1 to get the most recent submitted review
  • Added author parameter to filter by current user
  • Updated TypeScript interfaces and test builders
  • Removed accidental API proposal changes

Security Summary

No security vulnerabilities detected by CodeQL analysis.

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 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
isComplete?: boolean;
toolSpecificData?: ChatTerminalToolInvocationData;
fromSubAgent?: boolean;
presentation?: 'hidden' | 'hiddenAfterComplete' | undefined;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Undo api proposal changes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Reverted the API proposal changes in commit 4771be8.

Copilot AI requested a review from alexr00 December 17, 2025 14:49
@alexr00 alexr00 marked this pull request as ready for review December 17, 2025 15:15
@alexr00 alexr00 enabled auto-merge (squash) December 17, 2025 15:15
@vs-code-engineering vs-code-engineering bot added this to the December / January 2026 milestone Dec 17, 2025
@alexr00 alexr00 merged commit 0f1dd96 into main Dec 17, 2025
6 checks passed
@alexr00 alexr00 deleted the copilot/fix-show-changes-since-last-review branch December 17, 2025 15:52
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"

3 participants