Skip to content

Conversation

@ymc9
Copy link
Member

@ymc9 ymc9 commented Dec 30, 2025

Summary by CodeRabbit

  • Documentation
    • Added Framework Compatibility guidance (React, Vue, Svelte) with Svelte‑5 warning; Angular and Solid marked as not supported yet.
    • Introduced Configuration Overrides for per‑call and per‑client use.
    • Expanded and reorganized examples and demos (reactive args, infinite queries, cancellation), plus Samples, Interactive Demo, Full‑Stack Samples and CLI‑lite reference.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Dec 30, 2025

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

Project Deployment Review Updated (UTC)
zenstack-new-site Ready Ready Preview, Comment Dec 30, 2025 0:22am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 30, 2025

Walkthrough

Rewrites the TanStack Query client SDK docs: replaces Installation with Framework Compatibility (React/Vue/Svelte; Angular/Solid noted), expands context provider and logging options, adds Configuration Overrides, reworks per-framework examples (React, Vue, Svelte), and reorganizes Samples, Interactive Demo, and Full-Stack Samples.

Changes

Cohort / File(s) Summary
TanStack Query docs
docs/service/client-sdk/tanstack-query/index.md
Major documentation overhaul: replaced Installation with Framework Compatibility, added framework-specific dependency and compatibility notes (including Svelte 5 runes warning), expanded context provider and logging configuration, introduced Configuration Overrides (per-call / per-client) with examples, rewrote/reactivated React/Vue/Svelte code samples (fetch customization, infinite queries, cancellation), and reorganized Samples/Interactive Demo/Full-Stack Samples and CLI-lite references.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Pre-merge checks

✅ 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 clearly indicates this is a documentation update for v3.1.0 of the tanstack-query integration, matching the substantial documentation revisions in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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
Contributor

@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: 0

🧹 Nitpick comments (2)
docs/service/client-sdk/tanstack-query/index.md (2)

53-57: Minor style improvement: use "incompatible" instead of "not compatible".

Line 55 can be more concise by replacing the phrase with a single word.

- `@tanstack/svelte-query` v6 leverages Svelte 5's [runes](https://svelte.dev/docs/svelte/what-are-runes) reactivity system. ZenStack is not compatible with prior versions that uses Svelte stores.
+ `@tanstack/svelte-query` v6 leverages Svelte 5's [runes](https://svelte.dev/docs/svelte/what-are-runes) reactivity system. ZenStack is incompatible with prior versions that use Svelte stores.

Also note: "that uses" should be "that use" (subject-verb agreement).


188-190: Improve formality: replace "pretty much" with more direct phrasing.

The phrase "pretty much the same" is informal for technical documentation. Consider rephrasing to be more precise.

- From there, using the hooks is pretty much the same as using `ZenStackClient` in backend code.
+ From there, using the hooks is similar to using `ZenStackClient` in backend code.
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5e3f781 and d7c5a15.

📒 Files selected for processing (1)
  • docs/service/client-sdk/tanstack-query/index.md
🧰 Additional context used
🪛 LanguageTool
docs/service/client-sdk/tanstack-query/index.md

[style] ~55-~55: Consider using “incompatible” to avoid wordiness.
Context: ...e-runes) reactivity system. ZenStack is not compatible with prior versions that uses Svelte st...

(NOT_ABLE_PREMIUM)


[style] ~190-~190: The phrase ‘pretty much’ can be informal. To strengthen your writing, consider removing it or replacing it with an adverb.
Context: ... models. From there, using the hooks is pretty much the same as using ZenStackClient in b...

(PRETTY_MUCH)

🔇 Additional comments (6)
docs/service/client-sdk/tanstack-query/index.md (6)

87-186: Context Provider section is well-structured and examples are consistent.

The reformatting of the context provider examples across React, Vue, and Svelte improves readability and consistency. The logging configuration description is now more explicit about supported options.


192-270: Framework-specific examples are comprehensive and well-documented.

The expanded examples for React, Vue, and Svelte now include proper reactivity guidance with helpful cross-references to TanStack Query migration and documentation guides. Framework-specific patterns (function-wrapped arguments in Svelte v6, reactive arguments in Vue) are clearly explained.


276-293: Configuration Overrides section is clear and well-exemplified.

The two-level override examples (client-level and hook-level) effectively demonstrate the hierarchical configuration system. Examples are concise and realistic.


340-519: Infinite Query examples are comprehensive and framework-appropriate.

All three framework examples (React, Vue, Svelte) correctly demonstrate infinite query pagination with proper framework idioms. The getNextPageParam logic is consistent and well-documented. External documentation links aid further learning.


272-274: CLI documentation reference is well-placed and helpful.

The addition of the --lite flag documentation and CLI Reference link appropriately addresses security concerns about exposing access policies in frontend code.


579-598: The Samples section properly implements the StackBlitzGithub component and provides correct sample links. The component is correctly imported and configured with the appropriate repoPath and openFile attributes. The GitHub links follow the documented directory structure and are consistent with the samples pattern referenced elsewhere in the documentation (docs/samples.md).

Copy link
Contributor

@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: 0

🧹 Nitpick comments (2)
docs/service/client-sdk/tanstack-query/index.md (2)

53-57: Minor style improvement: use "incompatible" instead of "not compatible".

The warning message is slightly wordy. Consider "ZenStack is incompatible with prior versions that use Svelte stores" for clarity.


188-190: Minor style improvement: remove "pretty much" for stronger writing.

The phrase is informal. Consider replacing with a more direct statement: "From there, using the hooks is the same as using ZenStackClient in backend code" or "From there, you use the hooks similarly to ZenStackClient in backend code."

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d7c5a15 and 1b7fce9.

📒 Files selected for processing (1)
  • docs/service/client-sdk/tanstack-query/index.md
🧰 Additional context used
🪛 LanguageTool
docs/service/client-sdk/tanstack-query/index.md

[style] ~55-~55: Consider using “incompatible” to avoid wordiness.
Context: ...e-runes) reactivity system. ZenStack is not compatible with prior versions that use Svelte sto...

(NOT_ABLE_PREMIUM)


[style] ~190-~190: The phrase ‘pretty much’ can be informal. To strengthen your writing, consider removing it or replacing it with an adverb.
Context: ... models. From there, using the hooks is pretty much the same as using ZenStackClient in b...

(PRETTY_MUCH)

🔇 Additional comments (3)
docs/service/client-sdk/tanstack-query/index.md (3)

36-293: Well-organized restructuring with comprehensive per-framework guidance.

The refactoring significantly improves documentation clarity:

  • Framework Compatibility section establishes support scope upfront
  • Per-framework examples in Context Provider and Query Hooks sections cater to different developer audiences
  • New Configuration Overrides section effectively explains the hierarchical configuration model
  • Code examples are consistent and properly formatted across React, Vue, and Svelte

The documentation is now more accessible and actionable for developers working with different frameworks.


340-519: Infinite Query examples well-structured with framework-specific patterns.

The per-framework infinite query examples clearly show how to handle reactivity in each framework (Vue's reactive objects, Svelte's rune-based functions). The logic is consistent across examples while respecting framework conventions.


579-597: Samples section reorganization improves discoverability.

Grouping the interactive demo separately from full-stack samples makes it easier for users to find the example type they need. The links to GitHub repositories are a helpful addition.

Copy link
Contributor

@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 (2)
docs/service/client-sdk/tanstack-query/index.md (2)

53-57: Consider refining the warning phrasing for clarity.

The warning states "ZenStack is not compatible with prior versions" — consider using "incompatible" for more concise phrasing and stronger emphasis on the limitation.

🔎 Suggested phrasing refinement
- `@tanstack/svelte-query` v6 leverages Svelte 5's [runes](https://svelte.dev/docs/svelte/what-are-runes) reactivity system. ZenStack is not compatible with prior versions that use Svelte stores.
+ `@tanstack/svelte-query` v6 leverages Svelte 5's [runes](https://svelte.dev/docs/svelte/what-are-runes) reactivity system. ZenStack is incompatible with prior versions that use Svelte stores.

190-190: Optional: Replace informal phrasing for stronger documentation tone.

The phrase "pretty much the same as" is conversational and can be replaced with more precise language for formal technical documentation.

🔎 Suggested refinement
- Call the `useClientQueries` hook to get a root object to access CRUD hooks for all models. From there, using the hooks is pretty much the same as using `ZenStackClient` in backend code.
+ Call the `useClientQueries` hook to get a root object to access CRUD hooks for all models. From there, using the hooks mirrors the ORM query APIs and is fundamentally the same as using `ZenStackClient` in backend code.
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1b7fce9 and 7cc5539.

📒 Files selected for processing (1)
  • docs/service/client-sdk/tanstack-query/index.md
🧰 Additional context used
🪛 LanguageTool
docs/service/client-sdk/tanstack-query/index.md

[style] ~55-~55: Consider using “incompatible” to avoid wordiness.
Context: ...e-runes) reactivity system. ZenStack is not compatible with prior versions that use Svelte sto...

(NOT_ABLE_PREMIUM)


[style] ~190-~190: The phrase ‘pretty much’ can be informal. To strengthen your writing, consider removing it or replacing it with an adverb.
Context: ... models. From there, using the hooks is pretty much the same as using ZenStackClient in b...

(PRETTY_MUCH)

🔇 Additional comments (3)
docs/service/client-sdk/tanstack-query/index.md (3)

36-293: Excellent documentation restructuring with clear framework guidance and expanded configuration options.

The rewrite successfully:

  • Replaces generic Installation with explicit Framework Compatibility requirements, making version constraints immediately visible
  • Adds valuable context about framework support status (Angular/Solid noted as unsupported)
  • Expands Context Provider section with consistent, well-structured examples across all three supported frameworks (React/Vue/Svelte)
  • Introduces the new Configuration Overrides section with clear hierarchical patterns and concrete examples
  • Maintains safe patterns in all fetch function examples (null-coalescing operator usage is correct)

The cross-reference from Context Provider to Configuration Overrides (line 186) is properly placed and functional.


192-271: Well-organized framework-specific examples with appropriate reactive argument guidance.

The useClientQueries examples for each framework are consistent and include:

  • Clear imports and schema usage patterns
  • Vue example (lines 219–221) provides helpful context about reactive arguments
  • Svelte example (lines 248–250) documents the v6 migration requirement (function-wrapped arguments)
  • All examples follow framework idioms correctly

349-515: Infinite Query examples are well-structured and framework-appropriate.

All three framework examples:

  • Use correct pagination logic with getNextPageParam
  • Calculate fetched length consistently across pages
  • Apply framework-specific adaptations correctly (Svelte function wrapping at lines 482, 483)
  • Include the getNextPageParam check that prevents fetching when results are under PAGE_SIZE

@ymc9 ymc9 merged commit b81d5bb into main Dec 30, 2025
4 checks passed
@ymc9 ymc9 deleted the docs/hooks-update branch December 30, 2025 13:17
@coderabbitai coderabbitai bot mentioned this pull request Jan 9, 2026
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