Skip to content

SCAL-331020: Add Spotter analyst list/default actions and analystId config - #619

Open
bahetirisabh wants to merge 4 commits into
thoughtspot:mainfrom
bahetirisabh:SCAL-331020
Open

SCAL-331020: Add Spotter analyst list/default actions and analystId config#619
bahetirisabh wants to merge 4 commits into
thoughtspot:mainfrom
bahetirisabh:SCAL-331020

Conversation

@bahetirisabh

@bahetirisabh bahetirisabh commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Two additions for the Spotter Analyst experience, targeting ThoughtSpot 26.10.0.cl / SDK 1.53.0.

1. Two new Action enum members

SpotterAnalystList = 'spotterAnalystList',
SpotterDefaultAnalyst = 'spotterDefaultAnalyst',

They control the analyst list ("Show all") and the default Spotter analyst entry. These flow through the existing hiddenActions / disabledActions / visibleActions arrays, so there is no new plumbing — the enum entries just give hosts types and autocomplete instead of raw strings.

2. New SpotterAnalystConfig on SpotterEmbedViewConfig

export interface SpotterAnalystConfig {
    /**
     * Pins the embed to a single spotter analyst. Implies no default Spotter
     * and no "Show all".
     */
    analystId?: string;
}

Used as spotterAnalystConfig?: SpotterAnalystConfig on the view config:

const embed = new SpotterEmbed('#tsEmbed', {
    // ...other embed view config
    spotterAnalystConfig: {
        analystId: 'analyst-id-1234',
    },
});

Grouping it into an object matches the existing spotterChatConfig / spotterSidebarConfig pattern, so future analyst settings have a home instead of accumulating at the top level. It is defined in conversation.ts next to the other Spotter sub-configs and exported from index.ts.

Consumption is unchanged. The value is serialized as the analystId query param via Param.AnalystId, so the FE reads embedParams.analystId exactly as before. setParamIfDefined omits it when unset, so the URL is unchanged for hosts that don't use it — including when spotterAnalystConfig: {} is passed with no analystId.

Note on the typedoc diff

static/typedoc/typedoc.json is regenerated via npm run docgen. The diff is large, but nearly all of it is mechanical id renumbering and line shifts caused by inserting symbols into types.ts and conversation.ts.

main was merged in and the generated file was resolved by regenerating from the merged source rather than hand-merging. Verified against origin/main:

  • 0 documented symbols removed; added symbols are exactly SpotterAnalystList, SpotterDefaultAnalyst, SpotterAnalystConfig, spotterAnalystConfig, analystId
  • 0 comment/doc-text differences beyond this PR's own additions

Test plan

  • URL assertions for analystId: present when spotterAnalystConfig.analystId is set, absent when the config is omitted, and absent when the config is an empty object.
  • Both new actions added to the existing hidden/disabled it.each tables in conversation.spec.ts.
  • Full SDK suite after merging main: 44/44 suites, 1653 passed, 4 skipped.
  • tsc --noEmit and eslint clean on all changed files.

…onfig

Add two Action enum members, SpotterAnalystList and SpotterDefaultAnalyst,
so hosts can control the analyst list ("Show all") and the default Spotter
analyst entry with types and autocomplete instead of raw strings. These flow
through the existing hiddenActions/disabledActions/visibleActions arrays, so
no new plumbing is required.

Add analystId to SpotterEmbedViewConfig, serialized into the iframe URL via
the new Param.AnalystId so the FE can read it off embedParams. Setting it
pins the embed to a single spotter analyst, implying no default Spotter and
no "Show all".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@bahetirisabh
bahetirisabh requested a review from a team as a code owner August 10, 2026 18:30
@pkg-pr-new

pkg-pr-new Bot commented Aug 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: cf96376

Picks up SpotterAnalystList, SpotterDefaultAnalyst and
SpotterEmbedViewConfig.analystId.

Also picks up drift already on main whose commits did not regenerate the
docs: preRenderConfig from thoughtspot#603, and the enum-name corrections from thoughtspot#615
(EmbedEvent.customAction -> CustomAction, EmbedEvent.DrillDown -> Drilldown,
ListPageColumns.Favorite -> Favorites, AuthEvent.SUCCESS -> AuthStatus.SUCCESS,
and the removal of the non-existent HostEvent.ScheduleList examples).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Replaces the flat SpotterEmbedViewConfig.analystId with
spotterAnalystConfig?: SpotterAnalystConfig, matching the existing
spotterChatConfig / spotterSidebarConfig grouping so future analyst
settings have a home instead of accumulating at the top level.

Consumption is unchanged: the value is still serialized as the analystId
query param, so the FE keeps reading embedParams.analystId.

SpotterAnalystConfig is defined in conversation.ts alongside the other
Spotter sub-configs and exported from index.ts.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
# Conflicts:
#	static/typedoc/typedoc.json

it('should render the conversation embed with spotterAnalystConfig.analystId in the url', async () => {
const viewConfig: SpotterEmbedViewConfig = {
worksheetId: 'worksheetId',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Worksheets are deprecated and changed with model, do we still need to use the worksheet keyword?

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.

4 participants