From e6f8174a44050ecd9edc71d76e4764f07ceda061 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Jul 2026 07:18:18 +0000 Subject: [PATCH] fix(workshop): encode screenshot filenames in URLs and stabilize paste effect deps --- .../app/[locale]/manage/custom-widgets/_custom-widget-list.tsx | 2 +- apps/nextjs/src/components/store-install/store-api.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/nextjs/src/app/[locale]/manage/custom-widgets/_custom-widget-list.tsx b/apps/nextjs/src/app/[locale]/manage/custom-widgets/_custom-widget-list.tsx index 1b9a035fd..44dc2c21e 100644 --- a/apps/nextjs/src/app/[locale]/manage/custom-widgets/_custom-widget-list.tsx +++ b/apps/nextjs/src/app/[locale]/manage/custom-widgets/_custom-widget-list.tsx @@ -65,7 +65,7 @@ export const CustomWidgetList = ({ definitions }: CustomWidgetListProps) => { }; document.addEventListener("paste", onPaste); return () => document.removeEventListener("paste", onPaste); - }, [importMutation]); + }, [importMutation.mutate]); if (definitions.length === 0) { return ( diff --git a/apps/nextjs/src/components/store-install/store-api.ts b/apps/nextjs/src/components/store-install/store-api.ts index 78fa59271..c7bba15da 100644 --- a/apps/nextjs/src/components/store-install/store-api.ts +++ b/apps/nextjs/src/components/store-install/store-api.ts @@ -28,7 +28,7 @@ interface PBListResponse { } export const getStoreFileUrl = (submission: StoreSubmission, filename: string) => - `${STORE_URL}/api/files/submissions/${submission.id}/${filename}`; + `${STORE_URL}/api/files/submissions/${submission.id}/${encodeURIComponent(filename)}`; export const fetchStoreSubmissions = async ( type: "css" | "widget",