feat: server-side GitHub search for issue/PR pickers (#1352)

Replace local-only filtering in GitHub issue/PR picker dialogs with
server-side GitHub Search API queries. Search text is sent as a query
parameter to the server, which uses the GitHub Search API
(issuesAndPullRequests endpoint) with repo: qualifiers including fork
network support. Results are debounced at 350ms to respect API rate
limits.

- Add query parameter to GitHubAPI issuesList/prsList interface
- Server routes use Search API when query is present, standard list
  endpoint when absent
- Fork networks handled via repo:owner/repo OR repo:owner/upstream
- PR search fetches full PR details after Search API for head/base/draft
  fields
- Remove local filter memos from all three picker dialogs
- Add debounced search effect with abort controller cleanup
- Update VS Code backend and webview API for parity
- Update search placeholders in all locales

Closes #1350

Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
This commit is contained in:
Tom Rochette
2026-06-08 15:37:42 +03:00
committed by GitHub
co-authored by Bohdan Triapitsyn
parent 5589ca991a
commit 7b1b3167a4
16 changed files with 457 additions and 149 deletions
+18 -4
View File
@@ -191,10 +191,17 @@ export const createWebGitHubAPI = ({ urls }: WebGitHubAPIOptions): GitHubAPI =>
return body.branches ?? [];
},
async prsList(directory: string, options?: { page?: number }): Promise<GitHubPullRequestsListResult> {
async prsList(directory: string, options?: { page?: number; query?: string }): Promise<GitHubPullRequestsListResult> {
const page = options?.page ?? 1;
const params = new URLSearchParams({
directory,
page: String(page),
});
if (options?.query) {
params.set('query', options.query);
}
const response = await runtimeFetch(
`/api/github/pulls/list?directory=${encodeURIComponent(directory)}&page=${encodeURIComponent(String(page))}`,
`/api/github/pulls/list?${params.toString()}`,
{ method: 'GET', headers: { Accept: 'application/json' } }
);
const body = await jsonOrNull<GitHubPullRequestsListResult & { error?: string }>(response);
@@ -228,10 +235,17 @@ export const createWebGitHubAPI = ({ urls }: WebGitHubAPIOptions): GitHubAPI =>
return body;
},
async issuesList(directory: string, options?: { page?: number }): Promise<GitHubIssuesListResult> {
async issuesList(directory: string, options?: { page?: number; query?: string }): Promise<GitHubIssuesListResult> {
const page = options?.page ?? 1;
const params = new URLSearchParams({
directory,
page: String(page),
});
if (options?.query) {
params.set('query', options.query);
}
const response = await runtimeFetch(
`/api/github/issues/list?directory=${encodeURIComponent(directory)}&page=${encodeURIComponent(String(page))}`,
`/api/github/issues/list?${params.toString()}`,
{ method: 'GET', headers: { Accept: 'application/json' } }
);
const payload = await jsonOrNull<GitHubIssuesListResult & { error?: string }>(response);