Skip to content

feat: add web.phcode.dev as the production web domain - #3125

Merged
abose merged 3 commits into
mainfrom
ai
Aug 22, 2026
Merged

feat: add web.phcode.dev as the production web domain#3125
abose merged 3 commits into
mainfrom
ai

Conversation

@abose

@abose abose commented Aug 22, 2026

Copy link
Copy Markdown
Member

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.

abose added 3 commits August 22, 2026 15:18
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.
@sonarqubecloud

Copy link
Copy Markdown

@abose
abose merged commit 83c548c into main Aug 22, 2026
14 of 21 checks passed
@abose
abose deleted the ai branch August 22, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant