Skip to content

[SCAL-353250] Revert host events v2 default to v1 - #755

Merged
yinstardev merged 2 commits into
mainfrom
fix/SCAL-353250-revert-host-events-v2-default
Nov 17, 2026
Merged

yinstardev merged 2 commits into
mainfrom
fix/SCAL-353250-revert-host-events-v2-default

Conversation

@yinstardev

@yinstardev yinstardev commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Reverts #740 (SCAL-337616): useHostEventsV2 defaults to false again, so embeds that don't set it use host events v1, as they did before #740.

Why

With v2 on by default, the pre-render show cycle breaks on every released cluster:

  • The SDK sends HostEvent.UpdateEmbedParams as 'updateEmbedParams'. Blink lists the event as root-level under IncomingEventType.UpdateEmbedParams = 'UpdateEmbedParams' (capital U), so it is not treated as root-level.
  • Under v2, a non-root event only reaches handlers whose stored page context matches the incoming one. Blink's UpdateEmbedParams handler keeps the page context from when the embed container mounted, so on a Liveboard the event is dropped (noMatchingHandler).
  • The show-time config (hiddenActions, flags such as isContinuousLiveboardPDFEnabled, runtime filters) never applies. Under v1 every handler is called, so the update lands.

This surfaced as pre-render Liveboard e2e failures once the v2-default build was published as @latest, for example "hides the DownloadLiveboard action with hiddenActions config" and "shows the continuous PDF download option with isContinuousLiveboardPDFEnabled config".

Changes

Behavior change

Embeds that don't set useHostEventsV2 go back to v1. Setting useHostEventsV2: true explicitly is unchanged, and still hits the issue above on clusters without a blink fix.

Testing

  • SDK unit tests: 55 suites, 2360 tests pass
  • Pre-render Liveboard e2e against this PR's SDK build (pending)

Follow-up

Blink fix: make the SDK's 'updateEmbedParams' root-level, either by adding EventType.UpdateEmbedParams to rootLevelEvents or by fixing the IncomingEventType.UpdateEmbedParams casing. Re-enable the v2 default once that ships on the supported clusters.

Reverts #740 (SCAL-337616). With useHostEventsV2 defaulting to true,
the pre-render show cycle breaks on every released cluster. The SDK
sends HostEvent.UpdateEmbedParams as 'updateEmbedParams', but blink
lists the event as root-level under 'UpdateEmbedParams'. Under v2 a
non-root event only reaches handlers whose stored page context matches
the incoming one, and the UpdateEmbedParams handler keeps the context
from when the embed container mounted. On a Liveboard the update is
dropped (noMatchingHandler), so hiddenActions, flags and runtime
filters sent at show time never apply. v1 calls every handler, so it
is unaffected.

- getHostEventsConfig no longer defaults useHostEventsV2 to true
- drop the v1 deprecation warning and HOST_EVENTS_V1_DEPRECATED
- useHostEventsV2 doc back to @default false
- tests restored to the pre-#740 expectations
@yinstardev
yinstardev requested a review from a team as a code owner November 17, 2026 15:09

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request removes the deprecation warning and default fallback behavior for Host Events V1, changing the default value of useHostEventsV2 from true to undefined (which resolves to false / V1). Corresponding tests and the deprecated error message have been removed or updated. Note that the JSDoc tag order for useHostEventsV2 in src/types.ts violates the repository style guide by placing @default before @version. Feedback on the changes suggests adding a test to verify that the Error event is skipped when useHostEventsV2 is not set to prevent future regressions.

Comment thread src/embed/ts-embed.spec.ts Resolved
#739 merged after #751 renamed the <TBD> placeholder to
%NEXT_SDK_VERSION%, so main fails lint-versions on
conversation.ts:958. Use the new placeholder.
@pkg-pr-new

pkg-pr-new Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@thoughtspot/visual-embed-sdk@755

commit: 81878ec

@yinstardev
yinstardev merged commit 942a2f0 into main Nov 17, 2026
14 checks passed
@sandeep-kr-yadav
sandeep-kr-yadav deleted the fix/SCAL-353250-revert-host-events-v2-default branch November 17, 2026 16:11
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.

2 participants