From f3164b8a606e8ba0815ecdbe0de5d9053811d507 Mon Sep 17 00:00:00 2001 From: abose Date: Sat, 22 Aug 2026 15:14:40 +0530 Subject: [PATCH 1/3] feat: add web.phcode.dev as the production web domain web.phcode.dev becomes the new home for the hosted web app, with phcode.dev deprecated shortly after. Most of the app is origin-relative and boots on a new host unchanged (service worker scope, VFS base URL, PWA manifest, CSP). What needed fixing are the places that compare against a hardcoded list of known origins: - Phoenix.TRUSTED_ORIGINS in src/index.html and test/SpecRunner.html, which is also serialized into live preview pages as TRUSTED_ORIGINS_EMBED. - The duplicate list in live-preview-loader.html. This page also lacked the TRUSTED_ORIGINS[location.origin] = true self-add that the other two copies have, so it is the one origin list that could not adapt to a new host on its own. Added. - loggableURLS in loggerSetup.js. This is a startsWith prefix match, so https://web.phcode.dev/ did not match https://phcode.dev and Bugsnag would have been silently disabled on the new domain. Same for the safeStarts list, which decides whether our own URLs survive path redaction in error reports. Deprecation of phcode.dev: - The dev/staging interstitial now redirects to web.phcode.dev instead of the domain being retired. web.phcode.dev is deliberately not added to that gated-hostname list, it is production. - og:url, twitter:url, the robots.txt sitemap line and sitemap-phcode.xml point at the new home. Both domains serve the same artifact during the overlap, so this consolidates SEO and link previews. Analytics for the prod web build move to a new GA property and core-analytics app name so the retired endpoint stops accruing data. Desktop GA, desktop app name and MixPanel are unchanged, the desktop app is not moving origins. Note that phcode.live must allowlist the new origin in its own docs/trustedOrigins.js, and account.phcode.dev needs CORS for it with Allow-Credentials, otherwise login and live preview fail silently. --- src/brackets.config.dist.json | 4 ++-- src/index.html | 11 ++++++----- src/live-preview-loader.html | 4 ++++ src/loggerSetup.js | 5 +++-- src/robots.txt | 2 +- src/sitemap-phcode.xml | 4 ++-- test/SpecRunner.html | 1 + 7 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/brackets.config.dist.json b/src/brackets.config.dist.json index 0e8dfcc466..1a8800fe19 100644 --- a/src/brackets.config.dist.json +++ b/src/brackets.config.dist.json @@ -1,9 +1,9 @@ { - "googleAnalyticsID" : "G-FBK9RP5YK2", + "googleAnalyticsID" : "G-G3DTS3ZR09", "googleAnalyticsIDDesktop": "G-M7MX9BYZZ3", "mixPanelID" : "8cb6814f733e37c05cc59b4adad26407", "coreAnalyticsID" : "phoenix", - "coreAnalyticsAppName" : "phoenix-prod", + "coreAnalyticsAppName" : "phoenix-web", "coreAnalyticsAppNameDesktop" : "desktop-prod", "environment" : "production", "buildtype" : "production", diff --git a/src/index.html b/src/index.html index 84083453df..481abdc295 100644 --- a/src/index.html +++ b/src/index.html @@ -47,14 +47,14 @@ - + - + @@ -73,10 +73,10 @@