Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

Addresses review feedback requesting explanation of the duplex property type assertion in streaming upload implementation.

Changes

  • Added inline comment documenting:
    • Why duplex: 'half' is required for ReadableStream request bodies
    • What half-duplex communication means in this context
    • Why type assertion is needed (property not yet in standard TypeScript RequestInit)
// The 'duplex' property is required when using a ReadableStream as the request body.
// 'duplex: half' indicates half-duplex communication (one direction at a time),
// which is the mode needed for streaming request bodies with fetch().
// Type assertion is necessary because 'duplex' is not yet part of the standard
// TypeScript RequestInit type definition, though it's required by the fetch spec
// for streaming uploads.
const response = fetch(url, {
  method: 'PUT',
  body: webStream,
  duplex: 'half',
} as RequestInit & {duplex: 'half'})

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: madebydavid <5401249+madebydavid@users.noreply.github.com>
Copilot AI changed the title [WIP] Update progress tracking improvements for zipping and uploading Add documentation for duplex property in streaming upload Jan 22, 2026
Copilot AI requested a review from madebydavid January 22, 2026 12:07
@madebydavid madebydavid marked this pull request as ready for review January 22, 2026 12:11
@madebydavid madebydavid merged commit 6691772 into 138-feature-some-progress-indication-of-the-upload-progress-in-default-ship-mode-and-follow-ship-mode Jan 22, 2026
@madebydavid madebydavid deleted the copilot/sub-pr-139-again branch January 22, 2026 12:11
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.

2 participants