From e9c3c45612207f77f0239d3c7ee9f7ba6f93e6a5 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Sun, 22 Mar 2026 19:28:25 -0700 Subject: [PATCH] fix(app): pass yaml_path and tier args to render_banner and sync_ui_cookie MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both functions require (yaml_path, tier) — calling them with no args was silently failing inside the try/except, causing the banner to never render. --- app/app.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/app.py b/app/app.py index 7bef410..8a49a76 100644 --- a/app/app.py +++ b/app/app.py @@ -206,7 +206,9 @@ if IS_DEMO: # ── UI switcher banner (paid tier; or all visitors in demo mode) ───────────── try: from app.components.ui_switcher import render_banner - render_banner() + _ui_profile = _UserProfile(_USER_YAML) if _UserProfile.exists(_USER_YAML) else None + _ui_tier = _ui_profile.tier if _ui_profile else "free" + render_banner(_USER_YAML, _ui_tier) except Exception: pass # never crash the app over the banner @@ -215,6 +217,8 @@ pg.run() # ── UI preference cookie sync (runs after page render) ────────────────────── try: from app.components.ui_switcher import sync_ui_cookie - sync_ui_cookie() + _ui_profile = _UserProfile(_USER_YAML) if _UserProfile.exists(_USER_YAML) else None + _ui_tier = _ui_profile.tier if _ui_profile else "free" + sync_ui_cookie(_USER_YAML, _ui_tier) except Exception: pass # never crash the app over cookie sync