From 09af3ed2266e67cfbe3d366643c640ad522dce3e Mon Sep 17 00:00:00 2001 From: Christian Broberg Date: Sun, 7 Jun 2026 15:36:03 +0200 Subject: [PATCH 1/2] fix(ci): correct webhook-dispatch test mock type to unblock deploy gate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit deploy.yml's "Lint & Typecheck" job (tsc -b) failed on 5 TS2345 errors in webhook-dispatch.test.ts — a vi.fn() mock passed where the inline test's `fetchFn: typeof fetch` param is expected — which skipped the Deploy job, so pushes to main never auto-deployed. Cast the mock at the 5 call sites (`mockFetch as unknown as typeof fetch`); .mock assertions keep the Mock type. Verified: build packages + `tsc -b` → exit 0; 29 tests green. Co-Authored-By: Claude Opus 4.8 --- .../src/lib/__tests__/webhook-dispatch.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/cms-admin/src/lib/__tests__/webhook-dispatch.test.ts b/packages/cms-admin/src/lib/__tests__/webhook-dispatch.test.ts index db46749d7..ecf7e4aa6 100644 --- a/packages/cms-admin/src/lib/__tests__/webhook-dispatch.test.ts +++ b/packages/cms-admin/src/lib/__tests__/webhook-dispatch.test.ts @@ -183,7 +183,7 @@ describe("Webhook Dispatch", () => { }); it("returns empty array for empty webhooks list", async () => { - const results = await dispatchWebhooks([], baseEvent, mockFetch); + const results = await dispatchWebhooks([], baseEvent, mockFetch as unknown as typeof fetch); expect(results).toEqual([]); expect(mockFetch).not.toHaveBeenCalled(); }); @@ -194,7 +194,7 @@ describe("Webhook Dispatch", () => { { id: "2", url: "https://hooks.slack.com/services/T/B/x" }, { id: "3", url: "https://example.com/hook" }, ]; - const results = await dispatchWebhooks(webhooks, baseEvent, mockFetch); + const results = await dispatchWebhooks(webhooks, baseEvent, mockFetch as unknown as typeof fetch); expect(mockFetch).toHaveBeenCalledTimes(3); expect(results).toHaveLength(3); expect(results.every((r) => r.success)).toBe(true); @@ -211,7 +211,7 @@ describe("Webhook Dispatch", () => { { id: "2", url: "https://example.com/b" }, { id: "3", url: "https://example.com/c" }, ]; - const results = await dispatchWebhooks(webhooks, baseEvent, mockFetch); + const results = await dispatchWebhooks(webhooks, baseEvent, mockFetch as unknown as typeof fetch); expect(results[0].success).toBe(true); expect(results[1].success).toBe(false); expect(results[1].error).toContain("Connection refused"); @@ -221,7 +221,7 @@ describe("Webhook Dispatch", () => { it("reports HTTP error status codes", async () => { mockFetch.mockResolvedValue({ ok: false, status: 404 }); const webhooks: WebhookEntry[] = [{ id: "1", url: "https://example.com/hook" }]; - const results = await dispatchWebhooks(webhooks, baseEvent, mockFetch); + const results = await dispatchWebhooks(webhooks, baseEvent, mockFetch as unknown as typeof fetch); expect(results[0].success).toBe(false); expect(results[0].statusCode).toBe(404); }); @@ -232,7 +232,7 @@ describe("Webhook Dispatch", () => { { id: "2", url: "https://hooks.slack.com/services/T/B/x" }, { id: "3", url: "https://example.com/hook" }, ]; - await dispatchWebhooks(webhooks, baseEvent, mockFetch); + await dispatchWebhooks(webhooks, baseEvent, mockFetch as unknown as typeof fetch); // Discord const discordBody = JSON.parse(mockFetch.mock.calls[0][1].body); From f3b2fb93f9091d508f54157ecba7beaf289212d9 Mon Sep 17 00:00:00 2001 From: Christian Broberg Date: Sun, 7 Jun 2026 15:36:09 +0200 Subject: [PATCH 2/2] fix(editor): use Lucide RemoveFormatting icon for Clear-formatting button (F150) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Clear-formatting button rendered but its abstract inline-SVG eraser was hard to spot in the toolbar. Swap to Lucide's standard RemoveFormatting icon — the universally recognised "clear formatting" symbol — so editors can find it (sits right after superscript/subscript, before the separator). Co-Authored-By: Claude Opus 4.8 --- packages/cms-admin/src/components/editor/rich-text-editor.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cms-admin/src/components/editor/rich-text-editor.tsx b/packages/cms-admin/src/components/editor/rich-text-editor.tsx index aa14ca360..dcbe8165b 100644 --- a/packages/cms-admin/src/components/editor/rich-text-editor.tsx +++ b/packages/cms-admin/src/components/editor/rich-text-editor.tsx @@ -35,7 +35,7 @@ import { IconUnderline, IconSuperscript, IconSubscript, IconHighlight, IconZoomIn, IconZoomOut, IconProofread, } from "./editor-icons"; -import { Image as LucideImage, Zap, MessageSquareWarning, Code2, ChevronDown, Braces, Shapes } from "lucide-react"; +import { Image as LucideImage, Zap, MessageSquareWarning, Code2, ChevronDown, Braces, Shapes, RemoveFormatting } from "lucide-react"; import { toast } from "sonner"; import { AIMetadataPopover } from "@/components/media/ai-metadata-popover"; import { ProofreadPlugin, proofreadKey, textOffsetToPos } from "./proofread-plugin"; @@ -3163,7 +3163,7 @@ function RichTextEditorInner({ value, onChange, disabled, stickyOffset = 132, fe {(has("bold") || has("italic") || has("strike") || has("code")) && editor.chain().focus().unsetAllMarks().clearNodes().run()}> - + } {(has("bold") || has("italic") || has("strike") || has("code")) && }