feat(onboarding): Dual-query SCM repo selector with pagination#112427
Closed
jaydgoss wants to merge 2 commits intojaygoss/vdy-46-scm-repo-pagination-befrom
Closed
feat(onboarding): Dual-query SCM repo selector with pagination#112427jaydgoss wants to merge 2 commits intojaygoss/vdy-46-scm-repo-pagination-befrom
jaydgoss wants to merge 2 commits intojaygoss/vdy-46-scm-repo-pagination-befrom
Conversation
1e5937d to
fce1f2e
Compare
799ce60 to
6a95b26
Compare
fce1f2e to
ae08ef3
Compare
6a95b26 to
e54c6a5
Compare
ae08ef3 to
8fc7ad5
Compare
e54c6a5 to
f5bd813
Compare
8fc7ad5 to
abe3be7
Compare
f5bd813 to
8f8edbc
Compare
abe3be7 to
c135b8f
Compare
8f8edbc to
46a8711
Compare
Switch useScmRepoSearch to a dual-query approach: - Browse (no search): uses useInfiniteApiQuery with paginate=true, auto-fetches all pages in background via useFetchAllPages. First page appears instantly. - Search (user types): uses server-side search with accessibleOnly=true for accurate results. Also adds ScmVirtualizedMenuList for rendering performance with large repo lists. Refs VDY-46
46a8711 to
a617eb1
Compare
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.
Wire the SCM repo selector to use paginated browsing and server-side search, replacing the previous single-query approach that required the user to type before any repos appeared.
Two independent query paths:
Browse (no search):
useInfiniteApiQuerywithpaginate=truefires on mount. The first page (25 repos) appears immediately. Additional pages load on demand as the user scrolls near the bottom of the dropdown (prefetched 200px before the end viaScmVirtualizedMenuList).Search (user types): Standard
useQuerywithaccessibleOnly=truefor server-side filtering. Debounced at 200ms. Accurate results guaranteed since the backend fetches all installation repos and filters locally.The hook switches between browse and search results based on whether
debouncedSearchis set. Clearing the search input returns to the cached browse results.Also adds
makeVirtualizedMenuList(onNearBottomRef)factory to support prefetch-on-scroll without needing to pass custom props through react-select's strict type system. The existing consumer inscmPlatformFeatures.tsxcontinues to useScmVirtualizedMenuListdirectly.PR 2 of 2 -- stacked on #112426 (backend pagination)
Refs VDY-46