React SDK — Release Notes
@revrag-ai/embed-react · release history, newest first. Install the latest with npm install @revrag-ai/embed-react@latest; confirm the current version on npm.
2.0.0
Released: 23 October 2026
The widget now reads your dashboard's widget configuration the same way the Android and React Native SDKs do, plus fixes for React StrictMode, TypeScript and Content Security Policy. No code changes are needed: nothing was removed or renamed. It is a major version because the widget can look and behave differently after the upgrade, depending on what your widget configuration sets — check Behaviour changes before you ship.
npm install @revrag-ai/embed-react@2.0.0The widget's defaults changed. If your widget configuration leaves out the nudge, the agent's name or the auto-collapse time, your users will see a different widget after upgrading — most visibly, the inactivity nudge stops unless inactivityBehavior and nudgeDelay are both set. Set those fields on the dashboard first if you want to keep the 1.5.0 behaviour.
Breaking changes
None in the API. Every export, prop, hook and type from 1.5.0 is unchanged.
Behaviour changes to check
Fields your widget configuration leaves out now use the Android SDK's defaults:
| Field left out | 1.5.0 | 2.0.0 | To keep 1.5.0 behaviour |
|---|---|---|---|
| Agent name / type | blank | "Revrag AI" / "Onboarding Agent" | Set agentTextContent.agentName / agentType |
| Call button text | "Connect" | "Start Call" | Set agentTextContent.buttonText |
| Nudge | after 1.5 s, with a default message | none | Set collapsedView.inactivityBehavior, nudgeDelay (seconds, above 0) and tooltipMessage |
| After a call connects | the card stays open | folds back to the button after 15 s (the call keeps running) | Set collapsedView.collapsedTime |
| Agent output panel | stays open | closes 15 s after its text finishes | Set collapsedView.viewCloseDelay (ms) |
| Tooltip colour | purple | 80% black | Set colorPalette.tooltipBackgroundColor |
| Corners of the open widget | round pill | 20px | Set colorPalette.borderRadius |
Fields your widget configuration sets now take effect:
| Field | 1.5.0 | 2.0.0 |
|---|---|---|
fillType | any value except solid drew a left-to-right gradient | the gradient's direction: horizontal, vertical, otherwise diagonal (including gradient). solid, flat and color draw backgroundColor |
textColor | no effect; name and status always white | agent name, status line and the captions (CC) badge |
borderRadius | no effect | the open widget and the collapsed button, which becomes a rounded square filled with your gradient; the avatar stays round |
tooltipBackgroundColor, tooltipTextColor | tooltip only | tooltip and the live caption bubble |
only grad1 set | no gradient | a gradient from grad1 into a 35% darker shade |
pulseColor not set | default purple | your widget's main colour |
If a colour on your dashboard was wrong but had no visible effect in 1.5.0, it will show now.
New
- More widget configuration fields, all set on the dashboard:
colorPalette.gradientColors— a gradient with any number of colours.colorPalette.gradientPreset— a named gradient (ocean,sunset,aurora,midnight, …).position.leftPaddingandposition.topPadding, and thebottom-centerandtop-centerpositions.collapsedView.viewCloseDelay— how long the agent's output panel stays after its text finishes.
- Bad colours are ignored. A colour the browser cannot draw falls back to its default instead of breaking the gradient. Negative paddings count as 0.
Fixed
- Calls
startCall(),endCall()andisCallActive()now work under ReactStrictMode(on by default in Next.js development); before, they could report that no widget was mounted.- With two widgets on a page, unmounting one no longer stops the other from taking calls.
- Unmounting the widget while it was still initializing no longer starts click tracking afterwards.
- Content Security Policy
- The in-call icons are bundled with the SDK; no image host needs to be allowed for them.
- An avatar animation that cannot be loaded now shows the SDK's own animation. The SDK no longer retries through the third-party
corsproxy.io, so you can removecorsproxy.iofrom your CSP.
- TypeScript
- Full types with
moduleResolutionset tonodenext/node16(ES modules). In 1.5.0 they failed to resolve, or silently becameanywithskipLibCheck.
- Full types with
- Install size
- Six unused dependencies are no longer installed:
zustand,zod,zod-to-json-schema,tailwind-merge,tailwindcss-animateandtiny-invariant.
- Six unused dependencies are no longer installed:
- Agent context — the snapshot of your page sent to the agent no longer includes
subtree_text, as in the React Native SDK.
Upgrade steps: 1.5.0 → 2.0.0
- Install
@revrag-ai/embed-react@2.0.0. Apackage.jsonrange of^1.5.0will not pick it up on its own. - Check your widget configuration against Behaviour changes. Set any field whose 1.5.0 behaviour you want to keep — at least the nudge fields, if you rely on the nudge.
- If your app imports
zustand,zod,zod-to-json-schema,tailwind-merge,tailwindcss-animateortiny-invariantwithout listing it in its ownpackage.json, add it there. - Optional: remove
corsproxy.iofrom your Content Security Policy.
No code changes are needed.
1.5.0
Released: 5 October 2026
The Action Intelligence release — the voice agent can now see and act on the host page — plus a React 17 build and many widget stability fixes. Several of the fixes stop crashes and freezes the host app could hit in 1.4.4, so upgrading is recommended. Upgrading from 1.4.4 needs a few code changes; work through the upgrade steps below.
npm install @revrag-ai/embed-react@1.5.0Breaking changes
| Change | What to do |
|---|---|
appVersion is required in useInitialize | Pass it in the options: useInitialize(apiKey, { appVersion }). Without it, initialization fails and the widget never appears. |
useEmbed() removed | Use startCall, endCall, isCallActive and the widget functions in New exports. |
EmbedContextType type removed | Not needed once useEmbed is gone. |
EventPayload type removed | Use CustomEventPayload. |
embedEvent is narrower | reset() and getSessionId() are gone. event, customEvent, addCallback, removeCallback and getStoredAppUserId remain. |
Behaviour changes to check
| Change | What to check |
|---|---|
| The agent can act on your pages during a call | Add data-revrag-mask to fields it must never read, and put screens it must never see in excludeScreens. |
| Higher default z-index | The widget now sits above the host page's own modals and overlays. If you placed your own UI above the widget with a fixed z-index, check it is still on top. |
| The button is draggable by default | Known issue: EmbedButton does not pass draggable or autoCollapseMs through in 1.5.0, so draggable={false} has no effect yet. |
New
- Action Intelligence. During a call, the agent can read the current screen and act on it — tap, type, select, scroll and read fields — and highlights each element it acts on.
- Starts automatically inside
EmbedProvider; no setup needed. - Masked fields (
data-revrag-mask, exported asMASK_ATTR) are never sent. - If the user clicks or types during an action, the agent stops instead of overwriting them.
- New
EmbedProviderprops:actionRootRef,excludeScreens,showOnAllScreensandgetScreenName.
- Starts automatically inside
- Widget.
- A draggable button, on by default, that works with touch.
- Live captions (CC) and an in-call status line ("Speaking", "Listening").
- During a call, the expanded card collapses back to the button after
collapsedView.collapsedTime; the call keeps running.
New exports
| Export | What it does |
|---|---|
startCall, endCall, isCallActive | Start or end a call from your own code |
expandWidget, collapseWidget, isWidgetExpanded, subscribeWidgetExpanded | Open, close or watch the widget |
EmbedLogout | Clear the SDK session when your user signs out |
AgentEvent, embedOnAgent, embedOffAgent | Subscribe to agent lifecycle events |
MASK_ATTR | The attribute name that masks a field |
@revrag-ai/embed-react/react17 | Build for React 17 apps on webpack |
@revrag-ai/embed-react/diagnostics | verifyIntegration() and integrationSnapshot() to check a setup |
Fixed
- Host app safety
- A crash inside the widget now hides only the widget, instead of unmounting the whole app.
- Bad values in the dashboard's widget config no longer crash rendering; each field falls back to its default.
- The SDK loads when browser storage is blocked ("Block all cookies", sandboxed iframes).
- No more tab freeze when another script also keeps its element pinned to the end of
<body>. - Ending a call no longer removes the host page's own
<audio>elements. "use client"is back in the bundles, so the Next.js App Router works without a wrapper.
- Calls
- Closing the widget or ending a call while it was still connecting could leave the microphone on — fixed.
- Mute state no longer carries over into the next call.
- Widget display
- The widget no longer sits behind the host page's own modals and overlays, and stays usable while a host dialog is open.
Upgrade steps: 1.4.4 → 1.5.0
- Install
@revrag-ai/embed-react@1.5.0, and check your stack against the Dependency & Compatibility Guide. - Pass
appVersiontouseInitialize, matching a version your Revrag dashboard has a config for. - Search your code for
useEmbed,EmbedContextTypeandEventPayload, and replace them as above. - React 17 on webpack: import from
@revrag-ai/embed-react/react17. - Import the stylesheet as
@revrag-ai/embed-react/style.css, not…/dist/style.css. - Call
EmbedLogout()when your user signs out. - Mask sensitive fields and set
excludeScreenswhere needed. - Optional: run
verifyIntegration()from@revrag-ai/embed-react/diagnosticsto check the setup.
The React integration guide covers each step in detail.
1.4.4 and earlier
1.4.4 was published on 8 June 2026. It predates most of 1.5.0: no /react17 or /diagnostics entry, no appVersion option, no Action Intelligence, no call controls, no agent events and no EmbedLogout(). If you are still on it, upgrade with the steps above.