Repository navigation
Stream repositories available to the user from the API - #16286
Merged
Merged
Conversation
…'re owned by the user
sergiou87
previously approved these changes
Mar 17, 2023
sergiou87
left a comment
Member
There was a problem hiding this comment.
Code makes sense and works great!!! ⚡
I only found one comment line that isn't needed anymore. I'll approve the PR anyway and leave it up to you whether you remove it here or not.
Co-authored-by: Sergio Padrino <[email protected]>
Member
Author
|
Gentle reminder here @sergiou87, I think this is all reviewed, I just applied that suggestion of yours to remove the comment |
sergiou87
approved these changes
Mar 28, 2023
sergiou87
left a comment
Member
There was a problem hiding this comment.
Yup! Sorry, I forgot about that 😳
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #16276
Closes #8955
Closes #2770
Description
Improved the user experience in the clone repositories dialog for users with access to lots and lots of repositories.
Prior to this change we waited until we had loaded all repositories from the
/user/reposendpoint (could be hundreds of pages long for some users) before we showed them in the UI. With this PR I'm intending to improve that experience for users with tons of repos while not making it any worse for the vast majority of users who have access to very few repositories.The way I went about this was by showing the repositories in the UI as each page from the API is coming in and by making multiple concurrent streaming requests in order to prioritize the users own repositories over repositories for organizations that they belong to (which is typically but not always the culprit).
Prior to this change it took me almost 5 minutes of waiting on the clone repository dialog before I could see any repositories and after this it's a matter of seconds until I at least see my own repositories. The overall load time is also improved some by us loading owner, collaborator, and org affiliated repositories in three different concurrent streams.
Beyond those changes I noticed that we count any repository not owned by an organization as being "Your repository" in the filter list, that's been fixed to only include repository actually owned by the user. Additionally I've made it so that refreshing the list of repositories doesn't throw away all the repositories we've got access to.
Possible further improvements
I think an additional improvement that could be useful here is to add another fetch when refreshing repositories that only grab repositories created after the last fetch (i.e.
MAX(existing_repositories::created_at)). That would let users who've just created a repository online be able to see it almost instantaneously after hitting refresh.Showing a message when the user is searching but not finding what they're looking for would be nice (we're still loading repositories, your search results may be incomplete).
We could/should consider redesigning the clone screen to only show the users owned repositories by default. Ideally we'd let the user pick which org to load but the API support for that doesn't exists AFAICT.
For users with tons of repos there's a lot of overhead data from the API here that we don't care about. From a bandwidth conservation perspective GraphQL could help here.
Screenshots
Release notes
Notes: