feat(app,server): rank new-workspace picker by recency with debounced search
Plumb updatedAt through GitHub issue/PR search and committerDate through branch suggestions so the new-workspace picker interleaves branches and PRs sorted by last activity. Debounce the search query so remote GitHub searches are driven by what the user typed rather than a static list.
This commit is contained in:
@@ -1189,6 +1189,7 @@ export const GitHubSearchItemSchema = z.object({
|
||||
labels: z.array(z.string()),
|
||||
baseRefName: z.string().nullable().optional(),
|
||||
headRefName: z.string().nullable().optional(),
|
||||
updatedAt: z.string().optional(),
|
||||
});
|
||||
|
||||
export const GitHubSearchKindSchema = z.enum(["github-issue", "github-pr"]);
|
||||
@@ -2598,6 +2599,14 @@ export const BranchSuggestionsResponseSchema = z.object({
|
||||
type: z.literal("branch_suggestions_response"),
|
||||
payload: z.object({
|
||||
branches: z.array(z.string()),
|
||||
branchDetails: z
|
||||
.array(
|
||||
z.object({
|
||||
name: z.string(),
|
||||
committerDate: z.number(),
|
||||
}),
|
||||
)
|
||||
.optional(),
|
||||
error: z.string().nullable(),
|
||||
requestId: z.string(),
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user