Skip to content

Self-improving AI Employees for everyone

docs(frontend): describe canvas colours, radii and fonts as shipped

trohitg55d7c3e8fd8d
diff --git a/client/src/index.css b/client/src/index.css
index 305d4b10..be8ab869 100644
--- a/client/src/index.css
+++ b/client/src/index.css
@@ -168,7 +168,7 @@
/* ── New-contract tokens (design_handoff_machinaos_themes) ──────────
* Surface / foreground / semantic / typography / radius tokens
* exposed as Tailwind utilities. Defined per-theme in client/src/
- * themes/{light,dark,renaissance,cyber}.css — themes redefine the
+ * themes/<theme>.css (one file per theme) — themes redefine the
* `--bg-app`, `--fg-default`, etc. CSS variables under
* `:root[data-theme="..."]`; these `@theme inline` aliases give
* Tailwind classes that resolve against whichever theme is active.
diff --git a/client/src/lib/nodeSpec.ts b/client/src/lib/nodeSpec.ts
index 60f9c15b..a2346e9c 100644
--- a/client/src/lib/nodeSpec.ts
+++ b/client/src/lib/nodeSpec.ts
@@ -333,12 +333,12 @@ export function resolveNodeDescription(
});
// Wave 10.B: backend NodeSpec is the sole source for top-level
- // visual metadata (icon, subtitle, description, color). Local
- // nodeDefinitions/*.ts entries carry no icons anymore, so we just
- // pass the backend values through and only preserve local
- // `defaults.color` when the backend doesn't declare one — color is
- // the last remaining UX field that a few specialised agent configs
- // still set locally.
+ // visual metadata (icon, subtitle, description). The plugin colour is
+ // NodeSpec `color`, which `nodeSpecToDescription` does not copy into
+ // `defaults` (it sets only `defaults.name`), so `defaults.color` here
+ // can only come from a local fallback — and no caller passes one today.
+ // Canvas nodes that read `defaults.color` therefore fall back to their
+ // role token; AIAgentNode reads `useNodeSpec(type).color` directly.
return {
...backend,
defaults: {
diff --git a/client/src/themes/base.css b/client/src/themes/base.css
index 138c97bc..0266ea23 100644
--- a/client/src/themes/base.css
+++ b/client/src/themes/base.css
@@ -231,7 +231,7 @@
--canvas-grid-opacity: 0.4;
/* Node execution pulse colour (Wave 30). Independent of `--node-color`
- * (the plugin accent) so the executing-node glow stays high-contrast
+ * (the node's accent) so the executing-node glow stays high-contrast
* against the canvas background regardless of which plugin is running.
* Each theme overrides this to its most visible accent (Cyber neon
* cyan, Renaissance gold, Surveillance REC red, etc.). The default
@@ -342,8 +342,12 @@ html[data-page-hidden] *::after {
/* ============================================================================
* Default canvas-node visuals (Wave 21).
*
- * Each node component sets `--node-color` inline from its plugin's
- * accent hex (visuals.json). These rules consume that custom property
+ * Each node component sets `--node-color` inline. Only AIAgentNode passes
+ * the plugin's accent (its NodeSpec `color`); SquareNode, TriggerNode,
+ * StartNode, ToolkitNode and TeamMonitorNode read `defaults.color`, which
+ * the NodeSpec adapter never fills, so they pass their role token
+ * (`--node-model`, `--node-trigger`, `--node-workflow`, `--node-tool`,
+ * `--node-agent`). These rules consume that custom property
* to draw a sensible default border / gradient / shadow so light, dark,
* and any theme that doesn't define its own `.node` rule still renders
* correctly. Per-theme CSS in client/src/themes/<theme>.css overrides
diff --git a/docs-internal/design-system/HANDOFF.md b/docs-internal/design-system/HANDOFF.md
index f8b40133..2c3e6138 100644
--- a/docs-internal/design-system/HANDOFF.md
+++ b/docs-internal/design-system/HANDOFF.md
@@ -167,7 +167,7 @@ Every theme re-declares all five. A heading is written once as `font-family: var
### Spacing, radii, chrome
Space scale 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 (`--space-1`…`--space-8`).
-Radii `--radius-sm` 4 · `--radius-md` 6 · `--radius-lg` 8 · `--radius-xl` 12 · `--radius-node` 10 · `--radius-pill` 999. Themes override these wholesale — Greek/Edo/Cyber/Wasteland/Plague/Surveillance go to **0** across the board.
+Radii `--radius-sm` 4 · `--radius-md` 6 · `--radius-lg` 8 · `--radius-xl` 12 · `--radius-node` 10 · `--radius-pill` 999. In the live app each theme overrides `--radius-sm/md/lg/pill` (Edo, Cyber, Wasteland, Plague and Surveillance go to 0; Greek keeps a 2px `--radius-lg`), but no theme overrides `--radius`, `--radius-xl` or `--radius-node`. The Tailwind `rounded-sm/md/lg/xl` utilities are computed from `--radius` in `index.css`, so they stay 4/6/8/12px in every theme; a skin's radii reach `rounded-pill`, the Home radii (`--radius-row|card|panel|draft|composer`) and any CSS that reads `var(--radius-*)` directly.
Fixed chrome: `--h-toolbar` 48 · `--h-statusbar` 24 · `--h-control` 32 · `--w-sidebar` 280 · `--w-palette` 320.
### Shadows & motion
diff --git a/docs-internal/design-system/IMPLEMENTATION.md b/docs-internal/design-system/IMPLEMENTATION.md
index d6f27410..6306e1ae 100644
--- a/docs-internal/design-system/IMPLEMENTATION.md
+++ b/docs-internal/design-system/IMPLEMENTATION.md
@@ -80,7 +80,7 @@ color: var(--action-run-ink); /* readable accent */
```
### Type
-`--font-sans: 'Geist'` (display = body) · `--font-mono` (counts, state, timestamps — the "machine voice"): the live light / dark themes use the system mono stack `ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, monospace` (`client/src/themes/light.css`, `dark.css`); JetBrains Mono is only a skin mono (Cyber, Edo, Rot). This bundle's `tokens/typography.css` still leads with `'JetBrains Mono'` — the live theme files win.
+`--font-display` / `--font-body` are `'Geist Variable'` on light and dark (display = body; `index.css` also fixes `--font-sans` to the same stack) · `--font-mono` (counts, state, timestamps — the "machine voice"): the live light / dark themes use the system mono stack `ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, monospace` (`client/src/themes/light.css`, `dark.css`). JetBrains Mono appears only in skins: it is the mono font of Cyber, Edo and Rot, Cyber's body font, and the fallback after Space Mono in Atomic's mono and Cyber's display stacks. This bundle's `tokens/typography.css` still leads with `'JetBrains Mono'` — the live theme files win.
Scale (14px base, dense desktop): `--text-2xs 11` `--text-xs 12` `--text-sm 13` `--text-base 14` `--text-md 16` `--text-lg 18` `--text-xl 24` `--text-2xl 32` `--text-3xl 44`.
Weights: 400 body / 500 UI labels / 600 headings & buttons. Sentence case; uppercase + `--tracking-label .04em` only in the status bar and micro-labels.
diff --git a/docs-internal/design-system/guidelines/THEMES.md b/docs-internal/design-system/guidelines/THEMES.md
index 90f5af70..5b5fa54c 100644
--- a/docs-internal/design-system/guidelines/THEMES.md
+++ b/docs-internal/design-system/guidelines/THEMES.md
@@ -46,4 +46,4 @@ Special hardware: **Cyber** ships custom crosshair + bracket cursors and full-fr
## 5. Status in THIS design system
-`tokens/colors.css` encodes the two canonical themes (light `:root`, dark `.dark`). The 10 skins are **documented** here and sourced from the live `client/src/themes/` files, but not yet expressed as token scopes here. (Cyber and Plague display faces are the legibility substitutions Space Mono and Cinzel; the handoff's Major Mono Display and UnifrakturCook are not shipped.) To port one: copy its layer-2 block into a `[data-theme="X"]` scope in `tokens/`, map its accents onto the action/node role triplets, and load its Google Fonts (all skin fonts are on Google Fonts — same delivery as production). Visual comparison: `guidelines/theme-matrix.html`.
+`tokens/colors.css` encodes the two canonical themes (light `:root`, dark `.dark`). The 10 skins are **documented** here and sourced from the live `client/src/themes/` files, but not yet expressed as token scopes here. (Cyber and Plague display faces are the legibility substitutions Space Mono and Cinzel; the handoff's Major Mono Display and UnifrakturCook are not shipped.) To port one: copy its layer-2 block into a `[data-theme="X"]` scope in `tokens/`, map its accents onto the action/node role triplets, and load its Google Fonts (all skin fonts are on Google Fonts — same delivery as production). Visual comparison: `guidelines/theme-matrix.html`. That page, `theme-comparison.html`, `theme-comparison-full.html` and `panels-all-themes.html` predate the current fonts: they still show JetBrains Mono as the light/dark mono (live: the system mono stack), and the first three show Major Mono Display for Cyber's display face and UnifrakturCook for Plague's (live: Space Mono and Cinzel). The table in §3 and `client/src/themes/` are authoritative.
diff --git a/docs-internal/frontend_architecture.md b/docs-internal/frontend_architecture.md
index af0d8d27..06dfbb36 100644
--- a/docs-internal/frontend_architecture.md
+++ b/docs-internal/frontend_architecture.md
@@ -75,7 +75,7 @@ client/src/
│
├── components/
│ ├── ui/ # shadcn-generated primitives (editable, ours)
-│ │ ├── button.tsx # CVA variants: default/secondary/ghost/outline/destructive/link
+│ │ ├── button.tsx # CVA variants + sizes (buttonVariants; see "Component primitives")
│ │ ├── badge.tsx # + success/warning/info variants we added
│ │ ├── alert.tsx # + success/warning/info variants we added
│ │ ├── accordion.tsx # Radix accordion
@@ -308,11 +308,11 @@ All under [components/ui/](../client/src/components/ui/). Editable — add varia
| Concern | Primitive | Notes |
|---|---|---|
-| Button | `Button` (CVA) | Variants: `default | secondary | ghost | outline | destructive | link` + Normal-mode `invert | quiet | chip` (ours). Sizes: `default | xs | sm | lg | icon | icon-xs | icon-sm | icon-lg` + `pill | chip` (ours) |
+| Button | `Button` (CVA) | Variants: `default | secondary | ghost | outline | destructive | link` + Normal-mode `invert | quiet | chip` (ours). Sizes: `default | xs | sm | lg | icon | icon-xs | icon-sm | icon-lg` + `pill | chip` (ours). `buttonVariants` in `components/ui/button.tsx` is authoritative |
| Badge | `Badge` | + `success | warning | info` (ours) |
| Alert | `Alert + AlertTitle + AlertDescription` | + `success | warning | info` (ours) |
| Overlay | `Dialog`, `AlertDialog`, `Tooltip`, `DropdownMenu` | Radix |
-| Toggle | `Toggle`, `ToggleGroup + ToggleGroupItem` | Radix. Variants `default | segmented | chips` (ours) |
+| Toggle | `Toggle`, `ToggleGroup + ToggleGroupItem` | Radix. Variants `default | segmented | chips` (ours); the CVA in `components/ui/toggle.tsx` is authoritative |
| Disclosure | `Accordion`, `Collapsible`, `Tabs` | Radix |
| Inputs | `Input`, `Textarea`, `Select`, `Switch`, `Checkbox`, `Slider`, `Label` | Radix (Select/Switch/Checkbox/Slider) |
| Cards | `Card + CardHeader/Title/Description/Content/Footer` | Layout primitive |
@@ -410,7 +410,7 @@ components/credentials/CredentialsModal.tsx
## ParameterRenderer (pending Phase 6)
-Currently a 2152-line switch on `parameter.type` ([client/src/components/ParameterRenderer.tsx](../client/src/components/ParameterRenderer.tsx)). 15+ branches for `string | number | boolean | options | collection | fixedCollection | code | file | credential | ...`.
+Currently one large switch on `parameter.type` ([client/src/components/ParameterRenderer.tsx](../client/src/components/ParameterRenderer.tsx)), with a branch per type: `string | number | boolean | options | collection | fixedCollection | code | file | credential | ...`.
**Phase 6 plan:** replace with `@jsonforms/react` renderer registry. Requires backend to expose a `get_node_spec` WebSocket handler returning `NodeSpec { jsonSchema, uiSchema, _uiHints? }` per the RFC. Frontend will own the custom renderer set (one file per widget under `components/inspector/renderers/`) and route via JSON Forms' tester-based dispatch. Feature flag `VITE_USE_NODESPEC` gates the rollout; the old `ParameterRenderer` deletes once stable.
@@ -637,7 +637,7 @@ When the backend `get_node_spec` handler lands, the inspector will own a 4-file
```
inspector/
-├── ParameterRenderer.tsx # dispatcher + 11 inline widgets + drag-drop wrapper + WIDGETS registry
+├── ParameterRenderer.tsx # dispatcher + inline widgets + drag-drop wrapper + WIDGETS registry
├── CollectionWidget.tsx # recursive (>150 LOC, independently testable)
├── CodeWidget.tsx # CodeEditor + theme/toolbar plumbing
└── types.ts # WidgetProps discriminated union, registry tester signature
@@ -689,4 +689,4 @@ This architecture is the post-migration state. Pre-migration was antd + `styled-
**`useAppTheme()` powers the canvas + maps surface across all 12 themes.** The hook returns a `theme` object with the legacy `Colors` shape (`theme.colors.X`, `theme.isDarkMode`) so existing call sites don't change. Under non-light/dark themes it merges a per-theme overlay (primary, focus, action palette, edge stroke / selection / executing / completed / error) on top of the chosen base pack (`lightColors` for utopian-bright themes, `darkColors` for dystopian / dark themes). Adding a new theme overlay is a single entry in the `THEME_OVERRIDES` map in [hooks/useAppTheme.ts](../client/src/hooks/useAppTheme.ts).
-Read sites: every canvas node component (`AIAgentNode`, `SquareNode`, `TriggerNode`, `StartNode`, `ToolkitNode`, `TeamMonitorNode`), `EdgeConditionEditor`, and the Maps surface (`GoogleMapsPicker`, `MapsPreviewPanel`) — they interpolate per-definition `nodeColor` and JS-side hex values that Tailwind classes can't express. Every other surface uses Tailwind + the token tiers above and retints automatically through the per-theme `[data-theme="..."]` block.
+Read sites: every canvas node component (`AIAgentNode`, `SquareNode`, `TriggerNode`, `StartNode`, `ToolkitNode`, `TeamMonitorNode`), `Dashboard.tsx`, and the Maps surface (`GoogleMapsPicker`, `MapsPreviewPanel`) — they interpolate JS-side colour values that Tailwind classes can't express (`EdgeConditionEditor` no longer calls it). Of the node components, only `AIAgentNode` uses the plugin's own colour (NodeSpec `color`); the others read `definition.defaults.color`, which the NodeSpec adapter never fills, so they use their role token (`--node-model`, `--node-trigger`, `--node-workflow`, `--node-tool`, `--node-agent`). Every other surface uses Tailwind + the token tiers above and retints automatically through the per-theme `[data-theme="..."]` block.
diff --git a/docs-internal/node-logic-flows/language/textToSpeech.md b/docs-internal/node-logic-flows/language/textToSpeech.md
index 44419113..392621a8 100644
--- a/docs-internal/node-logic-flows/language/textToSpeech.md
+++ b/docs-internal/node-logic-flows/language/textToSpeech.md
@@ -42,8 +42,9 @@ auto-hides both, which would break chaining into `speechToText`.
| `sample_rate` | number | `null` | no | Where the provider supports it |
| `provider_options` | object | `{}` | no | Vendor-specific keys, passed through untouched |
-**`tts_model`, not `model`.** [`ParameterRenderer.tsx:898`](../../../client/src/components/ParameterRenderer.tsx#L898)
-overwrites any field literally named `model` or `api_key` with chat-model data
+**`tts_model`, not `model`.** The provider-change effect in
+[`ParameterRenderer.tsx`](../../../client/src/components/ParameterRenderer.tsx)
+(`loadStoredKeyForProvider`) overwrites any field literally named `model` or `api_key` with chat-model data
whenever a sibling `provider` field exists — and it never checks that the
provider is an LLM provider. A field named `model` here would be cleared the
moment a user picked ElevenLabs.
diff --git a/docs-internal/sarvam_service.md b/docs-internal/sarvam_service.md
index dbb60828..73d17c1d 100644
--- a/docs-internal/sarvam_service.md
+++ b/docs-internal/sarvam_service.md
@@ -248,10 +248,13 @@ faithful treatment.
| Icon mark | `#FFFFFF` | The official white logo |
| Node accent / palette group / catalogue | `#6A88E2` | Sarvam's interactive accent (their `#4250D5` → `#6A88E2` control gradient) |
-The navy is deliberately *not* reused as the node accent: `--node-color`
-drives the canvas node's border, and `#1E2033` is darker than the dark-theme
-canvas background, so the border would disappear. The accent blue reads on
-both light and dark surfaces.
+The navy is deliberately *not* reused as the node accent: `#1E2033` is
+darker than the dark-theme canvas background, so anything drawn in it there
+would disappear. The accent blue reads on both light and dark surfaces. (On
+the canvas itself the choice has no visible effect today: `sarvamChatModel`
+renders through `SquareNode`, which takes its border from the `--node-model`
+role token, not the plugin colour — see
+[theme_system.md → Canvas-node visual contract](./theme_system.md#canvas-node-visual-contract-w21).)
---
diff --git a/docs-internal/theme_system.md b/docs-internal/theme_system.md
index f33e710d..8d684d1d 100644
--- a/docs-internal/theme_system.md
+++ b/docs-internal/theme_system.md
@@ -141,7 +141,11 @@ tokens are used directly, as `w-(--w-home-sidebar)` or `duration-(--dur-slow)`):
[lib/motion.ts](../client/src/lib/motion.ts), whose fallbacks mirror
base.css.
- **Radii**: `--radius-row | card | panel | draft | composer`, multiples of each
- theme's `--radius-lg`, so square themes stay square.
+ theme's `--radius-lg`, so square themes stay square. The Tailwind
+ `rounded-sm/md/lg/xl` utilities do not follow themes: `index.css` computes
+ them from `--radius`, which no theme overrides, so they are 4/6/8/12px
+ everywhere. `rounded-pill`, these Home radii and CSS reading
+ `var(--radius-*)` directly do follow the theme.
- **Type and layout**: `--text-meta | row | lead | title | hero` (with
`--tracking-hero`, `--leading-hero`), and the Home layout constants
(`--w-home-sidebar`, `--h-home-header`, `--w-composer`, the orb slot sizes,
@@ -280,9 +284,9 @@ the surrounding chrome. Every other surface uses Tailwind + tokens. New themes c
- **`--node-pulse-color` contract** — executing-node glow color is independent of `--node-color` (the plugin accent). Each decorated skin overrides `--node-pulse-color` to its highest-contrast accent (light/dark deliberately keep the base.css `var(--info)` fallback) (Cyber neon cyan, Surveillance REC red, Renaissance ultramarine `--lapis-bright`, Atomic turquoise, etc.) so the glow stays visible against any canvas background. Defined in [base.css](../client/src/themes/base.css) at `:root`, overridden in each per-theme file. The executing keyframes (`node-pulse` + per-theme `cyber-pulse-exec` / `surv-pulse-exec` / `ren-pulse-exec`) and the per-theme `--pulse-keyframe` / `--pulse-duration` / `--pulse-timing` tokens live in [animations.css](../client/src/themes/animations.css); base.css's `.sq-node[data-executing] .sq-node-box` / `.react-flow__node.executing .{sq-node-box,node}` rule reads `var(--pulse-keyframe, node-pulse)`, so a theme picks its pulse by overriding ONE token (Cyber → `cyber-pulse-exec`, Surveillance → `surv-pulse-exec`, Renaissance → `ren-pulse-exec`) — no high-specificity per-theme animation rule. `node-pulse` is a triple-layer expanding box-shadow (12px ring + 32px mid halo + 56px outer halo) consuming `var(--node-pulse-color)` + the shared `--tint-pulse-*` alphas. Trigger nodes use a separate continuous `.opencompany-trigger-armed` "listening" heartbeat (`trigger-listening` keyframe) while waiting, plus `.opencompany-bolt` on the ⚡ badge — distinct from the one-shot execution pulse. **Never animate `opacity` on whole-node selectors** — it fades the node icon + content, not just the glow.
- **`data-page-hidden` animation pause** — `usePageActivitySync()` ([app/usePageActivitySync.ts](../client/src/app/usePageActivitySync.ts)), mounted once in [AppShell.tsx](../client/src/app/AppShell.tsx)'s `ShellEffects` so it covers both screens, listens to `visibilitychange` plus window `blur` / `focus` and toggles `data-page-hidden` on `<html>`; [base.css](../client/src/themes/base.css) declares `html[data-page-hidden] *, *::before, *::after { animation-play-state: paused !important; }`. Without this, paused CSS keyframes accumulate frames in the compositor queue while the tab is hidden; on tab return all 50+ executing nodes' triple-layer pulses + Cyber's full-viewport `cyber-flicker` / `cyber-roll` resume simultaneously, stalling the GPU compositor 100-200ms and blocking input dispatch (first-click-feels-frozen pattern). The unpause is deferred two `requestAnimationFrame` ticks so input dispatch wins the frame before composite resumes.
- **Parameter panel theme contract** — MasterSkillEditor, OutputPanel, MiddleSection, ParameterPanel removed `useAppTheme()`. Every surface renders against Tailwind tokens + new-contract CSS custom props. Section headers carry the display-typography triplet (`font-display tracking-[var(--type-tracking-display)] [text-transform:var(--type-uppercase)] text-fg-default`); action buttons use `<ActionButton intent="run|stop|save|config|tools">`; backgrounds use `bg-bg-elevated` / `bg-bg-panel` / `bg-bg-input` from the surface tier table above. EditableNodeLabel emits both `sq-node-label` and `node-label` classNames so per-theme typography rules fire under either topology. Per-theme scrollbar webkit rules (`::-webkit-scrollbar-thumb` etc.) declared in all 12 themes — gold (Renaissance), square-cornered (Atomic / Edo / Greek / Wasteland / Plague), metallic (Steampunk), phosphor (Rot), neon (Cyber), REC-red (Surveillance), shadcn neutral (Light / Dark).
-- **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`.
+- **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`; the NodeSpec adapter never fills that field, so it resolves to `var(--node-workflow)`.
- **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.
+- **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 its accent 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 that accent through CSS without fighting specificity. Only `AIAgentNode` passes the plugin's own colour (NodeSpec `color`); the other node components pass their role token (see "Canvas-node visual contract" below). 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`, 36px, 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.
@@ -369,7 +373,7 @@ Every canvas-node React component renders against pure CSS for visual styling. T
style={{ '--node-color': accentColor, /* layout only */ } as NodeStyle}
>
```
- `accentColor` comes from the plugin's `visuals.json` accent hex via `useNodeSpec(type)`.
+ In `AIAgentNode`, `accentColor` is the plugin's colour from `useNodeSpec(type)` (NodeSpec `color`, from the plugin's `meta.json` or `visuals.json`). `SquareNode`, `TriggerNode`, `StartNode`, `ToolkitNode` and `TeamMonitorNode` use `definition?.defaults?.color`, which `nodeSpecToDescription` never fills, so they always fall back to their role token: `var(--node-model)`, `var(--node-trigger)`, `var(--node-workflow)`, `var(--node-tool)` and `var(--node-agent)` respectively. Plugin colours therefore do not reach those nodes today.
2. **Keeping ONLY layout inline** — `position`, `padding`, `display`, `flex*`, `gap`, `width`, `height`, `transition`, `cursor`, `fontFamily`, `fontSize`. React Flow `<Handle>` positioning (`position: absolute; left/top/right/bottom`) MUST stay inline.
@@ -391,7 +395,7 @@ Two visually distinct node families, each with its own class hooks. Pick the rig
| 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 |
+| 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, TeamMonitorNode (GenericNode was retired) |
Both families share the same status-pip data contract:
diff --git a/server/tests/test_node_spec.py b/server/tests/test_node_spec.py
index 8832e74e..6d9e5c32 100644
--- a/server/tests/test_node_spec.py
+++ b/server/tests/test_node_spec.py
@@ -1023,8 +1023,9 @@ class TestPluginContractInvariants:
), f"{t}: componentKind={spec.get('componentKind')!r} not in {self.VALID_KINDS}"
def test_every_plugin_node_has_color(self):
- # Color is the brand/accent each node owns. Without it the frontend
- # can't render borders, glow, or top output handles consistently.
+ # Color is the brand/accent each node owns. The canvas uses it for
+ # the AI agent card (AIAgentNode reads the NodeSpec `color`); square,
+ # trigger and start nodes currently draw from role tokens instead.
for t in self._plugin_types():
spec = get_node_spec(t)
color = spec.get("color")