From 4e39201d76dcbb96d9928d960689bbe75d0ce2f7 Mon Sep 17 00:00:00 2001 From: "molecule-ai[bot]" <276602405+molecule-ai[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 02:45:29 +0000 Subject: [PATCH] fix(canvas): show toast when clipboard API unavailable in ConsoleModal (#1199) (#1231) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use explicit navigator.clipboard check instead of optional chaining so the no-op case is handled explicitly. When clipboard API is unavailable (non-HTTPS context) show a toast: "Copy requires HTTPS — please select and copy manually". Production is always HTTPS so this only affects local dev with http:// canvas. Closes #1199. Co-authored-by: Molecule AI Core-FE Co-authored-by: Claude Sonnet 4.6 --- canvas/src/components/ConsoleModal.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/canvas/src/components/ConsoleModal.tsx b/canvas/src/components/ConsoleModal.tsx index 55265837..1a43ca10 100644 --- a/canvas/src/components/ConsoleModal.tsx +++ b/canvas/src/components/ConsoleModal.tsx @@ -3,6 +3,7 @@ import { useEffect, useState } from "react"; import { createPortal } from "react-dom"; import { api } from "@/lib/api"; +import { showToast } from "@/components/Toaster"; interface Props { workspaceId: string; @@ -133,7 +134,13 @@ export function ConsoleModal({ workspaceId, workspaceName, open, onClose }: Prop
{output && (