Comfy-Org / Comfy-Org/ComfyUI_frontend
[Bug]: Dark/light theme switch intermittently fails to work
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
### Prerequisites
- [x] I am running the latest version of ComfyUI
- [x] I have searched existing issues to make sure this isn't a duplicate
- [x] I have tested with all custom nodes disabled ([see how](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled))
### What happened?
The dark/light theme switch in the menu sometimes doesn't work on first attempt. However, if the user goes into settings, makes any tweak, and then tries the theme switch button again, it works properly. This suggests there may be an initialization or state issue with the theme switching functionality.
https://github.com/user-attachments/assets/e02f8495-20cf-48a9-8c19-8f2eac3045b5
### Steps to Reproduce
1. Intermittent
2. Go to light/dark toggle and trigger it.
3. Notice that the mode doesn't switch
4. Go into settings and change a setting
5. Toggle light/dark again.
6. Notice that it works
### How is this affecting you?
Visual/UI issue only
### ComfyUI Frontend Version
OP: 1.25
JinYi: 1.26.4
### Browser
Chrome/Chromium
### Console Errors
```javascript
```
### Logs
```shell
```
### Additional Context
@viva-jinyi could you add more context?
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-5044-Bug-2526d73d365081249380d8b2386aa558) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.