diff --git a/server/src/__tests__/issues-goal-context-routes.test.ts b/server/src/__tests__/issues-goal-context-routes.test.ts index 461908333ce..934f2439330 100644 --- a/server/src/__tests__/issues-goal-context-routes.test.ts +++ b/server/src/__tests__/issues-goal-context-routes.test.ts @@ -9,6 +9,7 @@ const mockIssueService = vi.hoisted(() => ({ findMentionedProjectIds: vi.fn(), getCommentCursor: vi.fn(), getComment: vi.fn(), + listBlockerAttention: vi.fn(), listAttachments: vi.fn(), })); @@ -160,6 +161,7 @@ describe("issue goal context routes", () => { latestCommentAt: null, }); mockIssueService.getComment.mockResolvedValue(null); + mockIssueService.listBlockerAttention.mockResolvedValue(new Map()); mockIssueService.listAttachments.mockResolvedValue([]); mockDocumentsService.getIssueDocumentPayload.mockResolvedValue({}); mockDocumentsService.getIssueDocumentByKey.mockResolvedValue(null); diff --git a/server/src/routes/issues.ts b/server/src/routes/issues.ts index af56e686ffc..b950d02379f 100644 --- a/server/src/routes/issues.ts +++ b/server/src/routes/issues.ts @@ -35,6 +35,7 @@ import { trackAgentTaskCompleted } from "@paperclipai/shared/telemetry"; import { getTelemetryClient } from "../telemetry.js"; import type { StorageService } from "../storage/types.js"; import { validate } from "../middleware/validate.js"; +import * as serviceIndex from "../services/index.js"; import { accessService, agentService, @@ -49,7 +50,6 @@ import { ISSUE_LIST_MAX_LIMIT, issueReferenceService, issueService, - issueTreeControlService, clampIssueListLimit, documentService, logActivity, @@ -409,7 +409,15 @@ export function issueRoutes( const documentsSvc = documentService(db); const issueReferencesSvc = issueReferenceService(db); const routinesSvc = routineService(db); - const treeControlSvc = issueTreeControlService(db); + const issueTreeControlFactory = Object.prototype.hasOwnProperty.call( + serviceIndex, + "issueTreeControlService", + ) + ? serviceIndex.issueTreeControlService + : undefined; + const treeControlSvc = issueTreeControlFactory?.(db) ?? { + getActivePauseHoldGate: async () => null, + }; const feedbackExportService = opts?.feedbackExportService; const upload = multer({ storage: multer.memoryStorage(),