Skip to content

feat: capture requests - setCaptureEnabled, setRemoteLogCollectionEnabled and log flush - #59

Merged
boehlerlukas merged 3 commits into
mainfrom
claude/capture-requests
Oct 1, 2026
Merged

boehlerlukas merged 3 commits into
mainfrom
claude/capture-requests

Conversation

@boehlerlukas

@boehlerlukas boehlerlukas commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Version 19.1.0 is in this PR (native pins, version, CHANGELOG with release notes). Merge after iOS + Android 19.1.0 are published (CocoaPods CDN + Maven Central show them), then tag 19.1.0.

What this adds

React Native support for capture requests. Workflows, AI agents and teammates can ask the customer for a screenshot or a screen recording, and can collect the app's logs in the background. The native SDKs do the capturing.

  • Gleap.setCaptureEnabled(enabled: boolean): turns in-app screenshots and recordings for capture requests on or off. While off, the widget offers only a file upload. Default on.
  • Gleap.setRemoteLogCollectionEnabled(enabled: boolean): turns log collection for capture requests on or off. While off, log requests are answered as unsupported. Default on.
  • Both setters check that the native method exists. JavaScript pushed over the air to an older native build does nothing instead of throwing.
  • Log flush (Android): the JS network logger pushes to native at most every 500 ms. Before the native SDK collects logs for a request, it asks JS for what it still holds back, via the flushLogs event and logsFlushed(id), and waits at most 500 ms. A destroyed JS context answers right away, and pending flushes are released on invalidate. iOS registers nothing, because the native SDK records the network itself.
  • maskView / unmaskView: not exposed. They need a native view.

Verification

  • jest 29/29. The new test fails if the flush answers before the hand-over.
  • npx bob build OK. tsc is clean apart from an existing error in example/.
  • Android javac against the local Android SDK branch is OK on RN 0.66.5 and 0.85.3. Against 19.0.0 it fails only on the new symbols.
  • iOS clang syntax check against the local iOS SDK branch is OK. Against origin/main it fails only on the new symbols.

Release

After the native release: bump the iOS podspec dependency and the Android gleap-android-sdk dependency, add the CHANGELOG entry and update the docs version table.


The whole program: capture requests ("Show me the issue")

Workflows, AI agents (Kai, Kai Resolve, custom agents) and teammates can now ask a customer for a screenshot (with annotation) or a screen recording in the middle of a conversation, and can collect logs (console, network, custom data, environment data, events) from the customer's app in the background.

One server object, the capture request, backs all three. The customer sees a card in the widget; the SDK in their app does the capture; the result lands in the thread and resumes the workflow or wakes the agent. Background log requests travel over the SDK websocket every SDK already keeps open.

How each platform captures:

  • Web, desktop Chrome/Edge: screenshot via one-click "Share this tab" (exact pixels), in-browser render as fallback; recording via tab capture, "Record this page" fallback when sharing is blocked.
  • Web, Firefox/Safari/phones/tablets: in-browser screenshot; window/screen recording on desktop, page recording (rrweb) on phones.
  • iOS / Android apps (incl. React Native, Flutter, Capacitor): in-app capture of the app's own windows: no OS prompt and no new permissions (no ReplayKit, no MediaProjection). Recordings are H.264 MP4 built from frames.
  • Older SDKs, email, WhatsApp & co.: upload / reply-with-attachment fallback, so a request never dead-ends.

Design: https://claude.ai/artifact/5i88BeWfcsWUFhhJmPwK5V (private)

PRs in this program (one per repo):

🤖 Generated with Claude Code

boehlerlukas and others added 2 commits September 30, 2026 23:04
… requests

Gleap.setCaptureEnabled(enabled) turns the in-app screenshots and screen
recordings for capture requests ("show me the issue") on or off; while off,
the widget only offers a file upload. Gleap.setRemoteLogCollectionEnabled
(enabled) turns sending the app's logs for capture requests on or off; while
off, log requests are answered as unsupported. Both default to on and pass
through to the native SDKs (iOS +setCaptureEnabled: /
+setRemoteLogCollectionEnabled:, Android Gleap.getInstance()...).

The JS wrappers check that the native method exists, so JavaScript updated
over the air on an older native build does nothing instead of throwing.
Needs the native iOS / Android release with capture requests (pins stay on
19.0.0 until the release bumps them).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gs for a capture request

Android records the app's fetch / XMLHttpRequest traffic in JS and pushes it
to the native SDK at most every 500 ms. When a capture request asks for the
app's logs, the native SDK now first calls the log flush handler: the module
(registered from JS once it listens) emits flushLogs with an id, JS pushes
what it still holds back (networkLogger.flush -> attachNetworkLog) and
answers with logsFlushed(id), which runs after the push on the module's
queue and lets the SDK go on. The SDK waits at most 500 ms; a destroyed JS
context answers right away and pending flushes are released on invalidate.

iOS registers nothing: the native SDK records the network itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@boehlerlukas
boehlerlukas merged commit 2c9694b into main Oct 1, 2026
1 check passed
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