Skip to content

fix(recorder): cancel pending multipart control requests - #3353

Open
vedanth-jadhav wants to merge 1 commit into
CapSoftware:mainfrom
vedanth-jadhav:fix/recorder-cancel-control-requests
Open

vedanth-jadhav wants to merge 1 commit into
CapSoftware:mainfrom
vedanth-jadhav:fix/recorder-cancel-control-requests

Conversation

@vedanth-jadhav

@vedanth-jadhav vedanth-jadhav commented Oct 26, 2026 •

Copy link
Copy Markdown

Canceling a browser recording currently aborts PUTs but leaves presign and completion fetches running. A hung presign holds cancel() until the API timeout (60 seconds by default); canceling during completion backoff can send another completion request afterward. This affects the shared uploader used by web recording, extension recording and comment media.

Tie presign/completion fetches to an uploader-owned abort signal while retaining their existing timeouts. Reuse the cancelable retry wait for completion, check cancellation before dispatch, and prevent late completion responses from publishing success. The remote multipart-abort request keeps its independent timeout/signal. Interrupted completion still reports MultipartCompletionUncertainError, since the server may already have committed the recording. No public API, upload ordering, retry limits, payload format or dependency changes.

Validation on Linux x86_64 / Node 24.19.0:

  • All 91 recorder-core tests pass (84 existing, seven added). Five original event-order regressions were first run against unchanged production source and all failed.
  • Tests cover cancel/suspend with three pending presigns plus a queued fourth part; independent remote abort; pending completion; late successful responses; cancellation during completion backoff; no additional completion or success notification.
  • Scoped strict TypeScript for the uploader and its test passes; Biome and git diff --check pass. The final suite was rerun after updating the branch to current main.

Reproduce with bun run --cwd packages/recorder-core test. Local checks used Vitest 3.2.0 and Biome 2.2.0 installed outside the checkout; no workspace lockfile changes. Network order is controlled in tests; physical browser capture and authenticated storage were not exercised. This is a cancellation correctness fix, with no throughput claim. Checked current main/open PRs; native GPUI presign optimization #3352 changes a separate implementation.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

The PR lets InstantRecordingUploader stop pending presign and completion requests while keeping their existing timeouts.

  • Canceling or suspending a recording now stops pending multipart requests.

No actionable issues found. Tests were inspected but not run during this review.

Reviews (1) · Last reviewed commit: "fix(recorder): cancel pending multipart ..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
cap-status Skipped Skipped Oct 26, 2026 9:02am UTC

This branch was previously deployed

1 inactive deployment
Preview – cap-status — 3e2b3c14 Deployed Oct 26, 2026 by vercel[bot]
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