Expose default_color_mode in rx.Config#6716
Conversation
Greptile SummaryThis PR exposes
Confidence Score: 5/5The change is well-scoped — a new config field with validation, a constants refactor, and a JS provider restructuring, all covered by targeted tests. Config validation runs after env-var resolution so invalid values (including those from REFLEX_DEFAULT_COLOR_MODE) are caught early. The JS refactoring correctly moves context provision to ThemeProvider and the preload script default is consistent with the compiled context value. Tests cover all three valid modes, the precedence logic, env-var override, and document-root compilation. No files require special attention. Important Files Changed
Reviews (8): Last reviewed commit: "validate Config.default_color_mode" | Re-trigger Greptile |
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f5a912f962
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Decouple the actual toggle / set color mode functionality from radix so it can be used without including the RadixThemesColorModeProvider. Simplify RadixThemesColorModeProvider to only be responsible for flipping the .radix-themes root classes.
use setColorMode instead of setTheme for improved validation
No description provided.