Skip to content

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

fix: keep inbox quicklook and tests standalone

Dotta7ec871615974
diff --git a/ui/src/lib/inbox.test.ts b/ui/src/lib/inbox.test.ts
index 90a4aaaa03..27f844701c 100644
--- a/ui/src/lib/inbox.test.ts
+++ b/ui/src/lib/inbox.test.ts
@@ -138,7 +138,6 @@ function makeRun(id: string, status: HeartbeatRun["status"], createdAt: string,
logCompressed: false,
errorCode: null,
externalRunId: null,
- processGroupId: null,
processPid: null,
processStartedAt: null,
retryOfRunId: null,
diff --git a/ui/src/lib/optimistic-issue-runs.test.ts b/ui/src/lib/optimistic-issue-runs.test.ts
index f8614a6410..bd7c422581 100644
--- a/ui/src/lib/optimistic-issue-runs.test.ts
+++ b/ui/src/lib/optimistic-issue-runs.test.ts
@@ -22,6 +22,7 @@ function createLiveRun(overrides: Partial<LiveRunForIssue> = {}): LiveRunForIssu
function createActiveRun(overrides: Partial<ActiveRunForIssue> = {}): ActiveRunForIssue {
return {
id: "run-1",
+ companyId: "company-1",
agentId: "agent-1",
agentName: "CodexCoder",
adapterType: "codex_local",
diff --git a/ui/src/lib/router.tsx b/ui/src/lib/router.tsx
index 5cf81c8d05..77fab0462e 100644
--- a/ui/src/lib/router.tsx
+++ b/ui/src/lib/router.tsx
@@ -2,12 +2,19 @@ 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";
+function parseIssuePathIdFromPath(pathname: string | null | undefined): string | null {
+ if (!pathname) return null;
+ const match = pathname.match(/(?:^|\/)issues\/([^/?#]+)/);
+ return match?.[1] ?? null;
+}
+
function resolveTo(to: To, companyPrefix: string | null): To {
if (typeof to === "string") {
return applyCompanyPrefix(to, companyPrefix);
@@ -40,10 +47,23 @@ function useActiveCompanyPrefix(): string | null {
export * from "react-router-dom";
-export const Link = React.forwardRef<HTMLAnchorElement, React.ComponentProps<typeof RouterDom.Link>>(
- function CompanyLink({ to, ...props }, ref) {
+type CompanyLinkProps = React.ComponentProps<typeof RouterDom.Link> & {
+ disableIssueQuicklook?: boolean;
+};
+
+export const Link = React.forwardRef<HTMLAnchorElement, CompanyLinkProps>(
+ function CompanyLink({ to, disableIssueQuicklook = false, ...props }, ref) {
const companyPrefix = useActiveCompanyPrefix();
- return <RouterDom.Link ref={ref} to={resolveTo(to, companyPrefix)} {...props} />;
+ 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} />;
},
);
diff --git a/ui/src/pages/Inbox.test.tsx b/ui/src/pages/Inbox.test.tsx
index 22932945bd..e5f7beef04 100644
--- a/ui/src/pages/Inbox.test.tsx
+++ b/ui/src/pages/Inbox.test.tsx
@@ -98,7 +98,6 @@ describe("FailedRunInboxRow", () => {
logCompressed: false,
errorCode: null,
externalRunId: null,
- processGroupId: null,
processPid: null,
processStartedAt: null,
retryOfRunId: null,