feat(code): add paginated github repo picker#1854
Merged
Merged
Conversation
Contributor
Prompt To Fix All With AIThis is a comment left during a code review.
Path: apps/code/src/renderer/hooks/useIntegrations.ts
Line: 99-101
Comment:
**`requestedLimit` never resets on search change**
The `useEffect` with an empty dependency array is a no-op — `requestedLimit` is already initialised to `REPOSITORIES_PAGE_SIZE` by `useState`. The intended reset (when the search query changes) is therefore missing. After a user clicks "Load more" (raising the limit to 100+) and then types a new search, the hook will request that elevated limit from the API instead of starting fresh at 50.
Change the dependency to `[deferredSearch]` to make the reset meaningful:
```suggestion
useEffect(() => {
setRequestedLimit(REPOSITORIES_PAGE_SIZE);
}, [deferredSearch]);
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: apps/code/src/renderer/features/task-detail/components/TaskInput.tsx
Line: 553-556
Comment:
**Picker unreachable on first open**
When `isCloudRepoPickerOpen` flips to `true` and there is no cached data, `cloudRepositoriesLoading` (`isPending`) is `true` in the same render. This makes `isLoading = true`, causing `GitHubRepoPicker` to return the disabled "Loading repos…" button early — the `Combobox` is never mounted and the picker never visually opens. The issue exists identically in `DataSourceSetup.tsx`.
Because `useGithubRepositories` is only `enabled` when the picker is open, there is no pre-warmed cache, so the very first open (and any open after the 5-minute stale window) always triggers this path.
A straightforward fix is to only suppress the `isLoading` pass-through while the picker is closed and show loading state inside the already-open combobox (e.g. via a separate `isFetchingMore` / skeleton), or to enable the query slightly before the picker opens.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "feat(code): add paginated github repo pi..." | Re-trigger Greptile |
0210312 to
de59360
Compare
joshsny
approved these changes
Apr 23, 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 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.
Problem
The cloud gh repository picker only surfaced the first 50 repositories and depended on locally filtering a fully fetched
aggregate repository list. That made large integrations harder to navigate and behaved differently from the branch picker.
Changes
Load more