Skip to content

MSD: support CIAB routes at my.woo.localhost and my.woo.com#108550

Open
fushar wants to merge 1 commit intotrunkfrom
my-woo-envs-alt
Open

MSD: support CIAB routes at my.woo.localhost and my.woo.com#108550
fushar wants to merge 1 commit intotrunkfrom
my-woo-envs-alt

Conversation

@fushar
Copy link
Contributor

@fushar fushar commented Feb 6, 2026

Part of DOTMSD-1073
Alternative to #108536

Proposed Changes

Add app-side routing to route CIAB hostnames (my.woo.localhost and my.woo.com) to serve app-ciab.

The basic idea is that we serve app-ciab at / base path for the above hostnames, and /ciab for any other MSD hostnames.

Important

We will need to solve how to get the "current dashboard" in this logic, as the above hostnames will no longer have the /ciab base path:

export function dashboardLink( path: string = '' ) {

So interaction with Stepper / wpcom could still break. It is out of scope for this PR now.

Why are these changes being made?

See: pMz3w-nnj-p2

Testing Instructions

  1. Check out this PR locally, run yarn start:
    • Visit calypso.localhost:3000/sites; verify you see Hosting Dashboard v1
      • Verify you can also visit nav-unification pages like calypso.localhost:3000/home/:siteSlug.
    • Visit my.localhost:3000; verify you see MSD (dotcom)
    • Visit my.localhost:3000/ciab; verify you see MSD (CIAB)
    • Visit my.woo.localhost:3000; verify you see MSD (CIAB)
  2. Check out this PR locally, run yarn start-dashboard:
    • Visit my.localhost:3000; verify you see MSD (dotcom)
    • Visit my.localhost:3000/ciab; verify you see MSD (CIAB)
    • Visit my.woo.localhost:3000; verify you see MSD (CIAB)
  3. Visit <Calypso Live>/sites; verify you see Hosting Dashboard v1
    - Verify you can also visit nav-unification pages like calypso.localhost:3000/home/:siteSlug.
  4. Visit<Dashboard Live>; verify you see MSD (dotcom)
  5. Visit<Dashboard Live>/ciab; verify you see MSD (CIAB)

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@fushar fushar force-pushed the my-woo-envs-alt branch 2 times, most recently from 60cc72a to 319de54 Compare February 6, 2026 01:12
@matticbot
Copy link
Contributor

matticbot commented Feb 6, 2026

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • agents-manager
  • blaze-dashboard
  • happy-blocks
  • help-center
  • notifications
  • odyssey-stats
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug my-woo-envs-alt on your sandbox.

@fushar fushar changed the title WIP support CIAB on my.woo.com MSD: support CIAB routes at my.woo.localhost and my.woo.com Feb 6, 2026
@fushar fushar requested a review from taipeicoder February 6, 2026 04:02
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Feb 6, 2026
@fushar fushar self-assigned this Feb 6, 2026
@fushar fushar marked this pull request as ready for review February 6, 2026 04:46
@fushar fushar requested review from a team as code owners February 6, 2026 04:46
Copy link
Member

@p-jackson p-jackson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I think this is a good track to take. The server continues to decide which AppConfig is getting used, and webpack bundler continues to make a bundle specifically for each MSD variant. So I like that.

I don't like that the hostname config value will be incorrect from the client-side's point of view. In pMz3w-nnj-p2#comment-131646 I suggest also server-rendering the hostname config value based on the incoming request. Ultimately I think we'll need both changes, both server-rendering to make sure hostname is correct, and these changes which choose the correct section based on the incoming request.

return [
'http://my.localhost:3000',
'https://my.wordpress.com',
'http://my.woo.localhost:3000',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw I kinda like my-woo.localhost:3000. Just to keep the number of sub-domain components consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I don't have strong opinion; I think I subconsciously followed the existing jetpack.cloud.localhost hostname. 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that's fair. TIL about jetpack.cloud.localhost

boot( {
name: 'CIAB',
basePath: '/ciab',
basePath: getCiabDashboardBasePath( window.location.hostname ),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just a temporary thing, having the ability to support both /ciab and my.woo.com? Seems like we should just remove the /ciab path, but this is perhaps to help with the transition so we don't immediately break the link between CIAB site dashboards and the MSD?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need this anyway for the Dashboard Live link. Since we only have one live environment, and the domain is random string, there's no way to distinguish it. So currently CIAB is accessible at <Dashboard Live link>/ciab/*, while dotcom's is at the root path.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes, live links!

handleRoute( DASHBOARD_CIAB_SECTION_DEFINITION, '/ciab', 'entry-dashboard-ciab', ( req ) => {
// Allow CIAB routes under my.localhost.
return req.get( 'host' ).startsWith( 'my.localhost' );
handleRoute( DOTCOM_DASHBOARD_SECTION_DEFINITION, route, 'entry-dashboard-dotcom', ( req ) =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a separate handleRoute call for each MSD-variant seems fine to me. Calypso v1 has that giant sections.ts file to do it all declaratively, and if we end up with enough MSD-variants maybe we want to do it declaratively too. But I'm not mad about having a copy-pasted line for each dashboard type.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we want to do it declaratively too.

Hmm, I'm afraid if it's possible at all. We can only get the current request's host when we actually get the request, so that's why we need to "register" all the sections and then filter the correct one based on req.get('host') imperatively here 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants