Skip to content

Self-improving AI Employees for everyone

fix(theme): align all canvas-node class topology + status pip data contract (Wave 26)

trohitg63f008e7f64f
diff --git a/client/src/components/AIAgentNode.tsx b/client/src/components/AIAgentNode.tsx
index 7ca93243..4ab69166 100644
--- a/client/src/components/AIAgentNode.tsx
+++ b/client/src/components/AIAgentNode.tsx
@@ -100,6 +100,7 @@ const AIAgentNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
// Cyber neon underglow + corner LED blink, etc.).
<div
className={`node node-agent ${selected ? 'selected' : ''}`}
+ data-executing={isExecuting ? '' : undefined}
style={{
'--node-color': accentColor,
position: 'relative',
@@ -135,11 +136,11 @@ const AIAgentNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
type="target"
position={Position.Left}
isConnectable={isConnectable}
+ className="node-handle in"
style={{
position: 'absolute', left: '-6px', top: '30%', transform: 'translateY(-50%)',
width: theme.nodeSize.handle, height: theme.nodeSize.handle,
- backgroundColor: theme.colors.background,
- border: `2px solid ${theme.colors.textSecondary}`, borderRadius: '50%',
+ borderRadius: '50%',
}}
title="Input"
/>
@@ -149,14 +150,14 @@ const AIAgentNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
{/* Parameters gear */}
<button
onClick={handleParametersClick}
+ className="node-gear"
style={{
position: 'absolute', top: theme.spacing.xs, right: theme.spacing.xs,
width: theme.nodeSize.paramButton, height: theme.nodeSize.paramButton,
- borderRadius: theme.borderRadius.sm, backgroundColor: theme.colors.backgroundAlt,
- border: `1px solid ${theme.colors.border}`, cursor: 'pointer',
+ cursor: 'pointer',
display: 'flex', alignItems: 'center', justifyContent: 'center',
- fontSize: theme.fontSize.xs, color: theme.colors.textSecondary,
- fontWeight: theme.fontWeight.normal, transition: theme.transitions.fast, zIndex: 20,
+ fontSize: theme.fontSize.xs,
+ fontWeight: theme.fontWeight.normal, zIndex: 20,
}}
title="Edit Parameters"
>⚙️</button>
@@ -168,13 +169,15 @@ const AIAgentNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
</div>
{/* Title */}
- <div style={{
+ <div className="node-label" style={{
fontSize: theme.fontSize.base, fontWeight: theme.fontWeight.semibold,
color: theme.colors.text, lineHeight: '1.2', marginBottom: theme.spacing.xs,
}}>{title}</div>
- {/* Subtitle */}
- <div style={{
+ {/* Subtitle. Phase color is JS-driven (PHASE_CONFIG[phase].color) so
+ we keep the inline color while still exposing `node-sub` so themes
+ can style the resting subtitle. */}
+ <div className="node-sub" style={{
fontSize: theme.fontSize.xs, fontWeight: theme.fontWeight.normal,
color: isExecuting && phaseConfig ? phaseConfig.color : theme.colors.focus,
lineHeight: '1.2', marginBottom: theme.spacing.lg, transition: 'color 0.3s ease',
@@ -194,11 +197,11 @@ const AIAgentNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
type="target"
position={REACT_POSITION[h.position]}
isConnectable={isConnectable}
+ className="node-handle in"
style={{
position: 'absolute', left: '-6px', top: h.offset || '50%',
width: theme.nodeSize.handle, height: theme.nodeSize.handle,
- backgroundColor: theme.colors.background,
- border: `2px solid ${theme.colors.textSecondary}`, borderRadius: '0',
+ borderRadius: '0',
transform: 'translateY(-50%) rotate(45deg)',
}}
title={h.label || h.name}
@@ -223,11 +226,11 @@ const AIAgentNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
type="target"
position={Position.Bottom}
isConnectable={isConnectable}
+ className="node-handle in"
style={{
position: 'absolute', bottom: '-6px', left: h.offset || '50%',
width: theme.nodeSize.handle, height: theme.nodeSize.handle,
- backgroundColor: theme.colors.background,
- border: `2px solid ${theme.colors.textSecondary}`, borderRadius: '0',
+ borderRadius: '0',
transform: 'translateX(-50%) rotate(45deg)',
}}
title={h.label || h.name}
@@ -241,11 +244,10 @@ const AIAgentNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
type="source"
position={Position.Top}
isConnectable={isConnectable}
+ className="node-handle out"
style={{
position: 'absolute', top: '-6px', left: '50%', transform: 'translateX(-50%)',
width: theme.nodeSize.handle, height: theme.nodeSize.handle,
- backgroundColor: accentColor,
- border: `2px solid ${theme.isDarkMode ? theme.colors.background : '#ffffff'}`,
borderRadius: '50%', zIndex: 20,
}}
title={topOutput.label || topOutput.name}
@@ -270,12 +272,11 @@ const AIAgentNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
type="source"
position={Position.Right}
isConnectable={isConnectable}
+ className="node-handle out"
style={{
position: 'absolute', right: '-6px', top: h.offset || '50%',
transform: 'translateY(-50%)',
width: theme.nodeSize.handle, height: theme.nodeSize.handle,
- backgroundColor: accentColor,
- border: `2px solid ${theme.isDarkMode ? theme.colors.background : '#ffffff'}`,
borderRadius: '50%', zIndex: 20,
}}
title={h.label || h.name}
@@ -292,11 +293,11 @@ const AIAgentNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
type="source"
position={Position.Right}
isConnectable={isConnectable}
+ className="node-handle out"
style={{
position: 'absolute', right: '-6px', top: '50%', transform: 'translateY(-50%)',
width: theme.nodeSize.handle, height: theme.nodeSize.handle,
- backgroundColor: theme.colors.background,
- border: `2px solid ${theme.colors.textSecondary}`, borderRadius: '50%',
+ borderRadius: '50%',
}}
title="Main Output"
/>
diff --git a/client/src/components/GenericNode.tsx b/client/src/components/GenericNode.tsx
index 53480894..97fc88c2 100644
--- a/client/src/components/GenericNode.tsx
+++ b/client/src/components/GenericNode.tsx
@@ -98,19 +98,10 @@ const GenericNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
const nodeInputs = getNodeInputs();
const nodeOutputs = getNodeOutputs();
- // Helper functions for color management
+ // Node accent color — feeds the `--node-color` CSS custom property
+ // on the wrapper. Handle borders/backgrounds are now owned by
+ // `.node-handle` in base.css + per-theme overrides (Wave 26.C).
const getNodeColor = () => definition.defaults.color || '#9E9E9E';
- const getBorderColor = () => {
- const color = getNodeColor();
- if (color.startsWith('#')) {
- const hex = color.substring(1);
- const r = Math.max(0, parseInt(hex.substring(0, 2), 16) - 40);
- const g = Math.max(0, parseInt(hex.substring(2, 4), 16) - 40);
- const b = Math.max(0, parseInt(hex.substring(4, 6), 16) - 40);
- return `#${r.toString(16).padStart(2, '0')}${g.toString(16).padStart(2, '0')}${b.toString(16).padStart(2, '0')}`;
- }
- return color;
- };
return (
// `node` + `selected` co-classes activate per-theme generic-node
@@ -153,12 +144,14 @@ const GenericNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
<span style={{ fontSize: '24px', opacity: 0.8 }}>||</span>
</div>
)}
- {/* Input Handles - Multiple handles based on node definition */}
+ {/* Input Handles - Multiple handles based on node definition.
+ Visual styling (background, border) owned by `.node-handle.in`
+ in base.css + per-theme overrides. Inline keeps layout only. */}
{nodeInputs.map((input, index) => {
const totalInputs = nodeInputs.length;
- const topPosition = totalInputs === 1 ? '50%' :
+ const topPosition = totalInputs === 1 ? '50%' :
`${20 + (60 * index) / Math.max(totalInputs - 1, 1)}%`;
-
+
return (
<Handle
key={`input-${input.name}-${index}`}
@@ -166,6 +159,7 @@ const GenericNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
type="target"
position={Position.Left}
isConnectable={isConnectable}
+ className="node-handle in"
style={{
position: 'absolute',
left: '-6px',
@@ -173,20 +167,20 @@ const GenericNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
transform: 'translateY(-50%)',
width: '12px',
height: '12px',
- backgroundColor: 'rgba(255,255,255,0.9)',
- border: `2px solid ${getBorderColor()}`,
borderRadius: '50%'
}}
title={`${input.displayName}: ${input.description}`}
/>
);
})}
-
- {/* Parameters Button */}
+
+ {/* Parameters Button — visual styles (background, border, hover)
+ owned by `.node-gear` in base.css + per-theme overrides.
+ Inline keeps positioning + label color only. */}
<button
onClick={handleParametersClick}
- className="absolute top-2 right-2 z-20 flex h-5 w-5 cursor-pointer items-center justify-center rounded-full border-0 bg-white/95 text-[10px] font-semibold shadow-sm transition-all duration-200 hover:scale-115 hover:bg-white hover:shadow-md"
+ className="node-gear absolute top-2 right-2 z-20 flex h-5 w-5 cursor-pointer items-center justify-center rounded-full text-[10px] font-semibold transition-all duration-200 hover:scale-115"
style={{ color: getNodeColor() }}
title="Edit Parameters"
>
@@ -217,12 +211,13 @@ const GenericNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
</div>
- {/* Output Handles - Multiple handles based on node definition */}
+ {/* Output Handles - Multiple handles based on node definition.
+ Visual styling owned by `.node-handle.out` in base.css. */}
{nodeOutputs.map((output, index) => {
const totalOutputs = nodeOutputs.length;
- const topPosition = totalOutputs === 1 ? '50%' :
+ const topPosition = totalOutputs === 1 ? '50%' :
`${20 + (60 * index) / Math.max(totalOutputs - 1, 1)}%`;
-
+
return (
<Handle
key={`output-${output.name}-${index}`}
@@ -230,6 +225,7 @@ const GenericNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
type="source"
position={Position.Right}
isConnectable={isConnectable}
+ className="node-handle out"
style={{
position: 'absolute',
right: '-6px',
@@ -237,8 +233,6 @@ const GenericNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
transform: 'translateY(-50%)',
width: '12px',
height: '12px',
- backgroundColor: 'rgba(255,255,255,0.9)',
- border: `2px solid ${getBorderColor()}`,
borderRadius: '50%'
}}
title={`${output.displayName}: ${output.description}`}
diff --git a/client/src/components/SquareNode.tsx b/client/src/components/SquareNode.tsx
index 7e49780c..e38ef9c0 100644
--- a/client/src/components/SquareNode.tsx
+++ b/client/src/components/SquareNode.tsx
@@ -159,46 +159,39 @@ const SquareNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnectab
setSelectedNode({ id, type, data, position: { x: 0, y: 0 } });
};
- // Get status indicator color based on execution state
- const getStatusIndicatorColor = () => {
- // For executing or waiting state, show blue/cyan
- if (executionStatus === 'executing' || executionStatus === 'waiting') {
- return theme.dracula.cyan;
- }
- if (executionStatus === 'success') {
- return theme.dracula.green;
- }
- if (executionStatus === 'error') {
- return theme.dracula.red;
+ // Bucket execution + connection state into one of five status tokens
+ // consumed by `.sq-node-pip[data-status="..."]` in base.css. Per-theme
+ // CSS overrides these without fighting inline `backgroundColor`.
+ // Buckets: 'idle' | 'executing' | 'waiting' | 'success' | 'error'.
+ // Matches TriggerNode/StartNode/ToolkitNode contract (Wave 26.B).
+ const pipStatus: 'idle' | 'executing' | 'waiting' | 'success' | 'error' = (() => {
+ if (executionStatus === 'executing' || executionStatus === 'waiting' || isGlowing) {
+ return 'executing';
}
+ if (executionStatus === 'success') return 'success';
+ if (executionStatus === 'error') return 'error';
- // Idle state - use Android or configuration status
+ // Idle bucket — derive from connection / configuration signals.
if (isAndroidNode) {
- return isAndroidConnected ? theme.dracula.green : theme.dracula.red;
+ return isAndroidConnected ? 'success' : 'error';
}
-
- // WhatsApp nodes - use WebSocket connection status
if (isWhatsAppNode) {
- if (whatsappStatus.connected) return theme.dracula.green;
- if (whatsappStatus.pairing) return theme.dracula.orange;
- return theme.dracula.red;
+ if (whatsappStatus.connected) return 'success';
+ if (whatsappStatus.pairing) return 'waiting';
+ return 'error';
}
-
- // Google Maps nodes - use WebSocket API key validation status
if (isGoogleMapsNode && googleMapsKeyStatus) {
- return googleMapsKeyStatus.valid ? theme.dracula.green : theme.dracula.red;
+ return googleMapsKeyStatus.valid ? 'success' : 'error';
}
-
- // AI Model nodes - "is stored" from catalogue (hasApiKey via
- // useProviderStored above), "is validated" from apiKeyStatuses.
if (isAIModelNode) {
- if (aiKeyStatus?.valid && hasApiKey) return theme.dracula.green;
- if (hasApiKey) return theme.dracula.orange;
- return theme.dracula.red;
+ if (aiKeyStatus?.valid && hasApiKey) return 'success';
+ if (hasApiKey) return 'waiting';
+ return 'error';
}
-
- return isConfigured ? theme.dracula.green : hasApiKey ? theme.dracula.orange : theme.dracula.red;
- };
+ if (isConfigured) return 'success';
+ if (hasApiKey) return 'waiting';
+ return 'idle';
+ })();
const getStatusTitle = () => {
switch (executionStatus) {
@@ -320,7 +313,9 @@ const SquareNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnectab
{/* Service Icon */}
<NodeIcon icon={iconRef} className="h-7 w-7 text-3xl" />
- {/* Parameters Button */}
+ {/* Parameters Button — visual styles (background, border, hover)
+ owned by `.sq-node-gear` in base.css + per-theme overrides.
+ Inline keeps positioning + sizing only. */}
<button
onClick={handleParametersClick}
style={{
@@ -329,13 +324,7 @@ const SquareNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnectab
right: '-8px',
width: theme.nodeSize.paramButton,
height: theme.nodeSize.paramButton,
- cursor: 'pointer',
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
fontSize: theme.fontSize.xs,
- fontWeight: '400',
- transition: theme.transitions.fast,
zIndex: 30,
}}
title="Edit Service Parameters"
@@ -344,18 +333,21 @@ const SquareNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnectab
⚙️
</button>
- {/* Configuration/Execution Status Indicator */}
+ {/* Configuration/Execution Status Indicator.
+ Background color is owned by `.sq-node-pip[data-status="..."]`
+ in base.css (and per-theme overrides). We pass only the
+ execution/connection bucket here — no inline color. */}
<div
className="sq-node-pip"
+ data-status={pipStatus}
style={{
- '--node-color': getStatusIndicatorColor(),
position: 'absolute',
top: '-4px',
left: '-4px',
width: theme.nodeSize.statusIndicator,
height: theme.nodeSize.statusIndicator,
zIndex: 30,
- } as NodeStyle}
+ }}
title={getStatusTitle()}
/>
@@ -410,7 +402,10 @@ const SquareNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnectab
`nodeColor` carries the spec's brand color (Android green for
Android services, dracula accents elsewhere). The tooltip
reads from the spec's top-position output handle when one is
- declared there; otherwise falls back to a generic label. */}
+ declared there; otherwise falls back to a generic label.
+ Visual styles (background, border, radius) owned by
+ `.sq-node-handle.out` in base.css + per-theme overrides — we
+ pass `--node-color` for the CSS var only. */}
{isToolCapable && (() => {
const spec = getCachedNodeSpec(type || '');
const topOut = spec?.handles?.find(h => h.kind === 'output' && h.position === 'top');
@@ -421,18 +416,17 @@ const SquareNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnectab
type="source"
position={Position.Top}
isConnectable={isConnectable}
+ className="sq-node-handle out"
style={{
+ '--node-color': nodeColor,
position: 'absolute',
top: '-6px',
left: '50%',
transform: 'translateX(-50%)',
width: theme.nodeSize.handle,
height: theme.nodeSize.handle,
- backgroundColor: nodeColor,
- border: `2px solid ${theme.isDarkMode ? theme.colors.background : '#ffffff'}`,
- borderRadius: '50%',
zIndex: 20,
- }}
+ } as NodeStyle}
title={tooltip}
/>
);
diff --git a/client/src/components/StartNode.tsx b/client/src/components/StartNode.tsx
index b927e407..e3cd2c2a 100644
--- a/client/src/components/StartNode.tsx
+++ b/client/src/components/StartNode.tsx
@@ -5,6 +5,7 @@ import { NodeData, NodeStyle } from '../types/NodeTypes';
import { useAppStore } from '../store/useAppStore';
import { useAppTheme } from '../hooks/useAppTheme';
import { PlayCircle } from 'lucide-react';
+import { resolveNodeDescription } from '../lib/nodeSpec';
import EditableNodeLabel from './ui/EditableNodeLabel';
const StartNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnectable, selected }) => {
@@ -15,6 +16,11 @@ const StartNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnectabl
const defaultLabel = 'Start';
+ // Definition-driven color (Wave 26.A): backend NodeSpec is SSOT for
+ // node color. Falls back to dracula cyan if the spec hasn't loaded.
+ const definition = resolveNodeDescription(type || '');
+ const nodeColor = definition?.defaults?.color || theme.dracula.cyan;
+
const handleLabelChange = useCallback(
(newLabel: string) => updateNodeData(id, { label: newLabel }),
[id, updateNodeData]
@@ -30,15 +36,15 @@ const StartNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnectabl
setSelectedNode({ id, type, data, position: { x: 0, y: 0 } });
};
- const nodeColor = theme.dracula.cyan; // Cyan color for start node (neutral "begin" color)
-
return (
- // `node` + `selected` co-classes activate per-theme node decorations.
- // Visual styling (background, border, radius, shadow) lives in
- // base.css `.node { ... }` defaults + per-theme `.node` overrides
- // and reads `var(--node-color)` for the per-definition accent.
+ // `sq-node` + `selected` co-classes activate per-theme square-node
+ // decorations (Renaissance wax seal, Steampunk rivets, Edo hanko
+ // seal, Surveillance REC LED, Cyber neon underglow). Visual styling
+ // (background, border, radius, shadow) lives in base.css
+ // `.sq-node-box { ... }` defaults + per-theme overrides and reads
+ // `var(--node-color)` for the per-definition accent.
<div
- className={`node ${selected ? 'selected' : ''}`}
+ className={`sq-node ${selected ? 'selected' : ''}`}
style={{
'--node-color': nodeColor,
position: 'relative',
@@ -52,6 +58,7 @@ const StartNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnectabl
>
{/* Main Square Node — layout only; visuals live in CSS. */}
<div
+ className="sq-node-box"
style={{
position: 'relative',
width: '60px',
@@ -62,56 +69,45 @@ const StartNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnectabl
color: theme.colors.text,
fontSize: '28px',
fontWeight: '600',
- transition: 'all 0.2s ease',
}}
>
- {/* Play Icon */}
+ {/* Play Icon (color reads from definition-driven nodeColor) */}
<PlayCircle className="h-7 w-7" style={{ color: nodeColor }} />
- {/* Parameters Button */}
+ {/* Parameters Button — CSS owns bg/border via .sq-node-gear */}
<button
onClick={handleParametersClick}
+ className="sq-node-gear"
style={{
position: 'absolute',
top: '-8px',
right: '-8px',
width: '16px',
height: '16px',
- borderRadius: '3px',
- backgroundColor: theme.isDarkMode ? theme.colors.backgroundAlt : '#ffffff',
- border: `1px solid ${theme.isDarkMode ? theme.colors.border : `${nodeColor}40`}`,
cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontSize: '8px',
- color: theme.colors.textSecondary,
fontWeight: '400',
- transition: 'all 0.2s ease',
zIndex: 30,
- boxShadow: theme.isDarkMode
- ? `0 1px 3px ${theme.colors.shadow}`
- : `0 1px 4px ${nodeColor}20`
}}
title="Edit Parameters"
>
- {'\u2699\uFE0F'}
+ {'⚙️'}
</button>
- {/* Status Indicator - always green for start */}
+ {/* Status Indicator — Start is always "ready" (success bucket).
+ CSS owns bg color via per-status rule on .sq-node-pip. */}
<div
+ className="sq-node-pip"
+ data-status="success"
style={{
position: 'absolute',
top: '-4px',
left: '-4px',
width: '10px',
height: '10px',
- borderRadius: '50%',
- backgroundColor: nodeColor,
- border: `2px solid ${theme.isDarkMode ? theme.colors.background : '#ffffff'}`,
- boxShadow: theme.isDarkMode
- ? `0 1px 2px ${theme.colors.shadow}`
- : '0 1px 3px rgba(0,0,0,0.15)',
zIndex: 30,
}}
title="Workflow start point"
@@ -130,12 +126,13 @@ const StartNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnectabl
}}
/>
- {/* Output Handle */}
+ {/* Output Handle — CSS owns bg/border via .sq-node-handle.out */}
<Handle
id="output-main"
type="source"
position={Position.Right}
isConnectable={isConnectable}
+ className="sq-node-handle out"
style={{
position: 'absolute',
right: '-6px',
@@ -143,10 +140,7 @@ const StartNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnectabl
transform: 'translateY(-50%)',
width: '8px',
height: '8px',
- backgroundColor: nodeColor,
- border: `2px solid ${theme.isDarkMode ? theme.colors.background : '#ffffff'}`,
- borderRadius: '50%',
- zIndex: 20
+ zIndex: 20,
}}
title="Workflow Output"
/>
diff --git a/client/src/components/TeamMonitorNode.tsx b/client/src/components/TeamMonitorNode.tsx
index e73a9843..648c9614 100644
--- a/client/src/components/TeamMonitorNode.tsx
+++ b/client/src/components/TeamMonitorNode.tsx
@@ -230,36 +230,35 @@ const TeamMonitorNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConn
)}
</div>
- {/* Input Handle */}
+ {/* Input Handle — visual styling owned by `.node-handle.in`
+ in base.css + per-theme overrides. Inline keeps layout only. */}
<Handle
id="input-team"
type="target"
position={Position.Left}
isConnectable={isConnectable}
+ className="node-handle in"
style={{
left: -6,
top: '50%',
width: 10,
height: 10,
- backgroundColor: theme.isDarkMode ? theme.colors.background : '#ffffff',
- border: `2px solid ${nodeColor}`,
borderRadius: '50%',
}}
/>
- {/* Output Handle */}
+ {/* Output Handle — visual styling owned by `.node-handle.out`. */}
<Handle
id="output-main"
type="source"
position={Position.Right}
isConnectable={isConnectable}
+ className="node-handle out"
style={{
right: -6,
top: '50%',
width: 10,
height: 10,
- backgroundColor: nodeColor,
- border: `2px solid ${theme.isDarkMode ? theme.colors.background : '#ffffff'}`,
borderRadius: '50%',
}}
/>
diff --git a/client/src/components/ToolkitNode.tsx b/client/src/components/ToolkitNode.tsx
index edb50a92..0070afa4 100644
--- a/client/src/components/ToolkitNode.tsx
+++ b/client/src/components/ToolkitNode.tsx
@@ -69,21 +69,25 @@ const ToolkitNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
const iconSpec = useNodeSpec(type);
const iconRef = (iconSpec?.icon as string | undefined) ?? (definition?.icon as string | undefined);
- // Get status indicator color
- const getStatusIndicatorColor = () => {
- if (isExecuting) return theme.dracula.cyan;
- if (executionStatus === 'success') return theme.dracula.green;
- if (executionStatus === 'error') return theme.dracula.red;
- return theme.dracula.green; // Toolkit is always ready
- };
+ // Pip status bucket — CSS owns the visual color via per-status rules.
+ // Toolkit's idle state always reads as "success" (it's always ready).
+ const pipStatus = (() => {
+ if (isExecuting) return 'executing';
+ if (executionStatus === 'success') return 'success';
+ if (executionStatus === 'error') return 'error';
+ return 'success';
+ })();
return (
- // Visual styling (background, border, radius, shadow, executing pulse)
- // lives in base.css `.node` defaults + per-theme overrides; reads
- // `var(--node-color)` for the per-definition accent. The
- // `react-flow__node.executing .node` rule binds the pulse.
+ // `sq-node` + `selected` co-classes activate per-theme square-node
+ // decorations (Renaissance wax seal, Steampunk rivets, Edo hanko
+ // seal, Surveillance REC LED, Cyber neon underglow). Visuals
+ // (background, border, radius, shadow, executing pulse) live in
+ // base.css `.sq-node-box` defaults + per-theme overrides; reads
+ // `var(--node-color)` for the per-definition accent.
<div
- className={`node ${selected ? 'selected' : ''}`}
+ className={`sq-node ${selected ? 'selected' : ''}`}
+ data-executing={isExecuting ? '' : undefined}
style={{
'--node-color': nodeColor,
position: 'relative',
@@ -98,6 +102,7 @@ const ToolkitNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
{/* Main Node - rectangular for toolkit, square for skills.
Layout only; visuals live in CSS. */}
<div
+ className="sq-node-box"
style={{
position: 'relative',
width: isToolkitNode ? theme.nodeSize.toolkitWidth : theme.nodeSize.square,
@@ -108,62 +113,46 @@ const ToolkitNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
color: theme.colors.text,
fontSize: theme.nodeSize.squareIcon,
fontWeight: '600',
- transition: 'all 0.2s ease',
}}
>
{/* Service Icon */}
<NodeIcon icon={iconRef} className="h-7 w-7 text-3xl" />
- {/* Parameters Button */}
+ {/* Parameters Button — CSS owns bg/border via .sq-node-gear */}
<button
onClick={handleParametersClick}
+ className="sq-node-gear"
style={{
position: 'absolute',
top: '-8px',
right: '-8px',
width: theme.nodeSize.paramButton,
height: theme.nodeSize.paramButton,
- borderRadius: theme.borderRadius.sm,
- backgroundColor: theme.isDarkMode ? theme.colors.backgroundAlt : '#ffffff',
- border: `1px solid ${theme.isDarkMode ? theme.colors.border : '#d1d5db'}`,
cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontSize: theme.fontSize.xs,
- color: theme.colors.textSecondary,
fontWeight: '400',
transition: theme.transitions.fast,
zIndex: 30,
- boxShadow: theme.isDarkMode
- ? `0 1px 3px ${theme.colors.shadow}`
- : '0 1px 4px rgba(0,0,0,0.1)'
}}
title="Edit Toolkit Parameters"
>
⚙️
</button>
- {/* Status Indicator */}
+ {/* Status Indicator — CSS owns bg/animation via per-status rules. */}
<div
+ className="sq-node-pip"
+ data-status={pipStatus}
style={{
position: 'absolute',
top: '-4px',
left: '-4px',
width: theme.nodeSize.statusIndicator,
height: theme.nodeSize.statusIndicator,
- borderRadius: '50%',
- backgroundColor: getStatusIndicatorColor(),
- border: `2px solid ${theme.isDarkMode ? theme.colors.background : '#ffffff'}`,
- boxShadow: isExecuting
- ? theme.isDarkMode
- ? `0 0 6px ${theme.dracula.cyan}80`
- : '0 0 4px rgba(37, 99, 235, 0.5)'
- : theme.isDarkMode
- ? `0 1px 2px ${theme.colors.shadow}`
- : '0 1px 3px rgba(0,0,0,0.15)',
zIndex: 30,
- animation: isExecuting ? 'pulse 1s ease-in-out infinite' : 'none',
}}
title={isExecuting ? 'Executing...' : 'Toolkit ready'}
/>
@@ -174,6 +163,7 @@ const ToolkitNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
type="source"
position={Position.Top}
isConnectable={isConnectable}
+ className="sq-node-handle out"
style={{
position: 'absolute',
top: '-6px',
@@ -181,10 +171,7 @@ const ToolkitNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
transform: 'translateX(-50%)',
width: theme.nodeSize.handle,
height: theme.nodeSize.handle,
- backgroundColor: nodeColor,
- border: `2px solid ${theme.isDarkMode ? theme.colors.background : '#ffffff'}`,
- borderRadius: '50%',
- zIndex: 20
+ zIndex: 20,
}}
title={isToolkitNode ? "Connect to AI Agent's tool input" : "Connect to agent's skill input"}
/>
@@ -196,6 +183,7 @@ const ToolkitNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
type="target"
position={Position.Bottom}
isConnectable={isConnectable}
+ className="sq-node-handle in"
style={{
position: 'absolute',
bottom: '-6px',
@@ -203,16 +191,13 @@ const ToolkitNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
transform: 'translateX(-50%)',
width: theme.nodeSize.handle,
height: theme.nodeSize.handle,
- backgroundColor: theme.isDarkMode ? theme.colors.background : '#ffffff',
- border: `2px solid ${theme.isDarkMode ? theme.colors.textSecondary : '#6b7280'}`,
- borderRadius: '50%',
- zIndex: 20
+ zIndex: 20,
}}
title="Connect Android service nodes"
/>
)}
- {/* Output Data Indicator */}
+ {/* Output Data Indicator (bespoke; keeps inline style) */}
{executionStatus === 'success' && nodeStatus?.data && (
<div
style={{
diff --git a/client/src/components/TriggerNode.tsx b/client/src/components/TriggerNode.tsx
index eeec82be..306afdd9 100644
--- a/client/src/components/TriggerNode.tsx
+++ b/client/src/components/TriggerNode.tsx
@@ -67,29 +67,21 @@ const TriggerNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
setSelectedNode({ id, type, data, position: { x: 0, y: 0 } });
};
- // Get status indicator color based on execution state
- const getStatusIndicatorColor = () => {
- // Combined executing/waiting state - show purple with glow
- if (isExecuting) {
- return theme.dracula.purple;
- }
- if (executionStatus === 'success') {
- return theme.dracula.green;
- }
- if (executionStatus === 'error') {
- return theme.dracula.red;
- }
-
- // WhatsApp trigger - use connection status when idle
+ // Compute pip status bucket for `data-status` attribute. CSS owns the
+ // visual color via per-status rules in base.css and per-theme overrides.
+ // For WhatsApp triggers in idle state, fold connection state into the
+ // bucket: connected -> success, pairing -> waiting, otherwise -> error.
+ const pipStatus = (() => {
+ if (executionStatus === 'executing' || executionStatus === 'waiting') return 'executing';
+ if (executionStatus === 'success') return 'success';
+ if (executionStatus === 'error') return 'error';
if (isWhatsAppTrigger) {
- if (whatsappStatus.connected) return theme.dracula.green;
- if (whatsappStatus.pairing) return theme.dracula.orange;
- return theme.dracula.red;
+ if (whatsappStatus.connected) return 'success';
+ if (whatsappStatus.pairing) return 'waiting';
+ return 'error';
}
-
- // Idle state - show configured status
- return isConfigured ? theme.dracula.green : theme.dracula.orange;
- };
+ return isConfigured ? 'success' : 'idle';
+ })();
const getStatusTitle = () => {
switch (executionStatus) {
@@ -122,10 +114,14 @@ const TriggerNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
const nodeColor = definition?.defaults?.color || '#f59e0b';
return (
- // `node` + `node-trigger` + `selected` co-classes activate per-theme
- // trigger-node decorations.
+ // `sq-node` + `node-trigger` + `selected` co-classes activate per-theme
+ // square-node decorations (Renaissance wax seal, Steampunk rivets, Edo
+ // hanko seal, Surveillance REC LED, Cyber neon underglow). The
+ // `node-trigger` co-class lets per-type theme rules narrow further.
+ // `data-executing` binds the CSS pulse animation owned by base.css.
<div
- className={`node node-trigger ${selected ? 'selected' : ''}`}
+ className={`sq-node node-trigger ${selected ? 'selected' : ''}`}
+ data-executing={isExecuting ? '' : undefined}
style={{
'--node-color': nodeColor,
position: 'relative',
@@ -138,10 +134,11 @@ const TriggerNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
} as NodeStyle}
>
{/* Main Trigger Node — visual styling lives in base.css + per-theme
- CSS targeting `.node.node-trigger`. Inner box keeps only layout
+ CSS targeting `.sq-node-box`. Inner box keeps only layout
(size, flex), and per-theme decorations like Cyber neon glow,
Renaissance wax seal, and Steampunk rivets reach the pixels. */}
<div
+ className="sq-node-box"
style={{
position: 'relative',
width: theme.nodeSize.square,
@@ -152,7 +149,6 @@ const TriggerNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
color: theme.colors.text,
fontSize: theme.nodeSize.squareIcon,
fontWeight: '600',
- transition: 'all 0.2s ease',
opacity: isDisabled ? 0.5 : 1,
}}
>
@@ -182,62 +178,48 @@ const TriggerNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
{/* Parameters Button */}
<button
onClick={handleParametersClick}
+ className="sq-node-gear"
style={{
position: 'absolute',
top: '-8px',
right: '-8px',
width: theme.nodeSize.paramButton,
height: theme.nodeSize.paramButton,
- borderRadius: theme.borderRadius.sm,
- backgroundColor: theme.isDarkMode ? theme.colors.backgroundAlt : '#ffffff',
- border: `1px solid ${theme.isDarkMode ? theme.colors.border : '#d1d5db'}`,
cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontSize: theme.fontSize.xs,
- color: theme.colors.textSecondary,
fontWeight: '400',
transition: theme.transitions.fast,
zIndex: 30,
- boxShadow: theme.isDarkMode
- ? `0 1px 3px ${theme.colors.shadow}`
- : '0 1px 4px rgba(0,0,0,0.1)'
}}
title="Configure Trigger"
>
⚙️
</button>
- {/* Execution Status Indicator */}
- {/* Status Indicator - glows for both waiting and executing states */}
+ {/* Status Indicator — CSS owns the bg color via per-status rule
+ on `.sq-node-pip[data-status="…"]`. Pulse on executing/waiting
+ also lives in CSS. */}
<div
+ className="sq-node-pip"
+ data-status={pipStatus}
style={{
position: 'absolute',
top: '-4px',
left: '-4px',
width: theme.nodeSize.statusIndicator,
height: theme.nodeSize.statusIndicator,
- borderRadius: '50%',
- backgroundColor: getStatusIndicatorColor(),
- border: `2px solid ${theme.isDarkMode ? theme.colors.background : '#ffffff'}`,
- boxShadow: isExecuting
- ? theme.isDarkMode
- ? `0 0 6px ${theme.dracula.purple}80`
- : '0 0 4px rgba(37, 99, 235, 0.5)'
- : theme.isDarkMode
- ? `0 1px 2px ${theme.colors.shadow}`
- : '0 1px 3px rgba(0,0,0,0.15)',
zIndex: 30,
- // Subtle pulse animation for both modes
- animation: isExecuting ? 'pulse 1s ease-in-out infinite' : 'none',
}}
title={getStatusTitle()}
/>
{/* NO INPUT HANDLE - Trigger nodes don't have inputs */}
- {/* Trigger Badge - Lightning bolt indicator on bottom-left */}
+ {/* Trigger Badge - Lightning bolt indicator on bottom-left
+ (bespoke UI element, not in design schema; keeps inline style) */}
<div
style={{
position: 'absolute',
@@ -262,12 +244,13 @@ const TriggerNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
<span style={{ lineHeight: 1, color: theme.isDarkMode ? theme.colors.background : '#1a1d21' }}>⚡</span>
</div>
- {/* Output Handle (right side) */}
+ {/* Output Handle (right side) — CSS owns bg/border via .sq-node-handle.out */}
<Handle
id="output-main"
type="source"
position={Position.Right}
isConnectable={isConnectable}
+ className="sq-node-handle out"
style={{
position: 'absolute',
right: '-6px',
@@ -275,15 +258,12 @@ const TriggerNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta
transform: 'translateY(-50%)',
width: theme.nodeSize.handle,
height: theme.nodeSize.handle,
- backgroundColor: isConfigured ? nodeColor : theme.colors.textSecondary,
- border: `2px solid ${theme.isDarkMode ? theme.colors.background : '#ffffff'}`,
- borderRadius: '50%',
- zIndex: 20
+ zIndex: 20,
}}
title="Trigger Output"
/>
- {/* Output Data Indicator */}
+ {/* Output Data Indicator (bespoke; keeps inline style) */}
{executionStatus === 'success' && nodeStatus?.data && (
<div
style={{
diff --git a/client/src/components/ui/EditableNodeLabel.tsx b/client/src/components/ui/EditableNodeLabel.tsx
index b349dfea..14969713 100644
--- a/client/src/components/ui/EditableNodeLabel.tsx
+++ b/client/src/components/ui/EditableNodeLabel.tsx
@@ -98,7 +98,11 @@ const EditableNodeLabel: React.FC<EditableNodeLabelProps> = ({
onBlur={handleSave}
onClick={(e) => e.stopPropagation()}
className={cn(
- 'mt-2 h-auto max-w-[120px] border-accent px-1 py-0.5 text-center text-xs font-medium',
+ // Both `sq-node-label` and `node-label` co-classes always emit so
+ // per-theme CSS rules fire for whichever parent topology this
+ // label sits inside (`.sq-node` for square, `.node` for
+ // rectangular). Wave 26.B.
+ 'sq-node-label node-label mt-2 h-auto max-w-[120px] border-accent px-1 py-0.5 text-center text-xs font-medium',
className
)}
/>
@@ -110,7 +114,11 @@ const EditableNodeLabel: React.FC<EditableNodeLabelProps> = ({
onDoubleClick={onActivate}
title="Double-click to rename"
className={cn(
- 'mt-2 max-w-[120px] cursor-text text-center text-xs leading-tight font-medium text-foreground',
+ // Both `sq-node-label` and `node-label` co-classes always emit so
+ // per-theme CSS rules fire for whichever parent topology this
+ // label sits inside (`.sq-node` for square, `.node` for
+ // rectangular). Wave 26.B.
+ 'sq-node-label node-label mt-2 max-w-[120px] cursor-text text-center text-xs leading-tight font-medium text-foreground',
className
)}
>
diff --git a/client/src/themes/base.css b/client/src/themes/base.css
index 38e0c9ea..532f9df8 100644
--- a/client/src/themes/base.css
+++ b/client/src/themes/base.css
@@ -203,3 +203,86 @@
background-image: var(--canvas-grid, none);
cursor: var(--cursor-default, auto);
}
+
+/* ============================================================================
+ * Default canvas-node inner-element visuals (Wave 26).
+ *
+ * Status pips, gear buttons, handles, and labels — defaults that fire
+ * across all themes that don't override. Status pips are driven by
+ * `data-status` set inline by the React component; CSS picks the colour
+ * from shadcn semantic tokens. Per-theme CSS in client/src/themes/<theme>.css
+ * overrides these for material-specific identity.
+ * ============================================================================ */
+
+/* Status pip — square-node and rectangular-node variants */
+.sq-node-pip,
+.node-pip {
+ background: hsl(var(--muted-foreground));
+}
+
+.sq-node-pip[data-status="idle"],
+.node-pip[data-status="idle"] {
+ background: hsl(var(--muted-foreground));
+}
+
+.sq-node-pip[data-status="executing"],
+.sq-node-pip[data-status="waiting"],
+.node-pip[data-status="executing"],
+.node-pip[data-status="waiting"] {
+ background: var(--node-color, hsl(var(--info)));
+ box-shadow: 0 0 6px color-mix(in srgb, var(--node-color, hsl(var(--info))) 60%, transparent);
+}
+
+.sq-node-pip[data-status="success"],
+.node-pip[data-status="success"] {
+ background: hsl(var(--success));
+}
+
+.sq-node-pip[data-status="error"],
+.node-pip[data-status="error"] {
+ background: hsl(var(--destructive));
+}
+
+/* Gear button defaults */
+.sq-node-gear,
+.node-gear {
+ background: hsl(var(--card));
+ border: 1px solid hsl(var(--border));
+ color: hsl(var(--muted-foreground));
+ transition: background-color 0.15s ease, border-color 0.15s ease;
+}
+
+.sq-node-gear:hover,
+.node-gear:hover {
+ background: hsl(var(--accent));
+ border-color: hsl(var(--accent-foreground) / 0.2);
+}
+
+/* Handle defaults */
+.sq-node-handle,
+.node-handle {
+ background: hsl(var(--background));
+ border: 2px solid hsl(var(--muted-foreground));
+ transition: background-color 0.15s ease, border-color 0.15s ease;
+}
+
+.sq-node-handle.out,
+.node-handle.out {
+ background: var(--node-color, hsl(var(--primary)));
+ border-color: var(--node-color, hsl(var(--primary)));
+}
+
+.sq-node-handle.in,
+.node-handle.in {
+ background: hsl(var(--background));
+ border-color: hsl(var(--muted-foreground));
+}
+
+/* Label defaults — picks up display typography from theme */
+.sq-node-label,
+.node-label {
+ font-family: var(--font-display, var(--font-body));
+ letter-spacing: var(--type-tracking-display, 0);
+ text-transform: var(--type-uppercase, none);
+ color: hsl(var(--foreground));
+}
diff --git a/client/src/themes/cyber.css b/client/src/themes/cyber.css
index b08830e1..8de1aa53 100644
--- a/client/src/themes/cyber.css
+++ b/client/src/themes/cyber.css
@@ -367,9 +367,13 @@
clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
transition: none;
}
-:root[data-theme="cyber"] .node-trigger { border-color: var(--neon-green); color: var(--neon-green); box-shadow: 0 0 0 1px var(--bg-app), 0 0 16px rgba(38, 217, 122, 0.5), inset 0 0 12px rgba(38, 217, 122, 0.1); }
+/* Wave 26.B topology: TriggerNode is now `.sq-node.node-trigger` (square),
+ AIAgentNode remains `.node.node-agent` (rectangular). The `.node-trigger`
+ rule fires on legacy rectangular trigger usage AND on the new
+ `.sq-node.node-trigger .sq-node-box` for the migrated TriggerNode. */
+:root[data-theme="cyber"] .node-trigger,
+:root[data-theme="cyber"] .sq-node.node-trigger .sq-node-box { border-color: var(--neon-green); color: var(--neon-green); box-shadow: 0 0 0 1px var(--bg-app), 0 0 16px rgba(38, 217, 122, 0.5), inset 0 0 12px rgba(38, 217, 122, 0.1); }
:root[data-theme="cyber"] .node-agent { border-color: var(--neon-magenta); color: var(--neon-magenta); box-shadow: 0 0 0 1px var(--bg-app), 0 0 16px rgba(245, 30, 182, 0.6), inset 0 0 12px rgba(245, 30, 182, 0.15); }
-:root[data-theme="cyber"] .node-output { border-color: var(--neon-yellow); color: var(--neon-yellow); box-shadow: 0 0 0 1px var(--bg-app), 0 0 16px rgba(255, 208, 40, 0.4), inset 0 0 12px rgba(255, 208, 40, 0.1); }
/* corner LED */
:root[data-theme="cyber"] .node::before {
diff --git a/docs-internal/theme_system.md b/docs-internal/theme_system.md
index 76da5c57..e09e2f14 100644
--- a/docs-internal/theme_system.md
+++ b/docs-internal/theme_system.md
@@ -217,6 +217,7 @@ Result by theme (display font / tracking / case):
## What's done vs deferred
### Done
+- **Canvas-node class topology alignment** (W26) — TriggerNode, StartNode, ToolkitNode migrated from `.node` (rectangular spec-card) topology to `.sq-node` / `.sq-node-box` (square-icon node) topology so per-theme decorations (Steampunk brass rivets, Edo hanko seal, Surveillance REC LED, Renaissance gold emblem) reach them. Status pips, gear buttons, and React Flow handles on every node component now carry `.sq-node-pip` / `.sq-node-gear` / `.sq-node-handle.in/.out` (square nodes) or `.node-pip` / `.node-gear` / `.node-handle.in/.out` (rectangular nodes — AIAgentNode, GenericNode, TeamMonitorNode). Pip background is data-driven via `data-status="idle | executing | waiting | success | error"` — base.css picks the colour from shadcn semantic tokens; per-theme files override. Inline JS-computed `backgroundColor` / `border` / `animation` on these elements stripped — CSS owns visuals. Cyber's `.node-trigger` rule extended to dual-target both rectangular and square topologies (`.sq-node.node-trigger .sq-node-box`). Orphan `.node-output` rule removed. EditableNodeLabel now emits both `sq-node-label` and `node-label` classNames so per-theme typography rules fire. StartNode reads `nodeColor` from `definition?.defaults?.color` instead of hardcoded `theme.dracula.cyan`.
- **Audio fix** (W20) — `--sound-pack: chime` typo in `light.css` + `dark.css` was silently falling through to `'none'` (`chime` not in the engine's pack registry), making sound silent for the most-used themes. Renamed `light` → `parchment`, `dark` → `terminal`. Added `Sounds.unlock()` exported from [lib/sound.ts](../client/src/lib/sound.ts) plus a one-shot `pointerdown / keydown / touchstart` capture-phase listener in `useSoundSync()` ([hooks/useSound.ts](../client/src/hooks/useSound.ts)) so the AudioContext resumes on the user's first gesture (Chrome / Safari autoplay policy compliance).
- **Canvas-node visual contract** (W21) — every node component (`AIAgentNode`, `SquareNode`, `GenericNode`, `TriggerNode`, `StartNode`, `ToolkitNode`, `TeamMonitorNode`) stripped its inline `background` / `border` / `borderRadius` / `boxShadow` / `animation` props. Each now exposes the per-definition accent hex via `style={{ '--node-color': accentColor }}` on its outer wrapper. Visual styling lives in [base.css](../client/src/themes/base.css) defaults + per-theme overrides; `var(--node-color)` carries the plugin's `visuals.json` accent through CSS without fighting specificity. New `NodeStyle` helper type in [client/src/types/NodeTypes.ts](../client/src/types/NodeTypes.ts) (`React.CSSProperties & Record<\`--${string}\`, string | number>`) makes the inline custom-prop typecheck-clean.
- **Per-theme icons** (W23) — [client/src/assets/icons/themedGlyphs.ts](../client/src/assets/icons/themedGlyphs.ts) ports all 290 SVG glyphs from `design_handoff_machinaos_themes/app/icons.js` (29 keys × 10 themes). [NodeIcon.tsx](../client/src/assets/icons/NodeIcon.tsx) consults `THEMED_GLYPHS[activeTheme][key]` first; falls through to `lucide-react` / `lobehub:` / `asset:` dispatch on miss. Renaissance gets heraldic shields, Cyber wireframe + glow, Plague woodcut hatching, etc. Light + dark themes have no entries — they fall through to existing dispatch.
@@ -318,6 +319,29 @@ The `selected` co-class (driven by React Flow's `selected` prop) and the `data-e
**Anti-pattern:** never set `background` / `border` / `borderRadius` / `boxShadow` inline on canvas-node components. Inline styles win specificity and block per-theme decorations from rendering.
+### Class topology (W26)
+
+Two visually distinct node families, each with its own class hooks. Pick the right one when adding a new canvas-node component:
+
+| Family | Outer class | Inner box | Pip | Gear | Handle | Label | Used by |
+|---|---|---|---|---|---|---|---|
+| Square-icon | `.sq-node` | `.sq-node-box` | `.sq-node-pip` | `.sq-node-gear` | `.sq-node-handle.in` / `.sq-node-handle.out` | `.sq-node-label` | SquareNode, TriggerNode, StartNode, ToolkitNode |
+| Rectangular | `.node` (+ optional `.node-agent` / `.node-trigger` co-class for type-specific theming) | (none — single-div card) | `.node-pip` | `.node-gear` | `.node-handle.in` / `.node-handle.out` | `.node-label` | AIAgentNode, GenericNode, TeamMonitorNode |
+
+Both families share the same status-pip data contract:
+
+```tsx
+<div className="sq-node-pip" data-status={pipStatus} /> // or className="node-pip"
+```
+
+`pipStatus` is a string from the bucket `'idle' | 'executing' | 'waiting' | 'success' | 'error'`. base.css colors the pip per-status using `hsl(var(--success))` / `hsl(var(--destructive))` / `var(--node-color)` etc. Per-theme files override for material-specific identity.
+
+Execution-state animation: `data-executing={isExecuting ? '' : undefined}` on the outer wrapper. base.css binds `.sq-node[data-executing] .sq-node-box` and `.react-flow__node.executing .node` to the `node-pulse` keyframe.
+
+Selection state: `selected` co-class on the outer wrapper, driven by React Flow's `selected` prop.
+
+Type-specific co-classes (Cyber-only today): `.node-agent` colors AIAgentNode neon magenta; `.sq-node.node-trigger .sq-node-box` colors TriggerNode neon green. Other themes ignore these co-classes — single colour by node type is fine when not differentiating.
+
## Sound system
Each theme declares `--sound-pack: "<pack>"` in its `:root[data-theme="..."]` block. Pack names map to event tables in [client/src/lib/sound.ts](../client/src/lib/sound.ts):