sessions: fix endless spinner in Changes view for non-git folders - #324132
Merged
Ladislau Szomoru (lszomoru) merged 1 commit intoJul 3, 2026
Merged
Ladislau Szomoru (lszomoru) merged 1 commit into
Ladislau Szomoru (lszomoru) merged 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes issue #324066, where the Changes view showed an endless loading spinner when a session's workspace folder is not a git repository. The root cause is that GitRepositoryChangesetResolver.resolve(...) returned undefined when no repository URI was available, and the downstream changeset observables interpret an undefined resolved value as "still loading", which never clears. The fix returns an empty array instead, signaling a completed resolution with no changes.
Changes:
- In
GitRepositoryChangesetResolver.resolve(...), return[]instead ofundefinedwhen there is no repository URI, soisLoadingChangesresolves tofalsefor non-git folders.
Ladislau Szomoru (lszomoru)
approved these changes
Jul 3, 2026
Dmitriy Vasyura (dmitrivMS)
approved these changes
Jul 3, 2026
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
July 3, 2026 07:00
Dmitriy Vasyura (dmitrivMS)
disabled auto-merge
July 3, 2026 07:00
Ladislau Szomoru (lszomoru)
enabled auto-merge (squash)
July 3, 2026 07:00
Dirk Bäumer (dbaeumer)
approved these changes
Jul 3, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR fixes GitHub issue #324066: endless loading spinner in the Changes view when opening non-git directories.
Root Cause Analysis
For non-git workspaces or non-git folders,
activeSessionHasGitRepositoryObsinChangesViewServiceevaluates tofalse. When there's no Git repository, the changeset'sisLoadingChangescan remain stuck in a loading state if it tries to resolve refs via Git. Specifically, inUncommittedChangesChangesetand other git-backed changesets,isLoadingChangesevaluates totruewhenever the changeset resolver returnsundefined.In
GitRepositoryChangesetResolver.resolve(...), ifrepositoryUriis not present, it returnsundefined. Because it returnsundefined,changesPromiseObs.read(reader).read(reader)remainsundefined, which keeps the changeset'sisLoadingChangesstuck astrueindefinitely. This propagates up to the UI, leading to an endless spinner.Fix
Modify
GitRepositoryChangesetResolver.resolve(...)to return an empty array[]instead ofundefinedwhen the repository is not available. This signals to the changeset state observable that the resolution has completed (yielding no changes) rather than indicating that it is still loading.