From 2fa0e12aabbd73ae9550cdfc8076bf310240362a Mon Sep 17 00:00:00 2001 From: Dotta Date: Wed, 10 Jun 2026 22:20:55 +0000 Subject: [PATCH] Fix tool access CI fallout --- server/src/routes/openapi.ts | 8 ++++++++ ui/src/components/IssueProperties.test.tsx | 23 +++++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/server/src/routes/openapi.ts b/server/src/routes/openapi.ts index 768317fb5cb..33f8c60ce68 100644 --- a/server/src/routes/openapi.ts +++ b/server/src/routes/openapi.ts @@ -601,6 +601,7 @@ const BOARD_ONLY_OPERATIONS = new Set([ "GET /api/companies/{companyId}/tools/applications", "POST /api/companies/{companyId}/tools/applications", "PATCH /api/tool-applications/{applicationId}", + "DELETE /api/tool-applications/{applicationId}", "GET /api/companies/{companyId}/tools/connections", "POST /api/companies/{companyId}/tools/connections", "GET /api/tool-connections/{connectionId}", @@ -4545,6 +4546,13 @@ registerCurrentRoute({ body: updateToolApplicationSchema, }); +registerCurrentRoute({ + method: "delete", + path: "/api/tool-applications/{applicationId}", + tags: ["tool-access"], + summary: "Delete a tool application", +}); + registerCurrentRoute({ method: "get", path: "/api/companies/{companyId}/tools/connections", diff --git a/ui/src/components/IssueProperties.test.tsx b/ui/src/components/IssueProperties.test.tsx index 63f8d1eb138..30c353a3a44 100644 --- a/ui/src/components/IssueProperties.test.tsx +++ b/ui/src/components/IssueProperties.test.tsx @@ -1059,8 +1059,29 @@ describe("IssueProperties", () => { expect(container.textContent).toContain("Custom · gpt-5.4 · high"); expect(container.textContent).toContain("Model lane"); + const modelOptionsTrigger = Array.from(container.querySelectorAll("button")) + .find((button) => button.textContent?.includes("Custom · gpt-5.4")); + expect(modelOptionsTrigger).not.toBeUndefined(); + + await act(async () => { + modelOptionsTrigger!.dispatchEvent(new MouseEvent("click", { bubbles: true })); + }); + await flush(); + + let currentModelButton: HTMLButtonElement | undefined; + await waitForAssertion(() => { + currentModelButton = Array.from(container.querySelectorAll("button")) + .find((button) => button.textContent?.trim() === "GPT-5.4" || button.textContent?.trim() === "gpt-5.4"); + expect(currentModelButton).not.toBeUndefined(); + }); + + await act(async () => { + currentModelButton!.dispatchEvent(new MouseEvent("click", { bubbles: true })); + }); + await flush(); + const modelButton = Array.from(container.querySelectorAll("button")) - .find((button) => button.textContent?.includes("GPT-5.5")); + .find((button) => button.textContent?.includes("GPT-5.5") || button.textContent?.includes("gpt-5.5")); expect(modelButton).not.toBeUndefined(); await act(async () => {