Skip to content

fix[sdk][studio]: ENG-13439 boolean targeting in Builder Studio - #4830

Open
floating-dynamo wants to merge 2 commits into
mainfrom
ENG-13439-studio
Open

fix[sdk][studio]: ENG-13439 boolean targeting in Builder Studio#4830
floating-dynamo wants to merge 2 commits into
mainfrom
ENG-13439-studio

Conversation

@floating-dynamo

@floating-dynamo floating-dynamo commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Description

  • This fixes boolean targeting rules that failed because Studio sent string values instead of booleans.
  • Convert Studio user attribute values "true" and "false" back to booleans before sending the Content API request.

Link to JIRA ticket (if applicable):
https://builder-io.atlassian.net/browse/ENG-13439

Screenshot/Clip
Clip - https://clips.agent-native.com/share/A3fWy4lLi4dJ?ref=clip_share


Note

Low Risk
Small, Studio-preview-only change to query parsing with a focused unit test; no auth or persistence impact.

Overview
Fixes boolean targeting in Builder Studio preview by normalizing user-attribute query values before they are sent to the Content API.

When preview=BUILDER_STUDIO, builder.userAttributes.* URL params are parsed via parseStudioUserAttribute, which turns string "true" / "false" into real booleans (other values stay unchanged). A test covers mixed boolean and string attributes plus the existing urlPath / host injection.

Patch bumps all framework SDK packages via changeset.

Reviewed by Cursor Bugbot for commit b9861b0. Bugbot is set up for automated code reviews on this repo. Configure here.

@floating-dynamo
floating-dynamo requested a review from a team September 1, 2026 10:59
@floating-dynamo floating-dynamo self-assigned this Sep 1, 2026
@floating-dynamo
floating-dynamo requested review from lihuelg and removed request for a team September 1, 2026 10:59
@changeset-bot

changeset-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b9861b0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
@builder.io/sdk-angular Patch
@builder.io/sdk-react-nextjs Patch
@builder.io/sdk-qwik Patch
@builder.io/sdk-react Patch
@builder.io/sdk-react-native Patch
@builder.io/sdk-solid Patch
@builder.io/sdk-svelte Patch
@builder.io/sdk-vue Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@nx-cloud

nx-cloud Bot commented Sep 1, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit b9861b0

Command Status Duration Result
nx test @e2e/qwik-city ✅ Succeeded 8m 7s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-09-01 11:37:15 UTC

@builder-io-integration builder-io-integration Bot 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.

Builder reviewed your changes — looks good ✅

Review Details

Code Review Summary

PR #4830 fixes Builder Studio preview targeting by normalizing the URL-derived builder.userAttributes.* values "true" and "false" into JSON booleans before the Content API URL is generated. The implementation is narrowly scoped to the existing BUILDER_STUDIO path, preserves other attribute values, and continues to add the current pathname and host. The regression test covers both boolean values, a regular string attribute, and the generated context attributes. The changeset includes the affected SDK packages.

Risk assessment: Low. This is a focused SDK preview-parsing change with no authentication, persistence, mutation, or API-contract changes.

No confirmed bugs were found by either parallel code-review agent. The test suite was not executed because the workspace dependency setup failed while building isolated-vm; this is an environment limitation rather than a finding in the patch.

🧪 Browser testing: Skipped — dev server unavailable on HEAD due to failed workspace setup (isolated-vm build failure and no dev command configured). Will retry on the next incremental review.

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

Labels

None yet

1 participant