Skip to content

Read theme from authStore instead of next-themes - #1846

Open
Octagon-simon wants to merge 1 commit into
eigent-ai:mainfrom
Octagon-simon:patch/toast-ui-color-mismatch
Open

Read theme from authStore instead of next-themes#1846
Octagon-simon wants to merge 1 commit into
eigent-ai:mainfrom
Octagon-simon:patch/toast-ui-color-mismatch

Conversation

@Octagon-simon

Copy link
Copy Markdown

Pull Request

Related Issue

Fixes #1845

Description

The toast component src/components/ui/sonner.tsx read its theme from next-themes's useTheme() (const { theme = 'system' } = useTheme()), which did not reflect the app's actually-resolved theme. That's why the toast box rendered with colors that didn't match the device theme.

So I changed the Toaster to read the resolved appearance from the app's theme store instead.

Testing Evidence (REQUIRED)

Before:

Screenshot 2026-08-13 at 15 07 25

After:

Screenshot 2026-08-13 at 14 53 06
  • I have included human-verified testing evidence in this PR.
  • This PR includes frontend/UI changes, and I attached screenshot(s) or screen recording(s).
  • No frontend/UI changes in this PR.

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Contribution Guidelines Acknowledgement

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.

[UI Ehancement]: Toast color mismatch

1 participant