Open xcyeye opened 4 hours ago
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
📦 Deployment environment
Official Preview, Docker
latest
Windows
Chrome
When the set theme color is opposite to that of the system (lobechat is set to light color, and the windows color mode is set to dark), when refreshing the web page, the dark color will appear first and then the light color. I also found this problem in lobechat.com, local and self-built Docker. I tracked it down and found that the reason for this situation is (lobechat's theme is light and the windows system color is dark):
I'm seeing this issue in both Chrome and Edge browsers.
No response
No response
👀 @xcyeye
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。
@xcyeye Hello there! I'm here to help you with any bugs, questions, or contributions you have. I'm an expert bot designed to assist you while you wait for a human maintainer. Let me know how I can assist you!
I found a similar closed issue that might be related to the problem you're experiencing. The issue was about a brief switch to light mode when navigating to assistant settings in dark mode. It was resolved by a refactor in the Next.js app router [1].
For your specific issue, it seems like the theme appearance cookie (LOBE_THEME_APPEARANCE
) is being updated incorrectly during page refreshes, causing the theme to switch back and forth. This might be due to how the theme is being set based on system settings and user preferences.
You might want to check the logic that updates the LOBE_THEME_APPEARANCE
cookie to ensure it aligns with the intended behavior. The onAppearanceChange
event is used to update this cookie, so reviewing how this event is triggered and handled could be helpful [2].
To continue talking to Dosu, mention @dosu.
📦 部署环境
Official Preview, Docker
📌 软件版本
latest
💻 系统环境
Windows
🌐 浏览器
Chrome
🐛 问题描述
当设置的主题色和系统相反时(lobechat设置为浅色,windows颜色模式设置为深色),刷新网页时,会出现先深色后浅色的情况。我在lobechat.com,本地以及自建的Docker中也发现了这个问题。 我追踪了一下,出现这种情况的原因是(lobechat的主题为浅色,windows系统色为深色):
我在Chrome和Edge浏览器中都发现了这个问题。
📷 复现步骤
🚦 期望结果
No response
📝 补充信息
No response