From 4b6990b2c07dd7ddc28a421c85667d86cadb769b Mon Sep 17 00:00:00 2001 From: xrpbanks <126300068+xrpbanks@users.noreply.github.com> Date: Sun, 30 Aug 2026 03:09:58 +0000 Subject: [PATCH 1/3] Fix canonical WordPress CalorieApp route Point standalone CalorieApp sign-in to the canonical WordPress page route. --- frontend/components/XamanLoginPanel.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/components/XamanLoginPanel.tsx b/frontend/components/XamanLoginPanel.tsx index 0289a25..749ae4e 100644 --- a/frontend/components/XamanLoginPanel.tsx +++ b/frontend/components/XamanLoginPanel.tsx @@ -47,7 +47,7 @@ const PENDING_LOGIN_STORAGE_KEY = "calorieapp-pending-xaman-login"; const LOGIN_RETURN_STORAGE_KEY = "calorieapp-login-return"; const WORDPRESS_APP_URL = process.env.NEXT_PUBLIC_WORDPRESS_APP_URL?.trim() || - "https://calorietoken.net/calorieapp/"; + "https://calorietoken.net/index.php/calorieapp/"; type ParentBridgeMessage = { type?: unknown; From e72e33bb9e5b3f9591c739953c49cfbfdf2e8cb9 Mon Sep 17 00:00:00 2001 From: xrpbanks <126300068+xrpbanks@users.noreply.github.com> Date: Sun, 30 Aug 2026 03:11:22 +0000 Subject: [PATCH 2/3] Document canonical WordPress CalorieApp route --- frontend/.env.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/.env.example b/frontend/.env.example index 9f61495..19ac54b 100644 --- a/frontend/.env.example +++ b/frontend/.env.example @@ -11,7 +11,7 @@ NEXT_PUBLIC_BACKEND_WAKE_URL=http://localhost:8000 # Same-browser WordPress launcher used only when the app is opened outside the # [calorieapp_embed] page. Keep this on the canonical CalorieToken site. -NEXT_PUBLIC_WORDPRESS_APP_URL=https://calorietoken.net/calorieapp/ +NEXT_PUBLIC_WORDPRESS_APP_URL=https://calorietoken.net/index.php/calorieapp/ # Optional: frontend-only post-login fallback route if you need custom UX. # Keep this app-local (starts with /) and do not put secrets here. From b534a9ef40f30cc60bd0a55f6fef7ed7bb39e775 Mon Sep 17 00:00:00 2001 From: xrpbanks <126300068+xrpbanks@users.noreply.github.com> Date: Sun, 30 Aug 2026 03:12:29 +0000 Subject: [PATCH 3/3] Guard canonical WordPress CalorieApp route Add a test to ensure frontend uses the canonical WordPress URL. --- backend/tests/test_frontend_configuration.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 backend/tests/test_frontend_configuration.py diff --git a/backend/tests/test_frontend_configuration.py b/backend/tests/test_frontend_configuration.py new file mode 100644 index 0000000..19ae302 --- /dev/null +++ b/backend/tests/test_frontend_configuration.py @@ -0,0 +1,19 @@ +from pathlib import Path + + +REPO_ROOT = Path(__file__).resolve().parents[2] +CANONICAL_WORDPRESS_APP_URL = "https://calorietoken.net/index.php/calorieapp/" +NON_CANONICAL_WORDPRESS_APP_URL = "https://calorietoken.net/calorieapp/" + + +def test_frontend_uses_canonical_wordpress_calorieapp_route(): + panel_source = ( + REPO_ROOT / "frontend" / "components" / "XamanLoginPanel.tsx" + ).read_text(encoding="utf-8") + env_example = (REPO_ROOT / "frontend" / ".env.example").read_text( + encoding="utf-8" + ) + + for source in (panel_source, env_example): + assert CANONICAL_WORDPRESS_APP_URL in source + assert NON_CANONICAL_WORDPRESS_APP_URL not in source