Skip to content

[SCAL-352445] Lead HostEvent and EmbedEvent descriptions with what they do - #749

Merged
yinstardev merged 2 commits into
mainfrom
SCAL-352445
Nov 17, 2026
Merged

yinstardev merged 2 commits into
mainfrom
SCAL-352445

Conversation

@yinstardev

@yinstardev yinstardev commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

What

Rewrites HostEvent and EmbedEvent descriptions so each one opens with what it does. The content is the same, reordered.

  • HostEvent (29, including Pin): openers like "Trigger the X action on …" now lead with the effect and keep the UI label, e.g. "Make a copy of a Liveboard, visualization, or Answer page, the same as the Make a copy action."
  • EmbedEvent (18): fragments such as "Rendering has initialized." now use the "Emitted when …" form the other members already use.

The rules:

  • No facts removed.
  • No behaviour added that isn't already in the member's own JSDoc.
  • Tags, examples, links and the API are untouched.

Skipped on purpose:

  • Labels that are already the plain task (Share, Present, Copy link, Download PDF, Edit, Explore).
  • Members whose block never says what happens (Schedule, AIHighlights, AskSage, AskSpotter).
  • Deprecated members, so search favours their replacements.
  • Hidden and internal members.

Why

People search for the task, e.g. "save an answer to a Liveboard", not "pin action". The spotter-code MCP retrieves these docs for AI agents, and mechanism-first openers get missed.

  • HostEvent.Pin measured on the staging index: it scores 0.465 against a vector top-20 cutoff of about 0.513.
  • Reordered, plus spotter-code's planned typedoc-markup cleanup: 0.530. That ranks it first for the captured query "save answer to Liveboard from SearchEmbed". The cleanup alone reaches 0.506, so both are needed.

Suspected wrong descriptions (not changed here; need an owner to confirm)

  • EmbedEvent.AuthLogout and IdleSessionTimeout: the text reads like AuthFailure's ("failed to validate the auth session").
  • EmbedEvent.CreateConnection: "updates a connection" is copied from UpdateConnection.
  • HostEvent.Remove: the prose says it deletes a Liveboard, but its payload note requires vizId.
  • HostEvent.RefreshLiveboardBrowserCache: its ScheduleEmailRequest payload looks copied from SendTestScheduleEmail.
  • Typos: "an an embedded" (EmbedEvent.ExportTML) and "edit mode , equivalent" (HostEvent.ExitEditMode).

Testing

  • eslint src/types.ts is clean.
  • This is a comment-only change in src/types.ts.

The description opened with "Trigger Pin action on an embedded object", which
names the mechanism, and only said it adds an Answer to a Liveboard in its third
sentence. Readers and docs search (the spotter-code MCP) match on the task, so the
task now comes first. Same content, reordered; no API change.
@yinstardev
yinstardev requested a review from a team as a code owner November 15, 2026 10:07

@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 updates the JSDoc documentation in src/types.ts to clarify the behavior of adding an Answer or visualization to a Liveboard, both via the UI modal and programmatically. I have no feedback to provide on these changes.

@pkg-pr-new

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

Copy link
Copy Markdown

Open in StackBlitz

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

commit: ae38e56

…ey do

28 HostEvent descriptions opened with "Trigger the X action" or "Triggers ..."
and only later, if at all, said what happens. They now lead with the effect and
keep the UI label ("..., the same as the **X** action"). 18 EmbedEvent
descriptions were fragments ("Rendering has initialized."); they now use the
"Emitted when ..." form the other members use. Reordered and rephrased only:
no facts removed, no tags, examples or API changed.
@yinstardev yinstardev changed the title [SCAL-352445] Lead the HostEvent.Pin description with what it does [SCAL-352445] Lead HostEvent and EmbedEvent descriptions with what they do Nov 15, 2026
@yinstardev
yinstardev merged commit b4bc1a0 into main Nov 17, 2026
14 checks passed
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