Skip to content
GitHub

Web SDK changelog

What changed in each release of the Runbear React SDK, @runbear-io/react, including breaking changes.


On this page

This page mirrors the CHANGELOG.md shipped with @runbear-io/react. Each version is published to GitHub Packages with a matching v<version> GitHub release. Dates are the release dates.

Before 0.3.0 the package was versioned loosely and several patch releases added features; read each entry rather than inferring from the number. For which feature needs which version at a glance, see Version support.

0.6.0 - Unreleased#

Changed#

  • A turn whose only components are display components (a card) now keeps its suggestion chips; only interactive components (confirm, select) or a component shown as its fallback text suppress them.
  • The runbear-card class hook moved from the card's inner box to the per-component wrapper (the element that also carries runbear-component and data-runbear-component="card").
  • Images in markdown replies now load with referrerPolicy="no-referrer", loading="lazy" and decoding="async", and a broken or rejected image shows its alt text. Image hosts that require a Referer stop loading; the markdown image title is no longer forwarded.

Fixed#

  • Session mode: startWithMessage(text) now sends the typed message. Previously the new session replaced the old one mid-start, the message was cleared, the widget showed an empty thread, nothing was sent, and messagesLoaded reported messageCount: 0.
  • Session mode: reset(), startWithThread() and startWithMessage() now recover after sessionFailed. Previously your endpoint minted a new session and the SDK discarded it and rejected with "the session ended while a credential was in flight", so the widget stayed dead and each attempt left an unused session behind.
  • Cards now draw the 1px themed border 0.4.0 intended (border-solid); 0.4.0's border set only a width, so no outline was drawn.

Added#

  • config.components.disabled: component names (confirm, select, card, list, table, chart) this widget renders as their plain-text fallbackText instead of the rich component — live and after reload. Rendering only; the agent's Response components settings decide what is produced.
  • Exported types ComponentsConfig and ComponentLabels.
  • Class hooks runbear-image and runbear-image-fallback (markdown images today). runbear-link and runbear-pager, runbear-pager-content, runbear-pager-controls, runbear-pager-previous, runbear-pager-next, runbear-pager-status are reserved for the card, list and table renderers.
  • card gains an optional image (https only, loaded with no referrer and lazily; shows its alt text if it fails) and up to three links (open in a new tab, https only). A card on 0.4.x renders without them. CardProps gains image? and links?. Class hooks runbear-card-image, runbear-card-links, runbear-card-link.
  • New list response component: 1–10 results with thumbnail, linked title, subtitle and up to 3 label/value facts, 5 per page with local Previous/Next paging that never sends a message. It is display only, so a turn with only a list keeps its suggestion chips. Older SDKs show its fallbackText. Class hooks runbear-list-title, runbear-list-items, runbear-list-item, runbear-list-item-image, runbear-list-item-body, runbear-list-item-title, runbear-list-item-link, runbear-list-item-subtitle, runbear-list-item-meta, runbear-list-item-meta-entry, runbear-list-item-meta-label, runbear-list-item-meta-value.
  • Label keys config.components.labels.pagerPrevious (default "Previous"), pagerNext ("Next") and pagerStatus ("Page {page} of {count}", the screen-reader status), shared by the list and table pagers.
  • New table response component: an optional title and a grid of up to 8 columns × 30 rows of plain-text cells, 10 rows per page. Click a column header to sort locally (ascending, descending, original order; empty cells last); a column sorts as numbers when every non-empty cell is a number (1,250.50, $1,250, 12 €, 12%, (300); — and n/a count as empty), otherwise as locale text with "Item 2" before "Item 10". Sorting and paging never send a message. It is display only, so a turn with only a table keeps its suggestion chips. Older SDKs show its fallbackText. Class hooks runbear-table-view, runbear-table-scroll, runbear-table-grid, runbear-table-caption, runbear-table-head, runbear-table-header, runbear-table-sort, runbear-table-sort-icon, runbear-table-body, runbear-table-row, runbear-table-cell, runbear-table-more, runbear-table-status.
  • Label keys config.components.labels.tableUntitled (default "Table with {count} rows", the caption of an untitled table), tableSortedAscending ("Sorted by {label}, ascending"), tableSortedDescending ("Sorted by {label}, descending") and tableUnsorted ("Original order").
  • New chart response component: a static, themed SVG line, bar or area chart (category or date x axis, up to 4 series × 100 points). Every data value must be 0 or have a magnitude between 1e-12 and 1e15; a chart with any value outside that range shows its fallbackText.
  • CSS variables --runbear-chart-1 … --runbear-chart-4 (series colours; light and dark defaults).
  • Label keys config.components.labels.chartTypeLine, chartTypeBar, chartTypeArea, chartSummary, chartHiddenSeries.

0.5.0 - 2026-10-02#

Breaking#

  • CreateRunStreamResponse no longer has a thread.message.created member. The server never emitted that event; the message id arrives on the first thread.message.delta or thread.message.completed. Code that switched on it must drop that branch.

Changed#

  • Session mode: when a start cycle fails five times while sending the stored resume token, the SDK drops that token and makes exactly one more cycle without it, so your endpoint can mint a fresh session. Only if that cycle fails too does the widget emit sessionFailed { reason: "network" }. Previously a host endpoint that answered an expired resume token with a plain error failed every page load until the host called reset(). A declined or misconfigured result still ends the session after one call, and renewals of a live session are unaffected.

Fixed#

  • mount() on an element that already has children now removes them and renders the widget, with one console warning per page. Previously it cleared the element and rendered nothing, and a second mount() threw "Chat widget is already mounted".
  • The "no active thread yet" console warning now says to wait for containerReady. It used to offer sessionReady too, but a message sent from a sessionReady handler arrives before the thread is adopted and is dropped.
  • The Content-Security-Policy console warning and the misconfigured-session error now link to the public docs at docs.runbear.io instead of README sections.
  • JSDoc no longer claims that process.env.RUNBEAR_API_KEY or RUNBEAR_API_URL are read at runtime. The published build replaces them at build time, so a consumer cannot set them.
  • JSDoc that ships in the type declarations now lists card as a built-in component name, and describes the order of thread.message.component correctly: a card can arrive before thread.message.completed.

Added#

  • Exported types: Chat (the instance createChat() returns), ChatEventCreatedData, ChatEventContainerReadyData, ChatEventMessagesLoadedData and CardProps.
  • This changelog. The README now links to the full reference at docs.runbear.io instead of duplicating it.

0.4.0 - 2026-09-21#

Added#

  • The built-in card response component: a title, an optional subtitle and up to ten labelled fields, display only. Adds the runbear-card* class hooks and data-runbear-component="card". Before 0.4.0 a card showed its fallbackText.

0.3.0 - 2026-09-17#

Breaking#

  • Theming isolation. The theme tokens moved off :root onto [data-runbear], and the public CSS variables were renamed from --background, --primary and the rest to the --runbear-* contract (15 colour tokens plus --runbear-radius). --popover*, --card* and --chart-* were removed. Every generated rule is scoped to [data-runbear], so the widget no longer restyles the host page. Rename any overrides you set.

Added#

  • A dark palette: .dark on an ancestor or on the widget, or data-runbear-theme="auto" to follow prefers-color-scheme.
  • A console warning when the injected stylesheet is missing, which usually means a CSP style-src without 'unsafe-inline'.
  • Response components: the renderer registry and the built-in confirm and select components, with liveness rules, accessibility and theming hooks.
  • config.components.labels to override the components' user-visible strings.
  • The ChatComponent, ChatComponentOption, ConfirmProps and SelectProps types, and components on thread messages.

Fixed#

  • Message-list render defects: a missing loading indicator, suggestions that hid their message's content, and missing React keys.
  • Markdown links are limited to absolute https: and mailto: URLs, and images to absolute https: URLs.

0.2.0 - 2026-08-21#

Added#

  • Session mode: auth: { mode: "session", fetchSessionToken }. Your server mints a short-lived, thread-bound session pass and the browser talks to api.runbear.io directly. Includes renewal before expiry, backoff with a five-failure circuit breaker, per-widget storage (storage, sessionKey), SessionDeclinedError and SessionCredentialError, retrySession(), and the sessionReady, sessionRenewed, sessionChanged and sessionFailed events.
  • The auth option with session, proxy and direct modes. The top-level apiKey and baseUrl options are deprecated but still work.
  • RunbearApiError, carrying status, code, body and retryAfterSeconds, for every non-2xx response.

Changed#

  • Legacy baseUrl (proxy mode) now sends no credential at all.

0.1.9 - 2026-07-23#

Added#

  • config.assistant (name, avatarUrl, showName) and config.welcomeMessage.

0.1.8 - 2026-06-25#

Fixed#

  • Long streamed messages: NDJSON lines split across network chunks, and multi-byte characters split across chunks, are now decoded correctly.

0.1.7 - 2026-05-22#

Added#

  • The baseUrl option, to route requests through your own proxy.

0.1.6 - 2026-05-08#

Added#

  • config.chatInput.placeholder.

0.1.5 - 2026-05-07#

Added#

  • Paste files into the chat input to attach them.

0.1.4 - 2026-04-30#

Changed#

  • startWithMessage() also emits messagesLoaded.

0.1.3 - 2026-04-30#

Added#

  • The containerReady and messagesLoaded chat events.

0.1.2 - 2026-04-30#

Added#

  • Inline tool-call progress while a response streams (config.toolProgress).

0.1.1 - 2026-03-20#

Added#

  • config.thinking.enabled to turn the thinking display on or off.

0.1.0 - 2026-03-17#

Added#

  • Streaming of the model's thinking tokens.

0.0.1 - 2026-03-06#

  • First release as @runbear-io/react from its standalone repository.