Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(desktop): restore Solarized search highlight contrast
DavidShen14c8ef381997
diff --git a/apps/desktop/src/renderer/themes/__tests__/fixtures/builtin-theme-overrides.json b/apps/desktop/src/renderer/themes/__tests__/fixtures/builtin-theme-overrides.jsonindex cc8d5b9f5e..db45e6804d 100644--- a/apps/desktop/src/renderer/themes/__tests__/fixtures/builtin-theme-overrides.json+++ b/apps/desktop/src/renderer/themes/__tests__/fixtures/builtin-theme-overrides.json@@ -230,7 +230,7 @@"plan-toolbar-btn-hover-bg": "#eee8d5","popover": "46 42% 88%","primary-foreground": "0 0% 100%",- "search-match-fg": "0 0% 46%",+ "search-match-fg": "0 0% 35%","secondary": "46 42% 88%","settings-btn-primary-text": "#FFFFFF","settings-btn-secondary-hover-bg": "#eee8d5",@@ -252,7 +252,8 @@"tooltip-text": "#fdf6e3","update-btn-border": "#859900","update-btn-text": "#859900",- "form-field-hint": "#686868"+ "form-field-hint": "#686868",+ "search-match-bg": "45 100% 62%"}},"cindy-light": {diff --git a/apps/desktop/src/renderer/themes/__tests__/searchHighlightContrast.test.ts b/apps/desktop/src/renderer/themes/__tests__/searchHighlightContrast.test.tsindex 69804f0495..946c94859e 100644--- a/apps/desktop/src/renderer/themes/__tests__/searchHighlightContrast.test.ts+++ b/apps/desktop/src/renderer/themes/__tests__/searchHighlightContrast.test.ts@@ -21,10 +21,9 @@ describe('Search highlight contrast', () => {expect(contrastRatio(active, color(theme, 'search-match-bg'))).toBeGreaterThanOrEqual(1.4);});- it.each(['default-light', 'default-dark', 'cindy-light', 'cindy-dark'])(- '%s keeps ordinary matches readable and visible on content surfaces',- (id) => {- const theme = builtinThemes[id];+ it.each(Object.values(builtinThemes))(+ '$id keeps ordinary matches readable and visible on content surfaces',+ (theme) => {const background = color(theme, 'search-match-bg');expect(contrastRatio(background, color(theme, 'search-match-fg'))).toBeGreaterThanOrEqual(4.5);for (const surface of ['surface', 'surface-elevated']) {diff --git a/apps/desktop/src/renderer/themes/builtin/solarized-light.ts b/apps/desktop/src/renderer/themes/builtin/solarized-light.tsindex 5f38c8b03e..22c1868224 100644--- a/apps/desktop/src/renderer/themes/builtin/solarized-light.ts+++ b/apps/desktop/src/renderer/themes/builtin/solarized-light.ts@@ -103,7 +103,7 @@ const GENERATED_OVERRIDES = {"plan-toolbar-btn-hover-bg": "#eee8d5","popover": "46 42% 88%","primary-foreground": "0 0% 100%",- "search-match-fg": "0 0% 46%",+ "search-match-fg": "0 0% 35%","secondary": "46 42% 88%","settings-btn-primary-text": "#FFFFFF","settings-btn-secondary-hover-bg": "#eee8d5",@@ -126,6 +126,7 @@ const GENERATED_OVERRIDES = {"update-btn-border": "#859900","update-btn-text": "#859900","form-field-hint": "#686868",+ "search-match-bg": "45 100% 62%",} as const;// END GENERATED DS-8: themediff --git a/packages/design-tokens/src/desktop-bindings.json b/packages/design-tokens/src/desktop-bindings.jsonindex 79520764d7..27d9b1a2ec 100644--- a/packages/design-tokens/src/desktop-bindings.json+++ b/packages/design-tokens/src/desktop-bindings.json@@ -3310,7 +3310,8 @@"tooltip-text": "themes.solarized-light.tooltip-text","update-btn-border": "themes.solarized-light.update-btn-border","update-btn-text": "themes.solarized-light.update-btn-text",- "form-field-hint": "themes.solarized-light.form-field-hint"+ "form-field-hint": "themes.solarized-light.form-field-hint",+ "search-match-bg": "themes.solarized-light.search-match-bg"},"retained": {},"type": "light"diff --git a/packages/design-tokens/src/reference/themes.json b/packages/design-tokens/src/reference/themes.jsonindex fce67647cc..5e0bc38845 100644--- a/packages/design-tokens/src/reference/themes.json+++ b/packages/design-tokens/src/reference/themes.json@@ -9764,6 +9764,48 @@"alpha": false}}+ },+ "value-search-match-bg": {+ "$type": "color",+ "$value": {+ "colorSpace": "hsl",+ "components": [+ 45,+ 100,+ 62+ ]+ },+ "$extensions": {+ "com.cindy.desktop": {+ "format": "triplet",+ "precision": [+ 0,+ 0,+ 0+ ]+ }+ }+ },+ "value-search-match-fg": {+ "$type": "color",+ "$value": {+ "colorSpace": "hsl",+ "components": [+ 0,+ 0,+ 35+ ]+ },+ "$extensions": {+ "com.cindy.desktop": {+ "format": "triplet",+ "precision": [+ 0,+ 0,+ 0+ ]+ }+ }}}}diff --git a/packages/design-tokens/src/themes/builtin.json b/packages/design-tokens/src/themes/builtin.jsonindex 2a37a257d9..9a23938d7f 100644--- a/packages/design-tokens/src/themes/builtin.json+++ b/packages/design-tokens/src/themes/builtin.json@@ -4720,7 +4720,7 @@},"search-match-fg": {"$type": "color",- "$value": "{reference.themes.solarized-light.palette-TEXT_PRIMARY_HSL}"+ "$value": "{reference.themes.solarized-light.value-search-match-fg}"},"secondary": {"$type": "color",@@ -4809,6 +4809,10 @@"form-field-hint": {"$type": "color","$value": "{reference.themes.solarized-light.palette-HINT_TEXT}"+ },+ "search-match-bg": {+ "$type": "color",+ "$value": "{reference.themes.solarized-light.value-search-match-bg}"}}}