Support HttpApiSchema.StreamUint8Array request payloads in HttpApiClient - #6505
Support HttpApiSchema.StreamUint8Array request payloads in HttpApiClient#6505leonitousconforti wants to merge 2 commits into
Conversation
🦋 Changeset detectedLatest commit: e3a60c1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 27 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis change preserves ChangesStreaming request payloads
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/effect/src/unstable/httpapi/HttpApiClient.ts`:
- Around line 1003-1016: Update the stream-schema handling around
HttpApiSchema.isStreamUint8Array so StreamUint8Array and StreamSse encoders are
not cached or retrieved by shared AST identity. Key bodyFromPayloadCache by the
schema object for stream schemas, or bypass that cache for them, ensuring each
schema preserves its own contentType and mode; add a regression test covering
distinct custom content types.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 2cbb97b2-3731-4daf-b828-316c164acc27
📒 Files selected for processing (4)
.changeset/httpapi-client-stream-request-payloads.mdpackages/effect/src/unstable/httpapi/HttpApiClient.tspackages/effect/src/unstable/httpapi/HttpApiEndpoint.tspackages/effect/test/unstable/httpapi/HttpApiClient.test.ts
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
StreamUint8Array schemas all share a single AST while carrying their content type on the schema object, so caching encoders by AST let the first stream endpoint's content type leak into every other stream endpoint.
Type
Description
Related
Summary by CodeRabbit