From 59ee449ba112276122ba54ad356a8d7d02ac7c69 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Tue, 9 Jun 2026 20:41:49 -0700 Subject: [PATCH] FN-6155: render prompt fullscreen editor in a portal Keep the workflow prompt expander usable in the fullscreen editor across desktop and mobile. - render the expanded prompt and gate editor in a document-body portal instead of reusing the inline inspector container - keep the inline prompt textarea compact while wiring fullscreen edits, focus, and collapse controls through the portal overlay - extend workflow node editor coverage for desktop and mobile fullscreen expand, collapse, Escape, empty prompt, and edit persistence flows Files changed: packages/dashboard/app/components/WorkflowNodeEditor.tsx | 81 +++++++------ packages/dashboard/app/components/__tests__/WorkflowNodeEditor.test.tsx | 127 +++++++++++++++++++-- 2 files changed, 164 insertions(+), 44 deletions(-) Fusion-Task-Id: FN-6155 Fusion-Task-Lineage: 5d0a6367-932a-4fbc-bded-ebad3073d1a6 --- .../app/components/WorkflowNodeEditor.tsx | 81 ++++++----- .../__tests__/WorkflowNodeEditor.test.tsx | 127 ++++++++++++++++-- 2 files changed, 164 insertions(+), 44 deletions(-) diff --git a/packages/dashboard/app/components/WorkflowNodeEditor.tsx b/packages/dashboard/app/components/WorkflowNodeEditor.tsx index c975265a58..77d03c33cb 100644 --- a/packages/dashboard/app/components/WorkflowNodeEditor.tsx +++ b/packages/dashboard/app/components/WorkflowNodeEditor.tsx @@ -14,6 +14,7 @@ import { type Node as FlowNode, type Edge as FlowEdge, } from "@xyflow/react"; +import { createPortal } from "react-dom"; import { useTranslation } from "react-i18next"; import { X, Plus, Trash2, Save, MessageSquare, Terminal, Shield, GitMerge, Loader2, HelpCircle, PauseCircle, Split, Merge, Repeat, ClipboardCheck, ListChecks, Code2, Bell, LayoutGrid, Workflow, Download, Upload, ChevronDown, ChevronRight, ChevronLeft, Library, Sparkles, Maximize2, Minimize2 } from "lucide-react"; import type { WorkflowDefinition, WorkflowIrColumn, TraitViolation, WorkflowStepTemplate } from "@fusion/core"; @@ -2123,9 +2124,42 @@ function InnerEditor({ }, [overrideColumnBinding, agents.length, projectId, addToast]); const overlayProps = useOverlayDismiss(requestClose); + const promptFullscreenOverlay = + isPromptExpanded && (selectedNode?.data.kind === "prompt" || selectedNode?.data.kind === "gate") + ? createPortal( +
+
+ {t("workflowEditor.editingPrompt", "Editing Prompt")} + +
+