Skip to content

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

fix: keep thread polish independent of quicklook routing

Dottadc94e3d1dfb2
diff --git a/ui/src/lib/router.tsx b/ui/src/lib/router.tsx
index 3cae923e71..5cf81c8d05 100644
--- a/ui/src/lib/router.tsx
+++ b/ui/src/lib/router.tsx
@@ -2,13 +2,11 @@ import * as React from "react";
import * as RouterDom from "react-router-dom";
import type { NavigateOptions, To } from "react-router-dom";
import { useCompany } from "@/context/CompanyContext";
-import { IssueLinkQuicklook } from "@/components/IssueLinkQuicklook";
import {
applyCompanyPrefix,
extractCompanyPrefixFromPath,
normalizeCompanyPrefix,
} from "@/lib/company-routes";
-import { parseIssuePathIdFromPath } from "@/lib/issue-reference";
function resolveTo(to: To, companyPrefix: string | null): To {
if (typeof to === "string") {
@@ -42,23 +40,10 @@ function useActiveCompanyPrefix(): string | null {
export * from "react-router-dom";
-type CompanyLinkProps = React.ComponentProps<typeof RouterDom.Link> & {
- disableIssueQuicklook?: boolean;
-};
-
-export const Link = React.forwardRef<HTMLAnchorElement, CompanyLinkProps>(
- function CompanyLink({ to, disableIssueQuicklook = false, ...props }, ref) {
+export const Link = React.forwardRef<HTMLAnchorElement, React.ComponentProps<typeof RouterDom.Link>>(
+ function CompanyLink({ to, ...props }, ref) {
const companyPrefix = useActiveCompanyPrefix();
- const resolvedTo = resolveTo(to, companyPrefix);
- const issuePathId = disableIssueQuicklook
- ? null
- : parseIssuePathIdFromPath(typeof resolvedTo === "string" ? resolvedTo : resolvedTo.pathname);
-
- if (issuePathId) {
- return <IssueLinkQuicklook ref={ref} to={resolvedTo} issuePathId={issuePathId} {...props} />;
- }
-
- return <RouterDom.Link ref={ref} to={resolvedTo} {...props} />;
+ return <RouterDom.Link ref={ref} to={resolveTo(to, companyPrefix)} {...props} />;
},
);