Repository navigation
fix(sdk-recorder): honor recording limits in React - #2736
Merged
richiemcilroy merged 3 commits intoOct 20, 2026
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
Author
|
@greptileai please re-review 8c17d5b. The limit is now captured when start() is invoked. Updating the React prop no longer recreates or destroys a recording. Browser regression checks preserve capture and completion when the limit changes during recording, while paused, during permission acquisition and during upload. Four focused deadline tests pass, and the updated PR description includes the reproduced data loss and the corrected output. |
This branch was previously deployed
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.
React SDK recordings ignore custom length limits and use the four-hour default. The hook now passes
maxDurationMswhen starting a recording. The limit is captured before permission acquisition; later prop changes preserve the active recorder and its deadline.Closes #2735
Before and after
Same React 19.2.8 / Chrome 154 Linux workflow on main
b6a06a0a5, withmaxDurationMs: 1500, camera-mode canvas capture and intercepted upload requests:14400000ms1500msrecording, manual stop neededcomplete, automatically stoppedThe direct
CapRecordercontrol already stops at 1.5 seconds on main. The defect is in the React wrapper.Validation
bun test packages/sdk-recorder/__tests__/duration-limit.test.ts: four tests pass for the default deadline, constructor configuration, a per-start override and an explicit zero limit. The override cases fail against the previous implementation. Uses the existing Bun runtime without adding dependencies.recordingphase. This revision keeps capture alive, uploads a 47,890-byte recording and reportscomplete. Its saved file contains frames through 1.469 seconds; the paused case contains frames through 1.409 seconds. Both decode without errors.git diff --checkand a browser bundle build pass. Calls toCapRecorder.start()without an override retain their existing constructor limit.src/index.ts:87on main and this patch, in event-listener unsubscribe typing. No unrelated type changes are included. Full workspace checks were not run locally.The browser uses synthetic capture input and stubbed network requests. Physical cameras, native permission prompts, React 18, Firefox, Safari and cloud uploads remain unverified.


Confidence Score: 5/5
The PR appears safe to merge; no new actionable issues were found.Summary
React recordings now pass
maxDurationMstoCapRecorder.start()instead of rebuilding the recorder when the limit changes.Reviews (2) · Last reviewed commit: "fix(sdk-recorder): preserve capture when..." · Reviewed by Greptile