Skip to content

feat(code): add paginated github repo picker#1854

Merged
tatoalo merged 1 commit into
mainfrom
feat/cloud/repo-picker-load-more
Apr 23, 2026
Merged

feat(code): add paginated github repo picker#1854
tatoalo merged 1 commit into
mainfrom
feat/cloud/repo-picker-load-more

Conversation

@tatoalo
Copy link
Copy Markdown
Contributor

@tatoalo tatoalo commented Apr 23, 2026

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

  • add a paginated GitHub repository picker with Load more
  • wire the task input and GitHub data source setup flows to use backend-backed repository search and pagination
  • keep the existing full aggregate repository fetch for the other screens that still depend on it
  • update the shared repository picker so it supports both local filtering mode and backend-backed search mode

@tatoalo tatoalo self-assigned this Apr 23, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 23, 2026

Prompt To Fix All With AI
This 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

Comment thread apps/code/src/renderer/hooks/useIntegrations.ts
@tatoalo tatoalo force-pushed the feat/cloud/repo-picker-load-more branch from 0210312 to de59360 Compare April 23, 2026 09:29
@tatoalo tatoalo requested a review from a team April 23, 2026 10:34
@tatoalo tatoalo merged commit 03253e7 into main Apr 23, 2026
15 checks passed
@tatoalo tatoalo deleted the feat/cloud/repo-picker-load-more branch April 23, 2026 10:56
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