Self-improving AI Employees for everyone
Python ai-agentsai-employeeai-employeesassistantautonomous-agentsco-employeescompanygrok-botinstinctloop-agentsmuseown-your-datapersonalself-hosted
fix(client): size every icon from the design-system token, not Tailwind classes
trohitge7d8d1f21250
diff --git a/CLAUDE.md b/CLAUDE.mdindex 54f20344..4ed79d96 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -456,7 +456,7 @@ locked by `server/tests/test_output_contract.py`.5. **No opacity arithmetic at call sites.** `bg-primary/10`, `border-node-agent/30`, `${color}25` template literals are forbidden. If a unique tint is needed, add a new variant to the theme (e.g., `--node-X-soft`, `--node-X-border`) and use it by name.6. **No theme-locked names in non-decorative code.** Avoid `bg-dracula-purple`, `text-dracula-cyan`, etc. unless the constant accent is intentional (action-button palette). Prefer the role token (`bg-node-agent`) so future themes redefine without code edits.7. **No `useAppTheme()` in new files.** It is grandfathered for the canvas node components and `EdgeConditionEditor` only because they interpolate per-definition `nodeColor`. Every other surface uses Tailwind + the tokens above.-8. **Icons → `lucide-react`.** Inline SVGs are reserved for non-iconographic graphics (charts, decorative shapes). Replace any `<svg>...</svg>` icon you encounter while editing.+8. **Icons → `lucide-react`.** Inline SVGs are reserved for non-iconographic graphics (charts, decorative shapes). Replace any `<svg>...</svg>` icon you encounter while editing. **Icon size is a token, never a class**: backend-declared node/provider icons render through `<NodeIcon size={...}>` with `theme.nodeSize.squareIcon` on canvas nodes (32px, the one node-icon size) or a `theme.iconSize.*` step elsewhere, and `NodeIcon` applies that token as width, height AND emoji font size so every icon kind draws at the same edge. Never pass `h-*` / `w-*` / `text-*` sizing to it — the theme type scale maps `text-3xl` to 44px, which is how emoji nodes once painted half again larger than SVG-backed nodes beside them.9. **Any `draggable` element that performs a function must ship a pointer-operable, non-drag control reaching the same end state through the same write path.** WCAG 2.2 SC 2.5.7 (Level AA); the sufficient technique is [G219](https://www.w3.org/WAI/WCAG22/Techniques/general/G219), the failure is [F108](https://www.w3.org/WAI/WCAG22/Techniques/failures/F108). Two traps worth stating: **keyboard support does not discharge it** — the Understanding doc is explicit that an equivalent counts only "*unless that equivalent keyboard operation also provides controls that can be clicked or tapped with a pointer*", because touchscreen users may have no keyboard. And the alternative must operate *the same function*, so extract the write into a shared helper rather than reimplementing it — see [`lib/workspaceFileAssign.ts`](./client/src/lib/workspaceFileAssign.ts), which both `ParameterRenderer.handleDrop` and `WorkspaceFilePickerDialog` call, with a test asserting the two paths produce deep-equal results.When in doubt, read [docs-internal/frontend_architecture.md](./docs-internal/frontend_architecture.md) before introducing new patterns.diff --git a/client/src/ParameterPanel.tsx b/client/src/ParameterPanel.tsxindex 370cc867..c5d426de 100644--- a/client/src/ParameterPanel.tsx+++ b/client/src/ParameterPanel.tsx@@ -7,6 +7,7 @@ import { useWebSocket } from './contexts/WebSocketContext';import { ExecutionService, ExecutionResult } from './services/executionService';import { ActionButton } from './components/ui/action-button';import { NodeIcon } from './assets/icons';+import { theme } from './styles/theme';import { nodeExecutionReducer } from './utils/parameterPanelExecutionState';import { deriveCanvasLock } from './lib/canvasLock';@@ -161,7 +162,7 @@ const ParameterPanel: React.FC = () => {<div className="flex items-center gap-2 font-display text-[15px] font-semibold tracking-[var(--type-tracking-display)] text-fg-default [text-transform:var(--type-uppercase)]"><NodeIconicon={nodeDefinition.icon}- className="h-5 w-5 text-xl"+ size={theme.iconSize.md}/><span>{nodeDefinition.displayName}</span>{hasUnsavedChanges && <span className="text-warning">*</span>}diff --git a/client/src/assets/icons/NodeIcon.tsx b/client/src/assets/icons/NodeIcon.tsxindex df9e2efc..23e46600 100644--- a/client/src/assets/icons/NodeIcon.tsx+++ b/client/src/assets/icons/NodeIcon.tsx@@ -3,9 +3,14 @@** Resolves any backend-declared icon string (`lobehub:Claude`,* `asset:gmail`, `lucide:Battery`, emoji, URL, data URI) and renders- * it inside a wrapper sized by Tailwind classes. The lucide / image- * branches stretch to fill the wrapper; the emoji/text branch- * inherits the wrapper's font size.+ * it inside a square whose edge is a design-system token (`size`):+ * `theme.nodeSize.squareIcon` on canvas nodes, `theme.iconSize.*`+ * everywhere else (`client/src/styles/theme.ts`). The token sets the+ * box's width, height AND font size, so the lucide / image branches+ * fill the square and the emoji/text branch is drawn at the same+ * edge. Callers never pass Tailwind sizing (`h-7`, `text-3xl`) — the+ * theme type scale maps `text-3xl` to 44px, which is how emoji nodes+ * once painted half again larger than every SVG-backed node.** The wrapper does NOT apply a parent color to the resolved icon.* Each icon source carries its own color contract:@@ -34,8 +39,11 @@ export interface NodeIconProps {/** Backend-declared icon string. May be undefined while the spec* cache hydrates — the component renders the fallback in that case. */icon: string | undefined | null;- /** Wrapper class. Use Tailwind sizing tokens for the box (`h-6 w-6`)- * and a `text-X` class to size the emoji/text branch. */+ /** Box edge as a design-system token (`theme.nodeSize.squareIcon`,+ * `theme.iconSize.md`, ...). Drives width, height and the emoji+ * font size together. */+ size: string;+ /** Layout-only extras (`shrink-0`). Never sizing or `text-*`. */className?: string;/** Element rendered when the icon ref does not resolve. */fallback?: React.ReactNode;@@ -43,10 +51,14 @@ export interface NodeIconProps {export const NodeIcon: React.FC<NodeIconProps> = ({icon,+ size,className,fallback = null,}) => {const { theme } = useTheme();+ // One token, three dimensions: the square's edge and the emoji font+ // size are the same length, so no icon kind can outgrow another.+ const box: React.CSSProperties = { width: size, height: size, fontSize: size };let inner: React.ReactNode;// 1. Per-theme glyph override. Activates only when the icon prop is one@@ -69,6 +81,7 @@ export const NodeIcon: React.FC<NodeIconProps> = ({return (<spanclassName={cn('inline-flex items-center justify-center', className)}+ style={box}dangerouslySetInnerHTML={{ __html: themedSvg }}/>);@@ -90,13 +103,12 @@ export const NodeIcon: React.FC<NodeIconProps> = ({} else if (isImageIcon(resolved)) {inner = <img src={resolved} alt="" className="h-full w-full object-contain" />;} else {- // Emoji / short text — inherits font-size from the wrapper's- // `text-X` class.+ // Emoji / short text — inherits the token font size from the box.inner = <span className="leading-none">{resolved}</span>;}}return (- <span className={cn('inline-flex items-center justify-center', className)}>+ <span className={cn('inline-flex items-center justify-center', className)} style={box}>{inner}</span>);diff --git a/client/src/components/AIAgentNode.tsx b/client/src/components/AIAgentNode.tsxindex aea0b268..0d251c01 100644--- a/client/src/components/AIAgentNode.tsx+++ b/client/src/components/AIAgentNode.tsx@@ -234,9 +234,9 @@ const AIAgentNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta>⚙️</button>{/* Icon — `color` on the wrapper feeds currentColor to lucide;- NodeIcon stretches to fill via `h-7 w-7 text-3xl`. */}+ the box edge is the shared node-icon token. */}<div style={{ marginBottom: theme.spacing.xs, color: accentColor }}>- <NodeIcon icon={spec?.icon} className="h-7 w-7 text-3xl" />+ <NodeIcon icon={spec?.icon} size={theme.nodeSize.squareIcon} /></div>{/* Title — alignSelf:stretch + width:100% forces the flex childdiff --git a/client/src/components/SquareNode.tsx b/client/src/components/SquareNode.tsxindex fc6a990c..1f3a5955 100644--- a/client/src/components/SquareNode.tsx+++ b/client/src/components/SquareNode.tsx@@ -362,7 +362,7 @@ const SquareNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnectab{/* Service Icon */}- <NodeIcon icon={iconRef} className="h-7 w-7 text-3xl" />+ <NodeIcon icon={iconRef} size={theme.nodeSize.squareIcon} />{/* Parameters Button — visual styles (background, border, hover)owned by `.sq-node-gear` in base.css + per-theme overrides.diff --git a/client/src/components/StartNode.tsx b/client/src/components/StartNode.tsxindex b96f7b99..ad6951cc 100644--- a/client/src/components/StartNode.tsx+++ b/client/src/components/StartNode.tsx@@ -61,18 +61,21 @@ const StartNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnectablclassName="sq-node-box"style={{position: 'relative',- width: '60px',- height: '60px',+ width: theme.nodeSize.square,+ height: theme.nodeSize.square,display: 'flex',alignItems: 'center',justifyContent: 'center',color: theme.colors.text,- fontSize: '28px',+ fontSize: theme.nodeSize.squareIcon,fontWeight: '600',}}>- {/* Play Icon (color reads from definition-driven nodeColor) */}- <PlayCircle className="h-7 w-7" style={{ color: nodeColor }} />+ {/* Play Icon (color reads from definition-driven nodeColor);+ same node-icon token as every other canvas node */}+ <PlayCircle+ style={{ color: nodeColor, width: theme.nodeSize.squareIcon, height: theme.nodeSize.squareIcon }}+ />{/* Parameters Button — CSS owns bg/border via .sq-node-gear */}<buttondiff --git a/client/src/components/ToolkitNode.tsx b/client/src/components/ToolkitNode.tsxindex 13065941..f0295f8b 100644--- a/client/src/components/ToolkitNode.tsx+++ b/client/src/components/ToolkitNode.tsx@@ -110,7 +110,7 @@ const ToolkitNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta}}>{/* Service Icon */}- <NodeIcon icon={iconRef} className="h-7 w-7 text-3xl" />+ <NodeIcon icon={iconRef} size={theme.nodeSize.squareIcon} />{/* Parameters Button — CSS owns bg/border via .sq-node-gear */}<buttondiff --git a/client/src/components/TriggerNode.tsx b/client/src/components/TriggerNode.tsxindex 948e8da2..1505d3a6 100644--- a/client/src/components/TriggerNode.tsx+++ b/client/src/components/TriggerNode.tsx@@ -195,7 +195,7 @@ const TriggerNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta)}{/* Trigger Icon */}- <NodeIcon icon={iconRef} className="h-7 w-7 text-3xl" />+ <NodeIcon icon={iconRef} size={theme.nodeSize.squareIcon} />{/* Parameters Button */}<buttondiff --git a/client/src/components/credentials/CredentialsPalette.tsx b/client/src/components/credentials/CredentialsPalette.tsxindex 498d2cb9..0e05915c 100644--- a/client/src/components/credentials/CredentialsPalette.tsx+++ b/client/src/components/credentials/CredentialsPalette.tsx@@ -39,6 +39,7 @@ import { Search, X } from 'lucide-react';import { Input } from '@/components/ui/input';import { cn } from '@/lib/utils';import { NodeIcon } from '../../assets/icons';+import { theme } from '../../styles/theme';import { useWebSocket } from '../../contexts/WebSocketContext';import type { ProviderConfig, CategoryGroup } from './types';@@ -231,7 +232,8 @@ const ProviderRow = memo<RowProps>(function ProviderRow({ provider, selected, on><NodeIconicon={provider.iconRef}- className="h-3.5 w-3.5 shrink-0 text-sm"+ size={theme.iconSize.xs}+ className="shrink-0"/><span className="flex-1 truncate">{provider.name}</span><ProviderStatusDot providerId={provider.id} stored={!!provider.stored} />diff --git a/client/src/components/credentials/panels/ApiKeyPanel.tsx b/client/src/components/credentials/panels/ApiKeyPanel.tsxindex 06045032..feb7ad68 100644--- a/client/src/components/credentials/panels/ApiKeyPanel.tsx+++ b/client/src/components/credentials/panels/ApiKeyPanel.tsx@@ -16,6 +16,7 @@ import ApiKeyInput from '../../ui/ApiKeyInput';import { useCredentialPanel } from '../useCredentialPanel';import { ProviderDefaultsSection, LlmUsageSection, ApiUsageSection } from '../sections';import { NodeIcon } from '../../../assets/icons';+import { theme } from '../../../styles/theme';import type { ProviderConfig } from '../types';const ApiKeyPanel: React.FC<{ config: ProviderConfig; visible: boolean }> = ({ config, visible }) => {@@ -51,7 +52,7 @@ const ApiKeyPanel: React.FC<{ config: ProviderConfig; visible: boolean }> = ({ c><NodeIconicon={config.iconRef}- className="h-12 w-12 text-2xl"+ size={theme.iconSize.xl}/></div>{/* AQ.-prefixed keys route to the Vertex backend — show thediff --git a/client/src/components/credentials/panels/EmailPanel.tsx b/client/src/components/credentials/panels/EmailPanel.tsxindex a1a35407..42f0f6cf 100644--- a/client/src/components/credentials/panels/EmailPanel.tsx+++ b/client/src/components/credentials/panels/EmailPanel.tsx@@ -40,6 +40,7 @@ import {} from '@/components/ui/select';import { useApiKeys } from '../../../hooks/useApiKeys';import { NodeIcon } from '../../../assets/icons';+import { theme } from '../../../styles/theme';import { StatusCard } from '../primitives';import {AUTH_NOTES,@@ -207,7 +208,7 @@ const EmailPanel: React.FC<{ config: ProviderConfig; visible: boolean }> = ({ coreturn (<div className="flex min-h-0 flex-1 flex-col gap-4 p-5"><StatusCard- icon={<NodeIcon icon={config.iconRef} className="h-6 w-6 text-2xl" />}+ icon={<NodeIcon icon={config.iconRef} size={theme.iconSize.md} />}title={config.name}status={{ stored, address }}rows={[diff --git a/client/src/components/credentials/panels/OAuthPanel.tsx b/client/src/components/credentials/panels/OAuthPanel.tsxindex d53fb977..f2d64533 100644--- a/client/src/components/credentials/panels/OAuthPanel.tsx+++ b/client/src/components/credentials/panels/OAuthPanel.tsx@@ -9,6 +9,7 @@ import { useProviderStatus } from '../hooks';import { OAuthConnect } from '../primitives';import { ApiUsageSection } from '../sections';import { NodeIcon } from '../../../assets/icons';+import { theme } from '../../../styles/theme';import type { ProviderConfig } from '../types';const OAuthPanel: React.FC<{ config: ProviderConfig; visible: boolean }> = ({ config, visible }) => {@@ -26,7 +27,7 @@ const OAuthPanel: React.FC<{ config: ProviderConfig; visible: boolean }> = ({ coconfig={config} form={panel.form} connected={connected}stored={panel.stored} loading={panel.loading} error={panel.error}verificationCode={panel.verificationCode}- icon={<NodeIcon icon={config.iconRef} className="h-6 w-6 text-2xl" />}+ icon={<NodeIcon icon={config.iconRef} size={theme.iconSize.md} />}onSaveCredentials={() => {const missing = config.fields?.find(f => f.required && !panel.form.getFieldValue(f.key)?.trim());if (missing) { panel.setError(`${missing.label} is required`); return; }diff --git a/client/src/components/credentials/panels/QrPairingPanel.tsx b/client/src/components/credentials/panels/QrPairingPanel.tsxindex 2adc0188..3620edf3 100644--- a/client/src/components/credentials/panels/QrPairingPanel.tsx+++ b/client/src/components/credentials/panels/QrPairingPanel.tsx@@ -15,6 +15,7 @@ import { useProviderStatus } from '../hooks';import { StatusCard, ActionBar } from '../primitives';import { RateLimitSection } from '../sections';import { NodeIcon } from '../../../assets/icons';+import { theme } from '../../../styles/theme';import type { ActionDef } from '../primitives/ActionBar';import type { ProviderConfig } from '../types';@@ -63,7 +64,7 @@ const QrPairingPanel: React.FC<{ config: ProviderConfig; visible: boolean }> = (/>}{config.statusRows && (<StatusCard- icon={<NodeIcon icon={config.iconRef} className="h-6 w-6 text-2xl" />}+ icon={<NodeIcon icon={config.iconRef} size={theme.iconSize.md} />}title={config.name}rows={config.statusRows}status={status}diff --git a/client/src/components/onboarding/steps/ConnectAIStep.tsx b/client/src/components/onboarding/steps/ConnectAIStep.tsxindex 4b8f6d47..373a1334 100644--- a/client/src/components/onboarding/steps/ConnectAIStep.tsx+++ b/client/src/components/onboarding/steps/ConnectAIStep.tsx@@ -6,6 +6,7 @@ import { Alert, AlertDescription } from '@/components/ui/alert';import { Badge } from '@/components/ui/badge';import { Skeleton } from '@/components/ui/skeleton';import { NodeIcon } from '../../../assets/icons';+import { theme } from '../../../styles/theme';import { useCatalogueQuery, type ServerProviderConfig } from '../../../hooks/useCatalogueQuery';import { FEATURED_AI_PROVIDERS } from '../aiProviderLinks';@@ -69,7 +70,7 @@ const ConnectAIStep: React.FC<ConnectAIStepProps> = ({ onOpenCredentials }) => {key={id}className="flex flex-col items-center gap-1 rounded-md border border-border bg-muted/50 px-3 py-3 text-center">- <NodeIcon icon={provider.icon_ref} className="h-6 w-6 shrink-0 text-lg" />+ <NodeIcon icon={provider.icon_ref} size={theme.iconSize.md} className="shrink-0" /><span className="text-sm font-semibold">{provider.name}</span><span className="text-xs text-muted-foreground">{hint}</span>{provider.stored ? (@@ -99,7 +100,7 @@ const ConnectAIStep: React.FC<ConnectAIStepProps> = ({ onOpenCredentials }) => {key={p.id}className="inline-flex items-center gap-1 rounded-full border border-border bg-muted/50 px-2 py-0.5 text-xs">- <NodeIcon icon={p.icon_ref} className="h-3.5 w-3.5 shrink-0 text-sm" />+ <NodeIcon icon={p.icon_ref} size={theme.iconSize.xs} className="shrink-0" />{p.name}{p.stored && <Check className="h-3 w-3 text-success" />}</span>diff --git a/client/src/components/parameterPanel/InputSection.tsx b/client/src/components/parameterPanel/InputSection.tsxindex 56d423a2..e932baab 100644--- a/client/src/components/parameterPanel/InputSection.tsx+++ b/client/src/components/parameterPanel/InputSection.tsx@@ -18,6 +18,7 @@ import { cn } from '@/lib/utils';import { queryClient } from '../../lib/queryClient';import { getCachedNodeSpec } from '../../lib/nodeSpec';import { NodeIcon } from '../../assets/icons';+import { theme } from '../../styles/theme';import { resolveNodeDescription } from '../../lib/nodeSpec';// ---------------------------------------------------------------------------@@ -629,7 +630,7 @@ const InputSection: React.FC<InputSectionProps> = ({ nodeId, visible = true }) =className="flex cursor-pointer items-center justify-between bg-muted px-3 py-2 transition-colors hover:bg-card"><div className="flex items-center gap-2">- <NodeIcon icon={node.icon} className="h-5 w-5 text-lg" />+ <NodeIcon icon={node.icon} size={theme.iconSize.md} /><span className="font-display text-sm font-semibold text-fg-default">{node.name}</span></div><div className="flex items-center gap-2">diff --git a/client/src/components/parameterPanel/MasterSkillEditor.tsx b/client/src/components/parameterPanel/MasterSkillEditor.tsxindex 8887bc99..7c61cbd5 100644--- a/client/src/components/parameterPanel/MasterSkillEditor.tsx+++ b/client/src/components/parameterPanel/MasterSkillEditor.tsx@@ -48,6 +48,7 @@ import { toast } from 'sonner';import { useQuery, useQueryClient } from '@tanstack/react-query';import { useNodeStatus, useWebSocket } from '../../contexts/WebSocketContext';import { NodeIcon } from '../../assets/icons';+import { theme } from '../../styles/theme';import { cn } from '@/lib/utils';import { useFolderSkills } from '../../hooks/useFolderSkills';import { useNodeAllowlist } from '../../hooks/useNodeAllowlist';@@ -724,7 +725,7 @@ const MasterSkillEditor: React.FC<MasterSkillEditorProps> = ({}}onClick={(e) => e.stopPropagation()}/>- <NodeIcon icon={skill.icon} className="h-4 w-4 text-base" />+ <NodeIcon icon={skill.icon} size={theme.iconSize.sm} /><spanclassName={cn('flex-1 overflow-hidden text-sm whitespace-nowrap text-ellipsis',@@ -793,7 +794,7 @@ const MasterSkillEditor: React.FC<MasterSkillEditorProps> = ({style={{ color: pendingSkillData.color }}>{pendingSkillData.icon- ? <NodeIcon icon={pendingSkillData.icon} className="h-5 w-5 text-xl" />+ ? <NodeIcon icon={pendingSkillData.icon} size={theme.iconSize.md} />: <Plus className="h-5 w-5" />}</div><div className="flex-1">@@ -895,7 +896,7 @@ const MasterSkillEditor: React.FC<MasterSkillEditorProps> = ({<>{/* Skill Header */}<div className="flex items-center gap-3 border-b border-border-default bg-bg-panel p-3">- <NodeIcon icon={selectedSkillInfo.icon} className="h-6 w-6 text-2xl" />+ <NodeIcon icon={selectedSkillInfo.icon} size={theme.iconSize.md} /><div className="flex-1">{isEditingUserSkill ? (<Inputdiff --git a/client/src/components/parameterPanel/MiddleSection.tsx b/client/src/components/parameterPanel/MiddleSection.tsxindex f024228d..7e5afbf6 100644--- a/client/src/components/parameterPanel/MiddleSection.tsx+++ b/client/src/components/parameterPanel/MiddleSection.tsx@@ -45,6 +45,7 @@ import { folderSkillsQueryKey, type AvailableSkill } from '../../hooks/useFolderimport { queryKeys, STALE_TIME } from '../../lib/queryConfig';import { INodeTypeDescription, INodeProperties } from '../../types/INodeProperties';import { NodeIcon } from '../../assets/icons';+import { theme } from '../../styles/theme';import { ExecutionResult } from '../../services/executionService';import { Edge } from 'reactflow';import { shouldShowParameter } from '../../utils/parameterVisibility';@@ -926,7 +927,7 @@ const MiddleSection: React.FC<MiddleSectionProps> = ({><NodeIconicon={skill.icon}- className="h-5 w-5 text-lg"+ size={theme.iconSize.md}/></div><div className="min-w-0 flex-1 overflow-hidden">diff --git a/client/src/components/ui/ComponentItem.tsx b/client/src/components/ui/ComponentItem.tsxindex cf280cf0..3071a639 100644--- a/client/src/components/ui/ComponentItem.tsx+++ b/client/src/components/ui/ComponentItem.tsx@@ -4,6 +4,7 @@ import { cn } from '@/lib/utils';import { Card } from '@/components/ui/card';import { INodeTypeDescription } from '../../types/INodeProperties';import { NodeIcon } from '../../assets/icons';+import { theme } from '../../styles/theme';import { useNodeSpec } from '../../lib/nodeSpec';interface ComponentItemProps {@@ -46,7 +47,7 @@ const ComponentItem: React.FC<ComponentItemProps> = ({ definition: localDefiniti<div className="flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-bg-elevated ring-1 ring-border-default/40"><NodeIconicon={iconRaw}- className="h-5 w-5 text-lg"+ size={theme.iconSize.md}fallback={<span>📦</span>}/></div>diff --git a/client/src/components/ui/ComponentPalette.tsx b/client/src/components/ui/ComponentPalette.tsxindex 7d5b9f6b..b2a59ad1 100644--- a/client/src/components/ui/ComponentPalette.tsx+++ b/client/src/components/ui/ComponentPalette.tsx@@ -9,6 +9,7 @@ import { Input } from '@/components/ui/input';import { Skeleton } from '@/components/ui/skeleton';import { Search } from 'lucide-react';import { NodeIcon } from '../../assets/icons';+import { theme } from '../../styles/theme';import { useNodeGroups, listCachedNodeSpecs, NodeGroupEntry } from '../../lib/nodeSpec';import { nodeSpecToDescription } from '../../adapters/nodeSpecToDescription';@@ -177,7 +178,7 @@ const ComponentPalette: React.FC<ComponentPaletteProps> = ({><NodeIconicon={config.icon}- className="h-4 w-4 text-base"+ size={theme.iconSize.sm}fallback={<span>📦</span>}/></span>diff --git a/client/src/styles/theme.ts b/client/src/styles/theme.tsindex 22d29906..8937c6ef 100644--- a/client/src/styles/theme.ts+++ b/client/src/styles/theme.ts@@ -258,7 +258,10 @@ export const theme = {// Node sizes (fixed per industry standard)nodeSize: {square: '64px', // SquareNode (design-system spec: 64px box)- squareIcon: '28px', // Icon inside square node (≈ 0.44 × box)+ squareIcon: '32px', // Icon inside square node (0.5 × box). The ONE+ // node-icon size: every canvas node passes it to+ // <NodeIcon size=>, which applies it as width,+ // height and emoji font size together.handle: '8px', // Connection handlesstatusIndicator: '10px', // Status dotparamButton: '16px', // Parameters gear buttondiff --git a/docs-internal/design-system/HANDOFF.md b/docs-internal/design-system/HANDOFF.mdindex ce505691..28ffa86d 100644--- a/docs-internal/design-system/HANDOFF.md+++ b/docs-internal/design-system/HANDOFF.md@@ -270,7 +270,7 @@ The skins that use `uppercase` + wide tracking (Cyber at `.18em`, Greek at `.18e- **Pin your toolbar clusters.** The wordmark, workflow-name chip, mode toggle and action cluster all need `flex: none`; leave exactly one group (File/Edit/View) shrinkable. Without this the mode toggle collapses to a sliver in Cyber and Atomic.- **Test the widest theme, not the default.** Anything that fits in Light will overflow somewhere. Cyber and Greek are the stress cases.-Also: icons are **28px** (`h-7 w-7`) everywhere. Eight themes ship their own glyph set; Light, Dark, Plague and Surveillance fall through to lucide.+Also: canvas node icons are **32px** everywhere, and the size is a token, not a class — `theme.nodeSize.squareIcon` in `client/src/styles/theme.ts` (0.5 x the 64px `nodeSize.square` box), passed to `NodeIcon` as `size=`; non-canvas surfaces use the `theme.iconSize.*` scale the same way. `NodeIcon` applies that one token as the box's width, height AND font size, so SVG, library and emoji icons all draw at the same edge. Never size an icon with Tailwind `h-*`/`text-*` classes: the theme type scale maps `text-3xl` to 44px, which is how emoji nodes once painted half again larger than every SVG-backed node beside them. Eight themes ship their own glyph set; Light, Dark, Plague and Surveillance fall through to lucide.---diff --git a/docs-internal/design-system/components/canvas/SquareNode.jsx b/docs-internal/design-system/components/canvas/SquareNode.jsxindex 8a6dc693..dec5d323 100644--- a/docs-internal/design-system/components/canvas/SquareNode.jsx+++ b/docs-internal/design-system/components/canvas/SquareNode.jsx@@ -91,7 +91,7 @@ export function SquareNode({display: 'flex',alignItems: 'center',justifyContent: 'center',- fontSize: Math.round(size * 0.44),+ fontSize: Math.round(size * 0.5), // = theme.nodeSize.squareIcon (32px at the 64px box)color: 'var(--fg-default)',}}>diff --git a/docs-internal/design-system/readme.md b/docs-internal/design-system/readme.mdindex 22633f82..6e7bc4cd 100644--- a/docs-internal/design-system/readme.md+++ b/docs-internal/design-system/readme.md@@ -48,7 +48,7 @@ The app ships 12 visual themes (light, dark, Renaissance, Cyber, Edo, Steampunk## ICONOGRAPHY- **Lucide is the system icon set** (`lucide-react` in app; pinned CDN UMD in this kit). 1.5px–2px stroke, no fill, sized 12–20px, colored via `currentColor`. Common verbs: Play/Square (run/stop), Save, Settings, KeyRound (credentials), FolderOpen, FilePlus, Search, GripVertical (drag), PanelLeft/RightClose, ChevronDown, Zap (dev mode), Clock (normal mode).-- **Provider/brand logos** come from `@lobehub/icons` (OpenAI, Claude, Gemini, Groq, Ollama…) — colored brand marks, used at 16–28px on nodes and credential rows. In prototypes substitute colored dots or the service's official mark.+- **Provider/brand logos** come from `@lobehub/icons` (OpenAI, Claude, Gemini, Groq, Ollama…) — colored brand marks, used at 12–32px on nodes and credential rows (always via the `theme.nodeSize.squareIcon` / `theme.iconSize.*` tokens, never ad-hoc pixel classes). In prototypes substitute colored dots or the service's official mark.- **Node/service icons in production are backend-declared** (`asset:<key>` SVGs, `lucide:<Name>`, or plain emoji strings). Many shipped nodes use full-color emoji-style glyphs (🧠 memory, 🤖 agent robot, ⚙️ gear) — see `assets/product-canvas-screenshot.png`. The ⚙️ gear emoji is literally the node's settings button.- **Fallback icon is 📦.** Status communicated by 6–10px colored dot "pips", not icons.- **No icon font; no custom-drawn icon set.** Use Lucide via the `Icon` component (`components/icons/`), which renders from the lucide CDN bundle.diff --git a/docs-internal/frontend_architecture.md b/docs-internal/frontend_architecture.mdindex c3d2a461..f6f63bea 100644--- a/docs-internal/frontend_architecture.md+++ b/docs-internal/frontend_architecture.md@@ -28,7 +28,7 @@ Post-migration (2026-04-14). Single source of truth for the current frontend.| Styling | Tailwind v4 + `@tailwindcss/vite` | [index.css](../client/src/index.css) + [tailwind.config.js](../client/tailwind.config.js) || Component library | shadcn/ui (CLI `npx shadcn@latest add`) | [components/ui/](../client/src/components/ui/) || Primitives | Radix UI | Pulled as transitive deps by shadcn |-| Icons | `lucide-react` | Everywhere. No more `@ant-design/icons`. |+| Icons | `lucide-react` | Everywhere. No more `@ant-design/icons`. Backend-declared node / provider icons go through `<NodeIcon size={token}>` — `theme.nodeSize.squareIcon` on canvas nodes, `theme.iconSize.*` elsewhere; the token is applied as width, height and emoji font size, so never size an icon with `h-*` / `text-*` classes. || Typography | `@tailwindcss/typography` (`prose`) | Activated via `@plugin` in index.css || Markdown | `react-markdown` + `remark-gfm` + `remark-breaks` | Output panel, memory display, skill instructions || Code highlighting | `prismjs` | Code editor |diff --git a/docs-internal/theme_system.md b/docs-internal/theme_system.mdindex a9a933c5..99d365a8 100644--- a/docs-internal/theme_system.md+++ b/docs-internal/theme_system.md@@ -233,6 +233,7 @@ the surrounding chrome. Every other surface uses Tailwind + tokens. New themes c- **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, TeamMonitorNode; the former `GenericNode` was retired with the spec-driven canvas). 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`, `TriggerNode`, `StartNode`, `ToolkitNode`, `TeamMonitorNode`; `GenericNode` at the time, since retired) 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.+- **Icon size is a token** — `NodeIcon` takes `size=` (`theme.nodeSize.squareIcon`, 32px, on every canvas node; a `theme.iconSize.*` step elsewhere) and applies it as width, height and emoji font size together. Sizing classes are never passed: `--text-3xl` is 44px in `base.css`, so a `text-3xl` emoji once dwarfed every SVG-backed node next to it.- **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.- **Canvas grid + cursors** (W24) — `--canvas-grid` and `--cursor-default` slots declared in [base.css](../client/src/themes/base.css) and bound to `.canvas-host`. Per-theme grids: Cyber 24px magenta+cyan grid, Surveillance CCTV crosshair + REC overlay, Renaissance fleur-de-lis cartography, Greek key meander, Steampunk brass bolt grid, Atomic mid-century starburst, Wasteland cracked-earth fissures, Rot flagstone, Plague broadsheet red-X. Custom cursors: Cyber crosshair reticle, Surveillance snooper reticle, Renaissance gold-leaf quill.- **Decorative HTML primitives** (W25) — [client/src/components/SvgFilterDefs.tsx](../client/src/components/SvgFilterDefs.tsx) mounts a hidden inline `<svg><defs>` at app root exposing `#ink-blot` (Renaissance edge warble), `#noise` (Wasteland turbulence), `#crt` (Cyber chromatic aberration) so per-theme `filter: url(#...)` rules resolve. The `DropCap.tsx` wrapper (`v-display drop-cap`) planned alongside it was never retained: no `DropCap` component, `drop-cap` class or `::first-letter` rule exists in the tree today. What survives is the bare `.v-display` display-typography co-class, which ten of the per-theme files style (`cyber.css` glitch-on-hover, `edo.css`, `greek.css`, ...).diff --git a/server/nodes/scraper/tikhub.svg b/server/nodes/scraper/tikhub.svgindex 6140e456..f2467909 100644--- a/server/nodes/scraper/tikhub.svg+++ b/server/nodes/scraper/tikhub.svg@@ -1,5 +1,5 @@-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">- <rect x="2" y="2" width="20" height="20" rx="5" fill="#ff79c6"/>- <path d="M6.5 7h9v2.4h-3.2V17h-2.6V9.4H6.5z" fill="#ffffff"/>- <path d="M15.2 11.2l4.3 2.6-4.3 2.6z" fill="#ffffff"/>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none">+ <rect width="32" height="32" rx="7" fill="#ff79c6"/>+ <path d="M5 6h17v5h-6v15h-5V11H5z" fill="#ffffff"/>+ <path d="M19.5 14.5l8 4.75-8 4.75z" fill="#ffffff"/></svg>diff --git a/server/nodes/scraper/tikhub_action/icon.svg b/server/nodes/scraper/tikhub_action/icon.svgindex 6140e456..f2467909 100644--- a/server/nodes/scraper/tikhub_action/icon.svg+++ b/server/nodes/scraper/tikhub_action/icon.svg@@ -1,5 +1,5 @@-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">- <rect x="2" y="2" width="20" height="20" rx="5" fill="#ff79c6"/>- <path d="M6.5 7h9v2.4h-3.2V17h-2.6V9.4H6.5z" fill="#ffffff"/>- <path d="M15.2 11.2l4.3 2.6-4.3 2.6z" fill="#ffffff"/>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none">+ <rect width="32" height="32" rx="7" fill="#ff79c6"/>+ <path d="M5 6h17v5h-6v15h-5V11H5z" fill="#ffffff"/>+ <path d="M19.5 14.5l8 4.75-8 4.75z" fill="#ffffff"/></svg>