From 08928a9f8ea75e52ecd8f14c062e7abb9a404c40 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Sat, 28 Feb 2026 21:06:52 +0000 Subject: [PATCH] fix: app-switcher dropdown navigates within demo on subdomains On demo.rspace.online, the dropdown was linking to landing pages (rspace.online/moduleId) instead of navigating between demo pages. Changed condition to only use landing-page links on the bare domain. Co-Authored-By: Claude Opus 4.6 --- shared/components/rstack-app-switcher.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/shared/components/rstack-app-switcher.ts b/shared/components/rstack-app-switcher.ts index 2d82152..cae1728 100644 --- a/shared/components/rstack-app-switcher.ts +++ b/shared/components/rstack-app-switcher.ts @@ -187,11 +187,12 @@ export class RStackAppSwitcher extends HTMLElement { : `${m.icon}`; const space = this.#getSpaceSlug(); - // On demo (bare domain, demo subdomain, or standalone r*.online): link to landing pages + // On bare domain or standalone r*.online: link to landing pages. + // On demo.rspace.online or user subdomains: use rspaceNavUrl for in-app navigation. const host = window.location.host.split(":")[0]; - const onRspace = host.includes("rspace.online"); + const isBareDomain = host === "rspace.online" || host === "www.rspace.online"; const href = - (onRspace && space === "demo") || isStandaloneDomain() + (isBareDomain || isStandaloneDomain()) ? `${window.location.protocol}//rspace.online/${m.id}` : rspaceNavUrl(space, m.id);