Monitoring a Sitecore XM/XP migration inside Sitecore Pages

I'm currently working on a large enterprise Sitecore project migrating from Sitecore XM/XP to SitecoreAI (formerly XM Cloud). Migrations like this rarely happen in one big bang. Both platforms run side by side for a while, with an Application Gateway deciding per environment which one actually serves a given page.

That setup works well operationally, but it creates a quieter problem day to day.

The problem

When you're looking at a page in Sitecore Pages, there's nothing telling you which platform is actually serving it. Is /account already live on the new platform? Is it live everywhere, or only in test? The routing configuration has the answer, but it lives in an infrastructure repository, not anywhere near the content editor.

The real question: could Sitecore Pages itself just tell you which platform is serving the page you're looking at, live, without switching context?

The idea

That's exactly what Sitecore Marketplace apps are for. They're custom UI panels that plug directly into SitecoreAI through defined extension points, communicating with the host through the Marketplace SDK. No changes to the CMS core, no separate portal to open, just a small app that shows up right where you're already working.

I built one with two extension points:

  • A Page Context Panel, which shows routing status for the page currently open in Sitecore Pages.
  • A Dashboard Widget, which shows an aggregate view across all routes and environments.

What it does

Open a page that's already fully migrated, and the panel shows it clearly.

Sitecore Pages context panel showing a page routed to the new platform

Switch to a page that hasn't moved yet, and it updates immediately, no refresh needed.

Sitecore Pages context panel showing a page still on Sitecore XM/XP

The environment comparison is where it gets genuinely useful. Here's a page that's already on the new platform in test, but not yet promoted to acceptance or production. The mismatch is highlighted automatically:

Sitecore Pages context panel showing a route that differs between environments

Zoom out from a single page, and the Dashboard Widget shows the bigger picture: how many unique routes are already on the new platform, broken down per environment, with each row expandable to see the actual list.

Migration dashboard widget showing route counts per environment

How it's built

The core of the Page Context Panel is a subscription to pages.context through the Marketplace SDK. Instead of fetching the current page once, subscribing means the panel re-renders every time you navigate to a different page. This is the same pattern Sitecore documents in Combine multiple operations:

useEffect(() => {
  let unsubscribe: (() => void) | undefined;

  client
    .query("pages.context", {
      subscribe: true,
      onSuccess: (ctx) => {
        setPageContext(ctx ?? null);
        setPageLoading(false);
      },
    })
    .then((res) => {
      if (res?.data) setPageContext(res.data);
      if (res?.unsubscribe) unsubscribe = res.unsubscribe;
      setPageLoading(false);
    })
    .catch(() => setPageLoading(false));

  return () => unsubscribe?.();
}, [client]);

That gives the panel the current page's path. The other half is matching that path against the routing rules per environment, to determine which backend actually serves it:

function getRouteMatch(routing: EnvRouting, pagePath: string): RouteMatch {
  for (const rule of routing.rules) {
    if (rule.paths.some((path) => matchesRoute(pagePath, path))) {
      return { backend: rule.backend, ruleName: rule.name };
    }
  }
  return { backend: routing.defaultBackend, ruleName: null };
}

Combine the two, run it for test, acceptance, and production, and you get the live comparison shown above. The routing rules themselves are read from the gateway configuration for the demo in this post. In a real deployment you'd point that at wherever your own routing source of truth lives.

Conclusion

A small, purpose-built Marketplace app turned out to be a low-effort way to remove a real source of friction during migration. No changes to the CMS itself, no new portal for editors to learn, just a panel that lives exactly where the question comes up. Given how quick it was to build two working extension points, I expect this to become a common pattern for teams running long hybrid migrations on SitecoreAI.