Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(desktop): r2-m1 match chat search highlight colors
Josué33922cf87962
diff --git a/desktop-app/ui/src/lib/__tests__/searchHighlightStyles.test.ts b/desktop-app/ui/src/lib/__tests__/searchHighlightStyles.test.tsnew file mode 100644index 000000000..0d3a0c5af--- /dev/null+++ b/desktop-app/ui/src/lib/__tests__/searchHighlightStyles.test.ts@@ -0,0 +1,25 @@+import { describe, expect, it } from 'vitest'+import { readFileSync } from 'node:fs'+import path from 'node:path'++const tokens = readFileSync(path.join(process.cwd(), 'ui/src/styles/tokens.css'), 'utf8')+const styles = readFileSync(path.join(process.cwd(), 'ui/src/styles.css'), 'utf8')++describe('chat search highlight styling', () => {+ it('uses Chromium-compatible semantic colors in both themes', () => {+ expect(tokens.match(/--search-match-bg:\s*#ffff00/g)).toHaveLength(2)+ expect(tokens.match(/--search-match-current-bg:\s*#ff9632/g)).toHaveLength(2)+ expect(tokens.match(/--search-match-text:\s*#000000/g)).toHaveLength(2)+ expect(styles).toMatch(/\.chat-search-match\s*{[^}]*background:\s*var\(--search-match-bg\)/s)+ expect(styles).toMatch(+ /\.chat-search-match--active\s*{[^}]*background:\s*var\(--search-match-current-bg\)/s+ )+ expect(styles).not.toMatch(/\.chat-search-match--active\s*{[^}]*box-shadow:/s)+ })++ it('preserves system highlight colors in forced-colors mode', () => {+ expect(styles).toMatch(+ /@media \(forced-colors: active\)[\s\S]*background:\s*Highlight;[\s\S]*color:\s*HighlightText;/+ )+ })+})diff --git a/desktop-app/ui/src/styles.css b/desktop-app/ui/src/styles.cssindex 971963314..7174481af 100644--- a/desktop-app/ui/src/styles.css+++ b/desktop-app/ui/src/styles.css@@ -14980,12 +14980,20 @@ pre {}.chat-search-match {- background: rgba(var(--warning-rgb), 0.3);+ background: var(--search-match-bg);border-radius: 2px;- color: inherit;+ color: var(--search-match-text);}.chat-search-match--active {- background: rgba(var(--warning-rgb), 0.62);- box-shadow: 0 0 0 2px rgba(var(--focus-rgb), 0.9);+ background: var(--search-match-current-bg);+}++@media (forced-colors: active) {+ .chat-search-match,+ .chat-search-match--active {+ background: Highlight;+ color: HighlightText;+ forced-color-adjust: none;+ }}diff --git a/desktop-app/ui/src/styles/tokens.css b/desktop-app/ui/src/styles/tokens.cssindex 72a07385c..3b0b54e47 100644--- a/desktop-app/ui/src/styles/tokens.css+++ b/desktop-app/ui/src/styles/tokens.css@@ -23,6 +23,9 @@--success: #66b88f;--danger: #ec7c72;--warning: #d19452;+ --search-match-bg: #ffff00;+ --search-match-current-bg: #ff9632;+ --search-match-text: #000000;--unknown: #e2dfef;--info: #0072c0;--text-inverse: #ffffff;@@ -189,6 +192,9 @@--success: #2f8a66;--danger: #bf4d47;--warning: #a16b2b;+ --search-match-bg: #ffff00;+ --search-match-current-bg: #ff9632;+ --search-match-text: #000000;--unknown: #6b5f8a;--info: #0072c0;--text-inverse: #ffffff;