Skip to content

Changes in Pull Request tree becomes empty after auto-reveal fails to resolve the Files node #8845

Description

@Eiji-Kudo
  • Extension version: 0.156.0
  • VSCode Version: 1.128.1 (5264f2156cbcd7aea5fd004d29eaa10209155d66)
  • OS: macOS 15.6 (arm64)
  • Repository Clone Configuration: Multi-root workspace containing several independent GitHub.com repository clones
  • GitHub Product: GitHub.com

Description

The Changes in Pull Request tree occasionally becomes completely empty while reviewing a checked-out pull request. The diff editor remains open and usable, but no nodes are rendered in the tree.

Running Developer: Reload Window restores the tree. The failure occurred twice in the same session.

Steps to Reproduce

I do not yet have a fully deterministic reproduction, but both observed failures followed this sequence:

  1. Open a multi-root workspace and check out a branch associated with a pull request.
  2. Open a changed file from the Changes in Pull Request tree so that its PR diff is active.
  3. Switch away from and then return to the GitHub Pull Request sidebar.
  4. With the effective default settings below, the extension attempts to auto-reveal the active file.
  5. The Changes in Pull Request tree sometimes becomes completely empty.

Effective settings:

{
  "githubPullRequests.fileAutoReveal": true,
  "githubPullRequests.fileListLayout": "tree"
}

Extension Host Error

At the exact time the tree became empty, the extension host logged:

2026-07-15 13:37:03.733 [error] [TreeView:prStatus:github] Failed to resolve tree node for element 0/0:Files
2026-07-15 13:37:03.734 [error] Error: Cannot resolve tree item for element 0/0:Files from extension GitHub.vscode-pull-request-github
    at i._resolveTreeNode (.../extensionHostProcess.js:673:106475)
    at async sk.reveal (.../GitHub.vscode-pull-request-github-0.156.0/dist/extension.js:4108:17688)
    at async Cl.reveal (.../GitHub.vscode-pull-request-github-0.156.0/dist/extension.js:3843:2394)

An earlier occurrence in the same session produced the same failure:

2026-07-15 13:10:26.223 [error] [TreeView:prStatus:github] Failed to resolve tree node for element 0/0:Files
2026-07-15 13:10:26.223 [error] Error: Cannot resolve tree item for element 0/0:Files from extension GitHub.vscode-pull-request-github

Reloading the window restarted the extension host, rebuilt the tree, and restored the list.

Image

Expected Behavior

  • The changed-files tree remains populated when its visibility changes and the active diff is auto-revealed.
  • A failed reveal does not leave the entire tree empty.

Additional Context

This looks related to the tree-handle/reveal race addressed in #8522, but that fix describes flat-layout file nodes. This occurrence uses the default tree layout and fails while resolving the Files category node itself (0/0:Files).

Disabling auto-reveal avoids the observed failure path:

{
  "githubPullRequests.fileAutoReveal": false
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions