Compare commits

...
Author SHA1 Message Date
Cursor Agent 8578146fb9 Fix findLatestPr to prioritize open PRs and remove unused icon imports
- findLatestPr: sort open PRs before merged/closed so the UI correctly
  detects existing open PRs and avoids offering duplicate 'Create PR'
- Sidebar: remove unused MonitorIcon, MoonIcon, SunIcon imports
2026-02-20 00:21:21 +00:00
2 changed files with 4 additions and 7 deletions

No files matched your search

+3
View File
@@ -458,6 +458,9 @@ export class GitManager {
}
const parsed = parsePullRequestList(parsedJson).toSorted((a, b) => {
const aOpen = a.state === "open" ? 1 : 0;
const bOpen = b.state === "open" ? 1 : 0;
if (aOpen !== bOpen) return bOpen - aOpen;
const left = a.updatedAt ? Date.parse(a.updatedAt) : 0;
const right = b.updatedAt ? Date.parse(b.updatedAt) : 0;
return right - left;
+1 -7
View File
@@ -1,10 +1,4 @@
import {
GitPullRequestIcon,
MonitorIcon,
MoonIcon,
SunIcon,
TerminalIcon,
} from "lucide-react";
import { GitPullRequestIcon, TerminalIcon } from "lucide-react";
import { useCallback, useEffect, useMemo, useState } from "react";
import type { ResolvedKeybindingsConfig } from "@t3tools/contracts";
import { useMutation, useQueries, useQuery, useQueryClient } from "@tanstack/react-query";