@burdenoff/microfe-bigconsole 2026.801.1 → 2026.801.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/bigconsole/AdminRoutes.js +1 -1
  2. package/dist/bigconsole/AdminRoutes.js.map +1 -1
  3. package/dist/bigconsole/BigConsoleRoot.js +1 -1
  4. package/dist/bigconsole/BigConsoleRoot.js.map +1 -1
  5. package/dist/bigconsole/BigConsoleRoutes.js +1 -1
  6. package/dist/bigconsole/BigConsoleRoutes.js.map +1 -1
  7. package/dist/bigconsole/components/datasink/LinkedParsersPanel.js +1 -1
  8. package/dist/bigconsole/components/datasink/LinkedParsersPanel.js.map +1 -1
  9. package/dist/bigconsole/contexts/NavigationContext.js +1 -1
  10. package/dist/bigconsole/contexts/NavigationContext.js.map +1 -1
  11. package/dist/bigconsole/hooks/useFilterUrlSync.js +1 -1
  12. package/dist/bigconsole/hooks/useFilterUrlSync.js.map +1 -1
  13. package/dist/bigconsole/pages/DashboardBuilderPage.js +1 -1
  14. package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
  15. package/dist/bigconsole/pages/DashboardViewPage.js +1 -1
  16. package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
  17. package/dist/bigconsole/pages/DataParsersPage.js +1 -1
  18. package/dist/bigconsole/pages/DataParsersPage.js.map +1 -1
  19. package/dist/bigconsole/pages/DataSinkBuilderPage.js +1 -1
  20. package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
  21. package/dist/bigconsole/pages/DataSinkViewPage.js +1 -1
  22. package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
  23. package/dist/bigconsole/pages/ParserBuilderPage.js +1 -1
  24. package/dist/bigconsole/pages/ParserBuilderPage.js.map +1 -1
  25. package/dist/bigconsole/pages/ParserViewPage.js +1 -1
  26. package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
  27. package/dist/bigconsole/pages/PipelineBuilderPage.js +1 -1
  28. package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
  29. package/dist/bigconsole/pages/PipelineViewPage.js +1 -1
  30. package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
  31. package/dist/bigconsole/pages/WorkflowViewPage.js +1 -1
  32. package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
  33. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"PipelineBuilderPage.js","names":[],"sources":["../../../src/bigconsole/pages/PipelineBuilderPage.tsx"],"sourcesContent":["/**\n * Pipeline Builder Page\n *\n * Create and edit Pipelines with stage management.\n * Supports adding, removing, and reordering stages.\n */\n\nimport { memo, useState, useCallback, useEffect, useMemo } from 'react';\nimport { useParams } from 'react-router-dom';\nimport { GlassCard, IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { useAppNavigate } from '../contexts';\nimport { usePipelineOperations } from '../hooks/usePipelineOperations';\nimport { useParserOperations } from '../hooks/useParserOperations';\nimport { PipelineStatusBadge } from '../components/pipeline/PipelineStatusBadge';\nimport type { PipelineStatus, StageErrorHandling, ParserType } from '../types';\n\n// ============================================================================\n// TYPES\n// ============================================================================\n\ninterface StageForm {\n id?: string;\n parserId: string;\n parserName: string;\n parserType: ParserType | null;\n inputKey: string;\n outputKey: string;\n enabled: boolean;\n onError: StageErrorHandling;\n fallbackValue: string;\n description: string;\n}\n\n// ============================================================================\n// ICONS\n// ============================================================================\n\nconst BackIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M10 19l-7-7m0 0l7-7m-7 7h18\" />\n </svg>\n);\n\nconst PlusIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M12 4v16m8-8H4\" />\n </svg>\n);\n\nconst TrashIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16\"\n />\n </svg>\n);\n\nconst ArrowUpIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M5 15l7-7 7 7\" />\n </svg>\n);\n\nconst ArrowDownIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M19 9l-7 7-7-7\" />\n </svg>\n);\n\nconst ErrorIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n);\n\n// ============================================================================\n// CONSTANTS\n// ============================================================================\n\nconst STATUS_OPTIONS: { value: PipelineStatus; label: string }[] = [\n { value: 'draft', label: 'Draft' },\n { value: 'active', label: 'Active' },\n { value: 'inactive', label: 'Inactive' },\n];\n\nconst ERROR_HANDLING_OPTIONS: { value: StageErrorHandling; label: string; description: string }[] = [\n { value: 'fail', label: 'Fail', description: 'Stop pipeline execution on error' },\n { value: 'skip', label: 'Skip', description: 'Skip this stage and continue' },\n { value: 'fallback', label: 'Fallback', description: 'Use fallback value on error' },\n];\n\nconst DEFAULT_STAGE: StageForm = {\n parserId: '',\n parserName: '',\n parserType: null,\n inputKey: 'data',\n outputKey: 'result',\n enabled: true,\n onError: 'fail',\n fallbackValue: '',\n description: '',\n};\n\n// ============================================================================\n// COMPONENT\n// ============================================================================\n\nexport const PipelineBuilderPage = memo(function PipelineBuilderPage() {\n const { pipelineId } = useParams<{ pipelineId: string }>();\n const navigate = useAppNavigate();\n const isEditMode = !!pipelineId && pipelineId !== 'new';\n // Use default consoleId for now (should come from context in production)\n const consoleId = 'default';\n\n // Form state\n const [name, setName] = useState('');\n const [description, setDescription] = useState('');\n const [status, setStatus] = useState<PipelineStatus>('draft');\n const [stages, setStages] = useState<StageForm[]>([]);\n const [version, setVersion] = useState(1);\n const [isSaving, setIsSaving] = useState(false);\n const [saveError, setSaveError] = useState<string | null>(null);\n\n // Operations\n const {\n loading: pipelineLoading,\n error: pipelineError,\n fetchPipeline,\n createPipeline,\n updatePipeline,\n } = usePipelineOperations({\n consoleId,\n skipFetch: true,\n });\n\n const { parsers } = useParserOperations({\n consoleId,\n });\n\n // Load existing pipeline in edit mode\n useEffect(() => {\n if (isEditMode && pipelineId) {\n fetchPipeline(pipelineId).then((pipeline) => {\n if (pipeline) {\n setName(pipeline.name);\n setDescription(pipeline.description || '');\n setStatus(pipeline.status);\n setVersion(pipeline.version);\n setStages(\n (pipeline.stages || []).map((s) => ({\n id: s.id,\n parserId: s.parserId,\n parserName: s.parserName || '',\n parserType: s.parserType,\n inputKey: s.inputKey,\n outputKey: s.outputKey,\n enabled: s.enabled,\n onError: s.onError,\n fallbackValue: s.fallbackValue ? JSON.stringify(s.fallbackValue) : '',\n description: s.description || '',\n }))\n );\n }\n });\n }\n }, [isEditMode, pipelineId, fetchPipeline]);\n\n // Validation\n const isValid = useMemo(() => {\n if (!name.trim()) return false;\n if (stages.length === 0) return false;\n return stages.every((s) => s.parserId && s.inputKey && s.outputKey);\n }, [name, stages]);\n\n // Handlers\n const handleBack = useCallback(() => {\n navigate(`/pipelines`);\n }, [navigate]);\n\n const handleAddStage = useCallback(() => {\n setStages((prev) => [...prev, { ...DEFAULT_STAGE }]);\n }, []);\n\n const handleRemoveStage = useCallback((index: number) => {\n setStages((prev) => prev.filter((_, i) => i !== index));\n }, []);\n\n const handleMoveStage = useCallback((index: number, direction: 'up' | 'down') => {\n setStages((prev) => {\n const newStages = [...prev];\n const targetIndex = direction === 'up' ? index - 1 : index + 1;\n if (targetIndex < 0 || targetIndex >= newStages.length) return prev;\n [newStages[index], newStages[targetIndex]] = [newStages[targetIndex], newStages[index]];\n return newStages;\n });\n }, []);\n\n const handleUpdateStage = useCallback((index: number, updates: Partial<StageForm>) => {\n setStages((prev) => prev.map((stage, i) => (i === index ? { ...stage, ...updates } : stage)));\n }, []);\n\n const handleParserSelect = useCallback(\n (index: number, parserId: string) => {\n const parser = parsers.find((p) => p.id === parserId);\n if (parser) {\n handleUpdateStage(index, {\n parserId: parser.id,\n parserName: parser.name,\n parserType: parser.type,\n });\n }\n },\n [parsers, handleUpdateStage]\n );\n\n const handleSave = useCallback(async () => {\n if (!isValid || !consoleId) return;\n\n setIsSaving(true);\n setSaveError(null);\n\n try {\n const stageInputs = stages.map((s) => ({\n parserId: s.parserId,\n parserName: s.parserName,\n parserType: s.parserType || undefined,\n inputKey: s.inputKey,\n outputKey: s.outputKey,\n enabled: s.enabled,\n onError: s.onError,\n fallbackValue: s.fallbackValue ? JSON.parse(s.fallbackValue) : undefined,\n description: s.description || undefined,\n }));\n\n if (isEditMode && pipelineId) {\n const result = await updatePipeline(\n pipelineId,\n {\n name,\n description: description || undefined,\n status,\n },\n version\n );\n if (result) {\n navigate(`/pipelines/${pipelineId}`);\n }\n } else {\n const result = await createPipeline({\n consoleId,\n name,\n description: description || undefined,\n status,\n stages: stageInputs,\n });\n if (result) {\n navigate(`/pipelines/${result.id}`);\n }\n }\n } catch (err) {\n setSaveError(err instanceof Error ? err.message : 'Failed to save pipeline');\n } finally {\n setIsSaving(false);\n }\n }, [\n isValid,\n consoleId,\n isEditMode,\n pipelineId,\n name,\n description,\n status,\n stages,\n version,\n createPipeline,\n updatePipeline,\n navigate,\n ]);\n\n // Loading state\n if (pipelineLoading && isEditMode) {\n return (\n <div className=\"p-6\">\n <div className=\"flex flex-col items-center justify-center py-16\">\n <svg className=\"w-8 h-8 text-action-primary-bg animate-spin mb-4\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle className=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" strokeWidth=\"4\" />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n />\n </svg>\n <p className=\"text-sm text-text-secondary\">Loading Pipeline...</p>\n </div>\n </div>\n );\n }\n\n // Error state\n if (pipelineError) {\n return (\n <div className=\"p-6\">\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"p-3 rounded-full bg-status-error-bg/10 mb-4\">\n <ErrorIcon className=\"w-8 h-8 text-status-error-text\" />\n </div>\n <h3 className=\"text-lg font-medium text-text-primary mb-2\">Failed to load Pipeline</h3>\n <p className=\"text-sm text-text-secondary mb-4\">{pipelineError.message}</p>\n <button\n type=\"button\"\n onClick={handleBack}\n className=\"px-4 py-2 text-sm font-medium text-action-primary-fg bg-action-primary-bg hover:bg-action-primary-bgHover rounded-md transition-colors\"\n >\n Back to Pipelines\n </button>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"p-6\">\n {/* Header */}\n <div className=\"flex items-center justify-between mb-6\">\n <div className=\"flex items-center gap-4\">\n <button\n type=\"button\"\n onClick={handleBack}\n className=\"p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-md transition-colors\"\n >\n <BackIcon className=\"w-5 h-5\" />\n </button>\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">{isEditMode ? 'Edit Pipeline' : 'Create Pipeline'}</h1>\n <p className=\"text-sm text-text-secondary mt-1\">\n {isEditMode ? 'Update pipeline settings and stages' : 'Create a new data transformation pipeline'}\n </p>\n </div>\n </div>\n\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={handleBack}\n className=\"px-4 py-2 text-sm font-medium text-text-primary bg-bg-sunken hover:bg-border-default rounded-md transition-colors\"\n >\n Cancel\n </button>\n <button\n type=\"button\"\n onClick={handleSave}\n disabled={!isValid || isSaving}\n className=\"px-4 py-2 text-sm font-medium text-action-primary-fg bg-action-primary-bg hover:bg-action-primary-bgHover rounded-md transition-colors disabled:opacity-50\"\n >\n {isSaving ? 'Saving...' : isEditMode ? 'Save Changes' : 'Create Pipeline'}\n </button>\n </div>\n </div>\n\n <PagePurpose className=\"mb-6\">\n Build a pipeline by chaining parser stages — each stage reads an input key, runs a parser, and writes a\n structured output key that the next stage (or a data sink) can use. Name it, add your stages in order, then test\n it before saving so your data flows end to end.\n </PagePurpose>\n\n {/* Error Message */}\n {saveError && (\n <div className=\"mb-6 p-4 bg-status-error-bg/10 border border-status-error-border/20 rounded-md\">\n <p className=\"text-sm text-status-error-text\">{saveError}</p>\n </div>\n )}\n\n <div className=\"grid grid-cols-1 lg:grid-cols-3 gap-6\">\n {/* Main Form */}\n <div className=\"lg:col-span-2 space-y-6\">\n {/* Basic Info */}\n <div className=\"bg-bg-surface border border-border-default rounded-lg p-6\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">Basic Information</h2>\n\n <div className=\"space-y-4\">\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-2\">\n Name <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n type=\"text\"\n value={name}\n onChange={(e) => setName(e.target.value)}\n placeholder=\"My Pipeline\"\n className=\"w-full px-3 py-2 text-sm text-text-primary bg-bg-surface border border-border-default rounded-md focus:outline-none focus:ring-2 focus:ring-action-primary-bg\"\n />\n </div>\n\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-2\">Description</label>\n <textarea\n value={description}\n onChange={(e) => setDescription(e.target.value)}\n placeholder=\"What does this pipeline do?\"\n rows={3}\n className=\"w-full px-3 py-2 text-sm text-text-primary bg-bg-surface border border-border-default rounded-md focus:outline-none focus:ring-2 focus:ring-action-primary-bg resize-none\"\n />\n </div>\n\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-2\">Status</label>\n <select\n value={status}\n onChange={(e) => setStatus(e.target.value as PipelineStatus)}\n className=\"w-full px-3 py-2 text-sm text-text-primary bg-bg-surface border border-border-default rounded-md focus:outline-none focus:ring-2 focus:ring-action-primary-bg\"\n >\n {STATUS_OPTIONS.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {opt.label}\n </option>\n ))}\n </select>\n </div>\n </div>\n </div>\n\n {/* Stages — primary emphasis zone */}\n <GlassCard treatment=\"glass\" glow className=\"p-6\">\n <div className=\"flex items-center justify-between mb-4\">\n <h2 className=\"text-lg font-semibold text-text-primary\">Stages ({stages.length})</h2>\n <button\n type=\"button\"\n onClick={handleAddStage}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium text-action-primary-fg bg-action-primary-bg hover:bg-action-primary-bgHover rounded-md transition-colors\"\n >\n <PlusIcon className=\"w-4 h-4\" />\n Add Stage\n </button>\n </div>\n\n {stages.length === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-generic\"\n title=\"No stages yet\"\n description=\"Add a stage to start building your pipeline.\"\n action={\n <button\n type=\"button\"\n onClick={handleAddStage}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-fg bg-action-primary-bg hover:bg-action-primary-bgHover rounded-md transition-colors\"\n >\n <PlusIcon className=\"w-4 h-4\" />\n Add First Stage\n </button>\n }\n />\n ) : (\n <div className=\"space-y-4\">\n {stages.map((stage, index) => (\n <div key={index} className=\"p-4 bg-bg-sunken border border-border-default rounded-lg\">\n <div className=\"flex items-center justify-between mb-4\">\n <div className=\"flex items-center gap-2\">\n <span className=\"w-6 h-6 flex items-center justify-center text-xs font-medium bg-action-primary-bg/10 text-action-primary-bg rounded-full\">\n {index + 1}\n </span>\n <span className=\"font-medium text-text-primary\">\n {stage.parserName || `Stage ${index + 1}`}\n </span>\n </div>\n <div className=\"flex items-center gap-1\">\n <button\n type=\"button\"\n onClick={() => handleMoveStage(index, 'up')}\n disabled={index === 0}\n className=\"p-1 text-text-secondary hover:text-text-primary hover:bg-bg-surface rounded disabled:opacity-30\"\n >\n <ArrowUpIcon className=\"w-4 h-4\" />\n </button>\n <button\n type=\"button\"\n onClick={() => handleMoveStage(index, 'down')}\n disabled={index === stages.length - 1}\n className=\"p-1 text-text-secondary hover:text-text-primary hover:bg-bg-surface rounded disabled:opacity-30\"\n >\n <ArrowDownIcon className=\"w-4 h-4\" />\n </button>\n <button\n type=\"button\"\n onClick={() => handleRemoveStage(index)}\n className=\"p-1 text-text-secondary hover:text-status-error-text hover:bg-status-error-bg/10 rounded\"\n >\n <TrashIcon className=\"w-4 h-4\" />\n </button>\n </div>\n </div>\n\n <div className=\"grid grid-cols-2 gap-4\">\n <div className=\"col-span-2\">\n <label className=\"block text-xs font-medium text-text-secondary mb-1\">\n Parser <span className=\"text-status-error-text\">*</span>\n </label>\n <select\n value={stage.parserId}\n onChange={(e) => handleParserSelect(index, e.target.value)}\n className=\"w-full px-3 py-2 text-sm text-text-primary bg-bg-surface border border-border-default rounded-md focus:outline-none focus:ring-2 focus:ring-action-primary-bg\"\n >\n <option value=\"\">Select a parser...</option>\n {parsers.map((p) => (\n <option key={p.id} value={p.id}>\n {p.name} ({p.type.toUpperCase()})\n </option>\n ))}\n </select>\n </div>\n\n <div>\n <label className=\"block text-xs font-medium text-text-secondary mb-1\">\n Input Key <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n type=\"text\"\n value={stage.inputKey}\n onChange={(e) => handleUpdateStage(index, { inputKey: e.target.value })}\n placeholder=\"data\"\n className=\"w-full px-3 py-2 text-sm font-mono text-text-primary bg-bg-surface border border-border-default rounded-md focus:outline-none focus:ring-2 focus:ring-action-primary-bg\"\n />\n </div>\n\n <div>\n <label className=\"block text-xs font-medium text-text-secondary mb-1\">\n Output Key <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n type=\"text\"\n value={stage.outputKey}\n onChange={(e) => handleUpdateStage(index, { outputKey: e.target.value })}\n placeholder=\"result\"\n className=\"w-full px-3 py-2 text-sm font-mono text-text-primary bg-bg-surface border border-border-default rounded-md focus:outline-none focus:ring-2 focus:ring-action-primary-bg\"\n />\n </div>\n\n <div>\n <label className=\"block text-xs font-medium text-text-secondary mb-1\">On Error</label>\n <select\n value={stage.onError}\n onChange={(e) =>\n handleUpdateStage(index, {\n onError: e.target.value as StageErrorHandling,\n })\n }\n className=\"w-full px-3 py-2 text-sm text-text-primary bg-bg-surface border border-border-default rounded-md focus:outline-none focus:ring-2 focus:ring-action-primary-bg\"\n >\n {ERROR_HANDLING_OPTIONS.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {opt.label}\n </option>\n ))}\n </select>\n </div>\n\n <div className=\"flex items-center\">\n <label className=\"flex items-center gap-2 cursor-pointer\">\n <input\n type=\"checkbox\"\n checked={stage.enabled}\n onChange={(e) => handleUpdateStage(index, { enabled: e.target.checked })}\n className=\"w-4 h-4 rounded border-border-default text-action-primary-bg focus:ring-action-primary-bg\"\n />\n <span className=\"text-sm text-text-primary\">Enabled</span>\n </label>\n </div>\n\n {stage.onError === 'fallback' && (\n <div className=\"col-span-2\">\n <label className=\"block text-xs font-medium text-text-secondary mb-1\">\n Fallback Value (JSON)\n </label>\n <input\n type=\"text\"\n value={stage.fallbackValue}\n onChange={(e) => handleUpdateStage(index, { fallbackValue: e.target.value })}\n placeholder='{\"default\": true}'\n className=\"w-full px-3 py-2 text-sm font-mono text-text-primary bg-bg-surface border border-border-default rounded-md focus:outline-none focus:ring-2 focus:ring-action-primary-bg\"\n />\n </div>\n )}\n </div>\n </div>\n ))}\n </div>\n )}\n </GlassCard>\n </div>\n\n {/* Sidebar */}\n <div className=\"space-y-6\">\n {/* Preview */}\n <div className=\"bg-bg-surface border border-border-default rounded-lg p-6\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">Preview</h2>\n\n <div className=\"space-y-3\">\n <div>\n <span className=\"text-xs text-text-secondary\">Name</span>\n <p className=\"text-sm text-text-primary\">{name || 'Untitled'}</p>\n </div>\n\n <div>\n <span className=\"text-xs text-text-secondary\">Status</span>\n <div className=\"mt-1\">\n <PipelineStatusBadge status={status} />\n </div>\n </div>\n\n <div>\n <span className=\"text-xs text-text-secondary\">Stages</span>\n <p className=\"text-sm text-text-primary\">{stages.length}</p>\n </div>\n\n {stages.length > 0 && (\n <div>\n <span className=\"text-xs text-text-secondary\">Data Flow</span>\n <div className=\"mt-1 text-xs font-mono text-text-secondary\">\n {stages.map((s, i) => (\n <span key={i}>\n {s.inputKey}\n {i < stages.length - 1 && ' → '}\n </span>\n ))}\n {stages.length > 0 && ` → ${stages[stages.length - 1].outputKey}`}\n </div>\n </div>\n )}\n </div>\n </div>\n\n {/* Help */}\n <div className=\"bg-bg-sunken border border-border-default rounded-lg p-6\">\n <h3 className=\"text-sm font-semibold text-text-primary mb-2\">Tips</h3>\n <ul className=\"text-xs text-text-secondary space-y-2\">\n <li>• Each stage processes the output of the previous stage</li>\n <li>• Use consistent input/output keys to chain data</li>\n <li>• Set error handling per stage for robustness</li>\n <li>• Disable stages to skip them during execution</li>\n </ul>\n </div>\n </div>\n </div>\n </div>\n );\n});\n\nexport default PipelineBuilderPage;\n"],"mappings":";;;;;;;;;;AAqCA,IAAM,KAAY,EAAE,mBAClB,kBAAC,OAAD;CAAgB;CAAW,MAAK;CAAO,QAAO;CAAe,SAAQ;WACnE,kBAAC,QAAD;EAAM,eAAc;EAAQ,gBAAe;EAAQ,aAAa;EAAG,GAAE;EAAgC,CAAA;CACjG,CAAA,EAGF,KAAY,EAAE,mBAClB,kBAAC,OAAD;CAAgB;CAAW,MAAK;CAAO,QAAO;CAAe,SAAQ;WACnE,kBAAC,QAA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,2DAA4D,CAAA;QAChE,kBAAC,MAAD,EAAA,UAAI,oDAAqD,CAAA;QACzD,kBAAC,MAAD,EAAA,UAAI,iDAAkD,CAAA;QACtD,kBAAC,MAAD,EAAA,UAAI,kDAAmD,CAAA;QACpD;SACD;QACF;OACF;;GACF;;EAER"}
1
+ {"version":3,"file":"PipelineBuilderPage.js","names":[],"sources":["../../../src/bigconsole/pages/PipelineBuilderPage.tsx"],"sourcesContent":["/**\n * Pipeline Builder Page\n *\n * Create and edit Pipelines with stage management.\n * Supports adding, removing, and reordering stages.\n */\n\nimport { memo, useState, useCallback, useEffect, useMemo } from 'react';\nimport { useParams } from 'react-router';\nimport { GlassCard, IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { useAppNavigate } from '../contexts';\nimport { usePipelineOperations } from '../hooks/usePipelineOperations';\nimport { useParserOperations } from '../hooks/useParserOperations';\nimport { PipelineStatusBadge } from '../components/pipeline/PipelineStatusBadge';\nimport type { PipelineStatus, StageErrorHandling, ParserType } from '../types';\n\n// ============================================================================\n// TYPES\n// ============================================================================\n\ninterface StageForm {\n id?: string;\n parserId: string;\n parserName: string;\n parserType: ParserType | null;\n inputKey: string;\n outputKey: string;\n enabled: boolean;\n onError: StageErrorHandling;\n fallbackValue: string;\n description: string;\n}\n\n// ============================================================================\n// ICONS\n// ============================================================================\n\nconst BackIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M10 19l-7-7m0 0l7-7m-7 7h18\" />\n </svg>\n);\n\nconst PlusIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M12 4v16m8-8H4\" />\n </svg>\n);\n\nconst TrashIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16\"\n />\n </svg>\n);\n\nconst ArrowUpIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M5 15l7-7 7 7\" />\n </svg>\n);\n\nconst ArrowDownIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M19 9l-7 7-7-7\" />\n </svg>\n);\n\nconst ErrorIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n);\n\n// ============================================================================\n// CONSTANTS\n// ============================================================================\n\nconst STATUS_OPTIONS: { value: PipelineStatus; label: string }[] = [\n { value: 'draft', label: 'Draft' },\n { value: 'active', label: 'Active' },\n { value: 'inactive', label: 'Inactive' },\n];\n\nconst ERROR_HANDLING_OPTIONS: { value: StageErrorHandling; label: string; description: string }[] = [\n { value: 'fail', label: 'Fail', description: 'Stop pipeline execution on error' },\n { value: 'skip', label: 'Skip', description: 'Skip this stage and continue' },\n { value: 'fallback', label: 'Fallback', description: 'Use fallback value on error' },\n];\n\nconst DEFAULT_STAGE: StageForm = {\n parserId: '',\n parserName: '',\n parserType: null,\n inputKey: 'data',\n outputKey: 'result',\n enabled: true,\n onError: 'fail',\n fallbackValue: '',\n description: '',\n};\n\n// ============================================================================\n// COMPONENT\n// ============================================================================\n\nexport const PipelineBuilderPage = memo(function PipelineBuilderPage() {\n const { pipelineId } = useParams<{ pipelineId: string }>();\n const navigate = useAppNavigate();\n const isEditMode = !!pipelineId && pipelineId !== 'new';\n // Use default consoleId for now (should come from context in production)\n const consoleId = 'default';\n\n // Form state\n const [name, setName] = useState('');\n const [description, setDescription] = useState('');\n const [status, setStatus] = useState<PipelineStatus>('draft');\n const [stages, setStages] = useState<StageForm[]>([]);\n const [version, setVersion] = useState(1);\n const [isSaving, setIsSaving] = useState(false);\n const [saveError, setSaveError] = useState<string | null>(null);\n\n // Operations\n const {\n loading: pipelineLoading,\n error: pipelineError,\n fetchPipeline,\n createPipeline,\n updatePipeline,\n } = usePipelineOperations({\n consoleId,\n skipFetch: true,\n });\n\n const { parsers } = useParserOperations({\n consoleId,\n });\n\n // Load existing pipeline in edit mode\n useEffect(() => {\n if (isEditMode && pipelineId) {\n fetchPipeline(pipelineId).then((pipeline) => {\n if (pipeline) {\n setName(pipeline.name);\n setDescription(pipeline.description || '');\n setStatus(pipeline.status);\n setVersion(pipeline.version);\n setStages(\n (pipeline.stages || []).map((s) => ({\n id: s.id,\n parserId: s.parserId,\n parserName: s.parserName || '',\n parserType: s.parserType,\n inputKey: s.inputKey,\n outputKey: s.outputKey,\n enabled: s.enabled,\n onError: s.onError,\n fallbackValue: s.fallbackValue ? JSON.stringify(s.fallbackValue) : '',\n description: s.description || '',\n }))\n );\n }\n });\n }\n }, [isEditMode, pipelineId, fetchPipeline]);\n\n // Validation\n const isValid = useMemo(() => {\n if (!name.trim()) return false;\n if (stages.length === 0) return false;\n return stages.every((s) => s.parserId && s.inputKey && s.outputKey);\n }, [name, stages]);\n\n // Handlers\n const handleBack = useCallback(() => {\n navigate(`/pipelines`);\n }, [navigate]);\n\n const handleAddStage = useCallback(() => {\n setStages((prev) => [...prev, { ...DEFAULT_STAGE }]);\n }, []);\n\n const handleRemoveStage = useCallback((index: number) => {\n setStages((prev) => prev.filter((_, i) => i !== index));\n }, []);\n\n const handleMoveStage = useCallback((index: number, direction: 'up' | 'down') => {\n setStages((prev) => {\n const newStages = [...prev];\n const targetIndex = direction === 'up' ? index - 1 : index + 1;\n if (targetIndex < 0 || targetIndex >= newStages.length) return prev;\n [newStages[index], newStages[targetIndex]] = [newStages[targetIndex], newStages[index]];\n return newStages;\n });\n }, []);\n\n const handleUpdateStage = useCallback((index: number, updates: Partial<StageForm>) => {\n setStages((prev) => prev.map((stage, i) => (i === index ? { ...stage, ...updates } : stage)));\n }, []);\n\n const handleParserSelect = useCallback(\n (index: number, parserId: string) => {\n const parser = parsers.find((p) => p.id === parserId);\n if (parser) {\n handleUpdateStage(index, {\n parserId: parser.id,\n parserName: parser.name,\n parserType: parser.type,\n });\n }\n },\n [parsers, handleUpdateStage]\n );\n\n const handleSave = useCallback(async () => {\n if (!isValid || !consoleId) return;\n\n setIsSaving(true);\n setSaveError(null);\n\n try {\n const stageInputs = stages.map((s) => ({\n parserId: s.parserId,\n parserName: s.parserName,\n parserType: s.parserType || undefined,\n inputKey: s.inputKey,\n outputKey: s.outputKey,\n enabled: s.enabled,\n onError: s.onError,\n fallbackValue: s.fallbackValue ? JSON.parse(s.fallbackValue) : undefined,\n description: s.description || undefined,\n }));\n\n if (isEditMode && pipelineId) {\n const result = await updatePipeline(\n pipelineId,\n {\n name,\n description: description || undefined,\n status,\n },\n version\n );\n if (result) {\n navigate(`/pipelines/${pipelineId}`);\n }\n } else {\n const result = await createPipeline({\n consoleId,\n name,\n description: description || undefined,\n status,\n stages: stageInputs,\n });\n if (result) {\n navigate(`/pipelines/${result.id}`);\n }\n }\n } catch (err) {\n setSaveError(err instanceof Error ? err.message : 'Failed to save pipeline');\n } finally {\n setIsSaving(false);\n }\n }, [\n isValid,\n consoleId,\n isEditMode,\n pipelineId,\n name,\n description,\n status,\n stages,\n version,\n createPipeline,\n updatePipeline,\n navigate,\n ]);\n\n // Loading state\n if (pipelineLoading && isEditMode) {\n return (\n <div className=\"p-6\">\n <div className=\"flex flex-col items-center justify-center py-16\">\n <svg className=\"w-8 h-8 text-action-primary-bg animate-spin mb-4\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle className=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" strokeWidth=\"4\" />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n />\n </svg>\n <p className=\"text-sm text-text-secondary\">Loading Pipeline...</p>\n </div>\n </div>\n );\n }\n\n // Error state\n if (pipelineError) {\n return (\n <div className=\"p-6\">\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"p-3 rounded-full bg-status-error-bg/10 mb-4\">\n <ErrorIcon className=\"w-8 h-8 text-status-error-text\" />\n </div>\n <h3 className=\"text-lg font-medium text-text-primary mb-2\">Failed to load Pipeline</h3>\n <p className=\"text-sm text-text-secondary mb-4\">{pipelineError.message}</p>\n <button\n type=\"button\"\n onClick={handleBack}\n className=\"px-4 py-2 text-sm font-medium text-action-primary-fg bg-action-primary-bg hover:bg-action-primary-bgHover rounded-md transition-colors\"\n >\n Back to Pipelines\n </button>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"p-6\">\n {/* Header */}\n <div className=\"flex items-center justify-between mb-6\">\n <div className=\"flex items-center gap-4\">\n <button\n type=\"button\"\n onClick={handleBack}\n className=\"p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-md transition-colors\"\n >\n <BackIcon className=\"w-5 h-5\" />\n </button>\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">{isEditMode ? 'Edit Pipeline' : 'Create Pipeline'}</h1>\n <p className=\"text-sm text-text-secondary mt-1\">\n {isEditMode ? 'Update pipeline settings and stages' : 'Create a new data transformation pipeline'}\n </p>\n </div>\n </div>\n\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={handleBack}\n className=\"px-4 py-2 text-sm font-medium text-text-primary bg-bg-sunken hover:bg-border-default rounded-md transition-colors\"\n >\n Cancel\n </button>\n <button\n type=\"button\"\n onClick={handleSave}\n disabled={!isValid || isSaving}\n className=\"px-4 py-2 text-sm font-medium text-action-primary-fg bg-action-primary-bg hover:bg-action-primary-bgHover rounded-md transition-colors disabled:opacity-50\"\n >\n {isSaving ? 'Saving...' : isEditMode ? 'Save Changes' : 'Create Pipeline'}\n </button>\n </div>\n </div>\n\n <PagePurpose className=\"mb-6\">\n Build a pipeline by chaining parser stages — each stage reads an input key, runs a parser, and writes a\n structured output key that the next stage (or a data sink) can use. Name it, add your stages in order, then test\n it before saving so your data flows end to end.\n </PagePurpose>\n\n {/* Error Message */}\n {saveError && (\n <div className=\"mb-6 p-4 bg-status-error-bg/10 border border-status-error-border/20 rounded-md\">\n <p className=\"text-sm text-status-error-text\">{saveError}</p>\n </div>\n )}\n\n <div className=\"grid grid-cols-1 lg:grid-cols-3 gap-6\">\n {/* Main Form */}\n <div className=\"lg:col-span-2 space-y-6\">\n {/* Basic Info */}\n <div className=\"bg-bg-surface border border-border-default rounded-lg p-6\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">Basic Information</h2>\n\n <div className=\"space-y-4\">\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-2\">\n Name <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n type=\"text\"\n value={name}\n onChange={(e) => setName(e.target.value)}\n placeholder=\"My Pipeline\"\n className=\"w-full px-3 py-2 text-sm text-text-primary bg-bg-surface border border-border-default rounded-md focus:outline-none focus:ring-2 focus:ring-action-primary-bg\"\n />\n </div>\n\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-2\">Description</label>\n <textarea\n value={description}\n onChange={(e) => setDescription(e.target.value)}\n placeholder=\"What does this pipeline do?\"\n rows={3}\n className=\"w-full px-3 py-2 text-sm text-text-primary bg-bg-surface border border-border-default rounded-md focus:outline-none focus:ring-2 focus:ring-action-primary-bg resize-none\"\n />\n </div>\n\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-2\">Status</label>\n <select\n value={status}\n onChange={(e) => setStatus(e.target.value as PipelineStatus)}\n className=\"w-full px-3 py-2 text-sm text-text-primary bg-bg-surface border border-border-default rounded-md focus:outline-none focus:ring-2 focus:ring-action-primary-bg\"\n >\n {STATUS_OPTIONS.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {opt.label}\n </option>\n ))}\n </select>\n </div>\n </div>\n </div>\n\n {/* Stages — primary emphasis zone */}\n <GlassCard treatment=\"glass\" glow className=\"p-6\">\n <div className=\"flex items-center justify-between mb-4\">\n <h2 className=\"text-lg font-semibold text-text-primary\">Stages ({stages.length})</h2>\n <button\n type=\"button\"\n onClick={handleAddStage}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium text-action-primary-fg bg-action-primary-bg hover:bg-action-primary-bgHover rounded-md transition-colors\"\n >\n <PlusIcon className=\"w-4 h-4\" />\n Add Stage\n </button>\n </div>\n\n {stages.length === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-generic\"\n title=\"No stages yet\"\n description=\"Add a stage to start building your pipeline.\"\n action={\n <button\n type=\"button\"\n onClick={handleAddStage}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-fg bg-action-primary-bg hover:bg-action-primary-bgHover rounded-md transition-colors\"\n >\n <PlusIcon className=\"w-4 h-4\" />\n Add First Stage\n </button>\n }\n />\n ) : (\n <div className=\"space-y-4\">\n {stages.map((stage, index) => (\n <div key={index} className=\"p-4 bg-bg-sunken border border-border-default rounded-lg\">\n <div className=\"flex items-center justify-between mb-4\">\n <div className=\"flex items-center gap-2\">\n <span className=\"w-6 h-6 flex items-center justify-center text-xs font-medium bg-action-primary-bg/10 text-action-primary-bg rounded-full\">\n {index + 1}\n </span>\n <span className=\"font-medium text-text-primary\">\n {stage.parserName || `Stage ${index + 1}`}\n </span>\n </div>\n <div className=\"flex items-center gap-1\">\n <button\n type=\"button\"\n onClick={() => handleMoveStage(index, 'up')}\n disabled={index === 0}\n className=\"p-1 text-text-secondary hover:text-text-primary hover:bg-bg-surface rounded disabled:opacity-30\"\n >\n <ArrowUpIcon className=\"w-4 h-4\" />\n </button>\n <button\n type=\"button\"\n onClick={() => handleMoveStage(index, 'down')}\n disabled={index === stages.length - 1}\n className=\"p-1 text-text-secondary hover:text-text-primary hover:bg-bg-surface rounded disabled:opacity-30\"\n >\n <ArrowDownIcon className=\"w-4 h-4\" />\n </button>\n <button\n type=\"button\"\n onClick={() => handleRemoveStage(index)}\n className=\"p-1 text-text-secondary hover:text-status-error-text hover:bg-status-error-bg/10 rounded\"\n >\n <TrashIcon className=\"w-4 h-4\" />\n </button>\n </div>\n </div>\n\n <div className=\"grid grid-cols-2 gap-4\">\n <div className=\"col-span-2\">\n <label className=\"block text-xs font-medium text-text-secondary mb-1\">\n Parser <span className=\"text-status-error-text\">*</span>\n </label>\n <select\n value={stage.parserId}\n onChange={(e) => handleParserSelect(index, e.target.value)}\n className=\"w-full px-3 py-2 text-sm text-text-primary bg-bg-surface border border-border-default rounded-md focus:outline-none focus:ring-2 focus:ring-action-primary-bg\"\n >\n <option value=\"\">Select a parser...</option>\n {parsers.map((p) => (\n <option key={p.id} value={p.id}>\n {p.name} ({p.type.toUpperCase()})\n </option>\n ))}\n </select>\n </div>\n\n <div>\n <label className=\"block text-xs font-medium text-text-secondary mb-1\">\n Input Key <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n type=\"text\"\n value={stage.inputKey}\n onChange={(e) => handleUpdateStage(index, { inputKey: e.target.value })}\n placeholder=\"data\"\n className=\"w-full px-3 py-2 text-sm font-mono text-text-primary bg-bg-surface border border-border-default rounded-md focus:outline-none focus:ring-2 focus:ring-action-primary-bg\"\n />\n </div>\n\n <div>\n <label className=\"block text-xs font-medium text-text-secondary mb-1\">\n Output Key <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n type=\"text\"\n value={stage.outputKey}\n onChange={(e) => handleUpdateStage(index, { outputKey: e.target.value })}\n placeholder=\"result\"\n className=\"w-full px-3 py-2 text-sm font-mono text-text-primary bg-bg-surface border border-border-default rounded-md focus:outline-none focus:ring-2 focus:ring-action-primary-bg\"\n />\n </div>\n\n <div>\n <label className=\"block text-xs font-medium text-text-secondary mb-1\">On Error</label>\n <select\n value={stage.onError}\n onChange={(e) =>\n handleUpdateStage(index, {\n onError: e.target.value as StageErrorHandling,\n })\n }\n className=\"w-full px-3 py-2 text-sm text-text-primary bg-bg-surface border border-border-default rounded-md focus:outline-none focus:ring-2 focus:ring-action-primary-bg\"\n >\n {ERROR_HANDLING_OPTIONS.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {opt.label}\n </option>\n ))}\n </select>\n </div>\n\n <div className=\"flex items-center\">\n <label className=\"flex items-center gap-2 cursor-pointer\">\n <input\n type=\"checkbox\"\n checked={stage.enabled}\n onChange={(e) => handleUpdateStage(index, { enabled: e.target.checked })}\n className=\"w-4 h-4 rounded border-border-default text-action-primary-bg focus:ring-action-primary-bg\"\n />\n <span className=\"text-sm text-text-primary\">Enabled</span>\n </label>\n </div>\n\n {stage.onError === 'fallback' && (\n <div className=\"col-span-2\">\n <label className=\"block text-xs font-medium text-text-secondary mb-1\">\n Fallback Value (JSON)\n </label>\n <input\n type=\"text\"\n value={stage.fallbackValue}\n onChange={(e) => handleUpdateStage(index, { fallbackValue: e.target.value })}\n placeholder='{\"default\": true}'\n className=\"w-full px-3 py-2 text-sm font-mono text-text-primary bg-bg-surface border border-border-default rounded-md focus:outline-none focus:ring-2 focus:ring-action-primary-bg\"\n />\n </div>\n )}\n </div>\n </div>\n ))}\n </div>\n )}\n </GlassCard>\n </div>\n\n {/* Sidebar */}\n <div className=\"space-y-6\">\n {/* Preview */}\n <div className=\"bg-bg-surface border border-border-default rounded-lg p-6\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">Preview</h2>\n\n <div className=\"space-y-3\">\n <div>\n <span className=\"text-xs text-text-secondary\">Name</span>\n <p className=\"text-sm text-text-primary\">{name || 'Untitled'}</p>\n </div>\n\n <div>\n <span className=\"text-xs text-text-secondary\">Status</span>\n <div className=\"mt-1\">\n <PipelineStatusBadge status={status} />\n </div>\n </div>\n\n <div>\n <span className=\"text-xs text-text-secondary\">Stages</span>\n <p className=\"text-sm text-text-primary\">{stages.length}</p>\n </div>\n\n {stages.length > 0 && (\n <div>\n <span className=\"text-xs text-text-secondary\">Data Flow</span>\n <div className=\"mt-1 text-xs font-mono text-text-secondary\">\n {stages.map((s, i) => (\n <span key={i}>\n {s.inputKey}\n {i < stages.length - 1 && ' → '}\n </span>\n ))}\n {stages.length > 0 && ` → ${stages[stages.length - 1].outputKey}`}\n </div>\n </div>\n )}\n </div>\n </div>\n\n {/* Help */}\n <div className=\"bg-bg-sunken border border-border-default rounded-lg p-6\">\n <h3 className=\"text-sm font-semibold text-text-primary mb-2\">Tips</h3>\n <ul className=\"text-xs text-text-secondary space-y-2\">\n <li>• Each stage processes the output of the previous stage</li>\n <li>• Use consistent input/output keys to chain data</li>\n <li>• Set error handling per stage for robustness</li>\n <li>• Disable stages to skip them during execution</li>\n </ul>\n </div>\n </div>\n </div>\n </div>\n );\n});\n\nexport default PipelineBuilderPage;\n"],"mappings":";;;;;;;;;;AAqCA,IAAM,KAAY,EAAE,mBAClB,kBAAC,OAAD;CAAgB;CAAW,MAAK;CAAO,QAAO;CAAe,SAAQ;WACnE,kBAAC,QAAD;EAAM,eAAc;EAAQ,gBAAe;EAAQ,aAAa;EAAG,GAAE;EAAgC,CAAA;CACjG,CAAA,EAGF,KAAY,EAAE,mBAClB,kBAAC,OAAD;CAAgB;CAAW,MAAK;CAAO,QAAO;CAAe,SAAQ;WACnE,kBAAC,QAAD;EAAM,eAAc;EAAQ,gBAAe;EAAQ,aAAa;EAAG,GAAE;EAAmB,CAAA;CACpF,CA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AAD,EAAA,UAAI,iDAAkD,CAAA;QACtD,kBAAC,MAAD,EAAA,UAAI,kDAAmD,CAAA;QACpD;SACD;QACF;OACF;;GACF;;EAER"}
@@ -6,7 +6,7 @@ import { isNative as r, nativeNotify as i } from "../../utils/nativeBridge.js";
6
6
  import a from "../components/pipeline/PipelineStatusBadge.js";
7
7
  import o from "../components/pipeline/PipelineDeleteDialog.js";
8
8
  import { memo as s, useCallback as c, useEffect as l, useState as u } from "react";
9
- import { useParams as d, useSearchParams as f } from "react-router-dom";
9
+ import { useParams as d, useSearchParams as f } from "react-router";
10
10
  import { GlassCard as p, IllustratedEmptyState as m, NextSteps as h, PagePurpose as g } from "@burdenoff/fe-libs/ui";
11
11
  import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
12
12
  //#region src/bigconsole/pages/PipelineViewPage.tsx
@@ -1 +1 @@
1
- {"version":3,"file":"PipelineViewPage.js","names":[],"sources":["../../../src/bigconsole/pages/PipelineViewPage.tsx"],"sourcesContent":["/**\n * Pipeline View Page\n *\n * Display Pipeline details, stages, and execution history.\n * Supports testing pipeline with sample input.\n */\n\nimport { memo, useState, useCallback, useEffect } from 'react';\nimport { useParams, useSearchParams } from 'react-router-dom';\nimport { GlassCard, IllustratedEmptyState, PagePurpose, NextSteps } from '@burdenoff/fe-libs/ui';\nimport { useAppNavigate } from '../contexts';\nimport { isNative, nativeNotify } from '../../utils/nativeBridge';\nimport { usePipelineOperations } from '../hooks/usePipelineOperations';\nimport { usePipelineStore } from '../store/pipelineStore';\nimport { PipelineStatusBadge } from '../components/pipeline/PipelineStatusBadge';\nimport { PipelineDeleteDialog } from '../components/pipeline/PipelineDeleteDialog';\nimport type { Pipeline, PipelineExecution, PipelineStage } from '../types';\n\n// ============================================================================\n// ICONS\n// ============================================================================\n\nconst BackIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M10 19l-7-7m0 0l7-7m-7 7h18\" />\n </svg>\n);\n\nconst EditIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z\"\n />\n </svg>\n);\n\nconst DeleteIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16\"\n />\n </svg>\n);\n\nconst PlayIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z\"\n />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M21 12a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n);\n\nconst ErrorIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n);\n\nconst CheckIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M5 13l4 4L19 7\" />\n </svg>\n);\n\nconst ArrowRightIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M14 5l7 7m0 0l-7 7m7-7H3\" />\n </svg>\n);\n\n// ============================================================================\n// STAGE ERROR BADGE\n// ============================================================================\n\nconst StageErrorBadge = ({ handling }: { handling: string }) => {\n const config = {\n fail: { label: 'Fail', className: 'bg-status-error-bg/10 text-status-error-text' },\n skip: { label: 'Skip', className: 'bg-status-warning-bg/10 text-status-warning-text' },\n fallback: { label: 'Fallback', className: 'bg-action-primary-bg/10 text-action-primary-bg' },\n };\n const c = config[handling as keyof typeof config] || config.fail;\n return <span className={`px-1.5 py-0.5 text-xs font-medium rounded ${c.className}`}>{c.label}</span>;\n};\n\n// ============================================================================\n// COMPONENT\n// ============================================================================\n\nexport const PipelineViewPage = memo(function PipelineViewPage() {\n const { pipelineId } = useParams<{ pipelineId: string }>();\n const navigate = useAppNavigate();\n // Use default consoleId for now (should come from context in production)\n const consoleId = 'default';\n const [searchParams] = useSearchParams();\n\n // Local state\n const [pipeline, setPipeline] = useState<Pipeline | null>(null);\n const [testInput, setTestInput] = useState('{\\n \"data\": \"sample\"\\n}');\n const [testResult, setTestResult] = useState<PipelineExecution | null>(null);\n const [showTestPanel, setShowTestPanel] = useState(searchParams.get('test') === 'true');\n\n // Store state\n const deleteDialogOpen = usePipelineStore((state) => state.deleteDialogOpen);\n const openDeleteDialog = usePipelineStore((state) => state.openDeleteDialog);\n const closeDeleteDialog = usePipelineStore((state) => state.closeDeleteDialog);\n\n // Operations\n const { loading, error, fetchPipeline, deletePipeline, testPipeline } = usePipelineOperations({\n consoleId,\n skipFetch: true,\n });\n\n // Fetch pipeline on mount\n useEffect(() => {\n if (pipelineId) {\n fetchPipeline(pipelineId).then((result) => {\n if (result) {\n setPipeline(result);\n }\n });\n }\n }, [pipelineId, fetchPipeline]);\n\n // Handlers\n const handleBack = useCallback(() => {\n navigate(`/pipelines`);\n }, [navigate]);\n\n const handleEdit = useCallback(() => {\n navigate(`/pipelines/${pipelineId}/edit`);\n }, [navigate, pipelineId]);\n\n const handleDeleteClick = useCallback(() => {\n if (pipeline) {\n openDeleteDialog(pipeline);\n }\n }, [pipeline, openDeleteDialog]);\n\n const handleDeleteConfirm = useCallback(async () => {\n if (pipeline) {\n const success = await deletePipeline(pipeline.id);\n if (success) {\n if (isNative()) void nativeNotify('success');\n closeDeleteDialog();\n navigate(`/pipelines`);\n } else if (isNative()) {\n void nativeNotify('error');\n }\n }\n }, [pipeline, deletePipeline, closeDeleteDialog, navigate]);\n\n const handleViewParser = useCallback(\n (parserId: string) => {\n navigate(`/dashboards/${consoleId}/parsers/${parserId}`);\n },\n [navigate, consoleId]\n );\n\n const handleTest = useCallback(async () => {\n if (!pipeline) return;\n\n try {\n const result = await testPipeline({\n pipelineId: pipeline.id,\n inputData: testInput,\n });\n if (result) {\n setTestResult(result);\n }\n } catch (err) {}\n }, [pipeline, testPipeline, testInput]);\n\n // Loading state\n if (loading && !pipeline) {\n return (\n <div className=\"p-6\">\n <div className=\"flex flex-col items-center justify-center py-16\">\n <svg className=\"w-8 h-8 text-action-primary-bg animate-spin mb-4\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle className=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" strokeWidth=\"4\" />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n />\n </svg>\n <p className=\"text-sm text-text-secondary\">Loading Pipeline...</p>\n </div>\n </div>\n );\n }\n\n // Error state\n if (error) {\n return (\n <div className=\"p-6\">\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"p-3 rounded-full bg-status-error-bg/10 mb-4\">\n <ErrorIcon className=\"w-8 h-8 text-status-error-text\" />\n </div>\n <h3 className=\"text-lg font-medium text-text-primary mb-2\">Failed to load Pipeline</h3>\n <p className=\"text-sm text-text-secondary mb-4\">{error.message}</p>\n <button\n type=\"button\"\n onClick={handleBack}\n className=\"px-4 py-2 text-sm font-medium text-action-primary-fg bg-action-primary-bg hover:bg-action-primary-bgHover rounded-md transition-colors\"\n >\n Back to Pipelines\n </button>\n </div>\n </div>\n );\n }\n\n // Not found state\n if (!pipeline) {\n return (\n <div className=\"p-6\">\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"Pipeline not found\"\n description=\"The pipeline you're looking for doesn't exist or has been deleted.\"\n action={\n <button\n type=\"button\"\n onClick={handleBack}\n className=\"px-4 py-2 text-sm font-medium text-action-primary-fg bg-action-primary-bg hover:bg-action-primary-bgHover rounded-md transition-colors\"\n >\n Back to Pipelines\n </button>\n }\n />\n </div>\n );\n }\n\n return (\n <div className=\"p-6\">\n {/* Header */}\n <div className=\"flex items-center justify-between mb-6\">\n <div className=\"flex items-center gap-4\">\n <button\n type=\"button\"\n onClick={handleBack}\n className=\"p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-md transition-colors\"\n >\n <BackIcon className=\"w-5 h-5\" />\n </button>\n <div>\n <div className=\"flex items-center gap-3\">\n <h1 className=\"text-2xl font-bold text-text-primary\">{pipeline.name}</h1>\n <PipelineStatusBadge status={pipeline.status} />\n </div>\n {pipeline.description && <p className=\"text-sm text-text-secondary mt-1\">{pipeline.description}</p>}\n </div>\n </div>\n\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => setShowTestPanel(!showTestPanel)}\n className=\"inline-flex items-center gap-2 px-3 py-2 text-sm font-medium text-status-success-text bg-status-success-bg/10 hover:bg-status-success-bg/20 rounded-md transition-colors\"\n >\n <PlayIcon className=\"w-4 h-4\" />\n Test\n </button>\n <button\n type=\"button\"\n onClick={handleEdit}\n className=\"inline-flex items-center gap-2 px-3 py-2 text-sm font-medium text-text-primary bg-bg-sunken hover:bg-border-default rounded-md transition-colors\"\n >\n <EditIcon className=\"w-4 h-4\" />\n Edit\n </button>\n <button\n type=\"button\"\n onClick={handleDeleteClick}\n className=\"inline-flex items-center gap-2 px-3 py-2 text-sm font-medium text-status-error-text bg-status-error-bg/10 hover:bg-status-error-bg/20 rounded-md transition-colors\"\n >\n <DeleteIcon className=\"w-4 h-4\" />\n Delete\n </button>\n </div>\n </div>\n\n <PagePurpose className=\"mb-6\">\n A pipeline chains parsers and a data sink into a repeatable flow. Review its stages here, test it with sample\n input to confirm the output, then edit the stages or run it to process real data into the connected sink.\n </PagePurpose>\n\n <NextSteps\n storageKey=\"bigconsole-pipeline-view\"\n steps={[\n {\n id: 'test',\n label: 'Test with sample input',\n description: 'Run the pipeline against a sample to verify each stage.',\n onClick: () => setShowTestPanel(true),\n },\n {\n id: 'edit',\n label: 'Edit the stages',\n description: 'Add, reorder, or configure the parsers in this pipeline.',\n onClick: handleEdit,\n },\n {\n id: 'sinks',\n label: 'Review the target data sink',\n description: 'See where the processed data lands.',\n onClick: () => navigate('/datasinks'),\n },\n ]}\n />\n\n <div className=\"grid grid-cols-1 lg:grid-cols-3 gap-6\">\n {/* Main Content */}\n <div className=\"lg:col-span-2 space-y-6\">\n {/* Stages — primary emphasis zone */}\n <GlassCard treatment=\"glass\" glow className=\"p-6\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n Pipeline Stages ({pipeline.stages?.length || 0})\n </h2>\n\n {!pipeline.stages || pipeline.stages.length === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-generic\"\n title=\"No stages defined\"\n description=\"Edit the pipeline to add parser stages.\"\n />\n ) : (\n <div className=\"space-y-3\">\n {pipeline.stages.map((stage: PipelineStage, index: number) => (\n <div key={stage.id} className=\"flex items-center gap-3\">\n {/* Stage Card */}\n <div\n className={`\n flex-1 p-4 rounded-lg border\n ${stage.enabled ? 'bg-bg-surface border-border-default' : 'bg-bg-sunken border-border-default opacity-60'}\n `}\n >\n <div className=\"flex items-center justify-between mb-2\">\n <div className=\"flex items-center gap-2\">\n <span className=\"w-6 h-6 flex items-center justify-center text-xs font-medium bg-action-primary-bg/10 text-action-primary-bg rounded-full\">\n {index + 1}\n </span>\n <span className=\"font-medium text-text-primary\">\n {stage.parserName || `Stage ${index + 1}`}\n </span>\n {stage.parserType && (\n <span className=\"px-1.5 py-0.5 text-xs font-medium bg-bg-sunken text-text-secondary rounded\">\n {stage.parserType.toUpperCase()}\n </span>\n )}\n </div>\n <div className=\"flex items-center gap-2\">\n <StageErrorBadge handling={stage.onError} />\n {!stage.enabled && (\n <span className=\"px-1.5 py-0.5 text-xs font-medium bg-bg-sunken text-text-secondary rounded\">\n Disabled\n </span>\n )}\n </div>\n </div>\n\n <div className=\"flex items-center gap-2 text-xs text-text-secondary\">\n <span className=\"font-mono bg-bg-sunken px-1.5 py-0.5 rounded\">{stage.inputKey}</span>\n <ArrowRightIcon className=\"w-3 h-3\" />\n <span className=\"font-mono bg-bg-sunken px-1.5 py-0.5 rounded\">{stage.outputKey}</span>\n </div>\n\n {stage.description && <p className=\"text-xs text-text-secondary mt-2\">{stage.description}</p>}\n\n {stage.parserId && (\n <button\n type=\"button\"\n onClick={() => handleViewParser(stage.parserId)}\n className=\"mt-2 text-xs text-action-primary-bg hover:underline\"\n >\n View Parser\n </button>\n )}\n </div>\n\n {/* Arrow to next stage */}\n {index < (pipeline.stages?.length || 0) - 1 && (\n <ArrowRightIcon className=\"w-5 h-5 text-text-secondary flex-shrink-0 hidden md:block\" />\n )}\n </div>\n ))}\n </div>\n )}\n </GlassCard>\n\n {/* Test Panel */}\n {showTestPanel && (\n <div className=\"bg-bg-surface border border-border-default rounded-lg p-6\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">Test Pipeline</h2>\n\n <div className=\"space-y-4\">\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-2\">Input JSON</label>\n <textarea\n value={testInput}\n onChange={(e) => setTestInput(e.target.value)}\n className=\"w-full h-32 px-3 py-2 text-sm font-mono text-text-primary bg-bg-sunken border border-border-default rounded-md focus:outline-none focus:ring-2 focus:ring-action-primary-bg resize-none\"\n placeholder='{\"key\": \"value\"}'\n />\n </div>\n\n <button\n type=\"button\"\n onClick={handleTest}\n disabled={loading}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-fg bg-action-primary-bg hover:bg-action-primary-bgHover rounded-md transition-colors disabled:opacity-50\"\n >\n <PlayIcon className=\"w-4 h-4\" />\n {loading ? 'Running...' : 'Run Test'}\n </button>\n\n {testResult && (\n <div className=\"mt-4\">\n <div className=\"flex items-center gap-2 mb-2\">\n {testResult.status === 'completed' ? (\n <>\n <CheckIcon className=\"w-4 h-4 text-status-success-text\" />\n <span className=\"text-sm font-medium text-status-success-text\">Test Passed</span>\n </>\n ) : (\n <>\n <ErrorIcon className=\"w-4 h-4 text-status-error-text\" />\n <span className=\"text-sm font-medium text-status-error-text\">Test Failed</span>\n </>\n )}\n {testResult.totalExecutionTimeMs && (\n <span className=\"text-xs text-text-secondary\">({testResult.totalExecutionTimeMs}ms)</span>\n )}\n </div>\n\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-2\">Output</label>\n <pre className=\"w-full p-3 text-xs font-mono text-text-primary bg-bg-sunken border border-border-default rounded-md overflow-auto max-h-48\">\n {JSON.stringify(testResult.outputData, null, 2) || 'null'}\n </pre>\n </div>\n\n {testResult.error && (\n <div className=\"mt-2\">\n <label className=\"block text-sm font-medium text-status-error-text mb-2\">Error</label>\n <pre className=\"w-full p-3 text-xs font-mono text-status-error-text bg-status-error-bg/10 border border-status-error-border/20 rounded-md overflow-auto\">\n {testResult.error}\n </pre>\n </div>\n )}\n </div>\n )}\n </div>\n </div>\n )}\n </div>\n\n {/* Sidebar */}\n <div className=\"space-y-6\">\n {/* Details */}\n <div className=\"bg-bg-surface border border-border-default rounded-lg p-6\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">Details</h2>\n\n <dl className=\"space-y-3\">\n <div>\n <dt className=\"text-xs text-text-secondary\">Status</dt>\n <dd className=\"mt-1\">\n <PipelineStatusBadge status={pipeline.status} />\n </dd>\n </div>\n\n <div>\n <dt className=\"text-xs text-text-secondary\">Stages</dt>\n <dd className=\"text-sm text-text-primary\">{pipeline.stages?.length || 0}</dd>\n </div>\n\n <div>\n <dt className=\"text-xs text-text-secondary\">Last Executed</dt>\n <dd className=\"text-sm text-text-primary\">\n {pipeline.lastExecutedAt ? new Date(pipeline.lastExecutedAt).toLocaleString() : 'Never'}\n </dd>\n </div>\n\n <div>\n <dt className=\"text-xs text-text-secondary\">Version</dt>\n <dd className=\"text-sm text-text-primary\">{pipeline.version}</dd>\n </div>\n\n <div>\n <dt className=\"text-xs text-text-secondary\">Created</dt>\n <dd className=\"text-sm text-text-primary\">{new Date(pipeline.createdAt).toLocaleString()}</dd>\n </div>\n\n <div>\n <dt className=\"text-xs text-text-secondary\">Updated</dt>\n <dd className=\"text-sm text-text-primary\">{new Date(pipeline.updatedAt).toLocaleString()}</dd>\n </div>\n </dl>\n </div>\n </div>\n </div>\n\n {/* Delete Dialog */}\n {pipeline && (\n <PipelineDeleteDialog\n pipeline={pipeline}\n isOpen={deleteDialogOpen}\n onClose={closeDeleteDialog}\n onConfirm={handleDeleteConfirm}\n />\n )}\n </div>\n );\n});\n\nexport default PipelineViewPage;\n"],"mappings":";;;;;;;;;;;;AAsBA,IAAM,KAAY,EAAE,mBAClB,kBAAC,OAAD;CAAgB;CAAW,MAAK;CAAO,QAAO;CAAe,SAAQ;WACnE,kBAAC,QAAD;EAAM,eAAc;EAAQ,gBAAe;EAAQ,aAAa;EAAG,GAAE;EAAgC,CAAA;CACjG,CAAA,EAGF,KAAY,EAAE,mBAClB,kBAAC,OAAD;CAAgB;CAAW,MAAK;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UAAA,CACE,kBAAC,MAAD;SAAI,WAAU;mBAA8B;SAAY,CAAA,EACxD,kBAAC,MAAD;SAAI,WAAU;mBAA6B,IAAI,KAAK,EAAS,UAAU,CAAC,gBAAgB;SAAM,CAAA,CAC1F,EAAA,CAAA;QACH;SACD;;KACF,CAAA,CACF;;GAGL,KACC,kBAAC,GAAD;IACY;IACV,QAAQ;IACR,SAAS;IACT,WAAW;IACX,CAAA;GAEA;MAzSJ,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD;GACE,cAAa;GACb,OAAM;GACN,aAAY;GACZ,QACE,kBAAC,UAAD;IACE,MAAK;IACL,SAAS;IACT,WAAU;cACX;IAEQ,CAAA;GAEX,CAAA;EACE,CAAA;EA4RV"}
1
+ {"version":3,"file":"PipelineViewPage.js","names":[],"sources":["../../../src/bigconsole/pages/PipelineViewPage.tsx"],"sourcesContent":["/**\n * Pipeline View Page\n *\n * Display Pipeline details, stages, and execution history.\n * Supports testing pipeline with sample input.\n */\n\nimport { memo, useState, useCallback, useEffect } from 'react';\nimport { useParams, useSearchParams } from 'react-router';\nimport { GlassCard, IllustratedEmptyState, PagePurpose, NextSteps } from '@burdenoff/fe-libs/ui';\nimport { useAppNavigate } from '../contexts';\nimport { isNative, nativeNotify } from '../../utils/nativeBridge';\nimport { usePipelineOperations } from '../hooks/usePipelineOperations';\nimport { usePipelineStore } from '../store/pipelineStore';\nimport { PipelineStatusBadge } from '../components/pipeline/PipelineStatusBadge';\nimport { PipelineDeleteDialog } from '../components/pipeline/PipelineDeleteDialog';\nimport type { Pipeline, PipelineExecution, PipelineStage } from '../types';\n\n// ============================================================================\n// ICONS\n// ============================================================================\n\nconst BackIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M10 19l-7-7m0 0l7-7m-7 7h18\" />\n </svg>\n);\n\nconst EditIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z\"\n />\n </svg>\n);\n\nconst DeleteIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16\"\n />\n </svg>\n);\n\nconst PlayIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z\"\n />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M21 12a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n);\n\nconst ErrorIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n);\n\nconst CheckIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M5 13l4 4L19 7\" />\n </svg>\n);\n\nconst ArrowRightIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M14 5l7 7m0 0l-7 7m7-7H3\" />\n </svg>\n);\n\n// ============================================================================\n// STAGE ERROR BADGE\n// ============================================================================\n\nconst StageErrorBadge = ({ handling }: { handling: string }) => {\n const config = {\n fail: { label: 'Fail', className: 'bg-status-error-bg/10 text-status-error-text' },\n skip: { label: 'Skip', className: 'bg-status-warning-bg/10 text-status-warning-text' },\n fallback: { label: 'Fallback', className: 'bg-action-primary-bg/10 text-action-primary-bg' },\n };\n const c = config[handling as keyof typeof config] || config.fail;\n return <span className={`px-1.5 py-0.5 text-xs font-medium rounded ${c.className}`}>{c.label}</span>;\n};\n\n// ============================================================================\n// COMPONENT\n// ============================================================================\n\nexport const PipelineViewPage = memo(function PipelineViewPage() {\n const { pipelineId } = useParams<{ pipelineId: string }>();\n const navigate = useAppNavigate();\n // Use default consoleId for now (should come from context in production)\n const consoleId = 'default';\n const [searchParams] = useSearchParams();\n\n // Local state\n const [pipeline, setPipeline] = useState<Pipeline | null>(null);\n const [testInput, setTestInput] = useState('{\\n \"data\": \"sample\"\\n}');\n const [testResult, setTestResult] = useState<PipelineExecution | null>(null);\n const [showTestPanel, setShowTestPanel] = useState(searchParams.get('test') === 'true');\n\n // Store state\n const deleteDialogOpen = usePipelineStore((state) => state.deleteDialogOpen);\n const openDeleteDialog = usePipelineStore((state) => state.openDeleteDialog);\n const closeDeleteDialog = usePipelineStore((state) => state.closeDeleteDialog);\n\n // Operations\n const { loading, error, fetchPipeline, deletePipeline, testPipeline } = usePipelineOperations({\n consoleId,\n skipFetch: true,\n });\n\n // Fetch pipeline on mount\n useEffect(() => {\n if (pipelineId) {\n fetchPipeline(pipelineId).then((result) => {\n if (result) {\n setPipeline(result);\n }\n });\n }\n }, [pipelineId, fetchPipeline]);\n\n // Handlers\n const handleBack = useCallback(() => {\n navigate(`/pipelines`);\n }, [navigate]);\n\n const handleEdit = useCallback(() => {\n navigate(`/pipelines/${pipelineId}/edit`);\n }, [navigate, pipelineId]);\n\n const handleDeleteClick = useCallback(() => {\n if (pipeline) {\n openDeleteDialog(pipeline);\n }\n }, [pipeline, openDeleteDialog]);\n\n const handleDeleteConfirm = useCallback(async () => {\n if (pipeline) {\n const success = await deletePipeline(pipeline.id);\n if (success) {\n if (isNative()) void nativeNotify('success');\n closeDeleteDialog();\n navigate(`/pipelines`);\n } else if (isNative()) {\n void nativeNotify('error');\n }\n }\n }, [pipeline, deletePipeline, closeDeleteDialog, navigate]);\n\n const handleViewParser = useCallback(\n (parserId: string) => {\n navigate(`/dashboards/${consoleId}/parsers/${parserId}`);\n },\n [navigate, consoleId]\n );\n\n const handleTest = useCallback(async () => {\n if (!pipeline) return;\n\n try {\n const result = await testPipeline({\n pipelineId: pipeline.id,\n inputData: testInput,\n });\n if (result) {\n setTestResult(result);\n }\n } catch (err) {}\n }, [pipeline, testPipeline, testInput]);\n\n // Loading state\n if (loading && !pipeline) {\n return (\n <div className=\"p-6\">\n <div className=\"flex flex-col items-center justify-center py-16\">\n <svg className=\"w-8 h-8 text-action-primary-bg animate-spin mb-4\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle className=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" strokeWidth=\"4\" />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n />\n </svg>\n <p className=\"text-sm text-text-secondary\">Loading Pipeline...</p>\n </div>\n </div>\n );\n }\n\n // Error state\n if (error) {\n return (\n <div className=\"p-6\">\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"p-3 rounded-full bg-status-error-bg/10 mb-4\">\n <ErrorIcon className=\"w-8 h-8 text-status-error-text\" />\n </div>\n <h3 className=\"text-lg font-medium text-text-primary mb-2\">Failed to load Pipeline</h3>\n <p className=\"text-sm text-text-secondary mb-4\">{error.message}</p>\n <button\n type=\"button\"\n onClick={handleBack}\n className=\"px-4 py-2 text-sm font-medium text-action-primary-fg bg-action-primary-bg hover:bg-action-primary-bgHover rounded-md transition-colors\"\n >\n Back to Pipelines\n </button>\n </div>\n </div>\n );\n }\n\n // Not found state\n if (!pipeline) {\n return (\n <div className=\"p-6\">\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"Pipeline not found\"\n description=\"The pipeline you're looking for doesn't exist or has been deleted.\"\n action={\n <button\n type=\"button\"\n onClick={handleBack}\n className=\"px-4 py-2 text-sm font-medium text-action-primary-fg bg-action-primary-bg hover:bg-action-primary-bgHover rounded-md transition-colors\"\n >\n Back to Pipelines\n </button>\n }\n />\n </div>\n );\n }\n\n return (\n <div className=\"p-6\">\n {/* Header */}\n <div className=\"flex items-center justify-between mb-6\">\n <div className=\"flex items-center gap-4\">\n <button\n type=\"button\"\n onClick={handleBack}\n className=\"p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-md transition-colors\"\n >\n <BackIcon className=\"w-5 h-5\" />\n </button>\n <div>\n <div className=\"flex items-center gap-3\">\n <h1 className=\"text-2xl font-bold text-text-primary\">{pipeline.name}</h1>\n <PipelineStatusBadge status={pipeline.status} />\n </div>\n {pipeline.description && <p className=\"text-sm text-text-secondary mt-1\">{pipeline.description}</p>}\n </div>\n </div>\n\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => setShowTestPanel(!showTestPanel)}\n className=\"inline-flex items-center gap-2 px-3 py-2 text-sm font-medium text-status-success-text bg-status-success-bg/10 hover:bg-status-success-bg/20 rounded-md transition-colors\"\n >\n <PlayIcon className=\"w-4 h-4\" />\n Test\n </button>\n <button\n type=\"button\"\n onClick={handleEdit}\n className=\"inline-flex items-center gap-2 px-3 py-2 text-sm font-medium text-text-primary bg-bg-sunken hover:bg-border-default rounded-md transition-colors\"\n >\n <EditIcon className=\"w-4 h-4\" />\n Edit\n </button>\n <button\n type=\"button\"\n onClick={handleDeleteClick}\n className=\"inline-flex items-center gap-2 px-3 py-2 text-sm font-medium text-status-error-text bg-status-error-bg/10 hover:bg-status-error-bg/20 rounded-md transition-colors\"\n >\n <DeleteIcon className=\"w-4 h-4\" />\n Delete\n </button>\n </div>\n </div>\n\n <PagePurpose className=\"mb-6\">\n A pipeline chains parsers and a data sink into a repeatable flow. Review its stages here, test it with sample\n input to confirm the output, then edit the stages or run it to process real data into the connected sink.\n </PagePurpose>\n\n <NextSteps\n storageKey=\"bigconsole-pipeline-view\"\n steps={[\n {\n id: 'test',\n label: 'Test with sample input',\n description: 'Run the pipeline against a sample to verify each stage.',\n onClick: () => setShowTestPanel(true),\n },\n {\n id: 'edit',\n label: 'Edit the stages',\n description: 'Add, reorder, or configure the parsers in this pipeline.',\n onClick: handleEdit,\n },\n {\n id: 'sinks',\n label: 'Review the target data sink',\n description: 'See where the processed data lands.',\n onClick: () => navigate('/datasinks'),\n },\n ]}\n />\n\n <div className=\"grid grid-cols-1 lg:grid-cols-3 gap-6\">\n {/* Main Content */}\n <div className=\"lg:col-span-2 space-y-6\">\n {/* Stages — primary emphasis zone */}\n <GlassCard treatment=\"glass\" glow className=\"p-6\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n Pipeline Stages ({pipeline.stages?.length || 0})\n </h2>\n\n {!pipeline.stages || pipeline.stages.length === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-generic\"\n title=\"No stages defined\"\n description=\"Edit the pipeline to add parser stages.\"\n />\n ) : (\n <div className=\"space-y-3\">\n {pipeline.stages.map((stage: PipelineStage, index: number) => (\n <div key={stage.id} className=\"flex items-center gap-3\">\n {/* Stage Card */}\n <div\n className={`\n flex-1 p-4 rounded-lg border\n ${stage.enabled ? 'bg-bg-surface border-border-default' : 'bg-bg-sunken border-border-default opacity-60'}\n `}\n >\n <div className=\"flex items-center justify-between mb-2\">\n <div className=\"flex items-center gap-2\">\n <span className=\"w-6 h-6 flex items-center justify-center text-xs font-medium bg-action-primary-bg/10 text-action-primary-bg rounded-full\">\n {index + 1}\n </span>\n <span className=\"font-medium text-text-primary\">\n {stage.parserName || `Stage ${index + 1}`}\n </span>\n {stage.parserType && (\n <span className=\"px-1.5 py-0.5 text-xs font-medium bg-bg-sunken text-text-secondary rounded\">\n {stage.parserType.toUpperCase()}\n </span>\n )}\n </div>\n <div className=\"flex items-center gap-2\">\n <StageErrorBadge handling={stage.onError} />\n {!stage.enabled && (\n <span className=\"px-1.5 py-0.5 text-xs font-medium bg-bg-sunken text-text-secondary rounded\">\n Disabled\n </span>\n )}\n </div>\n </div>\n\n <div className=\"flex items-center gap-2 text-xs text-text-secondary\">\n <span className=\"font-mono bg-bg-sunken px-1.5 py-0.5 rounded\">{stage.inputKey}</span>\n <ArrowRightIcon className=\"w-3 h-3\" />\n <span className=\"font-mono bg-bg-sunken px-1.5 py-0.5 rounded\">{stage.outputKey}</span>\n </div>\n\n {stage.description && <p className=\"text-xs text-text-secondary mt-2\">{stage.description}</p>}\n\n {stage.parserId && (\n <button\n type=\"button\"\n onClick={() => handleViewParser(stage.parserId)}\n className=\"mt-2 text-xs text-action-primary-bg hover:underline\"\n >\n View Parser\n </button>\n )}\n </div>\n\n {/* Arrow to next stage */}\n {index < (pipeline.stages?.length || 0) - 1 && (\n <ArrowRightIcon className=\"w-5 h-5 text-text-secondary flex-shrink-0 hidden md:block\" />\n )}\n </div>\n ))}\n </div>\n )}\n </GlassCard>\n\n {/* Test Panel */}\n {showTestPanel && (\n <div className=\"bg-bg-surface border border-border-default rounded-lg p-6\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">Test Pipeline</h2>\n\n <div className=\"space-y-4\">\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-2\">Input JSON</label>\n <textarea\n value={testInput}\n onChange={(e) => setTestInput(e.target.value)}\n className=\"w-full h-32 px-3 py-2 text-sm font-mono text-text-primary bg-bg-sunken border border-border-default rounded-md focus:outline-none focus:ring-2 focus:ring-action-primary-bg resize-none\"\n placeholder='{\"key\": \"value\"}'\n />\n </div>\n\n <button\n type=\"button\"\n onClick={handleTest}\n disabled={loading}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-fg bg-action-primary-bg hover:bg-action-primary-bgHover rounded-md transition-colors disabled:opacity-50\"\n >\n <PlayIcon className=\"w-4 h-4\" />\n {loading ? 'Running...' : 'Run Test'}\n </button>\n\n {testResult && (\n <div className=\"mt-4\">\n <div className=\"flex items-center gap-2 mb-2\">\n {testResult.status === 'completed' ? (\n <>\n <CheckIcon className=\"w-4 h-4 text-status-success-text\" />\n <span className=\"text-sm font-medium text-status-success-text\">Test Passed</span>\n </>\n ) : (\n <>\n <ErrorIcon className=\"w-4 h-4 text-status-error-text\" />\n <span className=\"text-sm font-medium text-status-error-text\">Test Failed</span>\n </>\n )}\n {testResult.totalExecutionTimeMs && (\n <span className=\"text-xs text-text-secondary\">({testResult.totalExecutionTimeMs}ms)</span>\n )}\n </div>\n\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-2\">Output</label>\n <pre className=\"w-full p-3 text-xs font-mono text-text-primary bg-bg-sunken border border-border-default rounded-md overflow-auto max-h-48\">\n {JSON.stringify(testResult.outputData, null, 2) || 'null'}\n </pre>\n </div>\n\n {testResult.error && (\n <div className=\"mt-2\">\n <label className=\"block text-sm font-medium text-status-error-text mb-2\">Error</label>\n <pre className=\"w-full p-3 text-xs font-mono text-status-error-text bg-status-error-bg/10 border border-status-error-border/20 rounded-md overflow-auto\">\n {testResult.error}\n </pre>\n </div>\n )}\n </div>\n )}\n </div>\n </div>\n )}\n </div>\n\n {/* Sidebar */}\n <div className=\"space-y-6\">\n {/* Details */}\n <div className=\"bg-bg-surface border border-border-default rounded-lg p-6\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">Details</h2>\n\n <dl className=\"space-y-3\">\n <div>\n <dt className=\"text-xs text-text-secondary\">Status</dt>\n <dd className=\"mt-1\">\n <PipelineStatusBadge status={pipeline.status} />\n </dd>\n </div>\n\n <div>\n <dt className=\"text-xs text-text-secondary\">Stages</dt>\n <dd className=\"text-sm text-text-primary\">{pipeline.stages?.length || 0}</dd>\n </div>\n\n <div>\n <dt className=\"text-xs text-text-secondary\">Last Executed</dt>\n <dd className=\"text-sm text-text-primary\">\n {pipeline.lastExecutedAt ? new Date(pipeline.lastExecutedAt).toLocaleString() : 'Never'}\n </dd>\n </div>\n\n <div>\n <dt className=\"text-xs text-text-secondary\">Version</dt>\n <dd className=\"text-sm text-text-primary\">{pipeline.version}</dd>\n </div>\n\n <div>\n <dt className=\"text-xs text-text-secondary\">Created</dt>\n <dd className=\"text-sm text-text-primary\">{new Date(pipeline.createdAt).toLocaleString()}</dd>\n </div>\n\n <div>\n <dt className=\"text-xs text-text-secondary\">Updated</dt>\n <dd className=\"text-sm text-text-primary\">{new Date(pipeline.updatedAt).toLocaleString()}</dd>\n </div>\n </dl>\n </div>\n </div>\n </div>\n\n {/* Delete Dialog */}\n {pipeline && (\n <PipelineDeleteDialog\n pipeline={pipeline}\n isOpen={deleteDialogOpen}\n onClose={closeDeleteDialog}\n onConfirm={handleDeleteConfirm}\n />\n )}\n </div>\n );\n});\n\nexport default PipelineViewPage;\n"],"mappings":";;;;;;;;;;;;AAsBA,IAAM,KAAY,EAAE,mBAClB,kBAAC,OAAD;CAAgB;CAAW,MAAK;CAAO,QAAO;CAAe,SAAQ;WACnE,kBAAC,QAAD;EAAM,eAAc;EAAQ,gBAAe;EAAQ,aAAa;EAAG,GAAE;EAAgC,CAAA;CACjG,CAAA,EAGF,KAAY,EAAE,mBAClB,kBAAC,OAAD;CAAgB;CAAW,MAAK;CAAO,QAAO;CAAe,SAAQ;WACnE,kBAAC,QAAD;EACE,eAAc;EACd,gBAAe;EACf,aAAa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AAI,WAAU;mBAA6B,IAAI,KAAK,EAAS,UAAU,CAAC,gBAAgB;SAAM,CAAA,CAC1F,EAAA,CAAA;QACH;SACD;;KACF,CAAA,CACF;;GAGL,KACC,kBAAC,GAAD;IACY;IACV,QAAQ;IACR,SAAS;IACT,WAAW;IACX,CAAA;GAEA;MAzSJ,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD;GACE,cAAa;GACb,OAAM;GACN,aAAY;GACZ,QACE,kBAAC,UAAD;IACE,MAAK;IACL,SAAS;IACT,WAAU;cACX;IAEQ,CAAA;GAEX,CAAA;EACE,CAAA;EA4RV"}
@@ -8,7 +8,7 @@ import { isNative as i, nativeCopyText as a, nativeNotify as o, nativeToast as e
8
8
  import te from "../components/workflow/WorkflowStatusBadge.js";
9
9
  import s from "../components/workflow/WorkflowDeleteDialog.js";
10
10
  import { memo as c, useCallback as l, useEffect as u, useState as d } from "react";
11
- import { useParams as f } from "react-router-dom";
11
+ import { useParams as f } from "react-router";
12
12
  import { GlassCard as ne, IllustratedEmptyState as p, NextSteps as m, PagePurpose as h } from "@burdenoff/fe-libs/ui";
13
13
  import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
14
14
  import { WorkflowBuilder as y } from "@burdenoff/fluidgrids-fe-sdk";
@@ -1 +1 @@
1
- {"version":3,"file":"WorkflowViewPage.js","names":[],"sources":["../../../src/bigconsole/pages/WorkflowViewPage.tsx"],"sourcesContent":["/**\n * Workflow View Page\n *\n * Page for viewing FluidGrids Workflow details, linked DataSinks,\n * read-only workflow design preview, and real execution with polling.\n */\n\nimport { memo, useState, useEffect, useCallback } from 'react';\nimport { useParams } from 'react-router-dom';\nimport { GlassCard, IllustratedEmptyState, PagePurpose, NextSteps } from '@burdenoff/fe-libs/ui';\nimport { useAppNavigate } from '../contexts';\nimport { isNative, nativeCopyText, nativeNotify, nativeToast } from '../../utils/nativeBridge';\nimport { useBigConsole } from '../context';\nimport { formatDistanceToNow } from 'date-fns';\nimport { useWorkflowOperations } from '../hooks/useWorkflowOperations';\nimport { WorkflowStatusBadge } from '../components/workflow/WorkflowStatusBadge';\nimport { WorkflowDeleteDialog } from '../components/workflow/WorkflowDeleteDialog';\nimport type { FluidGridsWorkflow } from '../types';\n\n// FluidGrids FE SDK — read-only embedded builder preview\nimport { WorkflowBuilder } from '@burdenoff/fluidgrids-fe-sdk';\nimport { BOOTSTRAP_RETRY_DELAY_MS } from '../constants';\n\n// ============================================================================\n// ICONS\n// ============================================================================\n\nconst ArrowLeftIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M15 19l-7-7 7-7\" />\n </svg>\n);\n\nconst EditIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z\"\n />\n </svg>\n);\n\nconst TrashIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16\"\n />\n </svg>\n);\n\nconst PlayIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z\"\n />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M21 12a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n);\n\nconst CopyIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\"\n />\n </svg>\n);\n\nconst CheckIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M5 13l4 4L19 7\" />\n </svg>\n);\n\nconst DatabaseIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4\"\n />\n </svg>\n);\n\nconst ErrorIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n);\n\nconst ChevronDownIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M19 9l-7 7-7-7\" />\n </svg>\n);\n\n// ============================================================================\n// COMPONENT\n// ============================================================================\n\nexport const WorkflowViewPage = memo(function WorkflowViewPage() {\n const navigate = useAppNavigate();\n const { workflowId } = useParams<{ workflowId: string }>();\n\n // BigConsole context for apiGatewayUrl and authToken\n const { apiGatewayUrl, authToken, workspaceId } = useBigConsole();\n\n // Local state\n const [workflow, setWorkflow] = useState<FluidGridsWorkflow | null>(null);\n const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);\n const [, setIsDeleting] = useState(false);\n const [isExecuting, setIsExecuting] = useState(false);\n const [webhookCopied, setWebhookCopied] = useState(false);\n const [showDesignPreview, setShowDesignPreview] = useState(false);\n // Track whether initial fetch has completed — prevents \"not found\" flash\n // before data has even been requested (loading starts as false with skipFetch: true)\n const [isReady, setIsReady] = useState(false);\n const [executionResult, setExecutionResult] = useState<{\n success: boolean;\n output: unknown;\n error: string | null;\n executionTimeMs: number;\n runId?: string;\n } | null>(null);\n\n // Operations\n const { loading, error, fetchWorkflow, deleteWorkflow, executeWorkflow, pollWorkflowExecution } =\n useWorkflowOperations({\n skipFetch: true,\n });\n\n // Load workflow on mount.\n // On a full page reload the workspace token may not be issued yet when this\n // effect first runs, causing the gateway to lack workspace context and\n // the resolver to return null. We retry once after a short delay to give\n // the auth bootstrap time to complete.\n useEffect(() => {\n if (!workflowId) {\n setIsReady(true);\n return;\n }\n\n let cancelled = false;\n\n const load = async (attempt: number) => {\n try {\n const result = await fetchWorkflow(workflowId);\n if (cancelled) return;\n\n if (result) {\n setWorkflow(result);\n setIsReady(true);\n } else if (attempt === 0) {\n // First attempt failed — likely workspace token race on full-page load.\n // Retry once after a short delay.\n setTimeout(() => {\n if (!cancelled) load(1);\n }, BOOTSTRAP_RETRY_DELAY_MS);\n } else {\n // Second attempt also failed — genuinely not found\n setIsReady(true);\n }\n } catch {\n // Network error, GraphQL error, etc. — surface the \"not found\" UI\n // rather than spinning forever with no escape hatch.\n if (!cancelled) setIsReady(true);\n }\n };\n\n load(0);\n return () => {\n cancelled = true;\n };\n }, [workflowId, fetchWorkflow]);\n\n // Handlers\n const handleBack = useCallback(() => {\n navigate(`/workflows`);\n }, [navigate]);\n\n const handleEdit = useCallback(() => {\n navigate(`/workflows/${workflowId}/edit`);\n }, [navigate, workflowId]);\n\n const handleDelete = useCallback(async () => {\n if (!workflowId) return;\n setIsDeleting(true);\n try {\n const success = await deleteWorkflow(workflowId);\n if (success) {\n if (isNative()) void nativeNotify('success');\n navigate(`/workflows`);\n } else if (isNative()) {\n void nativeNotify('error');\n }\n } catch {\n if (isNative()) void nativeNotify('error');\n } finally {\n setIsDeleting(false);\n setShowDeleteConfirm(false);\n }\n }, [workflowId, deleteWorkflow, navigate]);\n\n const handleExecute = useCallback(async () => {\n if (!workflowId) return;\n setIsExecuting(true);\n setExecutionResult(null);\n\n const startTime = Date.now();\n\n try {\n const result = await executeWorkflow(workflowId);\n\n if (result) {\n const executionTimeMs = Date.now() - startTime;\n\n // If workflow has external FluidGrids ID, the execution is async\n if (result.externalWorkflowId) {\n setExecutionResult({\n success: true,\n output: {\n externalWorkflowId: result.externalWorkflowId,\n executionCount: result.executionCount,\n status: 'Triggered — polling for completion...',\n },\n error: null,\n executionTimeMs,\n });\n\n // Poll for completion in the background\n pollWorkflowExecution(workflowId, {\n intervalMs: 3000,\n timeoutMs: 120000,\n onProgress: (updated) => {\n setWorkflow(updated);\n },\n }).then((final) => {\n if (final) {\n setWorkflow(final);\n setExecutionResult((prev) =>\n prev\n ? {\n ...prev,\n output: {\n ...((prev.output as Record<string, unknown>) || {}),\n status: final.status === 'error' ? 'Failed' : 'Completed',\n executionCount: final.executionCount,\n lastExecutedAt: final.lastExecutedAt,\n },\n executionTimeMs: Date.now() - startTime,\n }\n : prev\n );\n }\n });\n } else {\n // Local execution (no external FluidGrids workflow)\n setExecutionResult({\n success: true,\n output: {\n executionCount: result.executionCount,\n lastExecutedAt: result.lastExecutedAt,\n status: 'Completed',\n },\n error: null,\n executionTimeMs,\n });\n }\n\n // Refresh workflow\n const updated = await fetchWorkflow(workflowId);\n if (updated) {\n setWorkflow(updated);\n }\n }\n } catch (err) {\n setExecutionResult({\n success: false,\n output: null,\n error: err instanceof Error ? err.message : 'Execution failed',\n executionTimeMs: Date.now() - startTime,\n });\n } finally {\n setIsExecuting(false);\n }\n }, [workflowId, executeWorkflow, fetchWorkflow, pollWorkflowExecution]);\n\n const handleCopyWebhook = useCallback(async () => {\n if (!workflow?.webhookUrl) return;\n try {\n await nativeCopyText(workflow.webhookUrl);\n setWebhookCopied(true);\n if (isNative()) void nativeToast('Webhook copied');\n setTimeout(() => setWebhookCopied(false), 2000);\n } catch {\n // Clipboard not available\n }\n }, [workflow?.webhookUrl]);\n\n const handleViewDataSink = useCallback(\n (dataSinkId: string) => {\n navigate(`/datasinks/${dataSinkId}`);\n },\n [navigate]\n );\n\n // Loading state — show spinner until initial fetch completes OR during a refetch\n if (!isReady || (loading && !workflow)) {\n return (\n <div className=\"p-6 flex items-center justify-center min-h-[400px]\">\n <svg className=\"w-8 h-8 text-action-primary-bg animate-spin\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle className=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" strokeWidth=\"4\" />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n />\n </svg>\n </div>\n );\n }\n\n // Error or not found state — only shown AFTER initial fetch completed\n if (error || !workflow) {\n return (\n <div className=\"p-6\">\n <button\n type=\"button\"\n onClick={handleBack}\n className=\"inline-flex items-center gap-1 text-sm text-text-secondary hover:text-text-primary mb-4\"\n >\n <ArrowLeftIcon className=\"w-4 h-4\" />\n Back to Workflows\n </button>\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"Workflow not found\"\n description={error?.message || 'The workflow you are looking for does not exist.'}\n />\n </div>\n );\n }\n\n const linkedDataSinkCount = workflow.dataSinkLinks?.length || 0;\n\n return (\n <div className=\"p-6 max-w-5xl mx-auto\">\n {/* Header */}\n <div className=\"mb-8\">\n <button\n type=\"button\"\n onClick={handleBack}\n className=\"inline-flex items-center gap-1 text-sm text-text-secondary hover:text-text-primary mb-4\"\n >\n <ArrowLeftIcon className=\"w-4 h-4\" />\n Back to Workflows\n </button>\n\n <div className=\"flex items-start justify-between\">\n <div>\n <div className=\"flex items-center gap-3 mb-2\">\n <h1 className=\"text-2xl font-bold text-text-primary\">{workflow.name}</h1>\n <WorkflowStatusBadge status={workflow.status} />\n </div>\n <p className=\"text-sm text-text-secondary font-mono\">{workflow.key}</p>\n {workflow.externalWorkflowId && (\n <p className=\"text-xs text-text-tertiary mt-1\">\n FluidGrids ID: <span className=\"font-mono\">{workflow.externalWorkflowId}</span>\n </p>\n )}\n </div>\n\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={handleExecute}\n disabled={isExecuting}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-status-success-bg hover:bg-status-success-bg/90 rounded-md transition-colors disabled:opacity-50\"\n >\n <PlayIcon className=\"w-4 h-4\" />\n {isExecuting ? 'Executing...' : 'Execute'}\n </button>\n <button\n type=\"button\"\n onClick={handleEdit}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-text-primary bg-bg-sunken hover:bg-border-default rounded-md transition-colors\"\n >\n <EditIcon className=\"w-4 h-4\" />\n Edit\n </button>\n <button\n type=\"button\"\n onClick={() => setShowDeleteConfirm(true)}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-status-error-text bg-status-error-bg/10 hover:bg-status-error-bg/20 rounded-md transition-colors\"\n >\n <TrashIcon className=\"w-4 h-4\" />\n Delete\n </button>\n </div>\n </div>\n </div>\n\n <PagePurpose className=\"mb-6\">\n A workflow is the visual ETL job that feeds this BigConsole — it fetches, transforms, and delivers data into\n linked data sinks. From here you can run it on demand, inspect its design and execution history, copy its\n webhook trigger, and edit it in the visual builder.\n </PagePurpose>\n\n <NextSteps\n storageKey=\"bigconsole-workflow-view\"\n steps={[\n {\n id: 'execute',\n label: 'Run the workflow',\n description: 'Trigger an execution to pull fresh data now.',\n onClick: handleExecute,\n },\n {\n id: 'design',\n label: 'Inspect the design',\n description: 'Expand the read-only preview to see each step.',\n onClick: () => setShowDesignPreview(true),\n },\n {\n id: 'edit',\n label: 'Edit in the builder',\n description: 'Open the FluidGrids visual builder to change the flow.',\n onClick: handleEdit,\n },\n {\n id: 'sinks',\n label: 'Check the linked data sinks',\n description: 'See where this workflow writes its output.',\n onClick: () => navigate('/datasinks'),\n },\n ]}\n />\n\n {/* Execution Result */}\n {executionResult && (\n <div\n className={`mb-6 p-4 rounded-lg border ${\n executionResult.success\n ? 'bg-status-success-bg/10 border-status-success-border/20'\n : 'bg-status-error-bg/10 border-status-error-border/20'\n }`}\n >\n <div className=\"flex items-center justify-between mb-2\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {executionResult.success ? 'Execution Triggered' : 'Execution Failed'}\n </h3>\n <span className=\"text-xs text-text-secondary\">{executionResult.executionTimeMs}ms</span>\n </div>\n {executionResult.error ? (\n <p className=\"text-sm text-status-error-text\">{executionResult.error}</p>\n ) : (\n <pre className=\"text-xs text-text-secondary font-mono bg-bg-sunken p-2 rounded overflow-auto max-h-[200px]\">\n {JSON.stringify(executionResult.output, null, 2)}\n </pre>\n )}\n {executionResult.runId && (\n <p className=\"text-xs text-text-tertiary mt-2\">\n Run ID: <span className=\"font-mono\">{executionResult.runId}</span>\n </p>\n )}\n </div>\n )}\n\n {/* Info Grid */}\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8\">\n {/* Description */}\n <div className=\"bg-bg-surface border border-border-default rounded-lg p-4\">\n <h3 className=\"text-sm font-medium text-text-secondary mb-2\">Description</h3>\n <p className=\"text-sm text-text-primary\">{workflow.description || 'No description'}</p>\n </div>\n\n {/* Execution Stats — primary emphasis zone */}\n <GlassCard treatment=\"glass\" glow className=\"p-4\">\n <h3 className=\"text-sm font-medium text-text-secondary mb-2\">Execution Stats</h3>\n <div className=\"grid grid-cols-2 gap-4\">\n <div>\n <p className=\"text-2xl font-bold text-text-primary\">{workflow.executionCount}</p>\n <p className=\"text-xs text-text-secondary\">Total Executions</p>\n </div>\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {workflow.lastExecutedAt\n ? formatDistanceToNow(new Date(workflow.lastExecutedAt), { addSuffix: true })\n : 'Never'}\n </p>\n <p className=\"text-xs text-text-secondary\">Last Executed</p>\n </div>\n </div>\n </GlassCard>\n </div>\n\n {/* Webhook URL */}\n {workflow.webhookUrl && (\n <div className=\"bg-bg-surface border border-border-default rounded-lg p-4 mb-8\">\n <h3 className=\"text-sm font-medium text-text-secondary mb-2\">Webhook URL</h3>\n <div className=\"flex items-center gap-2\">\n <code className=\"flex-1 text-sm text-text-primary font-mono bg-bg-sunken px-3 py-2 rounded overflow-auto\">\n {workflow.webhookUrl}\n </code>\n <button\n type=\"button\"\n onClick={handleCopyWebhook}\n className=\"flex items-center gap-1 px-3 py-2 text-sm text-text-secondary hover:text-text-primary transition-colors\"\n >\n {webhookCopied ? (\n <>\n <CheckIcon className=\"w-4 h-4 text-status-success-text\" />\n Copied!\n </>\n ) : (\n <>\n <CopyIcon className=\"w-4 h-4\" />\n Copy\n </>\n )}\n </button>\n </div>\n </div>\n )}\n\n {/* Workflow Design Preview (collapsible) */}\n {workflow.externalWorkflowId && (\n <div className=\"bg-bg-surface border border-border-default rounded-lg mb-8 overflow-hidden\">\n <button\n type=\"button\"\n onClick={() => setShowDesignPreview((prev) => !prev)}\n className=\"w-full flex items-center justify-between px-4 py-3 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors\"\n >\n <span>Workflow Design Preview</span>\n <ChevronDownIcon\n className={`w-4 h-4 text-text-secondary transition-transform ${showDesignPreview ? 'rotate-180' : ''}`}\n />\n </button>\n {showDesignPreview && (\n <div className=\"border-t border-border-default\" style={{ height: '450px' }}>\n <WorkflowBuilder\n apiGatewayUrl={apiGatewayUrl}\n workspaceId={workspaceId || 'default'}\n authToken={authToken}\n workflowId={workflow.externalWorkflowId}\n readonly\n hideHeader\n className=\"h-full\"\n />\n </div>\n )}\n </div>\n )}\n\n {/* Linked DataSinks */}\n <div className=\"bg-bg-surface border border-border-default rounded-lg p-4 mb-8\">\n <h3 className=\"text-sm font-medium text-text-secondary mb-4\">Linked DataSinks ({linkedDataSinkCount})</h3>\n {linkedDataSinkCount === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-generic\"\n title=\"No data sinks linked\"\n description=\"This workflow has no data sinks linked yet — its output isn't being stored.\"\n />\n ) : (\n <div className=\"space-y-2\">\n {workflow.dataSinkLinks?.map((link) => (\n <div key={link.id} className=\"flex items-center justify-between px-3 py-2 bg-bg-sunken rounded-md\">\n <div className=\"flex items-center gap-3\">\n <DatabaseIcon className=\"w-4 h-4 text-text-secondary\" />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {link.dataSink?.name || link.dataSink?.key || link.dataSinkId}\n </p>\n {link.dataSink?.key && <p className=\"text-xs text-text-secondary font-mono\">{link.dataSink.key}</p>}\n </div>\n </div>\n <div className=\"flex items-center gap-4\">\n <div className=\"flex items-center gap-2\">\n {link.isEnabled ? (\n <span className=\"text-xs text-status-success-text\">Enabled</span>\n ) : (\n <span className=\"text-xs text-text-secondary\">Disabled</span>\n )}\n <span className=\"text-xs text-text-secondary\">Priority: {link.priority}</span>\n </div>\n {link.dataSink && (\n <button\n type=\"button\"\n onClick={() => handleViewDataSink(link.dataSinkId)}\n className=\"text-xs text-action-primary-bg hover:underline\"\n >\n View\n </button>\n )}\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n\n {/* Timestamps */}\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-6\">\n <div className=\"bg-bg-surface border border-border-default rounded-lg p-4\">\n <h3 className=\"text-sm font-medium text-text-secondary mb-2\">Created</h3>\n <p className=\"text-sm text-text-primary\">\n {formatDistanceToNow(new Date(workflow.createdAt), { addSuffix: true })}\n </p>\n <p className=\"text-xs text-text-secondary\">by {workflow.createdBy}</p>\n </div>\n <div className=\"bg-bg-surface border border-border-default rounded-lg p-4\">\n <h3 className=\"text-sm font-medium text-text-secondary mb-2\">Last Updated</h3>\n <p className=\"text-sm text-text-primary\">\n {formatDistanceToNow(new Date(workflow.updatedAt), { addSuffix: true })}\n </p>\n <p className=\"text-xs text-text-secondary\">by {workflow.updatedBy || workflow.createdBy}</p>\n </div>\n </div>\n\n {/* Delete Confirmation Dialog */}\n {workflow && (\n <WorkflowDeleteDialog\n workflow={workflow}\n isOpen={showDeleteConfirm}\n onClose={() => setShowDeleteConfirm(false)}\n onConfirm={handleDelete}\n />\n )}\n </div>\n );\n});\n\nexport default WorkflowViewPage;\n"],"mappings":";;;;;;;;;;;;;;;;AA2BA,IAAM,KAAiB,EAAE,mBACvB,kBAAC,OAAD;CAAgB;CAAW,MAAK;CAAO,QAAO;CAAe,SAAQ;WACnE,kBAAC,QAAD;EAAM,eAAc;EAAQ,gBAAe;EAAQ,aAAa;EAAG,GAAE;EAAoB,CAAA;CACrF,CAAA,EAGF,KAAY,EAAE,mBAClB,kBAAC,OAAD;CAAgB;CAAW,MAAK;CAAO,QAAO;CAAe,SAAQ;WACnE,kBAAC,QAAD;EACE,eAAc;EACd,gBAAe;EACf,aAAa;EACb,GAAE;EACF,CAAA;CACE,CAAA,EAGF,KAAa,EAAE,mBACnB,kBAAC,OAAD;CAAgB;CAAW,MAAK;CAAO,QAAO;CAAe,SAAQ;WACnE,kBAAC,QAAD;EACE,eAAc;EACd,gBAAe;EACf,aAAa;EACb,GAAE;EACF,CAAA;CACE,CAAA,EAGF,KAAY,EAAE,mBAClB,kBAAC,OAAD;CAAgB;CAAW,MAAK;CAAO,QAAO;CAAe,SAAQ;WAArE,CACE,kBAAC,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,WAAU;mBAA8B;SAAe,CAAA,EAE/D,kBAAC,QAAD;SAAM,WAAU;mBAAhB,CAA8C,cAAW,EAAK,SAAgB;WAC1E;WACL,EAAK,YACJ,kBAAC,UAAD;QACE,MAAK;QACL,eAAe,GAAmB,EAAK,WAAW;QAClD,WAAU;kBACX;QAEQ,CAAA,CAEP;SACF;QA7BI,EAAK,GA6BT,CACN;KACE,CAAA,CAEJ;;GAGN,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf;MACE,kBAAC,MAAD;OAAI,WAAU;iBAA+C;OAAY,CAAA;MACzE,kBAAC,KAAD;OAAG,WAAU;iBACV,EAAoB,IAAI,KAAK,EAAS,UAAU,EAAE,EAAE,WAAW,IAAM,CAAC;OACrE,CAAA;MACJ,kBAAC,KAAD;OAAG,WAAU;iBAAb,CAA2C,OAAI,EAAS,UAAc;;MAClE;QACN,kBAAC,OAAD;KAAK,WAAU;eAAf;MACE,kBAAC,MAAD;OAAI,WAAU;iBAA+C;OAAiB,CAAA;MAC9E,kBAAC,KAAD;OAAG,WAAU;iBACV,EAAoB,IAAI,KAAK,EAAS,UAAU,EAAE,EAAE,WAAW,IAAM,CAAC;OACrE,CAAA;MACJ,kBAAC,KAAD;OAAG,WAAU;iBAAb,CAA2C,OAAI,EAAS,aAAa,EAAS,UAAc;;MACxF;OACF;;GAGL,KACC,kBAAC,GAAD;IACY;IACV,QAAQ;IACR,eAAe,EAAqB,GAAM;IAC1C,WAAW;IACX,CAAA;GAEA;;EAER"}
1
+ {"version":3,"file":"WorkflowViewPage.js","names":[],"sources":["../../../src/bigconsole/pages/WorkflowViewPage.tsx"],"sourcesContent":["/**\n * Workflow View Page\n *\n * Page for viewing FluidGrids Workflow details, linked DataSinks,\n * read-only workflow design preview, and real execution with polling.\n */\n\nimport { memo, useState, useEffect, useCallback } from 'react';\nimport { useParams } from 'react-router';\nimport { GlassCard, IllustratedEmptyState, PagePurpose, NextSteps } from '@burdenoff/fe-libs/ui';\nimport { useAppNavigate } from '../contexts';\nimport { isNative, nativeCopyText, nativeNotify, nativeToast } from '../../utils/nativeBridge';\nimport { useBigConsole } from '../context';\nimport { formatDistanceToNow } from 'date-fns';\nimport { useWorkflowOperations } from '../hooks/useWorkflowOperations';\nimport { WorkflowStatusBadge } from '../components/workflow/WorkflowStatusBadge';\nimport { WorkflowDeleteDialog } from '../components/workflow/WorkflowDeleteDialog';\nimport type { FluidGridsWorkflow } from '../types';\n\n// FluidGrids FE SDK — read-only embedded builder preview\nimport { WorkflowBuilder } from '@burdenoff/fluidgrids-fe-sdk';\nimport { BOOTSTRAP_RETRY_DELAY_MS } from '../constants';\n\n// ============================================================================\n// ICONS\n// ============================================================================\n\nconst ArrowLeftIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M15 19l-7-7 7-7\" />\n </svg>\n);\n\nconst EditIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z\"\n />\n </svg>\n);\n\nconst TrashIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16\"\n />\n </svg>\n);\n\nconst PlayIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z\"\n />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M21 12a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n);\n\nconst CopyIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\"\n />\n </svg>\n);\n\nconst CheckIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M5 13l4 4L19 7\" />\n </svg>\n);\n\nconst DatabaseIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4\"\n />\n </svg>\n);\n\nconst ErrorIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n);\n\nconst ChevronDownIcon = ({ className }: { className?: string }) => (\n <svg className={className} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M19 9l-7 7-7-7\" />\n </svg>\n);\n\n// ============================================================================\n// COMPONENT\n// ============================================================================\n\nexport const WorkflowViewPage = memo(function WorkflowViewPage() {\n const navigate = useAppNavigate();\n const { workflowId } = useParams<{ workflowId: string }>();\n\n // BigConsole context for apiGatewayUrl and authToken\n const { apiGatewayUrl, authToken, workspaceId } = useBigConsole();\n\n // Local state\n const [workflow, setWorkflow] = useState<FluidGridsWorkflow | null>(null);\n const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);\n const [, setIsDeleting] = useState(false);\n const [isExecuting, setIsExecuting] = useState(false);\n const [webhookCopied, setWebhookCopied] = useState(false);\n const [showDesignPreview, setShowDesignPreview] = useState(false);\n // Track whether initial fetch has completed — prevents \"not found\" flash\n // before data has even been requested (loading starts as false with skipFetch: true)\n const [isReady, setIsReady] = useState(false);\n const [executionResult, setExecutionResult] = useState<{\n success: boolean;\n output: unknown;\n error: string | null;\n executionTimeMs: number;\n runId?: string;\n } | null>(null);\n\n // Operations\n const { loading, error, fetchWorkflow, deleteWorkflow, executeWorkflow, pollWorkflowExecution } =\n useWorkflowOperations({\n skipFetch: true,\n });\n\n // Load workflow on mount.\n // On a full page reload the workspace token may not be issued yet when this\n // effect first runs, causing the gateway to lack workspace context and\n // the resolver to return null. We retry once after a short delay to give\n // the auth bootstrap time to complete.\n useEffect(() => {\n if (!workflowId) {\n setIsReady(true);\n return;\n }\n\n let cancelled = false;\n\n const load = async (attempt: number) => {\n try {\n const result = await fetchWorkflow(workflowId);\n if (cancelled) return;\n\n if (result) {\n setWorkflow(result);\n setIsReady(true);\n } else if (attempt === 0) {\n // First attempt failed — likely workspace token race on full-page load.\n // Retry once after a short delay.\n setTimeout(() => {\n if (!cancelled) load(1);\n }, BOOTSTRAP_RETRY_DELAY_MS);\n } else {\n // Second attempt also failed — genuinely not found\n setIsReady(true);\n }\n } catch {\n // Network error, GraphQL error, etc. — surface the \"not found\" UI\n // rather than spinning forever with no escape hatch.\n if (!cancelled) setIsReady(true);\n }\n };\n\n load(0);\n return () => {\n cancelled = true;\n };\n }, [workflowId, fetchWorkflow]);\n\n // Handlers\n const handleBack = useCallback(() => {\n navigate(`/workflows`);\n }, [navigate]);\n\n const handleEdit = useCallback(() => {\n navigate(`/workflows/${workflowId}/edit`);\n }, [navigate, workflowId]);\n\n const handleDelete = useCallback(async () => {\n if (!workflowId) return;\n setIsDeleting(true);\n try {\n const success = await deleteWorkflow(workflowId);\n if (success) {\n if (isNative()) void nativeNotify('success');\n navigate(`/workflows`);\n } else if (isNative()) {\n void nativeNotify('error');\n }\n } catch {\n if (isNative()) void nativeNotify('error');\n } finally {\n setIsDeleting(false);\n setShowDeleteConfirm(false);\n }\n }, [workflowId, deleteWorkflow, navigate]);\n\n const handleExecute = useCallback(async () => {\n if (!workflowId) return;\n setIsExecuting(true);\n setExecutionResult(null);\n\n const startTime = Date.now();\n\n try {\n const result = await executeWorkflow(workflowId);\n\n if (result) {\n const executionTimeMs = Date.now() - startTime;\n\n // If workflow has external FluidGrids ID, the execution is async\n if (result.externalWorkflowId) {\n setExecutionResult({\n success: true,\n output: {\n externalWorkflowId: result.externalWorkflowId,\n executionCount: result.executionCount,\n status: 'Triggered — polling for completion...',\n },\n error: null,\n executionTimeMs,\n });\n\n // Poll for completion in the background\n pollWorkflowExecution(workflowId, {\n intervalMs: 3000,\n timeoutMs: 120000,\n onProgress: (updated) => {\n setWorkflow(updated);\n },\n }).then((final) => {\n if (final) {\n setWorkflow(final);\n setExecutionResult((prev) =>\n prev\n ? {\n ...prev,\n output: {\n ...((prev.output as Record<string, unknown>) || {}),\n status: final.status === 'error' ? 'Failed' : 'Completed',\n executionCount: final.executionCount,\n lastExecutedAt: final.lastExecutedAt,\n },\n executionTimeMs: Date.now() - startTime,\n }\n : prev\n );\n }\n });\n } else {\n // Local execution (no external FluidGrids workflow)\n setExecutionResult({\n success: true,\n output: {\n executionCount: result.executionCount,\n lastExecutedAt: result.lastExecutedAt,\n status: 'Completed',\n },\n error: null,\n executionTimeMs,\n });\n }\n\n // Refresh workflow\n const updated = await fetchWorkflow(workflowId);\n if (updated) {\n setWorkflow(updated);\n }\n }\n } catch (err) {\n setExecutionResult({\n success: false,\n output: null,\n error: err instanceof Error ? err.message : 'Execution failed',\n executionTimeMs: Date.now() - startTime,\n });\n } finally {\n setIsExecuting(false);\n }\n }, [workflowId, executeWorkflow, fetchWorkflow, pollWorkflowExecution]);\n\n const handleCopyWebhook = useCallback(async () => {\n if (!workflow?.webhookUrl) return;\n try {\n await nativeCopyText(workflow.webhookUrl);\n setWebhookCopied(true);\n if (isNative()) void nativeToast('Webhook copied');\n setTimeout(() => setWebhookCopied(false), 2000);\n } catch {\n // Clipboard not available\n }\n }, [workflow?.webhookUrl]);\n\n const handleViewDataSink = useCallback(\n (dataSinkId: string) => {\n navigate(`/datasinks/${dataSinkId}`);\n },\n [navigate]\n );\n\n // Loading state — show spinner until initial fetch completes OR during a refetch\n if (!isReady || (loading && !workflow)) {\n return (\n <div className=\"p-6 flex items-center justify-center min-h-[400px]\">\n <svg className=\"w-8 h-8 text-action-primary-bg animate-spin\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle className=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" strokeWidth=\"4\" />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n />\n </svg>\n </div>\n );\n }\n\n // Error or not found state — only shown AFTER initial fetch completed\n if (error || !workflow) {\n return (\n <div className=\"p-6\">\n <button\n type=\"button\"\n onClick={handleBack}\n className=\"inline-flex items-center gap-1 text-sm text-text-secondary hover:text-text-primary mb-4\"\n >\n <ArrowLeftIcon className=\"w-4 h-4\" />\n Back to Workflows\n </button>\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"Workflow not found\"\n description={error?.message || 'The workflow you are looking for does not exist.'}\n />\n </div>\n );\n }\n\n const linkedDataSinkCount = workflow.dataSinkLinks?.length || 0;\n\n return (\n <div className=\"p-6 max-w-5xl mx-auto\">\n {/* Header */}\n <div className=\"mb-8\">\n <button\n type=\"button\"\n onClick={handleBack}\n className=\"inline-flex items-center gap-1 text-sm text-text-secondary hover:text-text-primary mb-4\"\n >\n <ArrowLeftIcon className=\"w-4 h-4\" />\n Back to Workflows\n </button>\n\n <div className=\"flex items-start justify-between\">\n <div>\n <div className=\"flex items-center gap-3 mb-2\">\n <h1 className=\"text-2xl font-bold text-text-primary\">{workflow.name}</h1>\n <WorkflowStatusBadge status={workflow.status} />\n </div>\n <p className=\"text-sm text-text-secondary font-mono\">{workflow.key}</p>\n {workflow.externalWorkflowId && (\n <p className=\"text-xs text-text-tertiary mt-1\">\n FluidGrids ID: <span className=\"font-mono\">{workflow.externalWorkflowId}</span>\n </p>\n )}\n </div>\n\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={handleExecute}\n disabled={isExecuting}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-status-success-bg hover:bg-status-success-bg/90 rounded-md transition-colors disabled:opacity-50\"\n >\n <PlayIcon className=\"w-4 h-4\" />\n {isExecuting ? 'Executing...' : 'Execute'}\n </button>\n <button\n type=\"button\"\n onClick={handleEdit}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-text-primary bg-bg-sunken hover:bg-border-default rounded-md transition-colors\"\n >\n <EditIcon className=\"w-4 h-4\" />\n Edit\n </button>\n <button\n type=\"button\"\n onClick={() => setShowDeleteConfirm(true)}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-status-error-text bg-status-error-bg/10 hover:bg-status-error-bg/20 rounded-md transition-colors\"\n >\n <TrashIcon className=\"w-4 h-4\" />\n Delete\n </button>\n </div>\n </div>\n </div>\n\n <PagePurpose className=\"mb-6\">\n A workflow is the visual ETL job that feeds this BigConsole — it fetches, transforms, and delivers data into\n linked data sinks. From here you can run it on demand, inspect its design and execution history, copy its\n webhook trigger, and edit it in the visual builder.\n </PagePurpose>\n\n <NextSteps\n storageKey=\"bigconsole-workflow-view\"\n steps={[\n {\n id: 'execute',\n label: 'Run the workflow',\n description: 'Trigger an execution to pull fresh data now.',\n onClick: handleExecute,\n },\n {\n id: 'design',\n label: 'Inspect the design',\n description: 'Expand the read-only preview to see each step.',\n onClick: () => setShowDesignPreview(true),\n },\n {\n id: 'edit',\n label: 'Edit in the builder',\n description: 'Open the FluidGrids visual builder to change the flow.',\n onClick: handleEdit,\n },\n {\n id: 'sinks',\n label: 'Check the linked data sinks',\n description: 'See where this workflow writes its output.',\n onClick: () => navigate('/datasinks'),\n },\n ]}\n />\n\n {/* Execution Result */}\n {executionResult && (\n <div\n className={`mb-6 p-4 rounded-lg border ${\n executionResult.success\n ? 'bg-status-success-bg/10 border-status-success-border/20'\n : 'bg-status-error-bg/10 border-status-error-border/20'\n }`}\n >\n <div className=\"flex items-center justify-between mb-2\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {executionResult.success ? 'Execution Triggered' : 'Execution Failed'}\n </h3>\n <span className=\"text-xs text-text-secondary\">{executionResult.executionTimeMs}ms</span>\n </div>\n {executionResult.error ? (\n <p className=\"text-sm text-status-error-text\">{executionResult.error}</p>\n ) : (\n <pre className=\"text-xs text-text-secondary font-mono bg-bg-sunken p-2 rounded overflow-auto max-h-[200px]\">\n {JSON.stringify(executionResult.output, null, 2)}\n </pre>\n )}\n {executionResult.runId && (\n <p className=\"text-xs text-text-tertiary mt-2\">\n Run ID: <span className=\"font-mono\">{executionResult.runId}</span>\n </p>\n )}\n </div>\n )}\n\n {/* Info Grid */}\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8\">\n {/* Description */}\n <div className=\"bg-bg-surface border border-border-default rounded-lg p-4\">\n <h3 className=\"text-sm font-medium text-text-secondary mb-2\">Description</h3>\n <p className=\"text-sm text-text-primary\">{workflow.description || 'No description'}</p>\n </div>\n\n {/* Execution Stats — primary emphasis zone */}\n <GlassCard treatment=\"glass\" glow className=\"p-4\">\n <h3 className=\"text-sm font-medium text-text-secondary mb-2\">Execution Stats</h3>\n <div className=\"grid grid-cols-2 gap-4\">\n <div>\n <p className=\"text-2xl font-bold text-text-primary\">{workflow.executionCount}</p>\n <p className=\"text-xs text-text-secondary\">Total Executions</p>\n </div>\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {workflow.lastExecutedAt\n ? formatDistanceToNow(new Date(workflow.lastExecutedAt), { addSuffix: true })\n : 'Never'}\n </p>\n <p className=\"text-xs text-text-secondary\">Last Executed</p>\n </div>\n </div>\n </GlassCard>\n </div>\n\n {/* Webhook URL */}\n {workflow.webhookUrl && (\n <div className=\"bg-bg-surface border border-border-default rounded-lg p-4 mb-8\">\n <h3 className=\"text-sm font-medium text-text-secondary mb-2\">Webhook URL</h3>\n <div className=\"flex items-center gap-2\">\n <code className=\"flex-1 text-sm text-text-primary font-mono bg-bg-sunken px-3 py-2 rounded overflow-auto\">\n {workflow.webhookUrl}\n </code>\n <button\n type=\"button\"\n onClick={handleCopyWebhook}\n className=\"flex items-center gap-1 px-3 py-2 text-sm text-text-secondary hover:text-text-primary transition-colors\"\n >\n {webhookCopied ? (\n <>\n <CheckIcon className=\"w-4 h-4 text-status-success-text\" />\n Copied!\n </>\n ) : (\n <>\n <CopyIcon className=\"w-4 h-4\" />\n Copy\n </>\n )}\n </button>\n </div>\n </div>\n )}\n\n {/* Workflow Design Preview (collapsible) */}\n {workflow.externalWorkflowId && (\n <div className=\"bg-bg-surface border border-border-default rounded-lg mb-8 overflow-hidden\">\n <button\n type=\"button\"\n onClick={() => setShowDesignPreview((prev) => !prev)}\n className=\"w-full flex items-center justify-between px-4 py-3 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors\"\n >\n <span>Workflow Design Preview</span>\n <ChevronDownIcon\n className={`w-4 h-4 text-text-secondary transition-transform ${showDesignPreview ? 'rotate-180' : ''}`}\n />\n </button>\n {showDesignPreview && (\n <div className=\"border-t border-border-default\" style={{ height: '450px' }}>\n <WorkflowBuilder\n apiGatewayUrl={apiGatewayUrl}\n workspaceId={workspaceId || 'default'}\n authToken={authToken}\n workflowId={workflow.externalWorkflowId}\n readonly\n hideHeader\n className=\"h-full\"\n />\n </div>\n )}\n </div>\n )}\n\n {/* Linked DataSinks */}\n <div className=\"bg-bg-surface border border-border-default rounded-lg p-4 mb-8\">\n <h3 className=\"text-sm font-medium text-text-secondary mb-4\">Linked DataSinks ({linkedDataSinkCount})</h3>\n {linkedDataSinkCount === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-generic\"\n title=\"No data sinks linked\"\n description=\"This workflow has no data sinks linked yet — its output isn't being stored.\"\n />\n ) : (\n <div className=\"space-y-2\">\n {workflow.dataSinkLinks?.map((link) => (\n <div key={link.id} className=\"flex items-center justify-between px-3 py-2 bg-bg-sunken rounded-md\">\n <div className=\"flex items-center gap-3\">\n <DatabaseIcon className=\"w-4 h-4 text-text-secondary\" />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {link.dataSink?.name || link.dataSink?.key || link.dataSinkId}\n </p>\n {link.dataSink?.key && <p className=\"text-xs text-text-secondary font-mono\">{link.dataSink.key}</p>}\n </div>\n </div>\n <div className=\"flex items-center gap-4\">\n <div className=\"flex items-center gap-2\">\n {link.isEnabled ? (\n <span className=\"text-xs text-status-success-text\">Enabled</span>\n ) : (\n <span className=\"text-xs text-text-secondary\">Disabled</span>\n )}\n <span className=\"text-xs text-text-secondary\">Priority: {link.priority}</span>\n </div>\n {link.dataSink && (\n <button\n type=\"button\"\n onClick={() => handleViewDataSink(link.dataSinkId)}\n className=\"text-xs text-action-primary-bg hover:underline\"\n >\n View\n </button>\n )}\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n\n {/* Timestamps */}\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-6\">\n <div className=\"bg-bg-surface border border-border-default rounded-lg p-4\">\n <h3 className=\"text-sm font-medium text-text-secondary mb-2\">Created</h3>\n <p className=\"text-sm text-text-primary\">\n {formatDistanceToNow(new Date(workflow.createdAt), { addSuffix: true })}\n </p>\n <p className=\"text-xs text-text-secondary\">by {workflow.createdBy}</p>\n </div>\n <div className=\"bg-bg-surface border border-border-default rounded-lg p-4\">\n <h3 className=\"text-sm font-medium text-text-secondary mb-2\">Last Updated</h3>\n <p className=\"text-sm text-text-primary\">\n {formatDistanceToNow(new Date(workflow.updatedAt), { addSuffix: true })}\n </p>\n <p className=\"text-xs text-text-secondary\">by {workflow.updatedBy || workflow.createdBy}</p>\n </div>\n </div>\n\n {/* Delete Confirmation Dialog */}\n {workflow && (\n <WorkflowDeleteDialog\n workflow={workflow}\n isOpen={showDeleteConfirm}\n onClose={() => setShowDeleteConfirm(false)}\n onConfirm={handleDelete}\n />\n )}\n </div>\n );\n});\n\nexport default WorkflowViewPage;\n"],"mappings":";;;;;;;;;;;;;;;;AA2BA,IAAM,KAAiB,EAAE,mBACvB,kBAAC,OAAD;CAAgB;CAAW,MAAK;CAAO,QAAO;CAAe,SAAQ;WACnE,kBAAC,QAAD;EAAM,eAAc;EAAQ,gBAAe;EAAQ,aAAa;EAAG,GAAE;EAAoB,CAAA;CACrF,CAAA,EAGF,KAAY,EAAE,mBAClB,kBAAC,OAAD;CAAgB;CAAW,MAAK;CAAO,QAAO;CAAe,SAAQ;WACnE,kBAAC,QAAD;EACE,eAAc;EACd,gBAAe;EACf,aAAa;EACb,GAAE;EACF,CAAA;CACE,CAAA,EAGF,KAAa,EAAE,mBACnB,kBAAC,OAAD;CAAgB;CAAW,MAAK;CAAO,QAAO;CAAe,SAAQ;WACnE,kBAAC,QAAD;EACE,eAAc;EACd,gBAA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D;OAAK,WAAU;iBAAf,CACE,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACG,EAAK,YACJ,kBAAC,QAAD;SAAM,WAAU;mBAAmC;SAAc,CAAA,GAEjE,kBAAC,QAAD;SAAM,WAAU;mBAA8B;SAAe,CAAA,EAE/D,kBAAC,QAAD;SAAM,WAAU;mBAAhB,CAA8C,cAAW,EAAK,SAAgB;WAC1E;WACL,EAAK,YACJ,kBAAC,UAAD;QACE,MAAK;QACL,eAAe,GAAmB,EAAK,WAAW;QAClD,WAAU;kBACX;QAEQ,CAAA,CAEP;SACF;QA7BI,EAAK,GA6BT,CACN;KACE,CAAA,CAEJ;;GAGN,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf;MACE,kBAAC,MAAD;OAAI,WAAU;iBAA+C;OAAY,CAAA;MACzE,kBAAC,KAAD;OAAG,WAAU;iBACV,EAAoB,IAAI,KAAK,EAAS,UAAU,EAAE,EAAE,WAAW,IAAM,CAAC;OACrE,CAAA;MACJ,kBAAC,KAAD;OAAG,WAAU;iBAAb,CAA2C,OAAI,EAAS,UAAc;;MAClE;QACN,kBAAC,OAAD;KAAK,WAAU;eAAf;MACE,kBAAC,MAAD;OAAI,WAAU;iBAA+C;OAAiB,CAAA;MAC9E,kBAAC,KAAD;OAAG,WAAU;iBACV,EAAoB,IAAI,KAAK,EAAS,UAAU,EAAE,EAAE,WAAW,IAAM,CAAC;OACrE,CAAA;MACJ,kBAAC,KAAD;OAAG,WAAU;iBAAb,CAA2C,OAAI,EAAS,aAAa,EAAS,UAAc;;MACxF;OACF;;GAGL,KACC,kBAAC,GAAD;IACY;IACV,QAAQ;IACR,eAAe,EAAqB,GAAM;IAC1C,WAAW;IACX,CAAA;GAEA;;EAER"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-bigconsole",
3
- "version": "2026.801.1",
3
+ "version": "2026.801.2",
4
4
  "description": "BigConsole - AI-powered analytics and dashboard platform",
5
5
  "type": "module",
6
6
  "files": [
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@apollo/client": "^4.0.11",
50
- "@burdenoff/fe-libs": "2026.731.4",
50
+ "@burdenoff/fe-libs": "2026.801.1",
51
51
  "@burdenoff/fluidgrids-fe-sdk": "2026.731.4",
52
52
  "@iconify/react": "^6.0.2",
53
53
  "@monaco-editor/react": "^4.7.0",
@@ -74,7 +74,7 @@
74
74
  "react-dom": "^19.0.0",
75
75
  "react-grid-layout": "^1.5.0",
76
76
  "react-resizable": "^3.1.3",
77
- "react-router-dom": "^7.1.3",
77
+ "react-router": "^8.3.0",
78
78
  "recharts": "^2.15.0",
79
79
  "sonner": "^2.0.7",
80
80
  "uuid": "^13.0.0",