Skip to content

[SCAL-299968] SDK changes for Send Now#467

Open
midhun-kr wants to merge 1 commit intomainfrom
SCAL-299968-sdk
Open

[SCAL-299968] SDK changes for Send Now#467
midhun-kr wants to merge 1 commit intomainfrom
SCAL-299968-sdk

Conversation

@midhun-kr
Copy link
Collaborator

No description provided.

@midhun-kr midhun-kr requested a review from a team as a code owner March 16, 2026 12:59
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new SDK capability that empowers users to manage and test Liveboard email schedules more effectively within embedded applications. By adding the isSendNowLiveboardSchedulingEnabled configuration, along with corresponding events and actions, the SDK now supports a "Send Now" feature, allowing for immediate testing of schedule emails. This enhancement provides developers with finer control over the scheduling experience in embedded environments.

Highlights

  • New Configuration Option: Introduced isSendNowLiveboardSchedulingEnabled in AppEmbed and LiveboardEmbed configurations to control the "Send Now" feature for Liveboard scheduling.
  • Feature Functionality: This new flag enables or disables the ability to send test schedule emails directly from embedded Liveboards.
  • Event and Action Integration: Added EmbedEvent.SendTestScheduleEmail, HostEvent.SendTestScheduleEmail, and Action.SendTestScheduleEmail to allow programmatic interaction and control over the "Send Test Email" button.
  • Test Coverage: Comprehensive unit tests were added to ensure the isSendNowLiveboardSchedulingEnabled parameter is correctly reflected in the generated embed URLs.
Changelog
  • src/embed/app.spec.ts
    • Added two new test cases to verify that the isSendNowLiveboardSchedulingEnabled parameter is correctly appended to the embed URL when set to true or false in the AppEmbed configuration.
  • src/embed/app.ts
    • Defined the isSendNowLiveboardSchedulingEnabled property within the AppViewConfig interface, including JSDoc comments for its purpose, supported embed types, version, default value, and an example.
    • Integrated isSendNowLiveboardSchedulingEnabled into the AppEmbed class constructor with a default value of false.
    • Implemented logic to conditionally add isSendNowLiveboardSchedulingEnabled as a URL parameter if its value is defined.
  • src/embed/liveboard.spec.ts
    • Added two new test cases to verify that the isSendNowLiveboardSchedulingEnabled parameter is correctly appended to the embed URL when set to true or false in the LiveboardEmbed configuration.
  • src/embed/liveboard.ts
    • Defined the isSendNowLiveboardSchedulingEnabled property within the LiveboardViewConfig interface, including JSDoc comments for its purpose, supported embed types, version, default value, and an example.
    • Integrated isSendNowLiveboardSchedulingEnabled into the LiveboardEmbed class constructor with a default value of false.
    • Implemented logic to conditionally add isSendNowLiveboardSchedulingEnabled as a URL parameter if its value is defined.
  • src/types.ts
    • Added SendTestScheduleEmail to the EmbedEvent enum, with JSDoc describing its emission condition and payload.
    • Added SendTestScheduleEmail to the HostEvent enum, with JSDoc describing its purpose, parameters, and examples for triggering.
    • Added isSendNowLiveboardSchedulingEnabled to the Param enum for URL parameter handling.
    • Added SendTestScheduleEmail to the Action enum, with JSDoc describing its use for disabling or hiding the corresponding button.
Activity
  • No specific activity (comments, reviews, progress) was provided for this pull request.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 16, 2026

Open in StackBlitz

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

commit: d1e1f13

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request introduces the isSendNowLiveboardSchedulingEnabled flag, enabling a new 'Send Now' feature for Liveboard scheduling. This includes adding the configuration option to AppViewConfig and LiveboardViewConfig, implementing its handling in AppEmbed and LiveboardEmbed classes, and adding corresponding tests. Additionally, new EmbedEvent, HostEvent, Param, and Action enum members have been added in src/types.ts to support this functionality. The changes are well-tested and documented.

src/embed/app.ts Outdated
Comment on lines +630 to +631
* @version SDK: 1.47.0 | ThoughtSpot Cloud: 26.5.0.cl
* @default false
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The @version tag specifies SDK: 1.47.0 | ThoughtSpot Cloud: 26.5.0.cl. Please ensure this version mapping is accurate and has been reviewed by a TSE (ThoughtSpot Embedded) developer, as per the style guide's requirement to flag any mismatches.

References
  1. The @version tag must follow the canonical mapping between SDK and ThoughtSpot Cloud versions. If the version pairing in a PR does not match this sequence, it should be flagged for review by a TSE (ThoughtSpot Embedded) developer. (link)

Copy link
Contributor

Choose a reason for hiding this comment

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

use 1.48.0

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

src/embed/app.ts Outdated
isPNGInScheduledEmailsEnabled = false,
isLiveboardXLSXCSVDownloadEnabled = false,
isGranularXLSXCSVSchedulesEnabled = false,
isSendNowLiveboardSchedulingEnabled = false,
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The style guide recommends preferring undefined over false for boolean parameters to avoid unnecessarily increasing the URL/query string size. Here, isSendNowLiveboardSchedulingEnabled is destructured with a default value of false, which will always send ?isSendNowLiveboardSchedulingEnabled=false even when not explicitly set by the caller. It should be undefined by default and only added to the URL if explicitly provided.

isSendNowLiveboardSchedulingEnabled,
Suggested change
isSendNowLiveboardSchedulingEnabled = false,
isSendNowLiveboardSchedulingEnabled,
References
  1. On the ThoughtSpot side, undefined (omitted param) is treated as falsy. There is no need to explicitly pass false when a flag is not set. Explicitly passing false for every unset flag increases the URL/query string size unnecessarily. Omit the param entirely when the value is not explicitly provided. Do not use = false as a default in destructuring. Leave the value as undefined when not set, and only add the param to the request when the caller explicitly provides a value (!== undefined). (link)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

Comment on lines +428 to +429
* @version SDK: 1.47.0 | ThoughtSpot Cloud: 26.5.0.cl
* @default false
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The @version tag specifies SDK: 1.47.0 | ThoughtSpot Cloud: 26.5.0.cl. Please ensure this version mapping is accurate and has been reviewed by a TSE (ThoughtSpot Embedded) developer, as per the style guide's requirement to flag any mismatches.

References
  1. The @version tag must follow the canonical mapping between SDK and ThoughtSpot Cloud versions. If the version pairing in a PR does not match this sequence, it should be flagged for review by a TSE (ThoughtSpot Embedded) developer. (link)

Copy link
Collaborator Author

@midhun-kr midhun-kr Mar 18, 2026

Choose a reason for hiding this comment

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

Changed to 1.48

isPNGInScheduledEmailsEnabled = false,
isLiveboardXLSXCSVDownloadEnabled = false,
isGranularXLSXCSVSchedulesEnabled = false,
isSendNowLiveboardSchedulingEnabled = false,
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The style guide recommends preferring undefined over false for boolean parameters to avoid unnecessarily increasing the URL/query string size. Here, isSendNowLiveboardSchedulingEnabled is destructured with a default value of false, which will always send ?isSendNowLiveboardSchedulingEnabled=false even when not explicitly set by the caller. It should be undefined by default and only added to the URL if explicitly provided.

isSendNowLiveboardSchedulingEnabled,
Suggested change
isSendNowLiveboardSchedulingEnabled = false,
isSendNowLiveboardSchedulingEnabled,
References
  1. On the ThoughtSpot side, undefined (omitted param) is treated as falsy. There is no need to explicitly pass false when a flag is not set. Explicitly passing false for every unset flag increases the URL/query string size unnecessarily. Omit the param entirely when the value is not explicitly provided. Do not use = false as a default in destructuring. Leave the value as undefined when not set, and only add the param to the request when the caller explicitly provides a value (!== undefined). (link)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

src/types.ts Outdated
Comment on lines +7527 to +7528
* ```
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.6.0.cl
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The @version tag specifies SDK: 1.47.0 | ThoughtSpot Cloud: 26.5.0.cl. Please ensure this version mapping is accurate and has been reviewed by a TSE (ThoughtSpot Embedded) developer, as per the style guide's requirement to flag any mismatches.

References
  1. The @version tag must follow the canonical mapping between SDK and ThoughtSpot Cloud versions. If the version pairing in a PR does not match this sequence, it should be flagged for review by a TSE (ThoughtSpot Embedded) developer. (link)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@sonar-prod-ts
Copy link

sonar-prod-ts bot commented Mar 18, 2026

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

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