Skip to content

Conversation

@ayushjrathod-dd
Copy link

@ayushjrathod-dd ayushjrathod-dd commented Nov 12, 2025

CodeAnt-AI Description

Normalize TypeScript generics formatting in errorBoundaryUtils

What Changed

  • Reflowed TypeScript generic parameter lines in packages/react-query/src/errorBoundaryUtils.ts; this only updates formatting and type annotation layout
  • No changes to runtime behavior, public API, or error handling logic

Impact

✅ No change to error handling behavior
✅ No change to runtime performance
✅ Fewer TypeScript formatting diffs during review

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • Style
    • Internal code formatting improvements to enhance consistency and maintainability.

@codeant-ai
Copy link

codeant-ai bot commented Nov 12, 2025

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@gemini-code-assist
Copy link

Summary of Changes

Hello @ayushjrathod-dd, 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 contains a small but important fix to errorBoundaryUtils.ts. It addresses a syntax error by removing an incorrectly placed comma within a TypeScript generic type definition. This ensures the code is syntactically correct and type-checks as expected.

Highlights

  • Syntax Correction: Removed a superfluous comma in the generic type parameters of DefaultedQueryObserverOptions within the ensurePreventErrorBoundaryRetry function, resolving a minor syntax error.
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.

@coderabbitai
Copy link

coderabbitai bot commented Nov 12, 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

The generic parameter list for the ensurePreventErrorBoundaryRetry function was reformatted to remove comma separators between TQueryFnData and TError within the DefaultedQueryObserverOptions type argument. No logic, control flow, or runtime behavior changes are present.

Changes

Cohort / File(s) Summary
Type parameter formatting
packages/react-query/src/errorBoundaryUtils.ts
Removed comma separators between TQueryFnData and TError in the generic parameter list of ensurePreventErrorBoundaryRetry function

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

This is a pure formatting adjustment with no functional impact on the codebase.

Poem

A comma or two, they took their leave,
From generic types, so neat and clean,
No logic changed, no fears to grieve,
Just tidier code—a rabbit's dream! 🐰✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and generic, lacking specificity about what aspect of errorBoundaryUtils.ts was actually updated. Provide a more descriptive title that specifies the change, such as 'Fix formatting of generic parameters in ensurePreventErrorBoundaryRetry' or 'Clean up type argument separators in errorBoundaryUtils.ts'.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ayushjrathod-dd-patch-1

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.

Copy link

@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 a syntax error in packages/react-query/src/errorBoundaryUtils.ts. The commas separating generic type arguments in the DefaultedQueryObserverOptions type have been removed, which will cause a compilation failure. This is a critical issue that must be addressed.

Comment on lines +21 to +22
TQueryFnData
TError

Choose a reason for hiding this comment

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

critical

This change introduces a syntax error. Generic type arguments in TypeScript must be separated by commas. The commas after TQueryFnData and TError are missing, which will cause the code to fail to compile.

    TQueryFnData,
    TError,

@codeant-ai codeant-ai bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Nov 12, 2025
Comment on lines +21 to +22
TQueryFnData
TError
Copy link

Choose a reason for hiding this comment

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

Suggestion: Add missing commas between the generic type arguments in the DefaultedQueryObserverOptions type argument list so the type parameters are correctly separated. [possible bug]

Severity Level: Critical 🚨

Suggested change
TQueryFnData
TError
TQueryFnData,
TError,
Why it matters? ⭐

The DefaultedQueryObserverOptions generic argument list in this file currently has the two type identifiers on separate lines without commas:

options: DefaultedQueryObserverOptions<
TQueryFnData
TError
TData,
...

That is invalid TypeScript generic syntax and will cause a compile error. Adding commas after TQueryFnData and TError fixes the syntax and restores the intended type argument list. I inspected packages/react-query/src/errorBoundaryUtils.ts and confirmed these exact lines are present in the PR.

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** packages/react-query/src/errorBoundaryUtils.ts
**Line:** 21:22
**Comment:**
	*Possible Bug: Add missing commas between the generic type arguments in the DefaultedQueryObserverOptions type argument list so the type parameters are correctly separated.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.

@codeant-ai
Copy link

codeant-ai bot commented Nov 12, 2025

CodeAnt AI finished reviewing your PR.

Copy link

@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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4a5990e and d58f2d6.

📒 Files selected for processing (1)
  • packages/react-query/src/errorBoundaryUtils.ts (1 hunks)
🧰 Additional context used
🪛 Biome (2.1.2)
packages/react-query/src/errorBoundaryUtils.ts

[error] 22-22: expected , but instead found TError

Remove TError

(parse)

🪛 GitHub Actions: autofix.ci
packages/react-query/src/errorBoundaryUtils.ts

[error] 14-14: SyntaxError: '>' expected.

⏰ 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). (2)
  • GitHub Check: Preview
  • GitHub Check: Test

Comment on lines +21 to +22
TQueryFnData
TError
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Critical syntax error: Missing comma between generic type parameters.

The comma separating TQueryFnData and TError has been removed, creating invalid TypeScript syntax. Generic type parameters must be comma-separated. This prevents the code from compiling, as confirmed by the static analysis tool and pipeline failures.

Apply this diff to restore the required comma:

   options: DefaultedQueryObserverOptions<
-    TQueryFnData
-    TError
+    TQueryFnData,
+    TError,
     TData,
     TQueryData,
     TQueryKey
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
TQueryFnData
TError
TQueryFnData,
TError,
🧰 Tools
🪛 Biome (2.1.2)

[error] 22-22: expected , but instead found TError

Remove TError

(parse)

🤖 Prompt for AI Agents
In packages/react-query/src/errorBoundaryUtils.ts around lines 21 to 22, the
generic type parameter list has a missing comma between TQueryFnData and TError
which causes invalid TypeScript; restore the comma so the generic parameters are
comma-separated (i.e., change "TQueryFnData TError" to "TQueryFnData, TError")
and ensure the file compiles.

@ayushjrathod-dd
Copy link
Author

/refacto-bot

@ayushjrathod-dd
Copy link
Author

@refacto-bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants