You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(azure-devops): deleted files appear in the pull request Code tab - #37745
Deleted files are missing from an Azure DevOps pull request's Code tab and changed-file count. Azure can return a deletion with item.path: null, naming the file only in originalPath or sourceServerItem; the decoder discarded these entries.
Change
For deletes without item.path, use sourceServerItem or originalPath. Clear the deleted file's head blob id so viewed marks use the empty revision, while preserving the original blob id for the deleted contents. Keep the existing folder, non-blob and missing-path filters.
The existing blob-batch and per-file diff paths already handle deletions; they now receive the missing entries.
Scope
A small, obvious bug first documented during #35295; no separate issue is needed. Changes are limited to the Azure DevOps decoder and two existing regression tests. No client, contract, dependency or authentication changes.
Verification
In packages/source-control-azure-devops, vp test run: passed, 154 tests across 9 files.
In the same package, vp run typecheck: passed with effect-tsgo; no errors.
At the root, vp run check:changed: passed formatting, lint, both knip checks, affected-package typechecks and focused tests.
With only the decoder temporarily restored from origin/main, vp test run src\server\azureDevOpsPullRequestJson.test.ts src\server\AzureDevOpsPullRequestProvider.test.ts: failed in exactly the two affected regression cases. Restoring the fix returned all 154 package tests to green.
A disposable draft Azure DevOps PR added, edited, renamed and deleted synthetic files. With main's decoder, the real Code tab showed 3 files and omitted the deletion. With the fix, it showed all 4 files and both merge-base lines as deletions. The deleted file's viewed mark persisted at the empty revision, survived reload and could be cleared.
Before: deletion missing
After: full deletion visible
Verified by GPT-6.1 Sol using GitHub Copilot through the acpRegistry harness in T3 Code.
Azure DevOps lists a deleted file with no item path and names it only in
originalPath or sourceServerItem, so the change list dropped every delete.
Take a delete's path from those fields and drop its objectId, so the Code
tab, file counts and viewed marks see the file as deleted.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reviewing files that changed from the base of the PR and between 11215be and 3bb6d4a.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The Azure DevOps iteration-change decoder now resolves deleted entries without an item path from source path fields and sets their object IDs to null. Tests cover the decoded entries and verify the generated patch for a deleted file.
pingdotgg/t3code#7721: Adds Azure DevOps pull request diff support and per-file viewed marks that use file revision object IDs.
Suggested labels:bugfix
Suggested reviewers:yordis, macroscopeapp
Merge Risk: Minimal · previous review 11215
Deleted files in Azure DevOps pull requests should now appear in the Code tab and in the changed-file count. The change is narrow and reversible, and no merge-blocking risk remains.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: deleted files in Azure DevOps pull requests now appear in the Code tab. The raw summary and objectives confirm the decoder now resolves paths for deletions that lack i…
Description check
The description follows the template. It has Problem, Change, Scope, and Verification sections, and each is filled in. The Problem section states the bug and its cause. The Change section explains the…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: deleted files in Azure DevOps pull requests now appear in the Code tab. The raw summary and objectives confirm the decoder now resolves paths for deletions that lack item.path, so the title matches the changeset. It uses the conventional commit format with a clear scope.
Full details: Description check
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections, and each is filled in. The Problem section states the bug and its cause. The Change section explains the decoder fix and the blob id handling. The Scope section says why no issue is needed and lists the files touched. The Verification section lists the package test run, typecheck, root check, a regression check with the decoder reverted, and a manual draft PR test with screenshots. The template comments remain in place, and the Problem section has no explicit reproduction steps beyond the Azure payload shape. The check passes because the description is mostly complete.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
The provider test re-decoded JSON to cover the same case the decoder test
already catches; the getDiff path it asserted is unchanged by the fix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Environment: real Chromium web client, 1280×800, light theme, separate fresh T3 homes, real Azure DevOps API and synthetic files.
Created a draft PR with one addition, edit, rename and deletion. Azure returned four entries, including a deletion with originalPath=/gone.txt and item.path=null. Opened the same PR's Code tab on both commits. On head, expanded the deletion, marked it viewed, reloaded, cleared the mark, and reloaded again; writes were acknowledged before reload.
Proven: scenarios:prove exited 0. Base omits gone.txt and reports 3 files. Head reports 4 files, displays both removed lines, preserves the viewed mark after reload, and preserves its cleared state after another reload.
The live Azure response used originalPath with item.path=null; it did not produce sourceServerItem or a supplied deletion head objectId, so those decoder variants were not demonstrated in the app.
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
size:S10-29 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
2 participants
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.
Problem
Deleted files are missing from an Azure DevOps pull request's Code tab and changed-file count. Azure can return a deletion with
item.path: null, naming the file only inoriginalPathorsourceServerItem; the decoder discarded these entries.Change
For deletes without
item.path, usesourceServerItemororiginalPath. Clear the deleted file's head blob id so viewed marks use the empty revision, while preserving the original blob id for the deleted contents. Keep the existing folder, non-blob and missing-path filters.The existing blob-batch and per-file diff paths already handle deletions; they now receive the missing entries.
Scope
A small, obvious bug first documented during #35295; no separate issue is needed. Changes are limited to the Azure DevOps decoder and two existing regression tests. No client, contract, dependency or authentication changes.
Verification
packages/source-control-azure-devops,vp test run: passed, 154 tests across 9 files.vp run typecheck: passed with effect-tsgo; no errors.vp run check:changed: passed formatting, lint, both knip checks, affected-package typechecks and focused tests.origin/main,vp test run src\server\azureDevOpsPullRequestJson.test.ts src\server\AzureDevOpsPullRequestProvider.test.ts: failed in exactly the two affected regression cases. Restoring the fix returned all 154 package tests to green.Verified by GPT-6.1 Sol using GitHub Copilot through the acpRegistry harness in T3 Code.