[Widget] Add call and message launcher entry points#822
Open
kalvin807 wants to merge 1 commit into
Open
Conversation
bbbf6f3 to
39ecb68
Compare
Show capability-derived call and message entry points on the widget launcher. The call button connects directly (terms still gated) and opens the sheet; the message button opens the sheet focused on the text input (session starts on first send). Derives from text_only/text_input_enabled via useTriggerEntryPoints. Adds the start_message text key. Side change: extract useCallButtonDisabled to dedup the call-in-flight predicate.
39ecb68 to
ba67158
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The launcher showed a single call CTA and reached text only after opening the widget; starting a call also took two clicks. This makes text a first-class launcher action and lets the call button start a call in one click.
What
!text_only) → call ("Start a call", primary).text_input_enabled) → message ("Message"; secondary, or primary when call is absent).start_messagetext key (default "Message").useTriggerEntryPointshook.useCallButtonDisabled(); remove a deadmin-h-18class on the chat input.CleanShot.2026-06-02.at.15.18.12.mp4
Testing
ExpandableTriggerActions.test.tsindex.test.ts/DismissButton.test.tsfor the one-click flow.Note
Medium Risk
Changes how users start voice vs text sessions and terms-gated flows on the expandable launcher; behavior is covered by new and updated browser tests but affects core embed UX.
Overview
The expandable widget launcher (tiny / compact / full) now shows separate Start a call and Message actions when disconnected, instead of a single chevron that doubled as start/expand. Visibility comes from
useTriggerEntryPoints: voice-capable agents get call; text-capable agents get message; multimodal gets both.Call accepts terms, opens the sheet, and starts the session in one click. Message accepts terms, opens the sheet, and focuses the text input via
pendingInputFocus; the conversation still starts on first send inSheetActions. The collapsed chevron is only expand/collapse (or expand mid-call). The language picker stays on the collapsed launcher and no longer expands the widget when opened (stopPropagationonTriggerLanguageSelect).useCallButtonDisabledcentralizes connecting/disconnecting disable state. New copy keystart_message(default"Message"). Launcher layout usesmin-h-11to avoid height bounce during cross-fades; chat icon SVG updated.Reviewed by Cursor Bugbot for commit ba67158. Bugbot is set up for automated code reviews on this repo. Configure here.