Skip to Content
v1.27.0 · shipped Global XHR capture, Hash-router inventory Read the changelog →
ConceptsRuntime config

Runtime config

Most apps need no extra wiring. With runtimeConfig: 'auto' (the default), the SDK fetches GET /v1/sdk/config after init and merges console-side settings over your host config — so you can tune the widget, capture flags, and banner copy from Projects → SDK install without rebuilding.

Host init() still wins when you wired something explicitly — for example widget: { trigger: 'banner' } or capture: { screenshot: 'off' }. The console cannot silently reset those back to defaults.

Setup default

Mushi.init({ projectId: 'YOUR_PROJECT_ID', apiKey: 'YOUR_API_KEY', // runtimeConfig defaults to 'auto' — no action needed })

Set runtimeConfig: false only when you want a fully static config (no console overlay). See Next.js static export for offline builds.

When host init wins

You set in codeConsole sendsResult
widget.trigger: 'banner'launcher: 'auto' (default)Banner stays — default launcher is ignored
widget.trigger: 'attach'Any launcherAttach mode stays
capture.screenshot: 'off'Unconfigured (default on-report)Screenshot stays off
capture.console: trueconsole: falseConsole capture turns off (console explicitly set it)
Nothing (defaults)Banner message + variantConsole banner applies

Full precedence rules: SDK_RUNTIME_CONFIG.md 

Console tuning without rebuild

  1. Open Projects → your project → SDK install
  2. Change launcher, banner copy, capture toggles, or screenshot privacy caption
  3. Save — live apps pick it up on the next config fetch (usually within seconds)

No npm publish or app store resubmit required for these knobs.

Widget draft persistence

If the report panel re-renders in the background (route change, theme toggle, runtime config refresh), typed description, email, and reply text are preserved along with cursor position. Drafts clear when the reporter submits or starts a fresh report session.

Troubleshooting

SymptomLikely causeFix
Top banner vanished after saving console configHost had trigger: 'banner'; old server always sent launcher: 'auto'Upgrade to latest @mushi-mushi/web. Host banner wiring now wins over console defaults.
Console toggle has no effectruntimeConfig: false or SDK never heartbeatsSet runtimeConfig: 'auto' and confirm project ID + API key
Capture button missingHost or console disabled that capture modeCheck capture.screenshot / capture.elementSelector in init and SDK install card
Reporter lost typed text mid-reportPre-fix SDK rebuildUpgrade @mushi-mushi/web — drafts persist across re-renders
Last updated on