From 7e5bc6ef72228f1356cd30dd16dd74c0b1d71ff2 Mon Sep 17 00:00:00 2001 From: Gaurav Dubey Date: Thu, 16 Jul 2026 00:39:01 +0530 Subject: [PATCH] fix(init): declare RadixThemesPlugin in default rxconfig template The blank app template renders Radix Themes components (rx.heading, rx.text, rx.code, rx.button), which auto-enable the Radix plugin at compile time. The generated rxconfig.py did not list RadixThemesPlugin, so the compiler fell back to implicit enablement and emitted the "Implicit Radix Themes enablement has been deprecated in version 0.9.0" warning on the first `reflex run` of every freshly scaffolded app. Declare rx.plugins.RadixThemesPlugin() explicitly in the config template (kept last to preserve the existing plugin/stylesheet ordering the implicit path used), which is the exact remedy the deprecation message instructs users to apply. New apps are now warning-free. closes #6483 --- packages/reflex-base/src/reflex_base/compiler/templates.py | 1 + tests/units/utils/test_utils.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/packages/reflex-base/src/reflex_base/compiler/templates.py b/packages/reflex-base/src/reflex_base/compiler/templates.py index ca94aa2c482..22adab11daa 100644 --- a/packages/reflex-base/src/reflex_base/compiler/templates.py +++ b/packages/reflex-base/src/reflex_base/compiler/templates.py @@ -139,6 +139,7 @@ def rxconfig_template(app_name: str): plugins=[ rx.plugins.SitemapPlugin(), rx.plugins.TailwindV4Plugin(), + rx.plugins.RadixThemesPlugin(), ] )""" diff --git a/tests/units/utils/test_utils.py b/tests/units/utils/test_utils.py index 4c60761e62e..8278a35e6bc 100644 --- a/tests/units/utils/test_utils.py +++ b/tests/units/utils/test_utils.py @@ -14,6 +14,7 @@ from reflex_base.vars.base import Var from reflex.environment import environment +from reflex.plugins import RadixThemesPlugin from reflex.state import BaseState from reflex.utils import exec as utils_exec from reflex.utils import frontend_skeleton, js_runtimes, prerequisites, templates, types @@ -361,6 +362,11 @@ def test_create_config_e2e(tmp_working_dir): exec((tmp_working_dir / constants.Config.FILE).read_text(), eval_globals) config = eval_globals["config"] assert config.app_name == app_name + # The default template must declare RadixThemesPlugin explicitly. The blank + # app renders Radix Themes components, so without an explicit plugin the + # compiler falls back to implicit enablement and emits a deprecation warning + # on the first `reflex run` of a freshly scaffolded app (issue #6483). + assert any(isinstance(plugin, RadixThemesPlugin) for plugin in config.plugins) class DataFrame: