Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

feat(ui): restyle the Workflow Builder to the new look

Juan Denis8279c10826b6
diff --git a/frontend/src/components/workflow/BaseNode.jsx b/frontend/src/components/workflow/BaseNode.jsx
index 6f006828..ca1fbb36 100644
--- a/frontend/src/components/workflow/BaseNode.jsx
+++ b/frontend/src/components/workflow/BaseNode.jsx
@@ -9,11 +9,12 @@ const iconMap = {
default: Box
};
+// Categorical node tints (redesign palette; docker brand blue kept).
const colorMap = {
docker: '#2496ed',
- database: '#f59e0b',
- domain: '#10b981',
- default: '#6366f1'
+ database: '#f5b945',
+ domain: '#3ddc97',
+ default: '#6d7cff'
};
const BaseNode = ({ data, selected }) => {
diff --git a/frontend/src/components/workflow/ConfigPanel.jsx b/frontend/src/components/workflow/ConfigPanel.jsx
index 6229dd7f..cd050e52 100644
--- a/frontend/src/components/workflow/ConfigPanel.jsx
+++ b/frontend/src/components/workflow/ConfigPanel.jsx
@@ -12,7 +12,7 @@ const ConfigPanel = ({
children,
footer
}) => {
- const borderColor = color || headerColor || '#6366f1';
+ const borderColor = color || headerColor || '#6d7cff';
const handleKeyDown = useCallback((e) => {
if (e.key === 'Escape') {
diff --git a/frontend/src/components/workflow/ConnectionEdge.jsx b/frontend/src/components/workflow/ConnectionEdge.jsx
index d1c56596..85441624 100644
--- a/frontend/src/components/workflow/ConnectionEdge.jsx
+++ b/frontend/src/components/workflow/ConnectionEdge.jsx
@@ -1,7 +1,20 @@
import React, { memo } from 'react';
import { BaseEdge, EdgeLabelRenderer, getSmoothStepPath } from '@xyflow/react';
import { X } from 'lucide-react';
-import { connectionLabels, connectionColors, getConnectionType } from '../../utils/connectionRules';
+import { connectionLabels, getConnectionType } from '../../utils/connectionRules';
+
+// Categorical edge tints aligned to the redesign palette. Literal hex by
+// design: SVG stroke is set via ReactFlow inline style props where var()
+// does not resolve (docker brand blue kept).
+const edgeColors = {
+ 'domain-dockerApp': '#3ddc97',
+ 'domain-service': '#3ddc97',
+ 'dockerApp-dockerApp': '#2496ed',
+ 'dockerApp-database': '#f5b945',
+ 'service-dockerApp': '#6d7cff',
+ 'service-database': '#f5b945',
+ 'service-service': '#6d7cff'
+};
const ConnectionEdge = ({
id,
@@ -35,7 +48,7 @@ const ConnectionEdge = ({
);
const label = connectionLabels[connectionType] || 'Connected';
- const color = connectionColors[connectionType] || '#6366f1';
+ const color = edgeColors[connectionType] || '#6d7cff';
return (
<>
@@ -44,9 +57,9 @@ const ConnectionEdge = ({
path={edgePath}
markerEnd={markerEnd}
style={{
- stroke: selected ? '#fff' : color,
+ stroke: selected ? '#8b93ff' : color,
strokeWidth: selected ? 2 : 1.5,
- filter: selected ? 'drop-shadow(0 0 4px rgba(255,255,255,0.5))' : 'none'
+ filter: selected ? 'drop-shadow(0 0 4px rgba(109, 124, 255, 0.55))' : 'none'
}}
/>
<EdgeLabelRenderer>
@@ -56,7 +69,7 @@ const ConnectionEdge = ({
position: 'absolute',
transform: `translate(-50%, -50%) translate(${labelX}px,${labelY}px)`,
pointerEvents: 'all',
- backgroundColor: selected ? '#fff' : color
+ '--edge-c': color
}}
>
<span className="edge-label-text">{label}</span>
diff --git a/frontend/src/components/workflow/DeploymentProgressModal.jsx b/frontend/src/components/workflow/DeploymentProgressModal.jsx
index ea088247..a56d11a1 100644
--- a/frontend/src/components/workflow/DeploymentProgressModal.jsx
+++ b/frontend/src/components/workflow/DeploymentProgressModal.jsx
@@ -3,11 +3,12 @@ import { Loader, CheckCircle, XCircle, Server, Database, Globe, Box, ExternalLin
import Modal from '../Modal';
import { Button } from '@/components/ui/button';
+// Categorical node tints (redesign palette; docker brand blue kept).
const nodeTypeConfig = {
dockerApp: { icon: Server, label: 'Docker App', color: '#2496ed' },
- database: { icon: Database, label: 'Database', color: '#f59e0b' },
- domain: { icon: Globe, label: 'Domain', color: '#10b981' },
- service: { icon: Box, label: 'Service', color: '#6366f1' }
+ database: { icon: Database, label: 'Database', color: '#f5b945' },
+ domain: { icon: Globe, label: 'Domain', color: '#3ddc97' },
+ service: { icon: Box, label: 'Service', color: '#6d7cff' }
};
const DeploymentProgressModal = ({ isDeploying, results, nodes, onClose }) => {
diff --git a/frontend/src/components/workflow/WorkflowExecutionHistory.jsx b/frontend/src/components/workflow/WorkflowExecutionHistory.jsx
index b9af163d..c85eef92 100644
--- a/frontend/src/components/workflow/WorkflowExecutionHistory.jsx
+++ b/frontend/src/components/workflow/WorkflowExecutionHistory.jsx
@@ -1,7 +1,14 @@
import React, { useState, useEffect, useCallback } from 'react';
-import { X, Clock, CheckCircle, XCircle, Loader2, List, FileText, RefreshCw, Activity } from 'lucide-react';
+import { Clock, Loader2, FileText, Activity } from 'lucide-react';
import api from '../../services/api';
import Modal from '../Modal';
+import { Pill } from '../ds';
+
+const statusKind = {
+ success: 'green',
+ failed: 'red',
+ running: 'amber'
+};
const WorkflowExecutionHistory = ({ workflowId, onClose }) => {
const [executions, setExecutions] = useState([]);
@@ -44,95 +51,76 @@ const WorkflowExecutionHistory = ({ workflowId, onClose }) => {
}
}, [selectedExecution, fetchLogs]);
- const getStatusIcon = (status) => {
- switch (status) {
- case 'success': return <CheckCircle size={16} className="text-green-500" />;
- case 'failed': return <XCircle size={16} className="text-red-500" />;
- case 'running': return <Loader2 size={16} className="text-blue-500 animate-spin" />;
- default: return <Clock size={16} className="text-gray-500" />;
- }
- };
-
return (
<Modal open={true} onClose={onClose} title="Execution History" size="lg">
- <div className="flex-1 flex overflow-hidden">
+ <div className="wf-history">
{/* Executions List */}
- <div className="w-1/3 border-r border-gray-700 overflow-y-auto bg-gray-900/30">
+ <div className="wf-history__list">
{isLoading ? (
- <div className="p-8 flex justify-center"><Loader2 className="animate-spin text-gray-500" /></div>
+ <div className="wf-history__loading"><Loader2 size={18} className="animate-spin" /></div>
) : executions.length === 0 ? (
- <div className="p-8 text-center text-gray-500 text-sm">No executions found</div>
+ <div className="wf-history__empty">No executions found</div>
) : (
- <div className="divide-y divide-gray-800">
- {executions.map((exec) => (
- <div
- key={exec.id}
- className={`p-3 cursor-pointer transition-colors hover:bg-gray-800/50 ${selectedExecution?.id === exec.id ? 'bg-blue-900/20 border-l-2 border-blue-500' : ''}`}
- onClick={() => setSelectedExecution(exec)}
- >
- <div className="flex justify-between items-center mb-1">
- <span className="text-xs font-mono text-gray-400">#{exec.id}</span>
- {getStatusIcon(exec.status)}
- </div>
- <div className="text-sm font-medium">{exec.trigger_type} trigger</div>
- <div className="text-[10px] text-gray-500 mt-1 flex items-center gap-1">
- <Clock size={10} />
- {new Date(exec.started_at).toLocaleString()}
- </div>
+ executions.map((exec) => (
+ <div
+ key={exec.id}
+ className={`wf-history__item ${selectedExecution?.id === exec.id ? 'is-on' : ''}`}
+ onClick={() => setSelectedExecution(exec)}
+ >
+ <div className="wf-history__item-top">
+ <span className="wf-history__id">#{exec.id}</span>
+ <Pill kind={statusKind[exec.status] || 'gray'}>{exec.status}</Pill>
</div>
- ))}
- </div>
+ <div className="wf-history__trigger">{exec.trigger_type} trigger</div>
+ <div className="wf-history__time">
+ <Clock size={10} />
+ {new Date(exec.started_at).toLocaleString()}
+ </div>
+ </div>
+ ))
)}
</div>
{/* Execution Details & Logs */}
- <div className="flex-1 flex flex-col overflow-hidden bg-gray-900/50">
+ <div className="wf-history__detail">
{selectedExecution ? (
<>
- <div className="p-4 border-b border-gray-800 flex justify-between items-center">
+ <div className="wf-history__head">
<div>
- <h3 className="text-sm font-semibold flex items-center gap-2">
+ <h3 className="wf-history__title">
Execution Details #{selectedExecution.id}
- <span className={`text-[10px] px-1.5 py-0.5 rounded uppercase font-bold ${
- selectedExecution.status === 'success' ? 'bg-green-900/30 text-green-400 border border-green-500/30' :
- selectedExecution.status === 'failed' ? 'bg-red-900/30 text-red-400 border border-red-500/30' :
- 'bg-blue-900/30 text-blue-400 border border-blue-500/30'
- }`}>
+ <Pill kind={statusKind[selectedExecution.status] || 'gray'}>
{selectedExecution.status}
- </span>
+ </Pill>
</h3>
- <div className="text-[10px] text-gray-500 mt-1">
+ <div className="wf-history__dur">
Duration: {selectedExecution.duration ? `${selectedExecution.duration.toFixed(2)}s` : 'N/A'}
</div>
</div>
</div>
- <div className="flex-1 overflow-y-auto p-4 font-mono text-xs">
- <div className="flex items-center gap-2 text-gray-400 mb-4 border-b border-gray-800 pb-2">
- <FileText size={14} />
+ <div className="wf-history__logs">
+ <div className="wf-history__logs-label">
+ <FileText size={13} />
<span>Execution Logs</span>
</div>
{isLogsLoading ? (
- <div className="flex justify-center p-8"><Loader2 className="animate-spin text-gray-500" /></div>
+ <div className="wf-history__loading"><Loader2 size={18} className="animate-spin" /></div>
) : logs.length === 0 ? (
- <div className="text-gray-600 italic">No logs available for this execution.</div>
+ <div className="wf-history__nolog">No logs available for this execution.</div>
) : (
- <div className="space-y-1">
+ <div className="wf-history__lines">
{logs.map((log) => (
- <div key={log.id} className="flex gap-3 py-0.5 hover:bg-white/5 px-1 rounded transition-colors">
- <span className="text-gray-600 shrink-0">[{new Date(log.timestamp).toLocaleTimeString([], { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit' })}]</span>
- <span className={`shrink-0 w-12 font-bold ${
- log.level === 'ERROR' ? 'text-red-400' :
- log.level === 'WARNING' ? 'text-yellow-400' :
- log.level === 'DEBUG' ? 'text-gray-500' : 'text-blue-400'
- }`}>
+ <div key={log.id} className="wf-log">
+ <span className="wf-log__ts">[{new Date(log.timestamp).toLocaleTimeString([], { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit' })}]</span>
+ <span className={`wf-log__lvl wf-log__lvl--${(log.level || 'info').toLowerCase()}`}>
{log.level}
</span>
{log.node_id && (
- <span className="text-indigo-400 shrink-0">[{log.node_id}]</span>
+ <span className="wf-log__node">[{log.node_id}]</span>
)}
- <span className="text-gray-300 break-all">{log.message}</span>
+ <span className="wf-log__msg">{log.message}</span>
</div>
))}
</div>
@@ -140,8 +128,8 @@ const WorkflowExecutionHistory = ({ workflowId, onClose }) => {
</div>
</>
) : (
- <div className="flex-1 flex flex-col items-center justify-center text-gray-600">
- <Activity size={48} className="mb-4 opacity-20" />
+ <div className="wf-history__placeholder">
+ <Activity size={44} />
<p>Select an execution to view details and logs</p>
</div>
)}
diff --git a/frontend/src/components/workflow/WorkflowListModal.jsx b/frontend/src/components/workflow/WorkflowListModal.jsx
index 4228ddf0..33b2d065 100644
--- a/frontend/src/components/workflow/WorkflowListModal.jsx
+++ b/frontend/src/components/workflow/WorkflowListModal.jsx
@@ -3,6 +3,7 @@ import { Trash2, Clock, Layers, GitBranch, Loader } from 'lucide-react';
import api from '../../services/api';
import Modal from '../Modal';
import { Button } from '@/components/ui/button';
+import { Pill } from '../ds';
const WorkflowListModal = ({ onLoad, onClose }) => {
const [workflows, setWorkflows] = useState([]);
@@ -94,7 +95,12 @@ const WorkflowListModal = ({ onLoad, onClose }) => {
onClick={() => handleLoad(workflow)}
>
<div className="workflow-item-main">
- <div className="workflow-item-name">{workflow.name}</div>
+ <div className="workflow-item-name">
+ <span>{workflow.name}</span>
+ <Pill kind={workflow.is_active ? 'green' : 'gray'}>
+ {workflow.is_active ? 'active' : 'paused'}
+ </Pill>
+ </div>
{workflow.description && (
<div className="workflow-item-desc">{workflow.description}</div>
)}
diff --git a/frontend/src/components/workflow/nodes/DatabaseNode.jsx b/frontend/src/components/workflow/nodes/DatabaseNode.jsx
index ae412cf0..8595d667 100644
--- a/frontend/src/components/workflow/nodes/DatabaseNode.jsx
+++ b/frontend/src/components/workflow/nodes/DatabaseNode.jsx
@@ -2,12 +2,14 @@ import React, { memo } from 'react';
import { Handle, Position } from '@xyflow/react';
import { Database, HardDrive } from 'lucide-react';
+// Engine brand colors stay literal (brand palette); fallback is the
+// redesign's categorical database amber.
const dbTypeColors = {
mysql: '#00758f',
postgresql: '#336791',
mongodb: '#4db33d',
redis: '#dc382d',
- default: '#f59e0b'
+ default: '#f5b945'
};
const dbTypeLabels = {
diff --git a/frontend/src/components/workflow/nodes/DomainNode.jsx b/frontend/src/components/workflow/nodes/DomainNode.jsx
index 068590e0..44cf0556 100644
--- a/frontend/src/components/workflow/nodes/DomainNode.jsx
+++ b/frontend/src/components/workflow/nodes/DomainNode.jsx
@@ -2,10 +2,11 @@ import React, { memo } from 'react';
import { Handle, Position } from '@xyflow/react';
import { Globe, Shield, ShieldCheck, ShieldX, Radio } from 'lucide-react';
+// Semantic SSL tints (redesign palette literals — inline style props).
const sslStatusConfig = {
- valid: { icon: ShieldCheck, color: '#10b981', label: 'SSL Valid' },
- expired: { icon: ShieldX, color: '#ef4444', label: 'SSL Expired' },
- none: { icon: Shield, color: '#6b7280', label: 'No SSL' }
+ valid: { icon: ShieldCheck, color: '#3ddc97', label: 'SSL Valid' },
+ expired: { icon: ShieldX, color: '#fb6f6f', label: 'SSL Expired' },
+ none: { icon: Shield, color: '#646b7a', label: 'No SSL' }
};
const DomainNode = ({ data, selected }) => {
diff --git a/frontend/src/components/workflow/nodes/ServiceNode.jsx b/frontend/src/components/workflow/nodes/ServiceNode.jsx
index f9966708..9471d885 100644
--- a/frontend/src/components/workflow/nodes/ServiceNode.jsx
+++ b/frontend/src/components/workflow/nodes/ServiceNode.jsx
@@ -2,12 +2,14 @@ import React, { memo } from 'react';
import { Handle, Position } from '@xyflow/react';
import { Box, Zap, MemoryStick, MessageSquare, Layers } from 'lucide-react';
+// Service brand colors stay literal (brand palette); queue/default use the
+// redesign's violet/accent.
const serviceTypeConfig = {
redis: { icon: Zap, color: '#dc382d', label: 'Redis' },
memcached: { icon: MemoryStick, color: '#00a65a', label: 'Memcached' },
rabbitmq: { icon: MessageSquare, color: '#ff6600', label: 'RabbitMQ' },
- queue: { icon: Layers, color: '#8b5cf6', label: 'Queue' },
- default: { icon: Box, color: '#6366f1', label: 'Service' }
+ queue: { icon: Layers, color: '#b07bf5', label: 'Queue' },
+ default: { icon: Box, color: '#6d7cff', label: 'Service' }
};
const ServiceNode = ({ data, selected }) => {
diff --git a/frontend/src/components/workflow/panels/DatabaseConfigPanel.jsx b/frontend/src/components/workflow/panels/DatabaseConfigPanel.jsx
index e174dc69..9b3d7380 100644
--- a/frontend/src/components/workflow/panels/DatabaseConfigPanel.jsx
+++ b/frontend/src/components/workflow/panels/DatabaseConfigPanel.jsx
@@ -5,6 +5,7 @@ import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { Select, SelectTrigger, SelectContent, SelectItem, SelectValue } from '@/components/ui/select';
+// Engine brand colors stay literal; fallback is the redesign's database amber.
const dbTypeConfig = {
mysql: { color: '#00758f', defaultPort: 3306 },
postgresql: { color: '#336791', defaultPort: 5432 },
@@ -15,7 +16,7 @@ const dbTypeConfig = {
const DatabaseConfigPanel = ({ node, onChange, onClose }) => {
const data = node?.data || {};
const dbType = data.type || 'mysql';
- const headerColor = dbTypeConfig[dbType]?.color || '#f59e0b';
+ const headerColor = dbTypeConfig[dbType]?.color || '#f5b945';
const handleChange = (field, value) => {
const updates = { ...data, [field]: value };
diff --git a/frontend/src/components/workflow/panels/DomainConfigPanel.jsx b/frontend/src/components/workflow/panels/DomainConfigPanel.jsx
index 499d02c2..afd95e63 100644
--- a/frontend/src/components/workflow/panels/DomainConfigPanel.jsx
+++ b/frontend/src/components/workflow/panels/DomainConfigPanel.jsx
@@ -24,7 +24,7 @@ const DomainConfigPanel = ({ node, onChange, onClose }) => {
isOpen={!!node}
title="Domain"
icon={Globe}
- headerColor="#10b981"
+ headerColor="#3ddc97"
onClose={onClose}
>
<div className="form-group">
diff --git a/frontend/src/components/workflow/panels/NotificationConfigPanel.jsx b/frontend/src/components/workflow/panels/NotificationConfigPanel.jsx
index 59f52989..a4cb930a 100644
--- a/frontend/src/components/workflow/panels/NotificationConfigPanel.jsx
+++ b/frontend/src/components/workflow/panels/NotificationConfigPanel.jsx
@@ -23,7 +23,7 @@ const NotificationConfigPanel = ({ node, onChange, onClose, onDelete }) => {
<ConfigPanel
title="Notification"
icon={<Bell size={16} />}
- color="#818cf8"
+ color="#b07bf5"
onClose={onClose}
footer={onDelete && (
<Button variant="destructive" size="sm" className="btn-delete-node" onClick={onDelete}>
diff --git a/frontend/src/components/workflow/panels/ScriptConfigPanel.jsx b/frontend/src/components/workflow/panels/ScriptConfigPanel.jsx
index e50a50fd..6aa881c8 100644
--- a/frontend/src/components/workflow/panels/ScriptConfigPanel.jsx
+++ b/frontend/src/components/workflow/panels/ScriptConfigPanel.jsx
@@ -21,7 +21,7 @@ const ScriptConfigPanel = ({ node, onChange, onClose, onDelete }) => {
<ConfigPanel
title="Script"
icon={<Terminal size={16} />}
- color="#71717a"
+ color="#646b7a"
onClose={onClose}
footer={onDelete && (
<Button variant="destructive" size="sm" className="btn-delete-node" onClick={onDelete}>
diff --git a/frontend/src/components/workflow/panels/ServiceConfigPanel.jsx b/frontend/src/components/workflow/panels/ServiceConfigPanel.jsx
index 893b7cf0..11185923 100644
--- a/frontend/src/components/workflow/panels/ServiceConfigPanel.jsx
+++ b/frontend/src/components/workflow/panels/ServiceConfigPanel.jsx
@@ -6,17 +6,19 @@ import { Label } from '@/components/ui/label';
import { Textarea } from '@/components/ui/textarea';
import { Select, SelectTrigger, SelectContent, SelectItem, SelectValue } from '@/components/ui/select';
+// Service brand colors stay literal; queue/fallback use the redesign's
+// violet/accent.
const serviceTypeConfig = {
redis: { color: '#dc382d', defaultPort: 6379 },
memcached: { color: '#00a65a', defaultPort: 11211 },
rabbitmq: { color: '#ff6600', defaultPort: 5672 },
- queue: { color: '#8b5cf6', defaultPort: 5555 }
+ queue: { color: '#b07bf5', defaultPort: 5555 }
};
const ServiceConfigPanel = ({ node, onChange, onClose }) => {
const data = node?.data || {};
const serviceType = data.serviceType || 'redis';
- const headerColor = serviceTypeConfig[serviceType]?.color || '#6366f1';
+ const headerColor = serviceTypeConfig[serviceType]?.color || '#6d7cff';
const handleChange = (field, value) => {
const updates = { ...data, [field]: value };
diff --git a/frontend/src/components/workflow/panels/TriggerConfigPanel.jsx b/frontend/src/components/workflow/panels/TriggerConfigPanel.jsx
index e211cf30..a4080e9d 100644
--- a/frontend/src/components/workflow/panels/TriggerConfigPanel.jsx
+++ b/frontend/src/components/workflow/panels/TriggerConfigPanel.jsx
@@ -60,7 +60,7 @@ const TriggerConfigPanel = ({ node, onChange, onClose, onDelete }) => {
<ConfigPanel
title="Trigger"
icon={<Play size={16} />}
- color="#3b82f6"
+ color="#49c7f0"
onClose={onClose}
footer={onDelete && (
<Button variant="destructive" size="sm" className="btn-delete-node" onClick={onDelete}>
diff --git a/frontend/src/pages/WorkflowBuilder.jsx b/frontend/src/pages/WorkflowBuilder.jsx
index 13bb34ef..1cbd6fff 100644
--- a/frontend/src/pages/WorkflowBuilder.jsx
+++ b/frontend/src/pages/WorkflowBuilder.jsx
@@ -36,6 +36,8 @@ import { isValidConnection as checkValidConnection, getConnectionError, getConne
import ConnectionEdge from '../components/workflow/ConnectionEdge';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
+import { Switch } from '@/components/ui/switch';
+import { Pill } from '../components/ds';
const initialNodes = [];
const initialEdges = [];
@@ -51,14 +53,17 @@ const nodeTypes = {
logic_if: LogicIfNode
};
+// Categorical node palette (minimap tints). Literal hex by design: these feed
+// ReactFlow inline color props, where var() does not resolve — values are
+// aligned to the redesign palette (docker brand blue kept).
const nodeColorMap = {
dockerApp: '#2496ed',
- database: '#f59e0b',
- domain: '#10b981',
- service: '#6366f1',
- trigger: '#3b82f6',
- script: '#6b7280',
- notification: '#8b5cf6',
+ database: '#f5b945',
+ domain: '#3ddc97',
+ service: '#6d7cff',
+ trigger: '#49c7f0',
+ script: '#646b7a',
+ notification: '#b07bf5',
logic_if: '#f97316'
};
@@ -69,76 +74,89 @@ const edgeTypes = {
let nodeId = 0;
const getId = () => `node_${nodeId++}`;
+// Compact relative timestamp for the header meta (backend stores naive UTC,
+// so clamp negatives to "just now" rather than showing future times).
+const timeAgo = (dateStr) => {
+ if (!dateStr) return null;
+ const diff = Date.now() - new Date(dateStr).getTime();
+ if (Number.isNaN(diff)) return null;
+ const mins = Math.floor(diff / 60000);
+ if (mins < 1) return 'just now';
+ if (mins < 60) return `${mins}m ago`;
+ const hours = Math.floor(mins / 60);
+ if (hours < 24) return `${hours}h ago`;
+ return `${Math.floor(hours / 24)}d ago`;
+};
+
const NodePalette = ({ onAddNode }) => {
return (
- <div className="workflow-palette">
- <div className="palette-section">
- <div className="palette-header">Triggers</div>
- <button
- className="palette-item palette-item-trigger"
- onClick={() => onAddNode('trigger', { label: 'Manual Trigger', triggerType: 'manual', isActive: true })}
- >
- <Play size={16} />
- <span>Manual</span>
- </button>
- <button
- className="palette-item palette-item-trigger"
- onClick={() => onAddNode('trigger', { label: 'Scheduled Task', triggerType: 'cron', isActive: true, triggerConfig: { cron: '0 * * * *' } })}
- >
- <Activity size={16} />
- <span>Schedule (Cron)</span>
- </button>
- <button
- className="palette-item palette-item-trigger"
- onClick={() => onAddNode('trigger', { label: 'Webhook Trigger', triggerType: 'webhook', isActive: true, triggerConfig: {} })}
- >
- <Globe size={16} />
- <span>Webhook</span>
- </button>
- <button
- className="palette-item palette-item-trigger"
- onClick={() => onAddNode('trigger', { label: 'Event Listener', triggerType: 'event', isActive: true, triggerConfig: { eventType: 'health_check_failed' } })}
- >
- <Eye size={16} />
- <span>System Event</span>
- </button>
- </div>
-
- <div className="palette-section">
- <div className="palette-header">Actions</div>
- <button
- className="palette-item palette-item-script"
- onClick={() => onAddNode('script', { label: 'Run Script', language: 'bash', content: '' })}
- >
- <Terminal size={16} />
- <span>Run Script</span>
- </button>
- <button
- className="palette-item palette-item-notification"
- onClick={() => onAddNode('notification', { label: 'Send Notification', channel: 'system', message: '' })}
- >
- <Bell size={16} />
- <span>Notification</span>
- </button>
- </div>
-
- <div className="palette-section">
- <div className="palette-header">Flow Control</div>
- <button
- className="palette-item palette-item-logic"
- onClick={() => onAddNode('logic_if', { label: 'If/Else', condition: '' })}
- >
- <Layout size={16} />
- <span>Condition (If/Else)</span>
- </button>
- </div>
+ <aside className="wf-rail">
+ <div className="wf-rail__grp">Triggers</div>
+ <button
+ type="button"
+ className="wf-rail__node"
+ onClick={() => onAddNode('trigger', { label: 'Manual Trigger', triggerType: 'manual', isActive: true })}
+ >
+ <span className="wf-rail__pi wf-rail__pi--trigger"><Play size={13} /></span>
+ <span>Manual</span>
+ </button>
+ <button
+ type="button"
+ className="wf-rail__node"
+ onClick={() => onAddNode('trigger', { label: 'Scheduled Task', triggerType: 'cron', isActive: true, triggerConfig: { cron: '0 * * * *' } })}
+ >
+ <span className="wf-rail__pi wf-rail__pi--trigger"><Activity size={13} /></span>
+ <span>Schedule (Cron)</span>
+ </button>
+ <button
+ type="button"
+ className="wf-rail__node"
+ onClick={() => onAddNode('trigger', { label: 'Webhook Trigger', triggerType: 'webhook', isActive: true, triggerConfig: {} })}
+ >
+ <span className="wf-rail__pi wf-rail__pi--trigger"><Globe size={13} /></span>
+ <span>Webhook</span>
+ </button>
+ <button
+ type="button"
+ className="wf-rail__node"
+ onClick={() => onAddNode('trigger', { label: 'Event Listener', triggerType: 'event', isActive: true, triggerConfig: { eventType: 'health_check_failed' } })}
+ >
+ <span className="wf-rail__pi wf-rail__pi--trigger"><Eye size={13} /></span>
+ <span>System Event</span>
+ </button>
+
+ <div className="wf-rail__grp">Actions</div>
+ <button
+ type="button"
+ className="wf-rail__node"
+ onClick={() => onAddNode('script', { label: 'Run Script', language: 'bash', content: '' })}
+ >
+ <span className="wf-rail__pi wf-rail__pi--action"><Terminal size={13} /></span>
+ <span>Run Script</span>
+ </button>
+ <button
+ type="button"
+ className="wf-rail__node"
+ onClick={() => onAddNode('notification', { label: 'Send Notification', channel: 'system', message: '' })}
+ >
+ <span className="wf-rail__pi wf-rail__pi--action"><Bell size={13} /></span>
+ <span>Notification</span>
+ </button>
+
+ <div className="wf-rail__grp">Flow Control</div>
+ <button
+ type="button"
+ className="wf-rail__node"
+ onClick={() => onAddNode('logic_if', { label: 'If/Else', condition: '' })}
+ >
+ <span className="wf-rail__pi wf-rail__pi--logic"><Layout size={13} /></span>
+ <span>Condition (If/Else)</span>
+ </button>
- <div className="palette-section palette-section-info">
- <div className="palette-hint">
- Add a trigger, connect actions, then save and execute. Press Delete to remove selected nodes.
- </div>
+ <div className="wf-rail__hint">
+ Add a trigger, connect actions, then save and execute. Press Delete to remove selected nodes.
</div>
- </div>
+ </aside>
);
};
@@ -158,6 +176,7 @@ const WorkflowCanvas = () => {
const [isLoading, setIsLoading] = useState(false);
const [showLoadModal, setShowLoadModal] = useState(false);
const [saveMessage, setSaveMessage] = useState(null);
+ const [isTogglingActive, setIsTogglingActive] = useState(false);
// Server data state
const [templates, setTemplates] = useState([]);
@@ -710,6 +729,43 @@ const WorkflowCanvas = () => {
}
}, [currentWorkflow]);
+ // Toggle the workflow-level active/paused flag (persisted by the backend:
+ // Workflow.is_active gates scheduled/webhook/event trigger runs).
+ const toggleWorkflowActive = useCallback(async () => {
+ if (!currentWorkflow || isTogglingActive) return;
+
+ const next = !currentWorkflow.is_active;
+ setIsTogglingActive(true);
+
+ try {
+ const response = await api.updateWorkflow(currentWorkflow.id, { is_active: next });
+ setCurrentWorkflow(response.workflow || { ...currentWorkflow, is_active: next });
+ setSaveMessage(next ? 'Workflow activated' : 'Workflow paused');
+ } catch (error) {
+ console.error('Failed to toggle workflow active state:', error);
+ setSaveMessage('Failed to update workflow');
+ } finally {
+ setIsTogglingActive(false);
+ setTimeout(() => setSaveMessage(null), 3000);
+ }
+ }, [currentWorkflow, isTogglingActive]);
+
+ // Mono meta line under the workflow name (real payload fields only).
+ const headMeta = useMemo(() => {
+ const parts = [];
+ if (currentWorkflow) parts.push(currentWorkflow.trigger_type || 'manual');
+ parts.push(`${nodes.length} nodes`);
+ parts.push(`${edges.length} edges`);
+ if (currentWorkflow) {
+ const ran = timeAgo(currentWorkflow.last_run_at);
+ parts.push(ran ? `last run ${ran}` : 'never run');
+ if (currentWorkflow.last_status) parts.push(currentWorkflow.last_status);
+ } else {
+ parts.push('unsaved view');
+ }
+ return parts.join(' · ');
+ }, [currentWorkflow, nodes.length, edges.length]);
+
const onConnect = useCallback(
(params) => {
if (checkValidConnection(params, nodes)) {
@@ -768,7 +824,7 @@ const WorkflowCanvas = () => {
}, [screenToFlowPosition, setNodes]);
const getNodeColor = useCallback((node) => {
- return nodeColorMap[node.type] || '#6366f1';
+ return nodeColorMap[node.type] || '#6d7cff';
}, []);
const handleNodeClick = useCallback((event, node) => {
@@ -863,20 +919,35 @@ const WorkflowCanvas = () => {
return (
<div className="workflow-canvas" ref={reactFlowWrapper}>
- <div className="workflow-toolbar">
- <div className="toolbar-left">
- <Input
- type="text"
- className="workflow-name-input"
- value={workflowName}
- onChange={(e) => setWorkflowName(e.target.value)}
- placeholder="View name..."
- />
+ <div className="wf-head">
+ <div className="wf-head__main">
+ <div className="wf-head__titlerow">
+ <Input
+ type="text"
+ className="workflow-name-input"
+ value={workflowName}
+ onChange={(e) => setWorkflowName(e.target.value)}
+ placeholder="View name..."
+ />
+ {currentWorkflow && (
+ <Pill kind={currentWorkflow.is_active ? 'green' : 'gray'}>
+ {currentWorkflow.is_active ? 'active' : 'paused'}
+ </Pill>
+ )}
+ </div>
+ <div className="wf-head__meta">{headMeta}</div>
+ </div>
+ <div className="wf-head__actions">
{currentWorkflow && (
- <span className="workflow-id-badge">Saved View</span>
+ <label className="wf-active-toggle" title="Enable automated trigger runs for this workflow">
+ <span>Active</span>
+ <Switch
+ checked={!!currentWorkflow.is_active}
+ onCheckedChange={toggleWorkflowActive}
+ disabled={isTogglingActive}
+ />
+ </label>
)}
- </div>
- <div className="toolbar-right">
<Button
variant="ghost"
size="sm"
@@ -884,7 +955,7 @@ const WorkflowCanvas = () => {
onClick={newWorkflow}
title="New workflow"
>
- <Plus size={16} />
+ <Plus size={15} />
<span>New</span>
</Button>
<Button
@@ -894,7 +965,7 @@ const WorkflowCanvas = () => {
onClick={() => setShowLoadModal(true)}
title="Load saved workflow"
>
- <FolderOpen size={16} />
+ <FolderOpen size={15} />
<span>Load</span>
</Button>
<div className="toolbar-divider" />
@@ -906,7 +977,7 @@ const WorkflowCanvas = () => {
disabled={isExecuting || !currentWorkflow}
title="Execute workflow"
>
- <Play size={16} />
+ <Play size={15} />
<span>{isExecuting ? 'Running...' : 'Execute'}</span>
</Button>
<Button
@@ -917,7 +988,7 @@ const WorkflowCanvas = () => {
disabled={!currentWorkflow}
title="Execution history"
>
- <Activity size={16} />
+ <Activity size={15} />
<span>History</span>
</Button>
<div className="toolbar-divider" />
@@ -928,7 +999,7 @@ const WorkflowCanvas = () => {
disabled={isSaving}
title="Save workflow"
>
- <Save size={16} />
+ <Save size={15} />
<span>{isSaving ? 'Saving...' : 'Save'}</span>
</Button>
</div>
@@ -936,56 +1007,54 @@ const WorkflowCanvas = () => {
<div className="toolbar-message">{saveMessage}</div>
)}
</div>
- <NodePalette onAddNode={addNode} />
- {connectionError && (
- <div className="connection-error-toast">
- {connectionError}
+ <div className="wf-body">
+ <NodePalette onAddNode={addNode} />
+ <div className="wf-stage">
+ {connectionError && (
+ <div className="connection-error-toast">
+ {connectionError}
+ </div>
+ )}
+ <ReactFlow
+ nodes={nodes}
+ edges={edges}
+ nodeTypes={memoizedNodeTypes}
+ edgeTypes={memoizedEdgeTypes}
+ onNodesChange={onNodesChange}
+ onEdgesChange={onEdgesChange}
+ onConnect={onConnect}
+ onConnectStart={onConnectStart}
+ onConnectEnd={onConnectEnd}
+ isValidConnection={isValidConnection}
+ onNodeClick={handleNodeClick}
+ onEdgeClick={handleEdgeClick}
+ onPaneClick={handlePaneClick}
+ fitView
+ panOnScroll
+ selectionOnDrag
+ panOnDrag={[1, 2]}
+ selectNodesOnDrag={false}
+ defaultEdgeOptions={{
+ type: 'connection',
+ animated: true
+ }}
+ >
+ <Background
+ variant="dots"
+ gap={22}
+ size={1}
+ color="var(--border)"
+ />
+ <Controls
+ showZoom={true}
+ showFitView={true}
+ showInteractive={false}
+ />
+ <MiniMap nodeColor={getNodeColor} />
+ </ReactFlow>
+ {renderConfigPanel()}
</div>
- )}
- <ReactFlow
- nodes={nodes}
- edges={edges}
- nodeTypes={memoizedNodeTypes}
- edgeTypes={memoizedEdgeTypes}
- onNodesChange={onNodesChange}
- onEdgesChange={onEdgesChange}
- onConnect={onConnect}
- onConnectStart={onConnectStart}
- onConnectEnd={onConnectEnd}
- isValidConnection={isValidConnection}
- onNodeClick={handleNodeClick}
- onEdgeClick={handleEdgeClick}
- onPaneClick={handlePaneClick}
- fitView
- panOnScroll
- selectionOnDrag
- panOnDrag={[1, 2]}
- selectNodesOnDrag={false}
- defaultEdgeOptions={{
- type: 'connection',
- animated: true
- }}
- >
- <Background
- variant="dots"
- gap={20}
- size={1}
- color="#333"
- />
- <Controls
- showZoom={true}
- showFitView={true}
- showInteractive={false}
- />
- <MiniMap
- nodeColor={getNodeColor}
- maskColor="rgba(0, 0, 0, 0.8)"
- style={{
- backgroundColor: '#1a1a1e'
- }}
- />
- </ReactFlow>
- {renderConfigPanel()}
+ </div>
{showLoadModal && (
<WorkflowListModal
onLoad={loadWorkflow}
diff --git a/frontend/src/styles/pages/_workflow.scss b/frontend/src/styles/pages/_workflow.scss
index 4ec38aea..c110bb33 100644
--- a/frontend/src/styles/pages/_workflow.scss
+++ b/frontend/src/styles/pages/_workflow.scss
@@ -1,5 +1,8 @@
// ============================================
-// WORKFLOW BUILDER PAGE STYLES
+// WORKFLOW BUILDER — redesign "infra console" look (demo wf-head / wf-rail):
+// flush header bar + left node-palette rail + ReactFlow canvas, joined by
+// 1px borders instead of floating cards. ReactFlow geometry (node paddings,
+// min-widths, handle sizes/offsets) is intentionally unchanged.
// ============================================
.workflow-page {
@@ -17,33 +20,19 @@
border: none;
}
}
-
- .page-header {
- flex-shrink: 0;
- margin-bottom: $space-4;
-
- h1 {
- margin: 0 0 $space-1;
- font-size: $font-size-xl;
- font-weight: $font-weight-semibold;
- }
-
- .page-subtitle {
- margin: 0;
- color: $text-secondary;
- font-size: $font-size-sm;
- }
- }
}
// ============================================
-// CANVAS CONTAINER
+// CANVAS CONTAINER (page shell: head + body)
// ============================================
.workflow-canvas {
flex: 1;
+ min-height: 0;
+ display: flex;
+ flex-direction: column;
background: $bg-body;
- border: 1px solid $border-subtle;
+ border: 1px solid var(--border-soft);
border-radius: $radius-lg;
overflow: hidden;
position: relative;
@@ -54,21 +43,22 @@
// React Flow Controls
.react-flow__controls {
- background: $bg-card;
- border: 1px solid $border-subtle;
+ background: var(--surface);
+ border: 1px solid var(--border);
border-radius: $radius-md;
- box-shadow: $shadow-lg;
+ box-shadow: var(--shadow-md);
+ overflow: hidden;
button {
- background: $bg-card;
+ background: var(--surface);
border: none;
- border-bottom: 1px solid $border-subtle;
+ border-bottom: 1px solid var(--border-soft);
color: $text-secondary;
width: 28px;
height: 28px;
&:hover {
- background: $bg-hover;
+ background: var(--surface-hover);
color: $text-primary;
}
@@ -84,38 +74,354 @@
// React Flow MiniMap
.react-flow__minimap {
- background: $bg-card;
- border: 1px solid $border-subtle;
+ background: var(--surface);
+ border: 1px solid var(--border);
border-radius: $radius-md;
- box-shadow: $shadow-lg;
+ box-shadow: var(--shadow-md);
+ overflow: hidden;
+ }
+
+ .react-flow__minimap-mask {
+ fill: var(--bg-body);
+ fill-opacity: 0.85;
+ }
+
+ .react-flow__minimap-node {
+ stroke: none;
}
// React Flow Background
.react-flow__background {
background: $bg-body;
}
+
+ // In-progress connection line
+ .react-flow__connection-path {
+ stroke: var(--accent);
+ stroke-width: 2;
+ }
+
+ // Drag-selection rectangle
+ .react-flow__selection {
+ background: var(--accent-bg-soft);
+ border: 1px dashed var(--accent-dim);
+ }
+
+ .react-flow__attribution {
+ background: transparent;
+
+ a {
+ color: var(--text-ghost);
+ }
+ }
}
// ============================================
-// NODE STYLES
+// HEAD BAR (demo wf-head: title + mono meta + actions)
// ============================================
-.workflow-node {
- min-width: 180px;
- background: $bg-card;
- border: 1px solid $border-subtle;
+.wf-head {
+ position: relative;
+ z-index: 25;
+ display: flex;
+ align-items: center;
+ gap: 14px;
+ flex-wrap: wrap;
+ flex-shrink: 0;
+ padding: 9px 16px 9px 10px;
+ border-bottom: 1px solid var(--border-soft);
+}
+
+.wf-head__main {
+ flex: 1;
+ min-width: 200px;
+}
+
+.wf-head__titlerow {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+}
+
+.wf-head__meta {
+ font-family: var(--mono);
+ font-size: 11px;
+ color: var(--text-faint);
+ margin-top: 1px;
+ padding-left: 11px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.wf-head__actions {
+ display: flex;
+ align-items: center;
+ gap: $space-2;
+ flex-wrap: wrap;
+}
+
+// Workflow name renders as the page title (ghost input).
+.workflow-name-input {
+ width: 220px;
+ height: auto;
+ padding: 5px 10px;
+ background: transparent;
+ border: 1px solid transparent;
+ border-radius: $radius-lg;
+ color: $text-primary;
+ font-size: 15px;
+ font-weight: $font-weight-semibold;
+ letter-spacing: -0.01em;
+ transition: border-color $transition-fast, background $transition-fast;
+
+ &:hover {
+ border-color: var(--border);
+ }
+
+ &:focus,
+ &:focus-visible {
+ outline: none;
+ border-color: var(--accent);
+ background: var(--surface-2);
+ box-shadow: none;
+ }
+
+ &::placeholder {
+ color: var(--text-ghost);
+ }
+}
+
+// Active/paused switch (persists Workflow.is_active)
+.wf-active-toggle {
+ display: inline-flex;
+ align-items: center;
+ gap: $space-2;
+ margin-right: $space-1;
+ cursor: pointer;
+
+ span {
+ font-size: 12px;
+ color: var(--text-faint);
+ }
+}
+
+.toolbar-btn {
+ display: inline-flex;
+ align-items: center;
+ gap: 7px;
+ height: 30px;
+ padding: 0 11px;
+ background: transparent;
+ border: 1px solid var(--border);
border-radius: $radius-lg;
- box-shadow: $shadow-md;
+ color: $text-secondary;
+ font-size: 12.5px;
+ font-weight: $font-weight-medium;
+ cursor: pointer;
transition: all $transition-fast;
+ white-space: nowrap;
+
+ svg {
+ flex-shrink: 0;
+ }
&:hover {
- border-color: $border-active;
- box-shadow: $shadow-lg;
+ background: var(--surface-2);
+ border-color: var(--border-strong);
+ color: $text-primary;
+ }
+
+ &:disabled {
+ opacity: 0.5;
+ cursor: not-allowed;
+ }
+}
+
+.toolbar-btn-execute {
+ color: var(--green);
+
+ &:hover:not(:disabled) {
+ background: var(--green-bg);
+ border-color: rgba($success, 0.35);
+ color: var(--green);
+ }
+}
+
+.toolbar-btn-primary {
+ background: linear-gradient(180deg, var(--accent), var(--accent-dim));
+ border-color: var(--accent-dim);
+ color: #fff;
+
+ &:hover:not(:disabled) {
+ background: linear-gradient(180deg, var(--accent-bright), var(--accent));
+ border-color: var(--accent-dim);
+ color: #fff;
+ }
+}
+
+.toolbar-divider {
+ width: 1px;
+ height: 22px;
+ background: var(--border);
+ margin: 0 $space-1;
+}
+
+.toolbar-message {
+ position: absolute;
+ top: 100%;
+ right: $space-4;
+ margin-top: 6px;
+ padding: 5px 10px;
+ background: $success-bg;
+ border: 1px solid $success-border;
+ border-radius: $radius-md;
+ color: var(--green);
+ font-family: var(--mono);
+ font-size: 11px;
+ white-space: nowrap;
+ z-index: 30;
+ animation: slideDown 0.2s ease-out;
+}
+
+// ============================================
+// BODY (rail + stage)
+// ============================================
+
+.wf-body {
+ flex: 1;
+ display: flex;
+ min-height: 0;
+ position: relative;
+}
+
+// Node palette rail (demo wf-rail / pal-node)
+.wf-rail {
+ width: 212px;
+ flex-shrink: 0;
+ display: flex;
+ flex-direction: column;
+ padding: 6px 10px 14px;
+ border-right: 1px solid var(--border-soft);
+ background: $bg-sidebar;
+ overflow-y: auto;
+ scrollbar-width: thin;
+
+ &::-webkit-scrollbar {
+ width: 4px;
+ }
+
+ &::-webkit-scrollbar-thumb {
+ background: $border-default;
+ border-radius: $radius-sm;
+ }
+
+ @media (max-width: $breakpoint-md) {
+ width: 160px;
+ padding: 4px 7px 10px;
+ }
+}
+
+.wf-rail__grp {
+ font-family: var(--mono);
+ font-size: 10px;
+ font-weight: $font-weight-semibold;
+ letter-spacing: 0.12em;
+ text-transform: uppercase;
+ color: var(--text-ghost);
+ padding: 11px 8px 6px;
+}
+
+.wf-rail__node {
+ display: flex;
+ align-items: center;
+ gap: 9px;
+ width: 100%;
+ padding: 7px 9px;
+ margin-bottom: 6px;
+ background: var(--surface-2);
+ border: 1px solid var(--border);
+ border-radius: $radius-lg;
+ color: $text-secondary;
+ font-size: 12.5px;
+ font-weight: $font-weight-medium;
+ text-align: left;
+ cursor: pointer;
+ transition: all $transition-fast;
+
+ span:last-child {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+
+ &:hover {
+ background: var(--surface-3);
+ border-color: rgba($accent-primary-raw, 0.45);
+ color: $text-primary;
+ }
+}
+
+.wf-rail__pi {
+ width: 24px;
+ height: 24px;
+ border-radius: 6px;
+ display: grid;
+ place-items: center;
+ flex-shrink: 0;
+ background: var(--surface-3);
+ color: $text-secondary;
+
+ &--trigger {
+ color: var(--green);
+ }
+
+ &--action {
+ color: var(--accent-bright);
+ }
+
+ &--logic {
+ color: var(--amber);
+ }
+}
+
+.wf-rail__hint {
+ margin-top: auto;
+ padding: $space-3 $space-2 0;
+ border-top: 1px solid var(--border-soft);
+ font-size: 11px;
+ line-height: 1.5;
+ color: var(--text-faint);
+}
+
+// Canvas stage (hosts ReactFlow + config panel + error toast)
+.wf-stage {
+ flex: 1;
+ min-width: 0;
+ position: relative;
+ overflow: hidden;
+}
+
+// ============================================
+// NODE STYLES (geometry unchanged: min-width/padding/handles)
+// ============================================
+
+.workflow-node {
+ min-width: 180px;
+ background: var(--surface);
+ border: 1px solid var(--border);
+ border-radius: 12px;
+ box-shadow: var(--shadow-md);
+ transition: border-color $transition-fast, box-shadow $transition-fast;
+
+ &:hover {
+ border-color: var(--border-strong);
+ box-shadow: var(--shadow-lg);
}
&.selected {
- border-color: $accent-primary;
- box-shadow: 0 0 0 2px $accent-glow;
+ border-color: var(--accent);
+ box-shadow: 0 0 0 2px $accent-glow, var(--shadow-lg);
}
}
@@ -124,9 +430,9 @@
align-items: center;
gap: $space-2;
padding: $space-2 $space-3;
- border-bottom: 2px solid $accent-primary;
- border-top-left-radius: $radius-lg;
- border-top-right-radius: $radius-lg;
+ border-bottom: 1px solid var(--border-soft);
+ border-top-left-radius: 12px;
+ border-top-right-radius: 12px;
}
.workflow-node-icon {
@@ -135,17 +441,19 @@
justify-content: center;
width: 28px;
height: 28px;
- background: $accent-primary;
- border-radius: $radius-md;
- color: white;
+ background: linear-gradient(140deg, var(--accent), var(--accent-dim));
+ border-radius: $radius-lg;
+ color: #fff;
+ flex-shrink: 0;
}
.workflow-node-type {
- font-size: $font-size-xs;
+ font-family: var(--mono);
+ font-size: 10px;
font-weight: $font-weight-semibold;
text-transform: uppercase;
- letter-spacing: 0.5px;
- color: $text-tertiary;
+ letter-spacing: 0.08em;
+ color: var(--text-faint);
}
.workflow-node-body {
@@ -153,8 +461,8 @@
}
.workflow-node-label {
- font-size: $font-size-sm;
- font-weight: $font-weight-medium;
+ font-size: 13px;
+ font-weight: $font-weight-semibold;
color: $text-primary;
margin-bottom: $space-1;
}
@@ -164,23 +472,24 @@
align-items: center;
gap: $space-1;
padding: $space-1 $space-2;
- border-radius: $radius-full;
+ border-radius: $radius-md;
+ font-family: var(--mono);
font-size: $font-size-xs;
font-weight: $font-weight-medium;
&.status-running {
background: $success-bg;
- color: $success;
+ color: var(--green);
}
&.status-stopped {
- background: fade($text-tertiary-raw, 10%);
- color: $text-tertiary;
+ background: var(--surface-3);
+ color: var(--text-faint);
}
&.status-error {
background: $danger-bg;
- color: $danger;
+ color: var(--red);
}
}
@@ -201,8 +510,8 @@
position: relative;
&.node-selected {
- border-color: $accent-primary;
- box-shadow: 0 0 0 2px $accent-glow;
+ border-color: var(--accent);
+ box-shadow: 0 0 0 2px $accent-glow, var(--shadow-lg);
}
}
@@ -213,8 +522,8 @@
width: 32px;
height: 32px;
min-width: 32px;
- background: $bg-elevated;
- border-radius: $radius-md;
+ background: var(--surface-2);
+ border-radius: $radius-lg;
color: $text-secondary;
}
@@ -224,8 +533,8 @@
}
.node-label {
- font-size: $font-size-sm;
- font-weight: $font-weight-medium;
+ font-size: 13px;
+ font-weight: $font-weight-semibold;
color: $text-primary;
white-space: nowrap;
overflow: hidden;
@@ -233,31 +542,33 @@
}
.node-sublabel {
- font-size: $font-size-xs;
- color: $text-tertiary;
+ font-family: var(--mono);
+ font-size: 10.5px;
+ color: var(--text-faint);
margin-top: 2px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
-// Node icon color variants
-.node-icon-manual { color: $info; }
-.node-icon-cron { color: #a855f7; }
-.node-icon-webhook { color: $success; }
-.node-icon-event { color: $warning; }
+// Node icon color variants (categorical tints; pink stays literal — it has
+// no semantic token, matching the file-type palette convention)
+.node-icon-manual { color: var(--cyan); }
+.node-icon-cron { color: var(--violet); }
+.node-icon-webhook { color: var(--green); }
+.node-icon-event { color: var(--amber); }
.node-icon-bash { color: $text-secondary; }
-.node-icon-python { color: #93c5fd; }
+.node-icon-python { color: var(--cyan); }
.node-icon-logic { color: #f97316; }
-.node-icon-discord { color: #818cf8; }
+.node-icon-discord { color: var(--violet); }
.node-icon-slack { color: #ec4899; }
-.node-icon-email { color: $info; }
+.node-icon-email { color: var(--cyan); }
// Node status glow variants
-.node-status-active { border-color: $info; box-shadow: 0 0 10px fade($info, 30%); }
-.node-status-success { border-color: $success; box-shadow: 0 0 10px fade($success, 30%); }
-.node-status-error { border-color: $danger; box-shadow: 0 0 10px fade($danger, 30%); }
-.node-status-inactive { border-color: $border-subtle; }
+.node-status-active { border-color: var(--cyan); box-shadow: 0 0 10px fade($info, 30%); }
+.node-status-success { border-color: var(--green); box-shadow: 0 0 10px fade($success, 30%); }
+.node-status-error { border-color: var(--red); box-shadow: 0 0 10px fade($danger, 30%); }
+.node-status-inactive { border-color: var(--border-soft); }
// Logic If/Else branching outputs
.node-outputs {
@@ -266,7 +577,7 @@
width: 100%;
margin-top: $space-2;
padding-top: $space-2;
- border-top: 1px solid $border-subtle;
+ border-top: 1px solid var(--border-soft);
}
.node-output-branch {
@@ -276,54 +587,56 @@
}
.node-branch-label {
+ font-family: var(--mono);
font-size: 10px;
font-weight: 700;
+ letter-spacing: 0.05em;
margin-bottom: $space-1;
- &.node-branch-true { color: $success; }
- &.node-branch-false { color: $danger; }
+ &.node-branch-true { color: var(--green); }
+ &.node-branch-false { color: var(--red); }
}
-// Compact handle styles
+// Compact handle styles (sizes unchanged)
.handle-input,
.handle-output {
width: 10px !important;
height: 10px !important;
- background: $bg-card !important;
- border: 2px solid $border-active !important;
+ background: var(--surface-3) !important;
+ border: 2px solid var(--border-strong) !important;
transition: all $transition-fast;
&:hover {
- background: $accent-primary !important;
- border-color: $accent-primary !important;
+ background: var(--accent) !important;
+ border-color: var(--accent) !important;
transform: scale(1.2);
}
}
.handle-true {
- border-color: $success !important;
- &:hover { background: $success !important; }
+ border-color: var(--green) !important;
+ &:hover { background: var(--green) !important; }
}
.handle-false {
- border-color: $danger !important;
- &:hover { background: $danger !important; }
+ border-color: var(--red) !important;
+ &:hover { background: var(--red) !important; }
}
// ============================================
-// HANDLE STYLES
+// HANDLE STYLES (sizes/offsets unchanged)
// ============================================
.workflow-handle {
width: 12px !important;
height: 12px !important;
- background: $bg-card !important;
- border: 2px solid $border-active !important;
+ background: var(--surface-3) !important;
+ border: 2px solid var(--border-strong) !important;
transition: all $transition-fast;
&:hover {
- background: $accent-primary !important;
- border-color: $accent-primary !important;
+ background: var(--accent) !important;
+ border-color: var(--accent) !important;
transform: scale(1.2);
}
}
@@ -341,177 +654,69 @@
// EDGE STYLES
// ============================================
-.react-flow__edge-path {
- stroke: $border-active;
- stroke-width: 2;
-}
-
-.react-flow__edge.selected .react-flow__edge-path {
- stroke: $accent-primary;
-}
-
-.react-flow__edge:hover .react-flow__edge-path {
- stroke: $accent-primary;
-}
-
-// Animated edges
-.react-flow__edge.animated path {
- stroke-dasharray: 5;
- animation: flowAnimation 0.5s linear infinite;
-}
-
-@keyframes flowAnimation {
- from {
- stroke-dashoffset: 10;
- }
- to {
- stroke-dashoffset: 0;
- }
-}
-
-// ============================================
-// NODE PALETTE STYLES
-// ============================================
-
-.workflow-palette {
- position: absolute;
- top: $space-4;
- left: $space-4;
- z-index: 10;
- display: flex;
- flex-direction: column;
- gap: $space-1;
- background: $bg-card;
- border: 1px solid $border-subtle;
- border-radius: $radius-lg;
- padding: $space-2;
- box-shadow: $shadow-lg;
- max-height: calc(100% - 120px);
- overflow-y: auto;
-}
-
-.palette-section {
- display: flex;
- flex-direction: column;
- gap: $space-1;
-
- &:not(:last-child) {
- padding-bottom: $space-2;
- border-bottom: 1px solid $border-subtle;
- margin-bottom: $space-1;
- }
-}
-
-.palette-header {
- font-size: $font-size-xs;
- font-weight: $font-weight-semibold;
- text-transform: uppercase;
- letter-spacing: 0.5px;
- color: $text-tertiary;
- padding: $space-1 $space-2;
-}
-
-.palette-item {
- display: flex;
- align-items: center;
- gap: $space-2;
- padding: $space-2 $space-3;
- background: transparent;
- border: 1px solid transparent;
- border-radius: $radius-md;
- color: $text-secondary;
- font-size: $font-size-sm;
- font-weight: $font-weight-medium;
- cursor: pointer;
- transition: all $transition-fast;
- white-space: nowrap;
- text-align: left;
-
- svg {
- flex-shrink: 0;
- }
-
- &:hover {
- background: $bg-hover;
- color: $text-primary;
- }
+.react-flow__edge-path {
+ stroke: $border-active;
+ stroke-width: 2;
+}
- &.palette-item-docker:hover {
- background: fade(#2496ed, 15%);
- color: #2496ed;
- border-color: fade(#2496ed, 30%);
- }
+.react-flow__edge.selected .react-flow__edge-path {
+ stroke: var(--accent-bright);
+}
- &.palette-item-database:hover {
- background: fade($warning, 15%);
- color: $warning;
- border-color: fade($warning, 30%);
- }
+.react-flow__edge:hover .react-flow__edge-path {
+ stroke: var(--accent);
+}
- &.palette-item-domain:hover {
- background: fade($success, 15%);
- color: $success;
- border-color: fade($success, 30%);
- }
+// Animated edges
+.react-flow__edge.animated path {
+ stroke-dasharray: 5;
+ animation: flowAnimation 0.5s linear infinite;
+}
- &.palette-item-service:hover {
- background: fade($accent-primary-raw, 15%);
- color: $accent-primary;
- border-color: fade($accent-primary-raw, 30%);
+@keyframes flowAnimation {
+ from {
+ stroke-dashoffset: 10;
+ }
+ to {
+ stroke-dashoffset: 0;
}
}
// ============================================
-// NODE TYPE-SPECIFIC STYLES
+// NODE TYPE-SPECIFIC STYLES (categorical gradients; docker brand kept)
// ============================================
// Docker App Node
.workflow-node-docker {
- .node-header-docker {
- border-color: #2496ed;
- }
-
.node-icon-docker {
- background: #2496ed;
+ background: linear-gradient(140deg, #2496ed, #1d77c4);
}
}
// Database Node
.workflow-node-database {
- .node-header-database {
- border-color: $warning;
- }
-
.node-icon-database {
- background: $warning;
+ background: linear-gradient(140deg, #f5b945, #cf9430);
}
}
// Domain Node
.workflow-node-domain {
- .node-header-domain {
- border-color: $success;
- }
-
.node-icon-domain {
- background: $success;
+ background: linear-gradient(140deg, #3ddc97, #2aa873);
}
.node-label-domain {
- font-size: $font-size-base;
- font-weight: $font-weight-semibold;
font-family: $font-mono;
+ font-size: 13.5px;
+ font-weight: $font-weight-semibold;
}
}
-// Service Node
+// Service Node (icon bg comes inline from the brand color; gradient fallback)
.workflow-node-service {
- .node-header-service {
- border-color: $accent-primary;
- }
-
.node-icon-service {
- background: $accent-primary;
+ background: linear-gradient(140deg, #6d7cff, #4a5cd0);
}
}
@@ -527,12 +732,17 @@
font-size: $font-size-xs;
.node-detail-label {
- color: $text-tertiary;
+ color: var(--text-ghost);
+ font-family: var(--mono);
+ font-size: 10px;
+ text-transform: uppercase;
+ letter-spacing: 0.06em;
}
.node-detail-value {
color: $text-secondary;
font-family: $font-mono;
+ font-size: 11px;
}
}
@@ -573,26 +783,28 @@
display: inline-flex;
align-items: center;
padding: 2px $space-2;
- background: fade($accent-primary-raw, 15%);
+ background: var(--accent-bg);
border: 1px solid fade($accent-primary-raw, 30%);
- border-radius: $radius-full;
+ border-radius: 5px;
font-size: $font-size-xs;
font-family: $font-mono;
- color: $accent-primary;
+ color: var(--accent-bright);
}
// ============================================
-// TYPE BADGES
+// TYPE BADGES (db engine chip — solid brand bg set inline)
// ============================================
.node-type-badge {
display: inline-flex;
align-items: center;
padding: 2px $space-2;
- border-radius: $radius-sm;
+ border-radius: 5px;
+ font-family: var(--mono);
font-size: $font-size-xs;
font-weight: $font-weight-semibold;
- color: white;
+ letter-spacing: 0.04em;
+ color: #fff;
margin-top: $space-1;
}
@@ -613,7 +825,9 @@
gap: $space-1;
padding: 2px $space-2;
border: 1px solid;
- border-radius: $radius-sm;
+ border-radius: 5px;
+ background: var(--surface-2);
+ font-family: var(--mono);
font-size: $font-size-xs;
font-weight: $font-weight-medium;
}
@@ -623,18 +837,19 @@
align-items: center;
gap: $space-1;
padding: 2px $space-2;
- border-radius: $radius-sm;
+ border-radius: 5px;
+ font-family: var(--mono);
font-size: $font-size-xs;
font-weight: $font-weight-medium;
&.dns-propagated {
background: $success-bg;
- color: $success;
+ color: var(--green);
}
&.dns-pending {
- background: fade($warning, 15%);
- color: $warning;
+ background: $warning-bg;
+ color: var(--amber);
}
}
@@ -649,17 +864,17 @@
margin-left: auto;
&.status-running {
- background: $success;
+ background: var(--green);
box-shadow: 0 0 0 2px fade($success, 30%);
animation: pulseRunning 2s ease-in-out infinite;
}
&.status-stopped {
- background: $text-tertiary;
+ background: var(--text-ghost);
}
&.status-error {
- background: $danger;
+ background: var(--red);
box-shadow: 0 0 0 2px fade($danger, 30%);
animation: pulseError 1s ease-in-out infinite;
}
@@ -703,9 +918,9 @@
right: 0;
width: 320px;
height: 100%;
- background: $bg-card;
- border-left: 1px solid $border-subtle;
- box-shadow: $shadow-lg;
+ background: var(--surface);
+ border-left: 1px solid var(--border);
+ box-shadow: var(--shadow-lg);
z-index: 20;
display: flex;
flex-direction: column;
@@ -721,12 +936,13 @@
}
}
+// Per-type tint arrives inline via borderColor on the header.
.config-panel-header {
display: flex;
align-items: center;
justify-content: space-between;
- padding: $space-4;
- border-bottom: 2px solid $accent-primary;
+ padding: 14px 16px;
+ border-bottom: 1px solid var(--border-soft);
flex-shrink: 0;
}
@@ -737,7 +953,7 @@
h3 {
margin: 0;
- font-size: $font-size-base;
+ font-size: 14px;
font-weight: $font-weight-semibold;
color: $text-primary;
}
@@ -749,8 +965,8 @@
justify-content: center;
width: 32px;
height: 32px;
- border-radius: $radius-md;
- color: white;
+ border-radius: 9px;
+ color: #fff;
}
.config-panel-close {
@@ -783,9 +999,12 @@
label {
display: block;
- font-size: $font-size-sm;
- font-weight: $font-weight-medium;
- color: $text-secondary;
+ font-family: var(--mono);
+ font-size: 10.5px;
+ font-weight: $font-weight-semibold;
+ text-transform: uppercase;
+ letter-spacing: 0.07em;
+ color: var(--text-faint);
margin-bottom: $space-2;
}
@@ -795,7 +1014,7 @@
width: 100%;
padding: $space-2 $space-3;
background: $bg-body;
- border: 1px solid $border-subtle;
+ border: 1px solid var(--border);
border-radius: $radius-md;
color: $text-primary;
font-size: $font-size-sm;
@@ -814,7 +1033,7 @@
select {
cursor: pointer;
appearance: none;
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2371717a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23646b7a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right $space-3 center;
padding-right: $space-8;
@@ -844,19 +1063,17 @@
font-size: $font-size-xs;
color: $text-tertiary;
margin-top: $space-1;
+ text-transform: none;
+ letter-spacing: normal;
}
}
.config-panel-footer {
padding: $space-4;
- border-top: 1px solid $border-subtle;
+ border-top: 1px solid var(--border-soft);
flex-shrink: 0;
}
-// ============================================
-// PORT LIST (Docker Config Panel)
-// ============================================
-
// ============================================
// CONFIG PANEL ELEMENTS
// ============================================
@@ -875,21 +1092,21 @@
gap: $space-1;
padding: $space-3;
background: $bg-body;
- border: 1px solid $border-subtle;
+ border: 1px solid var(--border);
border-radius: $radius-lg;
color: $text-tertiary;
cursor: pointer;
transition: all $transition-fast;
&:hover {
- border-color: $border-active;
+ border-color: var(--border-strong);
color: $text-secondary;
}
&.active {
- background: rgba($accent-primary-raw, 0.1);
- border-color: $accent-primary;
- color: $accent-primary;
+ background: var(--accent-bg);
+ border-color: var(--accent);
+ color: var(--accent-bright);
}
.trigger-type-name {
@@ -919,7 +1136,7 @@
gap: $space-1;
padding: $space-2;
background: $bg-body;
- border: 1px solid $border-subtle;
+ border: 1px solid var(--border);
border-radius: $radius-md;
color: $text-tertiary;
font-size: $font-size-xs;
@@ -927,14 +1144,14 @@
transition: all $transition-fast;
&:hover {
- border-color: $border-active;
+ border-color: var(--border-strong);
color: $text-secondary;
}
&.active {
- background: rgba($accent-primary-raw, 0.1);
- border-color: $accent-primary;
- color: $accent-primary;
+ background: var(--accent-bg);
+ border-color: var(--accent);
+ color: var(--accent-bright);
}
}
@@ -952,60 +1169,34 @@
gap: $space-2;
padding: $space-2;
background: $bg-body;
- border: 1px solid $border-subtle;
+ border: 1px solid var(--border);
border-radius: $radius-md;
color: $text-tertiary;
font-size: $font-size-sm;
cursor: pointer;
transition: all $transition-fast;
- &:hover { border-color: $border-active; color: $text-secondary; }
- &.active { background: rgba($accent-primary-raw, 0.1); border-color: $accent-primary; color: $accent-primary; }
+ &:hover { border-color: var(--border-strong); color: $text-secondary; }
+ &.active { background: var(--accent-bg); border-color: var(--accent); color: var(--accent-bright); }
}
// Script editor textarea
.script-editor {
min-height: 240px;
+ background: var(--bg-code) !important;
+ color: var(--text-code) !important;
font-size: $font-size-xs;
line-height: 1.6;
tab-size: 4;
}
-// Toggle switch
+// Toggle switch label row
.toggle-label {
display: flex !important;
align-items: center;
justify-content: space-between;
}
-.toggle-switch {
- position: relative;
- width: 36px;
- height: 20px;
- background: $bg-tertiary;
- border: none;
- border-radius: $radius-full;
- cursor: pointer;
- transition: background $transition-fast;
-
- &.active { background: $success; }
-
- .toggle-knob {
- position: absolute;
- top: 2px;
- left: 2px;
- width: 16px;
- height: 16px;
- background: white;
- border-radius: 50%;
- transition: transform $transition-fast;
- }
-
- &.active .toggle-knob {
- transform: translateX(16px);
- }
-}
-
// Input with action button (e.g. copy)
.input-with-action {
display: flex;
@@ -1020,7 +1211,7 @@
justify-content: center;
padding: $space-2 $space-3;
background: $bg-body;
- border: 1px solid $border-subtle;
+ border: 1px solid var(--border);
border-radius: $radius-md;
color: $text-secondary;
cursor: pointer;
@@ -1032,8 +1223,8 @@
// Info boxes in panels
.panel-info-box {
padding: $space-3;
- background: rgba($accent-primary-raw, 0.08);
- border: 1px solid rgba($accent-primary-raw, 0.2);
+ background: var(--accent-bg-soft);
+ border: 1px solid fade($accent-primary-raw, 20%);
border-radius: $radius-md;
font-size: $font-size-xs;
color: $text-secondary;
@@ -1041,18 +1232,19 @@
margin-top: $space-3;
code {
- background: rgba(0, 0, 0, 0.3);
+ background: var(--surface-3);
padding: 1px 4px;
border-radius: 3px;
+ font-family: var(--mono);
font-size: $font-size-xs;
- color: $accent-primary;
+ color: var(--accent-bright);
}
&.panel-info-warning {
- background: rgba($warning, 0.08);
- border-color: rgba($warning, 0.2);
+ background: $warning-bg;
+ border-color: $warning-border;
- code { color: $warning; }
+ code { color: var(--amber); }
}
}
@@ -1096,8 +1288,8 @@
height: 8px;
border-radius: 50%;
- &.branch-dot-true { background: $success; }
- &.branch-dot-false { background: $danger; }
+ &.branch-dot-true { background: var(--green); }
+ &.branch-dot-false { background: var(--red); }
}
// 3-col form row
@@ -1173,7 +1365,7 @@
color: $danger;
font-size: $font-size-sm;
font-weight: $font-weight-medium;
- box-shadow: $shadow-lg;
+ box-shadow: var(--shadow-lg);
animation: slideDown 0.2s ease-out;
}
@@ -1189,20 +1381,23 @@
}
// ============================================
-// EDGE LABEL STYLES
+// EDGE LABEL STYLES (mono chip tinted by --edge-c, set inline per edge)
// ============================================
.edge-label {
display: flex;
align-items: center;
- gap: $space-1;
- padding: 2px $space-2;
- border-radius: $radius-sm;
- font-size: $font-size-xs;
+ gap: 5px;
+ padding: 2px 8px;
+ background: var(--surface-2);
+ border: 1px solid var(--edge-c, var(--accent));
+ border-radius: 6px;
+ font-family: var(--mono);
+ font-size: 10px;
font-weight: $font-weight-medium;
- color: white;
+ color: var(--edge-c, var(--accent));
white-space: nowrap;
- transition: all $transition-fast;
+ transition: opacity $transition-fast;
opacity: 0;
.react-flow__edge:hover &,
@@ -1211,12 +1406,14 @@
}
&.edge-label-selected {
- color: $bg-body;
+ background: var(--accent-bg);
+ border-color: var(--accent);
+ color: var(--accent-bright);
}
}
.edge-label-text {
- line-height: 1;
+ line-height: 1.5;
}
.edge-delete-btn {
@@ -1226,10 +1423,10 @@
width: 16px;
height: 16px;
padding: 0;
- margin-left: $space-1;
+ margin-left: 2px;
background: $danger;
border: none;
- border-radius: $radius-sm;
+ border-radius: 4px;
color: white;
cursor: pointer;
transition: all $transition-fast;
@@ -1272,164 +1469,18 @@
cursor: pointer;
&.selected .react-flow__edge-path {
- stroke: white !important;
+ stroke: var(--accent-bright) !important;
stroke-width: 2 !important;
}
}
// ============================================
-// WORKFLOW TOOLBAR (SAVE/LOAD)
-// ============================================
-
-.workflow-toolbar {
- position: absolute;
- top: $space-4;
- right: $space-4;
- z-index: 15;
- display: flex;
- align-items: center;
- gap: $space-3;
- background: $bg-card;
- border: 1px solid $border-subtle;
- border-radius: $radius-lg;
- padding: $space-2 $space-3;
- box-shadow: $shadow-lg;
-}
-
-.toolbar-left {
- display: flex;
- align-items: center;
- gap: $space-3;
-}
-
-.toolbar-right {
- display: flex;
- align-items: center;
- gap: $space-2;
-}
-
-.workflow-name-input {
- width: 180px;
- padding: $space-2 $space-3;
- background: $bg-body;
- border: 1px solid $border-subtle;
- border-radius: $radius-md;
- color: $text-primary;
- font-size: $font-size-sm;
- font-weight: $font-weight-medium;
- transition: border-color $transition-fast;
-
- &:focus {
- outline: none;
- border-color: $accent-primary;
- }
-
- &::placeholder {
- color: $text-tertiary;
- }
-}
-
-.workflow-id-badge {
- padding: $space-1 $space-2;
- background: $bg-hover;
- border-radius: $radius-sm;
- font-size: $font-size-xs;
- font-family: $font-mono;
- color: $text-tertiary;
-}
-
-.toolbar-btn {
- display: flex;
- align-items: center;
- gap: $space-2;
- padding: $space-2 $space-3;
- background: transparent;
- border: 1px solid $border-subtle;
- border-radius: $radius-md;
- color: $text-secondary;
- font-size: $font-size-sm;
- font-weight: $font-weight-medium;
- cursor: pointer;
- transition: all $transition-fast;
- white-space: nowrap;
-
- svg {
- flex-shrink: 0;
- }
-
- &:hover {
- background: $bg-hover;
- border-color: $border-active;
- color: $text-primary;
- }
-
- &:disabled {
- opacity: 0.5;
- cursor: not-allowed;
- }
-}
-
-.toolbar-btn-primary {
- background: $accent-primary;
- border-color: $accent-primary;
- color: white;
-
- &:hover {
- background: darken($accent-primary-raw, 5%);
- border-color: darken($accent-primary-raw, 5%);
- color: white;
- }
-}
-
-.toolbar-btn-execute {
- color: $success;
-
- &:hover {
- background: rgba($success, 0.1);
- border-color: $success;
- }
-}
-
-.toolbar-divider {
- width: 1px;
- height: 24px;
- background: $border-subtle;
- margin: 0 $space-1;
-}
-
-.toolbar-message {
- position: absolute;
- top: 100%;
- right: 0;
- margin-top: $space-2;
- padding: $space-2 $space-3;
- background: $success-bg;
- border: 1px solid $success-border;
- border-radius: $radius-md;
- color: $success;
- font-size: $font-size-xs;
- font-weight: $font-weight-medium;
- white-space: nowrap;
- animation: slideDown 0.2s ease-out;
-}
-
-// ============================================
-// WORKFLOW LIST MODAL
+// WORKFLOW LIST MODAL (shadcn Dialog internals)
// ============================================
-.workflow-modal-overlay {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: fade($bg-body-raw, 80%);
- backdrop-filter: blur(4px);
- display: flex;
- align-items: center;
- justify-content: center;
- z-index: 100;
- animation: fadeIn 0.15s ease-out;
+.workflow-modal {
+ width: 500px;
+ max-width: 90vw;
}
@keyframes fadeIn {
@@ -1441,19 +1492,6 @@
}
}
-.workflow-modal {
- width: 500px;
- max-width: 90vw;
- max-height: 80vh;
- background: $bg-card;
- border: 1px solid $border-subtle;
- border-radius: $radius-xl;
- box-shadow: $shadow-lg;
- display: flex;
- flex-direction: column;
- animation: scaleIn 0.2s ease-out;
-}
-
@keyframes scaleIn {
from {
opacity: 0;
@@ -1465,44 +1503,9 @@
}
}
-.workflow-modal-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: $space-4 $space-5;
- border-bottom: 1px solid $border-subtle;
-
- h2 {
- margin: 0;
- font-size: $font-size-lg;
- font-weight: $font-weight-semibold;
- color: $text-primary;
- }
-}
-
-.modal-close-btn {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 32px;
- height: 32px;
- background: transparent;
- border: none;
- border-radius: $radius-md;
- color: $text-tertiary;
- cursor: pointer;
- transition: all $transition-fast;
-
- &:hover {
- background: $bg-hover;
- color: $text-primary;
- }
-}
-
.workflow-modal-content {
flex: 1;
overflow-y: auto;
- padding: $space-4;
@include custom-scrollbar();
}
@@ -1527,30 +1530,14 @@
transform: rotate(360deg);
}
}
-
-.workflow-list-error {
- display: flex;
- flex-direction: column;
- align-items: center;
- gap: $space-3;
- padding: $space-8;
- color: $danger;
-
- button {
- padding: $space-2 $space-4;
- background: $danger;
- border: none;
- border-radius: $radius-md;
- color: white;
- font-size: $font-size-sm;
- font-weight: $font-weight-medium;
- cursor: pointer;
- transition: background $transition-fast;
-
- &:hover {
- background: darken($danger, 10%);
- }
- }
+
+.workflow-list-error {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: $space-3;
+ padding: $space-8;
+ color: $danger;
}
.workflow-list-empty {
@@ -1559,7 +1546,7 @@
align-items: center;
gap: $space-2;
padding: $space-8;
- color: $text-tertiary;
+ color: var(--text-ghost);
p {
margin: 0;
@@ -1570,6 +1557,7 @@
span {
font-size: $font-size-sm;
+ color: $text-tertiary;
}
}
@@ -1584,15 +1572,15 @@
align-items: center;
gap: $space-3;
padding: $space-3 $space-4;
- background: $bg-body;
- border: 1px solid $border-subtle;
+ background: var(--surface-2);
+ border: 1px solid var(--border-soft);
border-radius: $radius-lg;
cursor: pointer;
transition: all $transition-fast;
&:hover {
- border-color: $accent-primary;
- background: fade($accent-primary-raw, 5%);
+ border-color: var(--accent);
+ background: var(--accent-bg-soft);
}
}
@@ -1602,12 +1590,19 @@
}
.workflow-item-name {
- font-size: $font-size-sm;
+ display: flex;
+ align-items: center;
+ gap: $space-2;
+ font-size: 13px;
font-weight: $font-weight-semibold;
color: $text-primary;
overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
+
+ > span:first-child {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
}
.workflow-item-desc {
@@ -1634,6 +1629,7 @@
display: flex;
align-items: center;
gap: $space-1;
+ font-family: var(--mono);
font-size: $font-size-xs;
color: $text-tertiary;
}
@@ -1643,8 +1639,9 @@
display: flex;
align-items: center;
gap: $space-1;
+ font-family: var(--mono);
font-size: $font-size-xs;
- color: $text-tertiary;
+ color: var(--text-ghost);
}
.workflow-item-delete {
@@ -1677,102 +1674,25 @@
}
}
-// ============================================
-// DEPLOY BUTTON
-// ============================================
-
-.toolbar-btn-deploy {
- background: $success;
- border-color: $success;
- color: white;
-
- &:hover:not(:disabled) {
- background: darken($success, 5%);
- border-color: darken($success, 5%);
- color: white;
- }
-
- &:disabled {
- opacity: 0.5;
- cursor: not-allowed;
- }
-}
-
// ============================================
// DEPLOYMENT PROGRESS MODAL
// ============================================
-.deployment-modal-overlay {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: fade($bg-body-raw, 80%);
- backdrop-filter: blur(4px);
- display: flex;
- align-items: center;
- justify-content: center;
- z-index: 100;
- animation: fadeIn 0.15s ease-out;
-}
-
.deployment-modal {
width: 520px;
max-width: 90vw;
- max-height: 80vh;
- background: $bg-card;
- border: 1px solid $border-subtle;
- border-radius: $radius-xl;
- box-shadow: $shadow-lg;
- display: flex;
- flex-direction: column;
- animation: scaleIn 0.2s ease-out;
-}
-
-.deployment-modal-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: $space-4 $space-5;
- border-bottom: 1px solid $border-subtle;
-
- h2 {
- margin: 0;
- font-size: $font-size-lg;
- font-weight: $font-weight-semibold;
- color: $text-primary;
- }
}
.deployment-modal-content {
flex: 1;
overflow-y: auto;
- padding: $space-4;
@include custom-scrollbar();
}
.deployment-modal-footer {
- padding: $space-4;
- border-top: 1px solid $border-subtle;
+ padding: $space-4 0 0;
display: flex;
justify-content: flex-end;
-
- .btn-primary {
- padding: $space-2 $space-5;
- background: $accent-primary;
- border: none;
- border-radius: $radius-md;
- color: white;
- font-size: $font-size-sm;
- font-weight: $font-weight-medium;
- cursor: pointer;
- transition: background $transition-fast;
-
- &:hover {
- background: darken($accent-primary-raw, 5%);
- }
- }
}
.deployment-loading {
@@ -1812,13 +1732,13 @@
&.success {
background: $success-bg;
border: 1px solid $success-border;
- color: $success;
+ color: var(--green);
}
&.has-errors {
background: $danger-bg;
border: 1px solid $danger-border;
- color: $danger;
+ color: var(--red);
}
}
@@ -1833,18 +1753,18 @@
align-items: center;
gap: $space-3;
padding: $space-3 $space-4;
- background: $bg-body;
- border: 1px solid $border-subtle;
+ background: var(--surface-2);
+ border: 1px solid var(--border-soft);
border-radius: $radius-md;
transition: all $transition-fast;
&.success {
- border-color: fade($success, 30%);
+ border-color: $success-border;
}
&.error {
- border-color: fade($danger, 30%);
- background: fade($danger, 5%);
+ border-color: $danger-border;
+ background: $danger-bg;
}
&.pending {
@@ -1858,8 +1778,8 @@
justify-content: center;
width: 32px;
height: 32px;
- border-radius: $radius-md;
- color: white;
+ border-radius: $radius-lg;
+ color: #fff;
flex-shrink: 0;
}
@@ -1878,6 +1798,7 @@
}
.result-type {
+ font-family: var(--mono);
font-size: $font-size-xs;
color: $text-tertiary;
}
@@ -1893,14 +1814,15 @@
}
.status-success {
- color: $success;
+ color: var(--green);
}
.status-error {
- color: $danger;
+ color: var(--red);
}
.status-pending {
+ font-family: var(--mono);
font-size: $font-size-xs;
color: $text-tertiary;
}
@@ -1913,7 +1835,7 @@
width: 28px;
height: 28px;
background: transparent;
- border: 1px solid $border-subtle;
+ border: 1px solid var(--border);
border-radius: $radius-sm;
color: $text-tertiary;
text-decoration: none;
@@ -1961,94 +1883,253 @@
}
// ============================================
-// DEPLOYED NODE INDICATOR
+// EXECUTION HISTORY (framed two-pane console in the modal)
// ============================================
-.workflow-node.deployed {
- border-color: $success;
+.wf-history {
+ display: flex;
+ height: min(62vh, 600px);
+ border: 1px solid var(--border-soft);
+ border-radius: $radius-lg;
+ background: var(--surface);
+ overflow: hidden;
+}
- &::after {
- content: '';
- position: absolute;
- top: -4px;
- right: -4px;
- width: 12px;
- height: 12px;
- background: $success;
- border: 2px solid $bg-card;
- border-radius: 50%;
+.wf-history__list {
+ width: 230px;
+ flex-shrink: 0;
+ border-right: 1px solid var(--border-soft);
+ background: $bg-sidebar;
+ overflow-y: auto;
+ @include custom-scrollbar();
+
+ @media (max-width: $breakpoint-sm) {
+ width: 150px;
}
}
-// ============================================
-// REAL APP NODE INDICATOR
-// ============================================
+.wf-history__item {
+ padding: 11px 14px;
+ border-bottom: 1px solid var(--border-soft);
+ cursor: pointer;
+ transition: background $transition-fast;
-.workflow-node.is-real {
- border-color: $accent-primary;
+ &:hover {
+ background: var(--surface-2);
+ }
- .workflow-node-header {
- background: fade($accent-primary-raw, 15%);
+ &.is-on {
+ background: var(--accent-bg);
+ box-shadow: inset 2px 0 0 var(--accent);
}
}
-// ============================================
-// PALETTE SUBMENU
-// ============================================
+.wf-history__item-top {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: $space-2;
+ margin-bottom: 4px;
+}
+
+.wf-history__id {
+ font-family: var(--mono);
+ font-size: 11px;
+ color: var(--text-faint);
+}
+
+.wf-history__trigger {
+ font-size: 12.5px;
+ font-weight: $font-weight-medium;
+ color: $text-primary;
+}
+
+.wf-history__time {
+ display: flex;
+ align-items: center;
+ gap: 5px;
+ margin-top: 4px;
+ font-family: var(--mono);
+ font-size: 10px;
+ color: var(--text-faint);
+
+ svg {
+ flex-shrink: 0;
+ }
+}
-.palette-submenu {
+.wf-history__detail {
+ flex: 1;
+ min-width: 0;
display: flex;
flex-direction: column;
- gap: $space-1;
- margin-left: $space-3;
- margin-bottom: $space-2;
- padding-left: $space-2;
- border: 1px solid $border-subtle;
+ overflow: hidden;
+}
+
+.wf-history__head {
+ padding: 13px 16px;
+ border-bottom: 1px solid var(--border-soft);
+ flex-shrink: 0;
}
-.palette-subitem {
+.wf-history__title {
display: flex;
align-items: center;
- justify-content: space-between;
- gap: $space-2;
- padding: $space-2;
- background: $bg-body;
- border: 1px solid $border-subtle;
- border-radius: $radius-sm;
- color: $text-secondary;
- font-size: $font-size-xs;
- cursor: pointer;
- transition: all $transition-fast;
+ gap: 9px;
+ margin: 0;
+ font-size: 13.5px;
+ font-weight: $font-weight-semibold;
+ color: $text-primary;
+}
+
+.wf-history__dur {
+ margin-top: 4px;
+ font-family: var(--mono);
+ font-size: 10.5px;
+ color: var(--text-faint);
+}
+
+.wf-history__logs {
+ flex: 1;
+ overflow-y: auto;
+ padding: $space-3 $space-4;
+ background: var(--bg-code);
+ font-family: var(--mono);
+ font-size: 11.5px;
+ @include custom-scrollbar();
+}
+
+.wf-history__logs-label {
+ display: flex;
+ align-items: center;
+ gap: 7px;
+ padding-bottom: $space-2;
+ margin-bottom: $space-2;
+ border-bottom: 1px solid var(--border-soft);
+ font-size: 10px;
+ font-weight: $font-weight-semibold;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: var(--text-faint);
+}
+
+.wf-history__lines {
+ display: flex;
+ flex-direction: column;
+ gap: 2px;
+}
+
+.wf-log {
+ display: flex;
+ gap: 10px;
+ padding: 1px 4px;
+ border-radius: 4px;
+ transition: background $transition-fast;
&:hover {
- background: $bg-hover;
- border-color: $accent-primary;
- color: $text-primary;
+ background: var(--surface-2);
}
+}
- .status-badge {
- font-size: 10px;
- padding: 1px 6px;
- }
+.wf-log__ts {
+ color: var(--text-ghost);
+ flex-shrink: 0;
}
-.palette-empty {
- padding: $space-2;
- color: $text-tertiary;
- font-size: $font-size-xs;
+.wf-log__lvl {
+ flex-shrink: 0;
+ width: 56px;
+ font-weight: $font-weight-bold;
+
+ &--error { color: var(--red); }
+ &--warning { color: var(--amber); }
+ &--debug { color: var(--text-faint); }
+ &--info { color: var(--cyan); }
+}
+
+.wf-log__node {
+ color: var(--accent-bright);
+ flex-shrink: 0;
+}
+
+.wf-log__msg {
+ color: var(--text-code);
+ overflow-wrap: anywhere;
+}
+
+.wf-history__nolog {
+ color: var(--text-faint);
font-style: italic;
}
-.palette-section-info {
- margin-top: auto;
- padding-top: $space-3;
- border-top: 1px solid $border-subtle;
+.wf-history__loading {
+ display: flex;
+ justify-content: center;
+ padding: $space-8;
+ color: var(--text-faint);
}
-.palette-hint {
- font-size: $font-size-xs;
- color: $text-tertiary;
- line-height: 1.4;
+.wf-history__empty {
+ padding: $space-6 $space-4;
+ text-align: center;
+ font-size: 12.5px;
+ color: var(--text-faint);
+}
+
+.wf-history__placeholder {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ gap: $space-3;
+ color: var(--text-ghost);
+
+ svg {
+ opacity: 0.35;
+ }
+
+ p {
+ margin: 0;
+ font-size: 13px;
+ color: var(--text-faint);
+ }
+}
+
+// ============================================
+// DEPLOYED NODE INDICATOR
+// ============================================
+
+.workflow-node.deployed {
+ border-color: var(--green);
+
+ &::after {
+ content: '';
+ position: absolute;
+ top: -4px;
+ right: -4px;
+ width: 12px;
+ height: 12px;
+ background: var(--green);
+ border: 2px solid var(--surface);
+ border-radius: 50%;
+ }
+}
+
+// ============================================
+// REAL APP NODE INDICATOR
+// ============================================
+
+.workflow-node.is-real {
+ border-color: fade($accent-primary-raw, 40%);
+
+ &.selected {
+ border-color: var(--accent);
+ }
+
+ .workflow-node-header {
+ background: var(--accent-bg-soft);
+ }
}
// ============================================
@@ -2067,11 +2148,12 @@
align-items: center;
gap: 4px;
padding: 2px $space-2;
- background: fade($success, 15%);
+ background: $success-bg;
border: 1px solid fade($success, 30%);
- border-radius: $radius-full;
+ border-radius: 5px;
+ font-family: var(--mono);
font-size: 10px;
- color: $success;
+ color: var(--green);
svg {
opacity: 0.7;
@@ -2079,6 +2161,7 @@
}
.node-domain-more {
+ font-family: var(--mono);
font-size: 10px;
color: $text-tertiary;
padding: 2px $space-1;
@@ -2088,46 +2171,30 @@
// PRIVATE URL IN NODE
// ============================================
-$color-info: #22d3ee;
-
.node-detail-private-url {
display: flex;
align-items: center;
gap: $space-1;
margin-top: $space-2;
padding: $space-1 $space-2;
- background: fade($color-info, 10%);
- border-radius: $radius-sm;
+ background: $info-bg;
+ border-radius: 5px;
svg {
- color: $color-info;
+ color: var(--cyan);
flex-shrink: 0;
}
.node-detail-value {
+ font-family: var(--mono);
font-size: 10px;
- color: $color-info;
+ color: var(--cyan);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
-// ============================================
-// SERVER OVERVIEW BUTTON
-// ============================================
-
-.toolbar-btn-overview {
- background: fade($color-info, 15%) !important;
- border-color: fade($color-info, 30%) !important;
- color: $color-info !important;
-
- &:hover:not(:disabled) {
- background: fade($color-info, 25%) !important;
- border-color: $color-info !important;
- }
-}
-
// ============================================
// CONFIG PANEL ENHANCEMENTS
// ============================================
@@ -2135,7 +2202,7 @@ $color-info: #22d3ee;
.form-value {
padding: $space-2 $space-3;
background: $bg-body;
- border: 1px solid $border-subtle;
+ border: 1px solid var(--border);
border-radius: $radius-md;
font-size: $font-size-sm;
color: $text-primary;
@@ -2143,7 +2210,8 @@ $color-info: #22d3ee;
&.status-badge {
display: inline-flex;
padding: $space-1 $space-2;
- border-radius: $radius-sm;
+ border-radius: 6px;
+ font-family: var(--mono);
font-size: $font-size-xs;
font-weight: $font-weight-medium;
text-transform: capitalize;
@@ -2152,19 +2220,19 @@ $color-info: #22d3ee;
&.status-running {
background: $success-bg;
border-color: $success-border;
- color: $success;
+ color: var(--green);
}
&.status-stopped {
- background: $bg-body;
- border-color: $border-subtle;
- color: $text-tertiary;
+ background: var(--surface-3);
+ border-color: var(--border);
+ color: var(--text-faint);
}
&.status-error {
background: $danger-bg;
border-color: $danger-border;
- color: $danger;
+ color: var(--red);
}
}
@@ -2197,22 +2265,23 @@ $color-info: #22d3ee;
gap: $space-2;
padding: $space-2;
background: $bg-body;
- border: 1px solid $border-subtle;
+ border: 1px solid var(--border);
border-radius: $radius-md;
font-size: $font-size-sm;
svg {
- color: $success;
+ color: var(--green);
}
.ssl-badge {
margin-left: auto;
padding: 2px 6px;
background: $success-bg;
- border-radius: $radius-sm;
+ border-radius: 5px;
+ font-family: var(--mono);
font-size: 10px;
font-weight: $font-weight-medium;
- color: $success;
+ color: var(--green);
}
}
@@ -2233,8 +2302,9 @@ $color-info: #22d3ee;
background: $success-bg;
border: 1px solid $success-border;
border-radius: $radius-sm;
+ font-family: var(--mono);
font-size: $font-size-xs;
- color: $success;
+ color: var(--green);
text-align: center;
}