Skip to content

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

fix(ui): repair issue detail split regressions

dotta1ac1dbcb3e7e
diff --git a/ui/src/lib/inbox.test.ts b/ui/src/lib/inbox.test.ts
index 5c8e1d57bd..18abb24865 100644
--- a/ui/src/lib/inbox.test.ts
+++ b/ui/src/lib/inbox.test.ts
@@ -330,6 +330,7 @@ describe("inbox helpers", () => {
dashboard,
heartbeatRuns: [],
mineIssues: [makeIssue("1", false), makeIssue("2", false), makeIssue("3", true)],
+ dismissedAlerts: new Set<string>(),
dismissedAtByKey: new Map(),
});
diff --git a/ui/src/pages/IssueDetail.tsx b/ui/src/pages/IssueDetail.tsx
index fcaa09cf31..554d7d4015 100644
--- a/ui/src/pages/IssueDetail.tsx
+++ b/ui/src/pages/IssueDetail.tsx
@@ -96,6 +96,10 @@ type IssueDetailComment = (IssueComment | OptimisticIssueComment) & {
};
const FEEDBACK_TERMS_URL = import.meta.env.VITE_FEEDBACK_TERMS_URL?.trim() || "https://paperclip.ing/tos";
+const ACTIVE_ISSUE_RUN_POLL_INTERVAL_MS = 3000;
+const IDLE_ISSUE_RUN_POLL_INTERVAL_MS = 30000;
+const ACTIVE_ISSUE_TIMELINE_POLL_INTERVAL_MS = 5000;
+const IDLE_ISSUE_TIMELINE_POLL_INTERVAL_MS = 30000;
function asRecord(value: unknown): Record<string, unknown> | null {
if (typeof value !== "object" || value === null || Array.isArray(value)) return null;
@@ -664,39 +668,6 @@ export function IssueDetail() {
},
});
- const approvalDecision = useMutation({
- mutationFn: async ({ approvalId, action }: { approvalId: string; action: "approve" | "reject" }) => {
- if (action === "approve") {
- return approvalsApi.approve(approvalId);
- }
- return approvalsApi.reject(approvalId);
- },
- onMutate: ({ approvalId, action }) => {
- setPendingApprovalAction({ approvalId, action });
- },
- onSuccess: (_approval, variables) => {
- invalidateIssue();
- queryClient.invalidateQueries({ queryKey: queryKeys.approvals.detail(variables.approvalId) });
- if (resolvedCompanyId) {
- queryClient.invalidateQueries({ queryKey: queryKeys.approvals.list(resolvedCompanyId) });
- }
- pushToast({
- title: variables.action === "approve" ? "Approval approved" : "Approval rejected",
- tone: "success",
- });
- },
- onError: (err, variables) => {
- pushToast({
- title: variables.action === "approve" ? "Approval failed" : "Rejection failed",
- body: err instanceof Error ? err.message : "Unable to update approval",
- tone: "error",
- });
- },
- onSettled: () => {
- setPendingApprovalAction(null);
- },
- });
-
const addComment = useMutation({
mutationFn: ({ body, reopen, interrupt }: { body: string; reopen?: boolean; interrupt?: boolean }) =>
issuesApi.addComment(issueId!, body, reopen, interrupt),