Skip to content

Git panel not getting updated when phoenix gains focus#2355

Merged
abose merged 2 commits intomainfrom
git-fix
Aug 24, 2025
Merged

Git panel not getting updated when phoenix gains focus#2355
abose merged 2 commits intomainfrom
git-fix

Conversation

@devvaannsh
Copy link
Member

This PR fixes the issue of git panel not getting updated properly when changes were made from external sources.

Before
Earlier, we had a 5seconds of focus switch dedupe time. The problem with this was that if user switch from the external source to Phoenix very quickly (maybe right after executing the command) then we were not refreshing the Git as it had a timer. Secondly, the hasStatusChanged only tracked for commit changes, and not the push/pull and other changes, that also prevented the panel to update when needed.

After
Now, when Phoenix gains focus, we check if the git panel is open. If its open it likely means that user performed some git changes externally, so we refresh the git panel. But if the git panel is not open, we just refresh the branch. This approach makes sure that we don't call the expensive REFRESH_ALL all the time when unintended. We call it only when its very likely that it should be updated.

@abose abose merged commit 6729ed6 into main Aug 24, 2025
12 of 15 checks passed
@abose abose deleted the git-fix branch August 24, 2025 05:14
@sonarqubecloud
Copy link

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.

2 participants

Comments