Skip to content

Fix empty siteId and sessionId when leaving update-design flow#101821

Merged
paulopmt1 merged 3 commits intotrunkfrom
fix/fullscreen-launchpad-update-design
Mar 25, 2025
Merged

Fix empty siteId and sessionId when leaving update-design flow#101821
paulopmt1 merged 3 commits intotrunkfrom
fix/fullscreen-launchpad-update-design

Conversation

@p-jackson
Copy link
Member

@p-jackson p-jackson commented Mar 25, 2025

Fixes #101822

Proposed Changes

  • Prevent the update-design flow from appending empty siteId and sessionId query params when it navigates to the full screen launchpad
  • As an extra measure, prevent empty siteId query params from causing a WSOD in the full screen launchpad.

The fix here is that addQueryArgs() will only ignore undefined values. nulls or empty strings get added as query args.

Why are these changes being made?

This bug was introduced by #99676 when the getPostFlowUrl() function was updated to include sessionId.

CC @alshakero @agrullon95

Testing Instructions

  1. Create new site using a flow that ends in the full screen launchpad
  • e.g. /setup/free
  1. Proceed through flow, everything can be free
  2. After arriving in the fullscreen launchpad, choose to update your design selection
  3. Choose a different design
  4. WSOD when you land back on the fullscreen launchpad
CleanShot.2025-03-25.at.17.50.02.mp4

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?
  • 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)?

@github-actions
Copy link

github-actions bot commented Mar 25, 2025

@p-jackson p-jackson self-assigned this Mar 25, 2025
@p-jackson p-jackson added Bug When a feature is broken and / or not performing as intended Free Onboarding Flow Bug labels Mar 25, 2025
@matticbot
Copy link
Contributor

matticbot commented Mar 25, 2025

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~39 bytes added 📈 [gzipped])

Details
name                parsed_size           gzip_size
update-design-flow        +24 B  (+0.1%)       +3 B  (+0.0%)
start-writing-flow        +24 B  (+0.2%)       +6 B  (+0.2%)
site-setup-flow           +24 B  (+0.0%)       +8 B  (+0.0%)
newsletter-flow           +24 B  (+0.2%)       +8 B  (+0.2%)
example-flow              +24 B  (+0.1%)       +7 B  (+0.1%)
build-flow                +24 B  (+0.3%)       +7 B  (+0.2%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@p-jackson p-jackson marked this pull request as ready for review March 25, 2025 07:32
@p-jackson p-jackson requested a review from a team as a code owner March 25, 2025 07:32
@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 Mar 25, 2025
@p-jackson p-jackson requested review from a team March 25, 2025 07:33
@matticbot
Copy link
Contributor

matticbot commented Mar 25, 2025

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug fix/fullscreen-launchpad-update-design on your sandbox.

Copy link
Contributor

@paulopmt1 paulopmt1 left a comment

Choose a reason for hiding this comment

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

It's working as it should. Thanks for fixing it @p-jackson, and thanks for adding tests!

@paulopmt1 paulopmt1 merged commit 5da0363 into trunk Mar 25, 2025
14 of 15 checks passed
@paulopmt1 paulopmt1 deleted the fix/fullscreen-launchpad-update-design branch March 25, 2025 12:14
@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 Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug When a feature is broken and / or not performing as intended Free Onboarding Flow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: WSOD after completing the "update-design" onboarding flow

3 participants

Comments