Skip to content

Conversation

@katinthehatsite
Copy link
Contributor

Related issues

Related to STU-1173

Proposed Changes

This PR explores the speeding up of the deeplink connection from WP.com e.g. connecting a WP.com site and opening a modal. In this PR, I am using an optimistic connection approach:

  • immediately create a minimal site object with data from the deeplink (this would need to be done on WP.com side, but we can add WP.com site's URL and site name which would be enough for our UI)
  • connect it to storage right away
  • and trigger the API refetch in parallel without blocking

Testing Instructions

  • Pull the changes from this branch
  • Start Studio
  • Navigate to the Sync tab
  • Make sure that you don't have any WP.com sites connected to your Studio site so that the Publish site button displays in the top right corner
  • Click on the Publish site button
  • Observe that you are brought to WP.com
  • Complete the purchase
  • Wait for the site to go Atomic
  • Observe that you see a popup asking you to open Studio
  • Confirm that the site you just created is connected in the Sync tab
  • Initially, you will see Loading site... placeholder and no URL in the Sync tab (because we need to pass these from Calypso and that needs to be done in the separate PR)
  • Confirm that the Push modal is open

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@katinthehatsite katinthehatsite self-assigned this Jan 9, 2026
@katinthehatsite katinthehatsite marked this pull request as draft January 9, 2026 13:07
@wpmobilebot
Copy link

📊 Performance Test Results

Comparing 11f9f3b vs trunk

site-editor

Metric trunk 11f9f3b Diff Change
load 6979.00 ms 6975.00 ms -4.00 ms 🟢 -0.1%

site-startup

Metric trunk 11f9f3b Diff Change
siteCreation 9087.00 ms 9080.00 ms -7.00 ms 🟢 -0.1%
siteStartup 3951.00 ms 3950.00 ms -1.00 ms 🟢 -0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change

@katinthehatsite
Copy link
Contributor Author

The code needs to be polished quite a bit so I am leaving this PR as a draft. What I am looking for is the feedback on the approach before adding any further polishing touches - does it make sense? is there a different way we could optimize the speed of connection that could be simpler?

One thing I dislike is creating a "fictional" site object that could potentially cause racing conditions and similar issues. Any opinions are welcome!

One option as an alternative that comes to mind could be adding a loading state to Sync tab if the user is connecting a site from deeplink and it is taking time. This way, they could have a visual indication of what is happening and this could be a simple and fast improvement in terms of the UX.

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