Skip to content

feat(durable-iterator): x-orpc-durable-iterator header#1032

Merged
dinwwwh merged 3 commits intomainfrom
docs/durable-iterator/headers
Sep 26, 2025
Merged

feat(durable-iterator): x-orpc-durable-iterator header#1032
dinwwwh merged 3 commits intomainfrom
docs/durable-iterator/headers

Conversation

@dinwwwh
Copy link
Copy Markdown
Member

@dinwwwh dinwwwh commented Sep 25, 2025

Summary by CodeRabbit

  • New Features

    • Standardized the Durable Iterator response header to x-orpc-durable-iterator for clearer interoperability.
  • Documentation

    • Added CORS guidance and examples showing how to expose the x-orpc-durable-iterator header in server-side setup.
  • Refactor

    • Renamed the public Durable Iterator header; update any references to the previous header name.
  • Chores

    • Minor internal alignment to reflect the new header name across the integration.

@vercel
Copy link
Copy Markdown

vercel bot commented Sep 25, 2025

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

Project Deployment Preview Comments Updated (UTC)
orpc Ready Ready Preview Comment Sep 25, 2025 3:30am

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Sep 25, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Sep 25, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Renames the durable iterator plugin header constant to x-orpc-durable-iterator and updates documentation to instruct CORS configurations to expose that header. No runtime logic changes beyond the constant value update.

Changes

Cohort / File(s) Summary
Documentation: Durable Iterator CORS guidance
apps/content/docs/integrations/durable-iterator.md
Adds CORS policy guidance noting the DurableIteratorHandlerPlugin adds the x-orpc-durable-iterator header and shows example CORSPlugin configuration with exposeHeaders: ['x-orpc-durable-iterator'].
Constant header key update
packages/durable-iterator/src/consts.ts
Changes DURABLE_ITERATOR_PLUGIN_HEADER_KEY value from 'x-orpc-dei' to 'x-orpc-durable-iterator'.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

size:M, lgtm

Poem

A rabbit hops with docs in paw,
“Expose the header,” is the law.
From dei to durable, crisp and clear,
CORS waves welcome packets near.
🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly captures the key change of introducing the new x-orpc-durable-iterator header for the durable-iterator feature, matching the updates in both documentation and code with clear contextual scope.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/durable-iterator/headers

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aae13bd and d4ea396.

📒 Files selected for processing (1)
  • apps/content/docs/integrations/durable-iterator.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • apps/content/docs/integrations/durable-iterator.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: lint
  • GitHub Check: test
  • GitHub Check: publish-commit
  • GitHub Check: Analyze (javascript-typescript)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @unnoq, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the durable iterator integration by renaming a key HTTP header for better descriptive clarity. Concurrently, it introduces crucial documentation regarding CORS policy, guiding developers on how to properly expose this new header to client-side applications when dealing with cross-origin requests, thereby ensuring seamless functionality and preventing potential access issues.

Highlights

  • Header Renaming: The internal constant DURABLE_ITERATOR_PLUGIN_HEADER_KEY has been updated from x-orpc-dei to x-orpc-durable-iterator for improved clarity and consistency in identifying durable iterator responses.
  • CORS Documentation: New documentation has been added to guide users on configuring CORS policies to expose the x-orpc-durable-iterator header, which is essential for cross-origin client-side access to durable iterator functionality.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the x-orpc-durable-iterator header to identify durable iterator responses, replacing the previous x-orpc-dei header for better clarity. The documentation has been updated accordingly to include a new section on CORS policy, explaining how to expose this header for cross-origin requests. My review focuses on the clarity and consistency of the documentation changes. I've suggested an improvement to the code example in the documentation to maintain consistency with other examples in the same file and to provide a more complete picture for the user.

Comment thread apps/content/docs/integrations/durable-iterator.md Outdated
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Sep 25, 2025

More templates

@orpc/arktype

npm i https://pkg.pr.new/@orpc/arktype@1032

@orpc/client

npm i https://pkg.pr.new/@orpc/client@1032

@orpc/contract

npm i https://pkg.pr.new/@orpc/contract@1032

@orpc/experimental-durable-iterator

npm i https://pkg.pr.new/@orpc/experimental-durable-iterator@1032

@orpc/hey-api

npm i https://pkg.pr.new/@orpc/hey-api@1032

@orpc/interop

npm i https://pkg.pr.new/@orpc/interop@1032

@orpc/json-schema

npm i https://pkg.pr.new/@orpc/json-schema@1032

@orpc/nest

npm i https://pkg.pr.new/@orpc/nest@1032

@orpc/openapi

npm i https://pkg.pr.new/@orpc/openapi@1032

@orpc/openapi-client

npm i https://pkg.pr.new/@orpc/openapi-client@1032

@orpc/otel

npm i https://pkg.pr.new/@orpc/otel@1032

@orpc/react

npm i https://pkg.pr.new/@orpc/react@1032

@orpc/react-query

npm i https://pkg.pr.new/@orpc/react-query@1032

@orpc/experimental-react-swr

npm i https://pkg.pr.new/@orpc/experimental-react-swr@1032

@orpc/server

npm i https://pkg.pr.new/@orpc/server@1032

@orpc/shared

npm i https://pkg.pr.new/@orpc/shared@1032

@orpc/solid-query

npm i https://pkg.pr.new/@orpc/solid-query@1032

@orpc/standard-server

npm i https://pkg.pr.new/@orpc/standard-server@1032

@orpc/standard-server-aws-lambda

npm i https://pkg.pr.new/@orpc/standard-server-aws-lambda@1032

@orpc/standard-server-fetch

npm i https://pkg.pr.new/@orpc/standard-server-fetch@1032

@orpc/standard-server-node

npm i https://pkg.pr.new/@orpc/standard-server-node@1032

@orpc/standard-server-peer

npm i https://pkg.pr.new/@orpc/standard-server-peer@1032

@orpc/svelte-query

npm i https://pkg.pr.new/@orpc/svelte-query@1032

@orpc/tanstack-query

npm i https://pkg.pr.new/@orpc/tanstack-query@1032

@orpc/trpc

npm i https://pkg.pr.new/@orpc/trpc@1032

@orpc/valibot

npm i https://pkg.pr.new/@orpc/valibot@1032

@orpc/vue-colada

npm i https://pkg.pr.new/@orpc/vue-colada@1032

@orpc/vue-query

npm i https://pkg.pr.new/@orpc/vue-query@1032

@orpc/zod

npm i https://pkg.pr.new/@orpc/zod@1032

commit: d4ea396

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
apps/content/docs/integrations/durable-iterator.md (1)

203-204: Clarify CORS guidance wording.

The phrase “client-side clients” reads redundant. Tightening it to “browser clients” (or similar) would make the sentence clearer.

Apply this diff to improve clarity:

-The `DurableEventIteratorHandlerPlugin` adds an `x-orpc-durable-iterator` header to responses, indicating that the response is a durable iterator. For cross-origin requests, you must configure CORS to expose this header to client-side clients.
+The `DurableEventIteratorHandlerPlugin` adds an `x-orpc-durable-iterator` header to responses, indicating that the response is a durable iterator. For cross-origin requests, you must configure CORS to expose this header to browser clients.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2f529b8 and aae13bd.

📒 Files selected for processing (2)
  • apps/content/docs/integrations/durable-iterator.md (1 hunks)
  • packages/durable-iterator/src/consts.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: publish-commit
  • GitHub Check: lint
  • GitHub Check: test

Comment thread packages/durable-iterator/src/consts.ts
@dinwwwh dinwwwh merged commit a136b97 into main Sep 26, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant