Skip to content

Dashboard: fix launch celebration modal Get domain link 500 in standalone dashboard#112209

Merged
StevenDufresne merged 2 commits into
trunkfrom
fix/dashboard-launch-modal-domain-link
Jul 2, 2026
Merged

Dashboard: fix launch celebration modal Get domain link 500 in standalone dashboard#112209
StevenDufresne merged 2 commits into
trunkfrom
fix/dashboard-launch-modal-domain-link

Conversation

@StevenDufresne

@StevenDufresne StevenDufresne commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Fixes DOTMSD-1378

Proposed Changes

  • Build the "Get your domain" link in the site launch celebration modal via the shared getAddSiteDomainUrl() helper instead of a hardcoded relative /domains/add/<slug> path.
  • Strengthen the modal's upsell test to assert the link points at the environment-aware add-domain URL.

Why are these changes being made?

  • In the standalone Multi-site Dashboard, a relative /domains/add/<slug> resolves against the current site host (e.g. <slug>.wpcomstaging.com), which has no add-domain flow — so the link 500s.
  • The shared helper already handles both environments correctly: an absolute wordpress.com URL when standalone, and a relative path in the Calypso backport. Three other components already use it; this brings the modal in line.

Testing Instructions

  • In the multi-site dashboard, open a site's Performance page for a site without a custom domain.
  • Launch the site so the celebration modal appears.
  • Click "Get your domain" and confirm it lands on the wordpress.com add-domain flow rather than a 500.
  • yarn test-client client/dashboard/sites/site-launch-celebration-modal/test/index.test.tsx

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?
  • For UI changes, have you tested the affected components in dark mode?
  • 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)?

…lone dashboard

The modal hardcoded a relative /domains/add/<slug> URL, which resolves
against the current host in the standalone dashboard and 500s. Delegate
to getAddSiteDomainUrl(), which builds an absolute wordpress.com URL when
standalone and a relative path in the Calypso backport.

Ref: DOTMSD-1378
@StevenDufresne
StevenDufresne marked this pull request as ready for review July 2, 2026 07:35
@StevenDufresne
StevenDufresne requested a review from a team as a code owner July 2, 2026 07:35
@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 Jul 2, 2026
@StevenDufresne
StevenDufresne requested a review from a team July 2, 2026 07:36
Comment thread client/dashboard/sites/site-launch-celebration-modal/test/index.test.tsx Outdated
Updated comment for clarity in test case.

@paulopmt1 paulopmt1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's working as expected, thanks for the fix @StevenDufresne!

Tested prod:

Image

With the fix it properly redirects:

Image

@StevenDufresne
StevenDufresne added this pull request to the merge queue Jul 2, 2026
Merged via the queue into trunk with commit d94b9dc Jul 2, 2026
15 checks passed
@StevenDufresne
StevenDufresne deleted the fix/dashboard-launch-modal-domain-link branch July 2, 2026 23:07
@github-actions github-actions Bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants