Skip to content

Widget: expose a programmatic open() on the IIFE (one-liner) — wanted for a clickable live-agent CTA #202

Description

@Omarear

The widget IIFE exposes no programmatic API: `packages/widget/src/mount.tsx` runs a single `mount()` on DOMContentLoaded — no window global, no event hook. This was verified during PR #200's CTA rewrite: the "live demo" CTAs became a deliberately NON-interactive `LiveAgentHint` ("The chat bubble on this page is the live agent — ask it anything ↘") because there was nothing truthful for a click to do.

Ask: a minimal `open()` hook — e.g. `window.ClankerSupport = { open }` set inside `mount()`, or a `clanker:open` CustomEvent listener on `document`. Roughly a one-liner plus the launcher-state plumbing.

Why now: marketing-relevant — with the hook, `LiveAgentHint` (used on the homepage closing section, feature pages, and use-case pages) can become a clickable "Try the live agent" that opens the on-page bubble, which is a strictly better conversion affordance than a pointing arrow. Also useful to any embedding customer ("Chat with us" links in their own nav).

Scope note: keep it client-visitor-initiated UI only — this is NOT an action-execution surface (the voice/actions rail rules in AGENTS.md don't apply to a UI open()).

🤖 Generated with Claude Code

https://claude.ai/code/session_018pJJgDHCnnNeEqEAApxFcQ

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions