Skip to content

The open-source app everyone uses to manage agents at work

Address Greptile navigation review

Dotta684422657216
diff --git a/ui/src/components/IssueLinkQuicklook.tsx b/ui/src/components/IssueLinkQuicklook.tsx
index 089b236fe1..b6311eff1a 100644
--- a/ui/src/components/IssueLinkQuicklook.tsx
+++ b/ui/src/components/IssueLinkQuicklook.tsx
@@ -5,7 +5,12 @@ import type { Issue } from "@paperclipai/shared";
import { useQuery, useQueryClient } from "@tanstack/react-query";
import { timeAgo } from "@/lib/timeAgo";
import { createIssueDetailPath, withIssueDetailHeaderSeed } from "@/lib/issueDetailBreadcrumb";
-import { fetchIssueDetail, getCachedIssueDetail, prefetchIssueDetail } from "@/lib/issueDetailCache";
+import {
+ fetchIssueDetail,
+ getCachedIssueDetail,
+ ISSUE_DETAIL_STALE_TIME_MS,
+ prefetchIssueDetail,
+} from "@/lib/issueDetailCache";
import { queryKeys } from "@/lib/queryKeys";
import { cn } from "@/lib/utils";
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
@@ -99,7 +104,7 @@ export const IssueLinkQuicklook = React.forwardRef<
queryFn: () => fetchIssueDetail(queryClient, issuePathId),
enabled: open,
initialData: () => cachedIssue,
- staleTime: 60_000,
+ staleTime: ISSUE_DETAIL_STALE_TIME_MS,
});
const detailPath = createIssueDetailPath(issuePathId);
diff --git a/ui/src/lib/issueDetailCache.ts b/ui/src/lib/issueDetailCache.ts
index b4fab727f3..8e02e46eb8 100644
--- a/ui/src/lib/issueDetailCache.ts
+++ b/ui/src/lib/issueDetailCache.ts
@@ -4,7 +4,7 @@ import { issuesApi } from "@/api/issues";
import { queryKeys } from "@/lib/queryKeys";
const ISSUE_DETAIL_QUERY_PREFIX = ["issues", "detail"] as const;
-const ISSUE_DETAIL_STALE_TIME_MS = 60_000;
+export const ISSUE_DETAIL_STALE_TIME_MS = 60_000;
function isNonEmptyString(value: unknown): value is string {
return typeof value === "string" && value.length > 0;
diff --git a/ui/src/lib/router.tsx b/ui/src/lib/router.tsx
index c166027798..c8d3a352d3 100644
--- a/ui/src/lib/router.tsx
+++ b/ui/src/lib/router.tsx
@@ -57,9 +57,7 @@ export const Link = React.forwardRef<HTMLAnchorElement, CompanyLinkProps>(
function CompanyLink({ to, disableIssueQuicklook = false, issuePrefetch = null, ...props }, ref) {
const companyPrefix = useActiveCompanyPrefix();
const resolvedTo = resolveTo(to, companyPrefix);
- const issuePathId = disableIssueQuicklook
- ? parseIssuePathIdFromPath(typeof resolvedTo === "string" ? resolvedTo : resolvedTo.pathname)
- : parseIssuePathIdFromPath(typeof resolvedTo === "string" ? resolvedTo : resolvedTo.pathname);
+ const issuePathId = parseIssuePathIdFromPath(typeof resolvedTo === "string" ? resolvedTo : resolvedTo.pathname);
if (issuePathId) {
return (