Skip to content

Conversation

@deepinfect
Copy link
Collaborator

@deepinfect deepinfect commented Oct 12, 2025

add theme settings

Summary by CodeRabbit

  • New Features

    • Added Theme settings with Light, Dark, and System options, including live previews and instant switching.
    • Multilingual labels for theme options added across English, Persian, French, Japanese, Korean, Portuguese (Brazil), Russian, and Chinese (Simplified, Hong Kong, Traditional).
  • Style

    • Improved dark mode readability by increasing muted text contrast.

@deepinfect deepinfect requested a review from zerob13 October 12, 2025 01:41
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 12, 2025

Walkthrough

Adds theme selection UI with previews in DisplaySettings.vue, exposes setThemeMode from the theme store, introduces new i18n strings for theme options across multiple locales, and adjusts CSS variables (notably dark mode muted-foreground opacity). No structural logic beyond UI-to-store theme switching.

Changes

Cohort / File(s) Summary
Theme UI (Display Settings)
src/renderer/src/components/settings/DisplaySettings.vue
Adds theme selection (light/dark/system) with previews, wires to theme store via setThemeMode, includes update guard and error handling.
Theme Store Exposure
src/renderer/src/stores/theme.ts
Exposes existing setThemeMode in the store’s public API; cycleTheme remains available.
i18n Additions (Theme Labels)
src/renderer/src/i18n/en-US/settings.json, .../fa-IR/settings.json, .../fr-FR/settings.json, .../ja-JP/settings.json, .../ko-KR/settings.json, .../pt-BR/settings.json, .../ru-RU/settings.json, .../zh-CN/settings.json, .../zh-HK/settings.json, .../zh-TW/settings.json
Adds themeLight, themeDark, themeSystem labels to multiple locales; no behavior changes.
CSS Theme Tokens
src/renderer/src/assets/style.css
Increases dark-mode muted-foreground opacity from 0.2 to 0.5; introduces duplicate declarations of several light-theme variables with identical values.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor U as User
  participant DS as DisplaySettings.vue
  participant TS as ThemeStore
  participant DOM as Document/Styles

  U->>DS: Select theme (light/dark/system)
  DS->>DS: Guard concurrent updates (isUpdatingTheme)
  DS->>TS: setThemeMode(mode)
  TS->>DOM: Apply theme tokens/classes
  DOM-->>DS: Theme applied (reactive state updates)
  DS-->>U: UI reflects selected theme
  alt Error
    TS-->>DS: Throw/Reject
    DS-->>U: Show failure state (reset guard)
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • UI/refactor #979 — Also modifies CSS theme tokens in src/renderer/src/assets/style.css, including muted-foreground adjustments.
  • fix: theme change issue #770 — Touches theme store API and theme switching mechanics, potentially conflicting with setThemeMode exposure.
  • feat(ui): new design tokens  #969 — Changes theming surface and DisplaySettings.vue related to theme UI, overlapping with this PR’s scope.

Poem

A nibble of light, a hop into dark,
I toggle the moon with a whiskery spark. 🌙
System or sun, I boop the theme mode,
Carrots reflect in CSS code. 🥕
Click, switch—so sleek and spry,
A bun-themed UI, by and by!

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The title "UI/refactor" is too generic and does not clearly convey the main purpose of the changeset, which is to add theme settings UI; as a result it is not immediately apparent what feature or refactoring this pull request introduces. Please update the title to succinctly describe the primary change— for example, "Add theme settings UI with light, dark, and system options"—so that reviewers and future readers can quickly understand the intent of this PR.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ui/refactor

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 33c0a0f and 115f930.

📒 Files selected for processing (1)
  • src/renderer/src/assets/style.css (3 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
src/renderer/src/**/*

📄 CodeRabbit inference engine (.cursor/rules/i18n.mdc)

src/renderer/src/**/*: All user-facing strings must use i18n keys (avoid hardcoded user-visible text in code)
Use the 'vue-i18n' framework for all internationalization in the renderer
Ensure all user-visible text in the renderer uses the translation system

Files:

  • src/renderer/src/assets/style.css
src/renderer/src/**

📄 CodeRabbit inference engine (AGENTS.md)

Put application code for the Vue app under src/renderer/src (components, stores, views, i18n, lib)

Files:

  • src/renderer/src/assets/style.css
🪛 Biome (2.1.2)
src/renderer/src/assets/style.css

[error] 63-63: Duplicate custom properties can lead to unexpected behavior and may override previous declarations unintentionally.

--foreground is already defined here.

Remove or rename the duplicate custom property to ensure consistent styling.

(lint/suspicious/noDuplicateCustomProperties)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-check (x64)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/renderer/src/components/settings/DisplaySettings.vue (1)

426-426: Use English for console logs.

The console.log statement contains Chinese text, which violates the guideline requiring English for all logs and comments.

As per coding guidelines

Apply this diff:

-  console.log('准备切换投屏保护状态:', value)
+  console.log('Preparing to toggle content protection:', value)
🧹 Nitpick comments (1)
src/renderer/src/components/settings/DisplaySettings.vue (1)

350-403: LGTM! Well-structured theme implementation.

The theme settings logic is well-organized with:

  • Proper type safety using ThemePreviewMode type
  • Clean preview styles mapping
  • Concurrent update prevention with isUpdatingTheme guard
  • Integration with the theme store

Optional: Consider adding user-visible error feedback when theme updates fail (currently only logs to console at line 399). You could show a toast notification or error message to inform users if the theme change doesn't complete successfully.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 33ce9c6 and 33c0a0f.

📒 Files selected for processing (17)
  • src/renderer/shell/components/AppBar.vue (1 hunks)
  • src/renderer/src/App.vue (1 hunks)
  • src/renderer/src/assets/style.css (3 hunks)
  • src/renderer/src/components/message/MessageList.vue (3 hunks)
  • src/renderer/src/components/prompt-input/PromptInput.vue (1 hunks)
  • src/renderer/src/components/settings/DisplaySettings.vue (4 hunks)
  • src/renderer/src/i18n/en-US/settings.json (1 hunks)
  • src/renderer/src/i18n/fa-IR/settings.json (1 hunks)
  • src/renderer/src/i18n/fr-FR/settings.json (1 hunks)
  • src/renderer/src/i18n/ja-JP/settings.json (1 hunks)
  • src/renderer/src/i18n/ko-KR/settings.json (1 hunks)
  • src/renderer/src/i18n/pt-BR/settings.json (1 hunks)
  • src/renderer/src/i18n/ru-RU/settings.json (1 hunks)
  • src/renderer/src/i18n/zh-CN/settings.json (1 hunks)
  • src/renderer/src/i18n/zh-HK/settings.json (1 hunks)
  • src/renderer/src/i18n/zh-TW/settings.json (1 hunks)
  • src/renderer/src/stores/theme.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (20)
src/renderer/src/**/*

📄 CodeRabbit inference engine (.cursor/rules/i18n.mdc)

src/renderer/src/**/*: All user-facing strings must use i18n keys (avoid hardcoded user-visible text in code)
Use the 'vue-i18n' framework for all internationalization in the renderer
Ensure all user-visible text in the renderer uses the translation system

Files:

  • src/renderer/src/i18n/en-US/settings.json
  • src/renderer/src/i18n/fr-FR/settings.json
  • src/renderer/src/components/prompt-input/PromptInput.vue
  • src/renderer/src/i18n/fa-IR/settings.json
  • src/renderer/src/assets/style.css
  • src/renderer/src/i18n/zh-CN/settings.json
  • src/renderer/src/components/message/MessageList.vue
  • src/renderer/src/i18n/ko-KR/settings.json
  • src/renderer/src/i18n/zh-TW/settings.json
  • src/renderer/src/components/settings/DisplaySettings.vue
  • src/renderer/src/i18n/zh-HK/settings.json
  • src/renderer/src/i18n/ja-JP/settings.json
  • src/renderer/src/i18n/ru-RU/settings.json
  • src/renderer/src/i18n/pt-BR/settings.json
  • src/renderer/src/App.vue
  • src/renderer/src/stores/theme.ts
src/renderer/src/**

📄 CodeRabbit inference engine (AGENTS.md)

Put application code for the Vue app under src/renderer/src (components, stores, views, i18n, lib)

Files:

  • src/renderer/src/i18n/en-US/settings.json
  • src/renderer/src/i18n/fr-FR/settings.json
  • src/renderer/src/components/prompt-input/PromptInput.vue
  • src/renderer/src/i18n/fa-IR/settings.json
  • src/renderer/src/assets/style.css
  • src/renderer/src/i18n/zh-CN/settings.json
  • src/renderer/src/components/message/MessageList.vue
  • src/renderer/src/i18n/ko-KR/settings.json
  • src/renderer/src/i18n/zh-TW/settings.json
  • src/renderer/src/components/settings/DisplaySettings.vue
  • src/renderer/src/i18n/zh-HK/settings.json
  • src/renderer/src/i18n/ja-JP/settings.json
  • src/renderer/src/i18n/ru-RU/settings.json
  • src/renderer/src/i18n/pt-BR/settings.json
  • src/renderer/src/App.vue
  • src/renderer/src/stores/theme.ts
src/renderer/**/*.{vue,ts,js,tsx,jsx}

📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)

渲染进程代码放在 src/renderer

Files:

  • src/renderer/src/components/prompt-input/PromptInput.vue
  • src/renderer/src/components/message/MessageList.vue
  • src/renderer/src/components/settings/DisplaySettings.vue
  • src/renderer/src/App.vue
  • src/renderer/shell/components/AppBar.vue
  • src/renderer/src/stores/theme.ts
src/renderer/src/**/*.{vue,ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/vue-best-practices.mdc)

src/renderer/src/**/*.{vue,ts,tsx,js,jsx}: Use the Composition API for better code organization and reusability
Implement proper state management with Pinia
Utilize Vue Router for navigation and route management
Leverage Vue's built-in reactivity system for efficient data handling

Files:

  • src/renderer/src/components/prompt-input/PromptInput.vue
  • src/renderer/src/components/message/MessageList.vue
  • src/renderer/src/components/settings/DisplaySettings.vue
  • src/renderer/src/App.vue
  • src/renderer/src/stores/theme.ts
src/renderer/src/**/*.vue

📄 CodeRabbit inference engine (.cursor/rules/vue-best-practices.mdc)

Use scoped styles to prevent CSS conflicts between components

Files:

  • src/renderer/src/components/prompt-input/PromptInput.vue
  • src/renderer/src/components/message/MessageList.vue
  • src/renderer/src/components/settings/DisplaySettings.vue
  • src/renderer/src/App.vue
src/renderer/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)

src/renderer/**/*.{ts,tsx,vue}: Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).
Use TypeScript for all code; prefer types over interfaces.
Avoid enums; use const objects instead.
Use arrow functions for methods and computed properties.
Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements.

Files:

  • src/renderer/src/components/prompt-input/PromptInput.vue
  • src/renderer/src/components/message/MessageList.vue
  • src/renderer/src/components/settings/DisplaySettings.vue
  • src/renderer/src/App.vue
  • src/renderer/shell/components/AppBar.vue
  • src/renderer/src/stores/theme.ts
src/renderer/**/*.{vue,ts}

📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)

Implement lazy loading for routes and components.

Files:

  • src/renderer/src/components/prompt-input/PromptInput.vue
  • src/renderer/src/components/message/MessageList.vue
  • src/renderer/src/components/settings/DisplaySettings.vue
  • src/renderer/src/App.vue
  • src/renderer/shell/components/AppBar.vue
  • src/renderer/src/stores/theme.ts
src/renderer/**/*.{ts,vue}

📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)

src/renderer/**/*.{ts,vue}: Use useFetch and useAsyncData for data fetching.
Implement SEO best practices using Nuxt's useHead and useSeoMeta.

Use Pinia for frontend state management (do not introduce alternative state libraries)

Files:

  • src/renderer/src/components/prompt-input/PromptInput.vue
  • src/renderer/src/components/message/MessageList.vue
  • src/renderer/src/components/settings/DisplaySettings.vue
  • src/renderer/src/App.vue
  • src/renderer/shell/components/AppBar.vue
  • src/renderer/src/stores/theme.ts
**/*.{ts,tsx,js,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

Use English for all logs and comments

Files:

  • src/renderer/src/components/prompt-input/PromptInput.vue
  • src/renderer/src/components/message/MessageList.vue
  • src/renderer/src/components/settings/DisplaySettings.vue
  • src/renderer/src/App.vue
  • src/renderer/shell/components/AppBar.vue
  • src/renderer/src/stores/theme.ts
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

Enable and adhere to strict TypeScript typing (avoid implicit any, prefer precise types)

Files:

  • src/renderer/src/components/prompt-input/PromptInput.vue
  • src/renderer/src/components/message/MessageList.vue
  • src/renderer/src/components/settings/DisplaySettings.vue
  • src/renderer/src/App.vue
  • src/renderer/shell/components/AppBar.vue
  • src/renderer/src/stores/theme.ts
src/renderer/{src,shell,floating}/**/*.vue

📄 CodeRabbit inference engine (CLAUDE.md)

src/renderer/{src,shell,floating}/**/*.vue: Use Vue 3 Composition API for all components
All user-facing strings must use i18n keys via vue-i18n (no hard-coded UI strings)
Use Tailwind CSS utilities and ensure styles are scoped in Vue components

Files:

  • src/renderer/src/components/prompt-input/PromptInput.vue
  • src/renderer/src/components/message/MessageList.vue
  • src/renderer/src/components/settings/DisplaySettings.vue
  • src/renderer/src/App.vue
  • src/renderer/shell/components/AppBar.vue
src/renderer/src/components/**/*

📄 CodeRabbit inference engine (CLAUDE.md)

Organize UI components by feature within src/renderer/src/

Files:

  • src/renderer/src/components/prompt-input/PromptInput.vue
  • src/renderer/src/components/message/MessageList.vue
  • src/renderer/src/components/settings/DisplaySettings.vue
src/renderer/src/**/*.{vue,ts}

📄 CodeRabbit inference engine (AGENTS.md)

All user-facing strings in the renderer must use vue-i18n keys defined in src/renderer/src/i18n

Files:

  • src/renderer/src/components/prompt-input/PromptInput.vue
  • src/renderer/src/components/message/MessageList.vue
  • src/renderer/src/components/settings/DisplaySettings.vue
  • src/renderer/src/App.vue
  • src/renderer/src/stores/theme.ts
**/*.{js,jsx,ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

Apply Prettier formatting: single quotes, no semicolons, max width 100

Files:

  • src/renderer/src/components/prompt-input/PromptInput.vue
  • src/renderer/src/components/message/MessageList.vue
  • src/renderer/src/components/settings/DisplaySettings.vue
  • src/renderer/src/App.vue
  • src/renderer/shell/components/AppBar.vue
  • src/renderer/src/stores/theme.ts
src/renderer/**/*.vue

📄 CodeRabbit inference engine (AGENTS.md)

Name Vue components in PascalCase (e.g., ChatInput.vue)

Files:

  • src/renderer/src/components/prompt-input/PromptInput.vue
  • src/renderer/src/components/message/MessageList.vue
  • src/renderer/src/components/settings/DisplaySettings.vue
  • src/renderer/src/App.vue
  • src/renderer/shell/components/AppBar.vue
src/renderer/shell/**

📄 CodeRabbit inference engine (AGENTS.md)

Keep shell UI code in src/renderer/shell/

Files:

  • src/renderer/shell/components/AppBar.vue
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development-setup.mdc)

**/*.{js,jsx,ts,tsx}: 使用 OxLint 进行代码检查
Log和注释使用英文书写

**/*.{js,jsx,ts,tsx}: Use OxLint for JS/TS code; pre-commit hooks run lint-staged and typecheck
Use camelCase for variables and functions
Use PascalCase for types and classes
Use SCREAMING_SNAKE_CASE for constants

Files:

  • src/renderer/src/stores/theme.ts
src/{main,renderer}/**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/electron-best-practices.mdc)

src/{main,renderer}/**/*.ts: Use context isolation for improved security
Implement proper inter-process communication (IPC) patterns
Optimize application startup time with lazy loading
Implement proper error handling and logging for debugging

Files:

  • src/renderer/src/stores/theme.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/error-logging.mdc)

**/*.{ts,tsx}: 始终使用 try-catch 处理可能的错误
提供有意义的错误信息
记录详细的错误日志
优雅降级处理
日志应包含时间戳、日志级别、错误代码、错误描述、堆栈跟踪(如适用)、相关上下文信息
日志级别应包括 ERROR、WARN、INFO、DEBUG
不要吞掉错误
提供用户友好的错误信息
实现错误重试机制
避免记录敏感信息
使用结构化日志
设置适当的日志级别

Files:

  • src/renderer/src/stores/theme.ts
src/renderer/src/stores/**/*.{vue,ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/pinia-best-practices.mdc)

src/renderer/src/stores/**/*.{vue,ts,tsx,js,jsx}: Use modules to organize related state and actions
Implement proper state persistence for maintaining data across sessions
Use getters for computed state properties
Utilize actions for side effects and asynchronous operations
Keep the store focused on global state, not component-specific data

Files:

  • src/renderer/src/stores/theme.ts
🧠 Learnings (3)
📚 Learning: 2025-07-21T01:46:30.354Z
Learnt from: CR
PR: ThinkInAIXYZ/deepchat#0
File: .cursor/rules/i18n.mdc:0-0
Timestamp: 2025-07-21T01:46:30.354Z
Learning: Applies to src/renderer/src/i18n/common.json : Shared translation keys must be placed in 'src/renderer/src/i18n/common.json'

Applied to files:

  • src/renderer/src/i18n/pt-BR/settings.json
📚 Learning: 2025-07-23T00:45:57.322Z
Learnt from: CR
PR: ThinkInAIXYZ/deepchat#0
File: .cursor/rules/vue-shadcn.mdc:0-0
Timestamp: 2025-07-23T00:45:57.322Z
Learning: Applies to src/renderer/**/*.{vue} : Use composition API and declarative programming patterns; avoid options API.

Applied to files:

  • src/renderer/src/App.vue
📚 Learning: 2025-07-21T01:47:28.817Z
Learnt from: CR
PR: ThinkInAIXYZ/deepchat#0
File: .cursor/rules/vue-best-practices.mdc:0-0
Timestamp: 2025-07-21T01:47:28.817Z
Learning: Applies to src/renderer/src/**/*.{vue,ts,tsx,js,jsx} : Use the Composition API for better code organization and reusability

Applied to files:

  • src/renderer/src/App.vue
🔇 Additional comments (1)
src/renderer/src/components/message/MessageList.vue (1)

57-90: Theme action buttons look consistent with the new token palette.

Switching the quick-action buttons to size="icon" with the shared bg-card/backdrop-blur styling keeps them aligned with the refreshed theme tokens. The updated text-foreground icons read well against both light/dark surfaces in my spot checks. Nice tidy cleanup.

Comment on lines 62 to 75
--foreground: hsl(0 0 15% / 1);
--card: hsl(0 0% 100%);
--card-foreground: var(--base-800);
--card-foreground: hsl(0 0 15% / 1);
--popover: hsl(0 0% 100%);
--popover-foreground: var(--base-800);
--popover-foreground: hsl(0 0 15% / 1);
--primary: hsl(210 100% 43%);
--primary-foreground: hsl(0 0% 100%);
--secondary: var(--base-200);
--secondary-foreground: var(--base-700);
--secondary: hsl(0 0 0% / 0.05);
--secondary-foreground: hsl(0 0 15% / 0.5);
--muted: hsl(0 0 0% / 0.03);
--muted-foreground: var(--base-400);
--muted-foreground: hsl(0 0 15% / 0.5);
--accent: hsl(0 0 15% / 0.05);
--accent-foreground: hsl(0 0 15% / 0.05);
--accent-foreground: hsl(0 0 15% / 0.8);
--destructive: hsl(0 84.2% 60.2%);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix invalid HSL syntax breaking theme colors

The new light-theme tokens drop the % on the saturation channel (e.g. hsl(0 0 15% / 1)), which is invalid CSS. When these variables are substituted (e.g. color: var(--foreground)), the property fails to parse and falls back, wiping out foreground/background colors across the UI. Please add the missing percent signs so the colors compile correctly.

-    --foreground: hsl(0 0 15% / 1);
-    --card-foreground: hsl(0 0 15% / 1);
-    --popover-foreground: hsl(0 0 15% / 1);
-    --secondary: hsl(0 0 0% / 0.05);
-    --secondary-foreground: hsl(0 0 15% / 0.5);
-    --muted-foreground: hsl(0 0 15% / 0.5);
-    --accent-foreground: hsl(0 0 15% / 0.8);
+    --foreground: hsl(0 0% 15% / 1);
+    --card-foreground: hsl(0 0% 15% / 1);
+    --popover-foreground: hsl(0 0% 15% / 1);
+    --secondary: hsl(0 0% 0% / 0.05);
+    --secondary-foreground: hsl(0 0% 15% / 0.5);
+    --muted-foreground: hsl(0 0% 15% / 0.5);
+    --accent-foreground: hsl(0 0% 15% / 0.8);

Repeat the same fix for the other new HSL literals in this file (e.g. Lines 156, 214).

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
--foreground: hsl(0 0 15% / 1);
--card: hsl(0 0% 100%);
--card-foreground: var(--base-800);
--card-foreground: hsl(0 0 15% / 1);
--popover: hsl(0 0% 100%);
--popover-foreground: var(--base-800);
--popover-foreground: hsl(0 0 15% / 1);
--primary: hsl(210 100% 43%);
--primary-foreground: hsl(0 0% 100%);
--secondary: var(--base-200);
--secondary-foreground: var(--base-700);
--secondary: hsl(0 0 0% / 0.05);
--secondary-foreground: hsl(0 0 15% / 0.5);
--muted: hsl(0 0 0% / 0.03);
--muted-foreground: var(--base-400);
--muted-foreground: hsl(0 0 15% / 0.5);
--accent: hsl(0 0 15% / 0.05);
--accent-foreground: hsl(0 0 15% / 0.05);
--accent-foreground: hsl(0 0 15% / 0.8);
--destructive: hsl(0 84.2% 60.2%);
--foreground: hsl(0 0% 15% / 1);
--card: hsl(0 0% 100%);
--card-foreground: hsl(0 0% 15% / 1);
--popover: hsl(0 0% 100%);
--popover-foreground: hsl(0 0% 15% / 1);
--primary: hsl(210 100% 43%);
--primary-foreground: hsl(0 0% 100%);
--secondary: hsl(0 0% 0% / 0.05);
--secondary-foreground: hsl(0 0% 15% / 0.5);
--muted: hsl(0 0 0% / 0.03);
--muted-foreground: hsl(0 0% 15% / 0.5);
--accent: hsl(0 0 15% / 0.05);
--accent-foreground: hsl(0 0% 15% / 0.8);
--destructive: hsl(0 84.2% 60.2%);
🤖 Prompt for AI Agents
In src/renderer/src/assets/style.css around lines 62 to 75, the HSL color
literals are using an invalid syntax by omitting the '%' on the saturation
channel (e.g. "hsl(0 0 15% / 1)" written as "hsl(0 0 15 / 1)"), causing CSS
properties that use these variables to fail; update each hsl(...) token to
include the '%' after the saturation value (and any other missing percent signs
for hue/saturation where applicable) so they become valid CSS (e.g. ensure "15"
becomes "15%"), and apply the same corrections to the other affected HSL
literals at lines ~156 and ~214 in the same file.

class="flex items-center gap-1 text-[10px] font-medium text-slate-200/90"
>
<span class="h-2 w-2 rounded-full bg-sky-400/80"></span>
Dark
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Replace hard-coded text with i18n keys.

The hard-coded strings "Dark" and "Light" in the system theme preview violate the i18n guideline. All user-facing strings in the renderer must use translation keys.

As per coding guidelines

Apply this diff to use i18n keys:

-                        Dark
+                        {{ t('settings.common.themeDark') }}
-                        Light
+                        {{ t('settings.common.themeLight') }}

Also applies to: 151-151

🤖 Prompt for AI Agents
In src/renderer/src/components/settings/DisplaySettings.vue around lines 141 and
151, replace the hard-coded "Dark" and "Light" strings in the system theme
preview with i18n translation keys; update the template to call the project's
i18n function (e.g. $t('settings.theme.dark') and $t('settings.theme.light') or
the project's established keys), and add corresponding keys/values to the
renderer locale files (for example en.json and other locales) so the
translations exist.

@zerob13 zerob13 merged commit 3aaafc7 into dev Oct 12, 2025
2 checks passed
@zerob13 zerob13 deleted the ui/refactor branch November 6, 2025 10:53
@zerob13 zerob13 restored the ui/refactor branch November 6, 2025 10:53
@zerob13 zerob13 deleted the ui/refactor branch November 23, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants