Skip to content

ci: electron example should not build with top level yarn build#1195

Open
joker23 wants to merge 3 commits intomainfrom
skz/sdk-2045/electron-example-build
Open

ci: electron example should not build with top level yarn build#1195
joker23 wants to merge 3 commits intomainfrom
skz/sdk-2045/electron-example-build

Conversation

@joker23
Copy link
Contributor

@joker23 joker23 commented Mar 18, 2026

Note

Low Risk
Low risk CI refactor plus removal of an example-only build script; main impact is on the GitHub Actions e2e job behavior and environment variable/secrets setup.

Overview
Refactors .github/workflows/electron.yaml’s run-example job to call the shared ./actions/run-example composite action instead of inlining dependency install/build, Xvfb/Playwright setup, and test execution.

Enhances actions/run-example/action.yml to support an env_vars input (written to $GITHUB_ENV) and to fetch the mobile SDK key in addition to the existing client-side and flag keys; the Electron workflow now supplies DISPLAY/ELECTRON_DISABLE_SANDBOX and moves Xvfb/Playwright/startup into before_test.

Removes the build script from packages/sdk/electron/example/package.json, so the example no longer exposes a top-level yarn build entry point.

Written by Cursor Bugbot for commit 7790739. 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-2045/electron-example-build branch from 283410e to e583c5f Compare March 18, 2026 16:17
@joker23
Copy link
Contributor Author

joker23 commented Mar 18, 2026

@cursor review

cursor[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@joker23 joker23 force-pushed the skz/sdk-2045/electron-example-build branch from f99d44f to d0d9a5b Compare March 18, 2026 18:14
@joker23
Copy link
Contributor Author

joker23 commented Mar 18, 2026

@cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

sudo apt-get install -y xvfb
Xvfb :99 -screen 0 1024x768x24 > /tmp/xvfb.log 2>&1 &
yarn workspace @internal/electron-example playwright install --with-deps chromium
yarn workspace @internal/electron-example start -- --build
Copy link

Choose a reason for hiding this comment

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

Double dash consumed by yarn, breaking electron build-exit

High Severity

The old build script was "electron-forge start -- --build", where the -- separator told electron-forge to pass --build through to the electron binary's process.argv. The new command yarn workspace @internal/electron-example start -- --build has yarn's CLI parser (Clipanion Option.Proxy()) consume the -- separator, resulting in electron-forge start --build without the --. Since --build is not a recognized electron-forge option, it likely won't reach process.argv, causing the process.argv.includes('--build') check in main.ts to fail. Instead of exiting immediately after building, the app would fully launch.

Additional Locations (1)
Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is actually exactly what I want it to do.

devin-ai-integration[bot]

This comment was marked as resolved.

@joker23 joker23 marked this pull request as ready for review March 18, 2026 20:20
@joker23 joker23 requested a review from a team as a code owner March 18, 2026 20:20
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