Skip to content

chore: adding SSR example and example test#1189

Open
joker23 wants to merge 1 commit intomainfrom
skz/sdk-1813/rsc-ssr-example
Open

chore: adding SSR example and example test#1189
joker23 wants to merge 1 commit intomainfrom
skz/sdk-1813/rsc-ssr-example

Conversation

@joker23
Copy link
Contributor

@joker23 joker23 commented Mar 16, 2026

Note

Medium Risk
Adds a new Next.js server-rendered example plus Playwright e2e coverage and updates CI to fetch a server-side SDK key; failures or misconfiguration could break React workflow runs and secret injection.

Overview
Adds a new React server-only (RSC) example app (packages/sdk/react/examples/server-only) that evaluates a LaunchDarkly flag on the server using createLDServerSession/useLDServerSession, including basic styling, docs, and a Playwright e2e smoke test.

Updates the monorepo and CI to run it: includes the new workspace in root package.json, adds a dedicated run-server-only-example GitHub Actions job, and extends the shared actions/run-example composite action to also fetch LAUNCHDARKLY_SDK_KEY from SSM (in addition to the existing client key/flag key).

Written by Cursor Bugbot for commit 1b62a24. This will update automatically on new commits. Configure here.


Open with Devin

@github-actions
Copy link
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 25566 bytes
Compressed size limit: 26000
Uncompressed size: 125383 bytes

@github-actions
Copy link
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 172527 bytes
Compressed size limit: 200000
Uncompressed size: 802217 bytes

@github-actions
Copy link
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 24539 bytes
Compressed size limit: 25000
Uncompressed size: 85098 bytes

@github-actions
Copy link
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 22203 bytes
Compressed size limit: 24000
Uncompressed size: 115238 bytes

@joker23 joker23 force-pushed the skz/sdk-1813/rsc-ssr-example branch 5 times, most recently from c043a28 to a638247 Compare March 17, 2026 00:28
@joker23 joker23 force-pushed the skz/sdk-1813/rsc-ssr-example branch from a638247 to 1b62a24 Compare March 17, 2026 16:31
@joker23
Copy link
Contributor Author

joker23 commented Mar 17, 2026

@cursor review

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@joker23 joker23 marked this pull request as ready for review March 17, 2026 18:34
@joker23 joker23 requested a review from a team as a code owner March 17, 2026 18:34
aws_assume_role: ${{ inputs.aws_assume_role }}
ssm_parameter_pairs: '/sdk/common/hello-apps/client-key = LAUNCHDARKLY_CLIENT_SIDE_ID'

- uses: launchdarkly/gh-actions/actions/release-secrets@1a3dc56945c8e87bc952119b055f9481b4d642b0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

adding this for server sdk testing ... we can also choose to add a param for this action so different workflows can enable different keys, for now I am just loading all of the envs since there are no naming conflicts

// in this render tree can retrieve it via useLDServerSession() — no prop drilling needed.
createLDServerSession(ldBaseClient, context);

return <App />;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

NOTE: also that I separated this with App.tsx since a more realistic application of this example is for developers to already have a "global" server sdk client that they would create this session out of. This is what the Page.tsx is suppose to represent (The top level set up for this SDK)

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.

1 participant