Repository navigation
feat: capture requests - setCaptureEnabled, setRemoteLogCollectionEnabled and log flush - #40
Merged
Merged
Conversation
… 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.
iOS and Android pass them to the native SDKs. Web calls the JavaScript SDK's
Gleap.setCaptureEnabled / setRemoteLogCollectionEnabled; a call made before
the JavaScript SDK has loaded (or on one without them) never throws and is
applied once it reports initialized.
Needs the native iOS / Android release with capture requests and, on web,
the JavaScript SDK release with them (pins stay on 19.0.0 until the release
bumps them).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…logs for a capture request Network requests logged from Dart (logNetworkRequest, the http / dio interceptors) are pushed 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, registered on initialize (Android and iOS): the plugin invokes flushLogs on the main thread, Dart pushes a scheduled push right away (GleapNetworkLogStore.flushPending, awaiting attachNetworkLogs) and returns, and the plugin calls done. The SDK waits at most 500 ms; with the engine detached the flush is answered right away. Web has no flush hook: the JavaScript SDK collects the logs there and Dart pushes to it at most every 500 ms, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 1, 2026
Merged
Merged
boehlerlukas
marked this pull request as ready for review
October 1, 2026 11:58
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
Flutter 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 (and the JavaScript SDK on web) do the capturing.
Gleap.setCaptureEnabled({required bool enabled}): 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({required bool enabled}): turns log collection for capture requests on or off. While off, log requests are answered asunsupported. Default on.initialized.flushLogson the main thread. Dart pushes a pending push right away (GleapNetworkLogStore.flushPending), and the native SDK continues. It waits at most 500 ms; a detached engine answers right away.FLAG_SECUREwindows (Android) and views passed to theirmaskView. Fields drawn by Flutter (e.g. a passwordTextField) are not native views, so they are not detected. The customer reviews every screenshot and recording before sending and can blur parts of a screenshot.maskViewis not exposed from Dart, because a Flutter widget can't be targeted as a native view.Verification
flutter test21/21, including the newflushPendingtest.flutter analyzeshows only 5 existing infos, all inexample/.flutter build webof the example OK.javacagainst the local Android SDK branch is OK. Against 19.0.0 it fails only on the new symbols.clangsyntax check against the local iOS SDK branch is OK. Againstorigin/mainit fails only on the new symbols.Release
After the native release: bump the podspec,
Package.swiftand the Android 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:
Design: https://claude.ai/artifact/5i88BeWfcsWUFhhJmPwK5V (private)
PRs in this program (one per repo):
🤖 Generated with Claude Code