Skip to content

feat(server)!: improve hibernation naming conventions - #686

Merged
dinwwwh merged 1 commit into
mainfrom
feat/server/improve-hibernation-naming
Jun 25, 2025
Merged

feat(server)!: improve hibernation naming conventions#686
dinwwwh merged 1 commit into
mainfrom
feat/server/improve-hibernation-naming

Conversation

@dinwwwh

@dinwwwh dinwwwh commented Jun 25, 2025

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Refactor
    • Updated naming conventions for internal plugin context and symbols to improve clarity. No changes to functionality or user experience.

@vercel

vercel Bot commented Jun 25, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
orpc ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 25, 2025 8:43am

@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jun 25, 2025
@coderabbitai

coderabbitai Bot commented Jun 25, 2025

Copy link
Copy Markdown

Walkthrough

This change updates the naming of an interface and a symbol related to hibernation context management within a plugin. The interface and symbol are both renamed, and all internal references within the plugin class are adjusted accordingly. The logic and control flow remain unchanged.

Changes

File(s) Change Summary
packages/server/src/hibernation/plugin.ts Renamed interface and symbol for hibernation context; updated all class references to new names.

Poem

The hibernation names have changed,
Symbols and types rearranged.
No logic lost, just clearer tags,
The code now wears new, tidy rags.
A rabbit hops through fields of code,
Cheering for clarity on this road! 🐇✨


📜 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 274e703 and 52bebce.

📒 Files selected for processing (1)
  • packages/server/src/hibernation/plugin.ts (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: publish-commit
  • GitHub Check: lint
🔇 Additional comments (6)
packages/server/src/hibernation/plugin.ts (6)

6-8: Good naming improvement for interface clarity.

The rename from experimental_HibernationContext to experimental_HibernationPluginContext adds clarity and specificity. The "Plugin" suffix makes it clear this interface is specifically for the hibernation plugin context.

Note: This is a breaking change as it affects the exported interface.


16-16: Improved symbol naming and description.

The rename to CONTEXT_SYMBOL with the descriptive symbol description 'ORPC_HIBERNATION_CONTEXT' is a good improvement. The shorter property name is cleaner within the class scope while the symbol description remains descriptive.


25-25: Consistent type annotation update.

The type annotation correctly uses the renamed interface experimental_HibernationPluginContext.


30-30: Consistent symbol reference update.

The symbol reference correctly uses the renamed CONTEXT_SYMBOL property.


49-49: Consistent symbol and type updates.

Both the symbol reference (CONTEXT_SYMBOL) and type assertion (experimental_HibernationPluginContext) are correctly updated to use the renamed entities.


6-6: ```shell
#!/bin/bash

Refined search across .ts and .tsx without relying on unsupported --type flags

echo "Checking for external usage of the old interface name..."
rg "experimental_HibernationContext" -g ".ts" -g ".tsx" -A2 -B2 || true

echo "Checking for external usage of the old symbol property..."
rg "HIBERNATION_CONTEXT_SYMBOL" -g ".ts" -g ".tsx" -A2 -B2 || true


</details>

</blockquote></details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEejqANiS4AzEtQAUiSlIoBKEF3jNe+KZAQBSgxqeHwsEOZ4DCIFDCkMcXDEAwA5bGYgii4ANgAOHIMAVWdsyGwMDHwARyN9Y3AoMnp8GxwCYjJlGnomVnYuXn5hUXEpGXkmJSpVdS0depMoOFRUTHbCUnIqHoV+xK4qAHdIRAzmNAp5OQVplTVNbV0wQwbTA240BgBrNFJEAD0pVcQIoDABgWCoXCAO4FmwRGiGlwiA4BgARJiDABibGQACCAElOttqHRTudLvJWoxYJh/mZYCQUIlKDYvsyAAYkAAe3Eo3nYaAsAH0ABLwLIhJIYADC4RoPNwnMgRzQyAoZDQbHoBEg3L5ArYiWF4slUJlAAV4Yi5QrecqNDAmadZJl8BZys56Or0JBviR5NFILgXUxWUrhiIxKrfZrIuSbBQWPqxYSAEIAUQASql8dBCQB5VIi2XF6CZgAa0BFAGUAJoAWXThYAMiq9Zyy6kK9W602W+3VepYH7yCdEG6BB7IEpEAwKPBuDL9QByQvZy2y8UZnN5gvF0vlqvQVecp3yiiaxDccK0aJECyyAA06Asns1dnjDGkIfwIZdD16End1PUwehohoCh2R/SAExZRB4CUACuV5flF2NXBTQlKVoQwa0EWiFUGAsdVkCOShmWwbhaDJXV/2wZwULgkgTgTRAnRWZBohI7A52Yhd7BXcD0EQRCiAwTD+DaUNmUhChpTCLBw0VXAWWYzVqmwaQ1Mgygf2XfA+BE9QNRIXBFxICRhXQDBdVkflRNKFdg1kxgLHgdgWSggyCAoTiXQsfBEQYWzegVZNPRsIKTk1C5gwqBg6RiOhX3CJ9mMiB8wtdUD/UDL1EyM04/Oytz5MU8I4lU9S3M07TEDUlSHVVSjIGYRR4BsTzaA0IwjFxAkLCgvDkD1NylBIy5RukyA0KM3Ziu4bABA80L2HUTyUgMKBCVZaCOUgeNtToLgDXQwUTVFHCLSU+UI2VSBACTCfU0KNIVrvNBS8II217tUlVg05T4fj+aQgRcShQXBCq8NhG0kRRTkdsgWVSLEnhk3Q3B5GOnUzs1NBaHS+Q0yzXN8yLEtu17GsG2bNsuBA6cLBVF7OUJ4mMAymmT37BnWyZqcPUB5T0eQc73qus1cKtBGMFF/UQd+f4IYoEFEDBCEvsqjB4cIjBkUQZHMXROoXjeJo7NmtA8E2LodnJPpMMONAJ0pK5IBuKZlFmR4FgtpY9iiXARSQxARU1CRPIo2gRUay41PqAwg4AVgAJiCAQfwYNAABZaAARjyAAGEu88LgBOARK8rvPU4btASAAZhIEgBAAdhsBgBByEuO4YdPnleIPnfUMPaAjqOY7oEVmmHoA=== -->

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details open="true">
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

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.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=unnoq/orpc&utm_content=686):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Explain this complex logic.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai explain this code block.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and explain its main purpose.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 introduces a breaking change to the server's experimental hibernation plugin by refining its internal naming conventions. The primary goal is to enhance clarity and consistency of identifiers related to the hibernation context, making the codebase more maintainable and easier to understand for future development.

Highlights

  • Interface Renaming: The experimental_HibernationContext interface has been renamed to experimental_HibernationPluginContext to explicitly indicate its association with the plugin.
  • Symbol Renaming and Value Update: The HIBERNATION_CONTEXT_SYMBOL property within experimental_HibernationPlugin has been renamed to CONTEXT_SYMBOL, and its associated Symbol value has been updated to ORPC_HIBERNATION_CONTEXT for improved consistency and uniqueness.
  • Context Reference Updates: All internal references to the old interface name and symbol within the experimental_HibernationPlugin class have been updated to reflect the new naming conventions.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 is currently in preview and 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 to provide feedback.

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.

@codecov

codecov Bot commented Jun 25, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

The pull request focuses on improving the naming conventions related to the hibernation plugin's context and symbol, enhancing code clarity and reducing potential naming conflicts. The changes involve renaming the context interface and symbol, and updating their usages throughout the plugin.

@pkg-pr-new

pkg-pr-new Bot commented Jun 25, 2025

Copy link
Copy Markdown
More templates

@orpc/arktype

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

@orpc/client

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

@orpc/contract

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

@orpc/experimental-durable-event-iterator

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

@orpc/hey-api

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

@orpc/nest

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

@orpc/openapi

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

@orpc/openapi-client

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

@orpc/react

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

@orpc/react-query

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

@orpc/server

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

@orpc/shared

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

@orpc/solid-query

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

@orpc/standard-server

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

@orpc/standard-server-aws-lambda

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

@orpc/standard-server-fetch

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

@orpc/standard-server-node

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

@orpc/standard-server-peer

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

@orpc/svelte-query

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

@orpc/tanstack-query

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

@orpc/valibot

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

@orpc/vue-colada

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

@orpc/vue-query

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

@orpc/zod

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

commit: 52bebce

@dinwwwh
dinwwwh merged commit add5acf into main Jun 25, 2025
8 checks passed
@dinwwwh
dinwwwh deleted the feat/server/improve-hibernation-naming branch June 22, 2026 01:43
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