Fix org app-switcher linking to the official site on custom deployments#1714
Open
aryeh-stark wants to merge 1 commit into
Open
Fix org app-switcher linking to the official site on custom deployments#1714aryeh-stark wants to merge 1 commit into
aryeh-stark wants to merge 1 commit into
Conversation
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.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Contributor
|
Here's a visual recap of what changed:
Open the full interactive recap |
Contributor
|
great catch, thanks @aryeh-stark ! just need lint to pass and good to merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
defaultOrgAppLinksbuilds the org app-switcher from each template's hardcoded*.agent-native.comprod 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_PATHbaked at build), build sibling links from the current origin →<origin>/<app>/. Keep the prod URLs for the first-party subdomain layout. Backward compatible (noVITE_APP_BASE_PATH→ unchanged).Tests both directions + changeset.