Skip to content

[Widget] Add call and message launcher entry points#822

Open
kalvin807 wants to merge 1 commit into
mainfrom
kalvin807/widget-launcher-entry-points
Open

[Widget] Add call and message launcher entry points#822
kalvin807 wants to merge 1 commit into
mainfrom
kalvin807/widget-launcher-entry-points

Conversation

@kalvin807
Copy link
Copy Markdown
Contributor

@kalvin807 kalvin807 commented Jun 2, 2026

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

  • Capability-derived entry points on the expandable launcher (tiny/compact/full):
    • Voice-capable (!text_only) → call ("Start a call", primary).
    • Text-capable (text_input_enabled) → message ("Message"; secondary, or primary when call is absent).
    • Multimodal shows both; voice-only shows call; text-only shows message.
  • ⚠️ Call connects directly on click (terms still prompt) and opens the sheet.
  • Message opens the sheet focused on the text input; session starts on first send.
  • Language picker added to the expandable collapsed trigger; clicking it opens the dropdown without expanding the widget.
  • New start_message text key (default "Message").
  • Visibility derived via one useTriggerEntryPoints hook.
  • Side changes: extract useCallButtonDisabled(); remove a dead min-h-18 class on the chat input.
CleanShot.2026-06-02.at.15.18.12.mp4

Testing

  • New ExpandableTriggerActions.test.ts
  • Updated index.test.ts / DismissButton.test.ts for 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 in SheetActions. 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 (stopPropagation on TriggerLanguageSelect). useCallButtonDisabled centralizes connecting/disconnecting disable state. New copy key start_message (default "Message"). Launcher layout uses min-h-11 to 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.

@kalvin807 kalvin807 force-pushed the kalvin807/widget-launcher-entry-points branch 3 times, most recently from bbbf6f3 to 39ecb68 Compare June 2, 2026 06:29
@kalvin807 kalvin807 requested a review from kamilk-11 June 2, 2026 06:31
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.
@kalvin807 kalvin807 force-pushed the kalvin807/widget-launcher-entry-points branch from 39ecb68 to ba67158 Compare June 2, 2026 08:51
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.

1 participant