Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

fix(frontend): r1-b1 bind shared table theme tokens

Josuécb0b3b7fc73a
diff --git a/packages/frontend-table-system/styles.css b/packages/frontend-table-system/styles.css
index f9fc779b2..5a0f3345e 100644
--- a/packages/frontend-table-system/styles.css
+++ b/packages/frontend-table-system/styles.css
@@ -1,12 +1,12 @@
:root {
- --eft-surface: var(--cu-bg-elevated, var(--surface-elevated, #171a21));
- --eft-surface-muted: var(--cu-bg-subtle, var(--surface-subtle, #20242d));
- --eft-border: var(--cu-border, var(--border-color, #343946));
- --eft-text: var(--cu-text, var(--text-primary, #f5f7fb));
- --eft-muted: var(--cu-text-muted, var(--text-muted, #a7afbf));
- --eft-accent: var(--cu-accent, var(--accent, #7c9cff));
- --eft-danger: var(--cu-danger, var(--danger, #ff6b7a));
- --eft-focus: var(--cu-focus-ring, var(--focus-ring, #9bb5ff));
+ --eft-surface: var(--cu-surface);
+ --eft-surface-muted: var(--cu-surface-hover);
+ --eft-border: var(--cu-border);
+ --eft-text: var(--cu-text);
+ --eft-muted: var(--cu-text-muted);
+ --eft-accent: var(--cu-accent);
+ --eft-danger: var(--cu-danger);
+ --eft-focus: rgba(var(--cu-focus-rgb), 0.8);
}
.eft-data-view-header {
diff --git a/scripts/style-rules/rules.test.mjs b/scripts/style-rules/rules.test.mjs
index 502771a18..7fb4451b8 100644
--- a/scripts/style-rules/rules.test.mjs
+++ b/scripts/style-rules/rules.test.mjs
@@ -1,4 +1,5 @@
import assert from 'node:assert/strict'
+import { readFileSync } from 'node:fs'
import test from 'node:test'
import { rulesForFile } from './rules.mjs'
@@ -54,3 +55,20 @@ test('does not confuse RowActionsMenu with the retired RowActions component', ()
[]
)
})
+
+test('shared table colors resolve through tokens declared by both web apps', () => {
+ const sharedCss = readFileSync('packages/frontend-table-system/styles.css', 'utf8')
+ const controlCss = readFileSync('control-ui/app/globals.css', 'utf8')
+ const profileCss = readFileSync('profile-ui/app/globals.css', 'utf8')
+ const bindings = [...sharedCss.matchAll(/--eft-[^:]+:\s*var\((--cu-[^)]+)\);/g)]
+
+ assert.ok(bindings.length >= 7)
+ for (const [, token] of bindings) {
+ assert.match(controlCss, new RegExp(`${token.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\s*:`))
+ assert.match(profileCss, new RegExp(`${token.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\s*:`))
+ }
+ assert.match(controlCss, /--cu-focus-rgb\s*:/)
+ assert.match(profileCss, /--cu-focus-rgb\s*:/)
+ assert.match(controlCss, /:root\[data-theme='light'\][\s\S]*--cu-surface-hover\s*:/)
+ assert.doesNotMatch(sharedCss, /--eft-[^:]+:[^;]*#[0-9a-f]{3,8}/i)
+})