Skip to content

fix: show loading state in git sync button while repo data is being fetched [INS-2610] #9939

Open
pavkout wants to merge 1 commit into
Kong:developfrom
pavkout:NS-2610
Open

fix: show loading state in git sync button while repo data is being fetched [INS-2610] #9939
pavkout wants to merge 1 commit into
Kong:developfrom
pavkout:NS-2610

Conversation

@pavkout
Copy link
Copy Markdown
Contributor

@pavkout pavkout commented May 20, 2026

Summary

  • When opening a git-connected project, the git sync button was immediately showing "Git is not connected" because isSynced evaluated to false while gitRepoDataFetcher.data was still undefined (the fetcher is triggered lazily via a useEffect after mount).
  • Added isLoadingGitRepo — true when a gitRepository.uri exists but fetcher data has not yet arrived — to distinguish the loading phase from a genuinely disconnected state.
  • The sync button now renders a spinner + "Loading..." label during that window, replacing the misleading "Git is not connected" flash.

@pavkout pavkout requested review from a team and Copilot May 20, 2026 13:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the Git project sync dropdown UX by preventing a brief, misleading “Git is not connected” state while the repository metadata is still being lazily fetched after mount.

Changes:

  • Adds an isLoadingGitRepo state derived from gitRepository.uri + absence of gitRepoDataFetcher.data.
  • Renders a spinner + “Connecting...” placeholder row during the initial repo-data fetch window.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pavkout pavkout self-assigned this May 20, 2026
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