Skip to content

feat(lightning-out): @W-24501804@ add CLWR site link, org-wide settings and App ID guidance - #1071

Closed
akashdhake wants to merge 3 commits into
salesforcecli:mainfrom
akashdhake:feat/lightning-out-messages
Closed

akashdhake wants to merge 3 commits into
salesforcecli:mainfrom
akashdhake:feat/lightning-out-messages

Conversation

@akashdhake

@akashdhake akashdhake commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Work item: W-24501804
https://gus.lightning.force.com/lightning/r/ADM_Work__c/a07EE00002nLhYnYAK/view

Stacked on #1070 (promote the command to GA). Until #1070 merges, this PR also shows its commit. This PR's own changes are commits 9721845 and 06f363a. I'll rebase once #1070 lands.

What and why

After sf template generate lightning-out finishes, three things are missing or unclear in the output. All wording was checked against Salesforce Core (266-main, and 264 for the Setup labels).

  1. CLWR: link the app to a site. --runtime help said only "extra site-deployment step". A Metadata API deploy creates no site link, and the Lightning Out 2.0 App Manager UI creates it when you save on the "Linked Communities Site" tab. The CLWR runtime finds an app's components through that link. The command now says so.
  2. Org-wide settings. The generated MyDomain and Security settings set isFirstPartyCookieUseRequired=false and enableOauthCorsPolicy=true for the whole org. Nothing in the output said that. A warning now does.
  3. App ID. The old line didn't say where to find the App ID or what to do with it. It now points to Lightning Out 2.0 App Manager and the app-id attribute on <lightning-out-application>. For LWR_CORE, app-id is what adds the app's host domains to the allowed frame ancestors (SFDCContentSecurityPolicyFactory).

Changes

  • --runtime: the summary is now one line ("Runtime the app targets: LWR_CORE or CLWR."). The detail moved to a new flags.runtime.description.
  • New success.clwr-site: printed for CLWR runs only, right after the deploy command and before the App ID line.
  • New warning.org-settings: printed as a warning for all runs, before the deploy command it refers to. Because it is a warning, it also appears in the warnings array of --json output. That is deliberate: the org-wide effect applies to automated runs too.
  • success.app-id is reworded.
  • Tests: run() is now exercised with the generator stubbed. They check that the CLWR guidance is shown only for CLWR, that the org-wide warning appears for every runtime, and the runtime summary/description split. I confirmed the LWR_CORE test fails if the CLWR gate is removed.

Testing

  • Unit tests: 33 passing in the lightning-out file.
  • yarn test (wireit): passes.
  • yarn lint: 0 errors. 1 existing warning (sf-plugin/get-connection-with-version in digital-experience/site.ts), not from this change.
  • --help output checked for the new --runtime text.
  • Not run: the NUTs, and an end-to-end run against an org.

For copy review

Copy review requested: please review the wording in messages/lightningOut.md. Points I'd like a second look at:

  • The Setup navigation sentence in success.clwr-site.
  • The UI label names: "Lightning Out 2.0 App Manager", "Linked Communities Site", "Complete Deployment in Experience Builder".
  • The org-settings warning, which uses the metadata field names.
  • Naming: all new text says "Lightning Out 2.0", per the PM guidance to keep "2.0" until the beta is sunset.

Known gaps, not in this PR

  • success.frontdoor applies only to authenticated CLWR. Guest CLWR uses org-url and site-prefix.
  • --host-domains has no effect on how a CLWR app is framed.
  • "Guest and authenticated users" for CLWR matches the Setup UI's runtime description. A 9/30 Slack answer said guest access isn't supported on CLWR yet, so the wording needs a final check with the PM.

…ccess messages

Remove the beta state and hidden flag so the command appears in help,
docs and autocomplete and no longer prints the beta banner.

Also replace em dashes in the success.app-id and success.dont-delete
messages and use 'Lightning Out 2.0' consistently in the success text.
…gs and App ID guidance

Add post-run guidance for the Lightning Out 2.0 scaffold:
- CLWR: link the app to an Experience Cloud site on the Linked
  Communities Site tab in Lightning Out 2.0 App Manager.
- Warn that the generated MyDomain and Security settings are org-wide.
- Say where to find the App ID and to set it as the app-id attribute.

Move the --runtime detail from the flag summary into its description.
@akashdhake
akashdhake requested a review from a team as a code owner October 15, 2026 17:26
… messages

- Rename success.org-settings to warning.org-settings and print it before
  the next-step line, since it warns about the deploy that follows.
- Print the CLWR site-link guidance before the App ID line.
- Reword the app-id sentence to name the CSP frame-ancestors directive.
- Replace string-only tests with behavior tests of run() output (CLWR-only
  guidance, org-wide warning).
@akashdhake

Copy link
Copy Markdown
Contributor Author

Folded into #1070 so there is a single PR for W-24501804. All commits from this branch are now in #1070.

@akashdhake akashdhake closed this Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant