diff --git a/frontend/components/screen/widgets/FlowWidget.tsx b/frontend/components/screen/widgets/FlowWidget.tsx
index cd0c052f..e512ad21 100644
--- a/frontend/components/screen/widgets/FlowWidget.tsx
+++ b/frontend/components/screen/widgets/FlowWidget.tsx
@@ -37,6 +37,7 @@ import {
} from "@/components/ui/dialog";
import { Label } from "@/components/ui/label";
import { Input } from "@/components/ui/input";
+import { useScreenPreview } from "@/contexts/ScreenPreviewContext";
interface FlowWidgetProps {
component: FlowComponent;
@@ -53,6 +54,8 @@ export function FlowWidget({
flowRefreshKey,
onFlowRefresh,
}: FlowWidgetProps) {
+ const { isPreviewMode } = useScreenPreview(); // 프리뷰 모드 확인
+
// 🆕 전역 상태 관리
const setSelectedStep = useFlowStepStore((state) => state.setSelectedStep);
const resetFlow = useFlowStepStore((state) => state.resetFlow);
@@ -312,6 +315,57 @@ export function FlowWidget({
setLoading(true);
setError(null);
+ // 프리뷰 모드에서는 샘플 데이터만 표시
+ if (isPreviewMode) {
+ console.log("🔒 프리뷰 모드: 플로우 데이터 로드 차단 - 샘플 데이터 표시");
+ setFlowData({
+ id: flowId || 0,
+ flowName: flowName || "샘플 플로우",
+ description: "프리뷰 모드 샘플",
+ isActive: true,
+ createdAt: new Date().toISOString(),
+ updatedAt: new Date().toISOString(),
+ } as FlowDefinition);
+
+ const sampleSteps: FlowStep[] = [
+ {
+ id: 1,
+ flowId: flowId || 0,
+ stepName: "시작 단계",
+ stepOrder: 1,
+ stepType: "start",
+ stepConfig: {},
+ createdAt: new Date().toISOString(),
+ updatedAt: new Date().toISOString(),
+ },
+ {
+ id: 2,
+ flowId: flowId || 0,
+ stepName: "진행 중",
+ stepOrder: 2,
+ stepType: "process",
+ stepConfig: {},
+ createdAt: new Date().toISOString(),
+ updatedAt: new Date().toISOString(),
+ },
+ {
+ id: 3,
+ flowId: flowId || 0,
+ stepName: "완료",
+ stepOrder: 3,
+ stepType: "end",
+ stepConfig: {},
+ createdAt: new Date().toISOString(),
+ updatedAt: new Date().toISOString(),
+ },
+ ];
+ setSteps(sampleSteps);
+ setStepCounts({ 1: 5, 2: 3, 3: 2 });
+ setConnections([]);
+ setLoading(false);
+ return;
+ }
+
// 플로우 정보 조회
const flowResponse = await getFlowById(flowId!);
if (!flowResponse.success || !flowResponse.data) {
@@ -413,6 +467,11 @@ export function FlowWidget({
// 🆕 스텝 클릭 핸들러 (전역 상태 업데이트 추가)
const handleStepClick = async (stepId: number, stepName: string) => {
+ // 프리뷰 모드에서는 스텝 클릭 차단
+ if (isPreviewMode) {
+ return;
+ }
+
// 외부 콜백 실행
if (onStepClick) {
onStepClick(stepId, stepName);
@@ -485,6 +544,11 @@ export function FlowWidget({
// 체크박스 토글
const toggleRowSelection = (rowIndex: number) => {
+ // 프리뷰 모드에서는 행 선택 차단
+ if (isPreviewMode) {
+ return;
+ }
+
const newSelected = new Set(selectedRows);
if (newSelected.has(rowIndex)) {
newSelected.delete(rowIndex);
@@ -675,7 +739,13 @@ export function FlowWidget({