Skip to content

Fix org app-switcher linking to the official site on custom deployments#1714

Open
aryeh-stark wants to merge 1 commit into
BuilderIO:mainfrom
21-Stark-AI:upstream/app-switcher-origin
Open

Fix org app-switcher linking to the official site on custom deployments#1714
aryeh-stark wants to merge 1 commit into
BuilderIO:mainfrom
21-Stark-AI:upstream/app-switcher-origin

Conversation

@aryeh-stark

Copy link
Copy Markdown
Contributor

Problem

defaultOrgAppLinks builds the org app-switcher from each template's hardcoded *.agent-native.com prod URL. On a self-hosted, path-prefixed deployment (apps served at <origin>/<app>/), every sibling-app link therefore points at the first-party hosted site instead of the current deployment.

Fix

When the client is path-prefixed (VITE_APP_BASE_PATH baked at build), build sibling links from the current origin → <origin>/<app>/. Keep the prod URLs for the first-party subdomain layout. Backward compatible (no VITE_APP_BASE_PATH → unchanged).

Tests both directions + changeset.

defaultOrgAppLinks hardcoded each template's *.agent-native.com prod URL, so a
path-prefixed deployment (served at <origin>/<app>/, e.g. apps.example.com/mail/)
linked every sibling app to the first-party hosted site instead of the current
deployment. Build <origin>/<app>/ links when the client is path-prefixed
(VITE_APP_BASE_PATH baked at build); keep the prod URLs for the subdomain layout.
@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Here's a visual recap of what changed:

Visual recap

Open the full interactive recap

@steve8708

Copy link
Copy Markdown
Contributor

great catch, thanks @aryeh-stark ! just need lint to pass and good to merge

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants