Skip to content

Self-improving AI Employees for everyone

fix(theme): bind per-theme keyframes to executing nodes + remove dead nodeGlow + status-state box glow (Wave 29)

trohitg301d3ab9ac2c
diff --git a/client/src/styles/canvasAnimations.ts b/client/src/styles/canvasAnimations.ts
index 4c17ee1b..6f690577 100644
--- a/client/src/styles/canvasAnimations.ts
+++ b/client/src/styles/canvasAnimations.ts
@@ -3,16 +3,23 @@
* Dashboard. Split into named groups so a new status visual or keyframe
* can be added without touching Dashboard.tsx.
*
- * KEYFRAMES -- @keyframes definitions (color-agnostic;
- * consume scoped --node-glow* CSS vars)
+ * KEYFRAMES -- @keyframes definitions for edges
* edgeStatusStyles(...) -- .react-flow__edge.{selected,executing,...}
- * nodeStatusStyles(...) -- .react-flow__node.{executing,...}
+ * nodeStatusStyles(...) -- .react-flow__node.{...} (status-class colors only)
* buildCanvasStyles(...) -- composes the three for Dashboard
*
* Per-node inline animations (border pulse, etc.) live in their own
* components and read theme tokens directly; this module is for
* canvas-wide rules that need to match React Flow's wrapper classes.
*
+ * Node execution glow is owned by `client/src/themes/base.css` — see
+ * the `node-pulse` keyframe + `.react-flow__node.executing .node` /
+ * `.sq-node[data-executing] .sq-node-box` rules there. This file used
+ * to inject a competing `nodeGlow` keyframe targeting the React Flow
+ * wrapper; that was dead code (only the inner `.node` child animated)
+ * and has been removed in favour of base.css as the single source of
+ * truth.
+ *
* The light vs dark distinction is encoded entirely in `colors` (the
* theme object provides different values per mode), so this file knows
* nothing about which theme is active.
@@ -34,11 +41,6 @@ const KEYFRAMES = `
0% { stroke-dashoffset: 24; }
100% { stroke-dashoffset: 0; }
}
-
- @keyframes nodeGlow {
- 0%, 100% { filter: drop-shadow(0 0 8px var(--node-glow)) drop-shadow(0 0 16px var(--node-glow-soft)); }
- 50% { filter: drop-shadow(0 0 14px var(--node-glow)) drop-shadow(0 0 24px var(--node-glow)); }
- }
`;
function edgeStatusStyles(colors: CanvasStatusColors): string {
@@ -89,18 +91,17 @@ function edgeStatusStyles(colors: CanvasStatusColors): string {
`;
}
-function nodeStatusStyles(colors: CanvasStatusColors): string {
- // --node-glow / --node-glow-soft are scoped vars consumed by the
- // nodeGlow keyframe, so the keyframe stays color-agnostic and theme
- // swaps don't require regenerating the keyframe text.
- const glow = colors.edgeExecuting;
- return `
- .react-flow__node.executing {
- --node-glow: ${glow};
- --node-glow-soft: ${glow}80;
- animation: nodeGlow 1.2s ease-in-out infinite;
- }
-`;
+function nodeStatusStyles(_colors: CanvasStatusColors): string {
+ // Node execution animation is owned by base.css (`node-pulse`
+ // keyframe + `.react-flow__node.executing .node` /
+ // `.sq-node[data-executing] .sq-node-box` rules). This function is
+ // retained as a hook for future canvas-wide status-class rules on
+ // the React Flow wrapper that don't fit per-component CSS.
+ //
+ // `_colors` is intentionally unused at the moment; the parameter is
+ // kept on the signature so callers (buildCanvasStyles) and the
+ // CanvasStatusColors contract stay stable for downstream consumers.
+ return '';
}
export function buildCanvasStyles(colors: CanvasStatusColors): string {
diff --git a/client/src/themes/base.css b/client/src/themes/base.css
index 532f9df8..91b09007 100644
--- a/client/src/themes/base.css
+++ b/client/src/themes/base.css
@@ -286,3 +286,34 @@
text-transform: var(--type-uppercase, none);
color: hsl(var(--foreground));
}
+
+/* ============================================================================
+ * Status-state box glow (Wave 29).
+ *
+ * The W26 status-pip rules (.sq-node-pip[data-status="..."]) color the
+ * small status indicator. This block adds a complementary glow to the
+ * NODE BOX itself for `success` and `error` states, so post-execution
+ * outcomes are visible at canvas zoom levels where the pip is too
+ * small to read. Per-theme files override these via higher-specificity
+ * `:root[data-theme="..."] .sq-node[data-status="..."] .sq-node-box`
+ * selectors when they want a material-specific outcome glow.
+ * ============================================================================ */
+
+.sq-node[data-status="success"] .sq-node-box,
+.react-flow__node[data-status="success"] .node {
+ box-shadow:
+ 0 0 0 1px hsl(var(--success)),
+ 0 0 14px color-mix(in srgb, hsl(var(--success)) 60%, transparent);
+}
+
+.sq-node[data-status="error"] .sq-node-box,
+.react-flow__node[data-status="error"] .node {
+ box-shadow:
+ 0 0 0 1px hsl(var(--destructive)),
+ 0 0 14px color-mix(in srgb, hsl(var(--destructive)) 60%, transparent);
+}
+
+/* TODO(wave-30): mirror data-status from the pip to the outer .sq-node /
+ * .react-flow__node wrapper in each canvas-node component so the box
+ * glow rules above fire. The wave-29 selectors are pre-positioned;
+ * components currently set data-status on the pip only (W26). */
diff --git a/client/src/themes/cyber.css b/client/src/themes/cyber.css
index daa307fe..28b424c0 100644
--- a/client/src/themes/cyber.css
+++ b/client/src/themes/cyber.css
@@ -421,6 +421,22 @@
0 0 20px var(--neon-cyan);
animation: cyber-blink 1.6s steps(2) infinite;
}
+
+/* Wave 29: Cyber executing nodes pulse with the cyber-blink keyframe
+ * (steps animation = digital strobe), not the smooth node-pulse default.
+ * Targets BOTH React Flow's wrapper class and our data-attribute so
+ * either drives the animation. Higher specificity than base.css's
+ * generic .react-flow__node.executing .sq-node-box rule, so this wins. */
+:root[data-theme="cyber"] .sq-node[data-executing] .sq-node-box,
+:root[data-theme="cyber"] .react-flow__node.executing .sq-node-box,
+:root[data-theme="cyber"] .react-flow__node.executing .node {
+ animation: cyber-blink 1.6s steps(2) infinite;
+ border-color: var(--neon-cyan);
+ box-shadow:
+ 0 0 0 1px var(--neon-cyan),
+ 0 0 24px var(--neon-cyan),
+ inset 0 0 18px rgba(29, 217, 229, 0.3);
+}
:root[data-theme="cyber"] .sq-node-pip {
border-radius: 0;
width: 8px; height: 8px;
diff --git a/client/src/themes/edo.css b/client/src/themes/edo.css
index ff85ed66..9b8111f8 100644
--- a/client/src/themes/edo.css
+++ b/client/src/themes/edo.css
@@ -171,6 +171,8 @@
:root[data-theme="edo"] .sq-node.selected .sq-node-box {
border: 2px solid hsl(var(--accent));
background: var(--bg-elevated);
+ /* Wave 29: outer halo so selection reads at any zoom level. */
+ box-shadow: 0 0 0 2px hsl(var(--accent) / 0.5), 0 4px 14px hsl(var(--accent) / 0.3);
}
:root[data-theme="edo"] .sq-node.selected .sq-node-box::before {
content: ''; position: absolute; top: 4px; right: 4px; width: 14px; height: 14px;
diff --git a/client/src/themes/plague.css b/client/src/themes/plague.css
index 20c43444..1f4abd79 100644
--- a/client/src/themes/plague.css
+++ b/client/src/themes/plague.css
@@ -175,7 +175,12 @@
content: ''; position: absolute; top: -3px; left: 50%; width: 6px; height: 6px;
background: var(--crow); transform: translateX(-50%);
}
-:root[data-theme="plague"] .sq-node.selected .sq-node-box { border-color: hsl(var(--accent)); background: hsl(var(--destructive) / 0.2); }
+/* Wave 29: outer halo so selection reads at any zoom level. */
+:root[data-theme="plague"] .sq-node.selected .sq-node-box {
+ border-color: hsl(var(--accent));
+ background: hsl(var(--destructive) / 0.2);
+ box-shadow: 0 0 0 2px hsl(var(--accent)), 0 0 14px hsl(var(--destructive) / 0.4);
+}
:root[data-theme="plague"] .sq-node-gear { background: hsl(var(--accent)); color: var(--linen); border: none; border-radius: 0; }
:root[data-theme="plague"] .sq-node-handle { border-radius: 0; }
:root[data-theme="plague"] .sq-node-handle.out { background: hsl(var(--accent)); }
diff --git a/client/src/themes/renaissance.css b/client/src/themes/renaissance.css
index 19a452f5..47485fae 100644
--- a/client/src/themes/renaissance.css
+++ b/client/src/themes/renaissance.css
@@ -369,6 +369,21 @@
border-color: var(--gold);
box-shadow: 0 0 0 3px rgba(212, 160, 48, 0.5), 0 3px 0 var(--border-strong), inset 0 0 0 1px var(--gold);
}
+
+/* Wave 29: Renaissance executing nodes flicker like candlelight using
+ * ren-flicker (opacity pulse) — NOT the digital node-pulse. The gold
+ * border stays steady; only the ambient glow shimmers. Higher specificity
+ * than base.css's generic rule, so this wins. */
+:root[data-theme="renaissance"] .sq-node[data-executing] .sq-node-box,
+:root[data-theme="renaissance"] .react-flow__node.executing .sq-node-box,
+:root[data-theme="renaissance"] .react-flow__node.executing .node {
+ animation: ren-flicker 2.4s ease-in-out infinite;
+ border-color: var(--gold);
+ box-shadow:
+ 0 0 0 2px rgba(212, 160, 48, 0.6),
+ 0 0 20px rgba(212, 160, 48, 0.4),
+ inset 0 0 0 1px var(--gold);
+}
:root[data-theme="renaissance"] .sq-node-pip {
border: 1px solid var(--border-strong);
box-shadow: 0 0 4px currentColor;
diff --git a/client/src/themes/surveillance.css b/client/src/themes/surveillance.css
index 74501188..ca0a0da5 100644
--- a/client/src/themes/surveillance.css
+++ b/client/src/themes/surveillance.css
@@ -200,6 +200,17 @@
:root[data-theme="surveillance"] .sq-node.selected .sq-node-box {
border: 1px solid hsl(var(--primary)); box-shadow: 0 0 0 1px hsl(var(--primary)), 0 0 8px rgba(232,38,38,0.4);
}
+
+/* Wave 29: Surveillance executing nodes blink the REC red glow, matching
+ * the corner LED's surv-blink rhythm. Mirrors the analog-camera "live"
+ * indicator language. Higher specificity than base.css's generic rule. */
+:root[data-theme="surveillance"] .sq-node[data-executing] .sq-node-box,
+:root[data-theme="surveillance"] .react-flow__node.executing .sq-node-box,
+:root[data-theme="surveillance"] .react-flow__node.executing .node {
+ animation: surv-blink 1.0s steps(2) infinite;
+ border: 1px solid hsl(var(--destructive));
+ box-shadow: 0 0 0 1px hsl(var(--destructive)), 0 0 14px rgba(232, 38, 38, 0.65);
+}
:root[data-theme="surveillance"] .sq-node-pip { border-radius: 0; }
:root[data-theme="surveillance"] .sq-node-gear { background: hsl(var(--primary)); color: white; border-radius: 0; border: none; }
:root[data-theme="surveillance"] .sq-node-handle { border-radius: 0; background: var(--phosphor); }