Skip to content

Feedback forms: tab capture for the marked screenshot and the recording (Gleap #228450) - #214

Merged
boehlerlukas merged 1 commit into
masterfrom
gleap/228450-tab-capture-old-forms
Nov 11, 2026
Merged

boehlerlukas merged 1 commit into
masterfrom
gleap/228450-tab-capture-old-forms

Conversation

@boehlerlukas

Copy link
Copy Markdown
Contributor

Gleap ticket: #228450 Use web recording api everywhere

Problem

Capture requests take screenshots and recordings from the current tab (getDisplayMedia with preferCurrentTab). The feedback form's capture step still used the older ways: the screenshot was always a DOM snapshot rendered on the server, and the recording asked for the whole screen with its own MediaRecorder code.

Change

  • Mark the bug (screenshot): the Next click (or Enter) asks for the current tab and takes one frame, drawings included, with the editor's toolbar hidden. The image is uploaded to /uploads/sdk and the report carries screenshotUrl (as the mobile SDKs do), so no server change is needed. The same masks as in capture requests are painted over private fields.
  • Fallback: where the tab can't be captured (not desktop Chromium, inside a frame, project set to webScreenshotMethod: "dom-only"), or the share dialog is declined, or the capture or upload fails, the report sends the DOM snapshot as before.
  • Record screen: GleapScreenRecorder now runs on requestDisplayStream and DisplayRecording from the capture requests (current tab first on Chromium, the browser's own picker elsewhere; MP4 or WebM with a seekable duration). Its own stream and recorder code is removed.
  • Shared pieces instead of copies: canCaptureTab() (GleapCaptureSettings) and captureTabScreenshot() (GleapCaptureScreenshot) are used by both the capture requests and the form.

Not changed

  • Reports sent without marking a screenshot, and silent reports, keep the DOM render. They have no click on the page that could open the share dialog, and a dialog on every form submit would be a new prompt for every reporter.
  • No version bump or build output in this PR (as in earlier feature PRs).

Checked

  • npx jest: 40 suites, 743 tests pass (new: GleapMarkerManager.test.js, GleapScreenRecorder.test.js, tab-screenshot cases in GleapFeedback.test.js).
  • npx webpack builds.
  • Demo page in a Chromium browser: Next calls getDisplayMedia inside the click with the tab options; with sharing denied the form opens and the drawing stays for the DOM render.
  • Not checked by hand: a granted share dialog in Chrome (the test browser denies screen sharing). That path is the same function capture requests already use.

🤖 Generated with Claude Code

…ng (Gleap #228450)

The form's capture step now uses the capture requests' method:

- "Mark the bug": Next takes one frame of the current tab, drawings included
  (desktop Chromium, one click in the browser's share dialog). The image is
  uploaded and sent as screenshotUrl. Where the tab can't be captured (other
  browsers, a frame, webScreenshotMethod "dom-only"), or it is declined or
  fails, the report renders the DOM on the server as before.
- "Record screen": GleapScreenRecorder runs on DisplayRecording and
  requestDisplayStream (current tab first on Chromium, MP4/WebM with a
  seekable duration) instead of its own MediaRecorder code.

Reports sent without marking, and silent reports, keep the DOM render: they
have no click on the page that could ask for the tab.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@boehlerlukas
boehlerlukas merged commit bc7b2a2 into master Nov 11, 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