Skip to content

Conversation

@ymc9
Copy link
Member

@ymc9 ymc9 commented Dec 31, 2025

Summary by CodeRabbit

Documentation

  • Revised SvelteKit server adapter documentation with new API Routes mounting approach and comprehensive examples; Server Hooks method now marked as deprecated.
  • Added Svelte support preview indicator to TanStack Query documentation.

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

@vercel
Copy link

vercel bot commented Dec 31, 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 31, 2025 6:15am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 31, 2025

Walkthrough

Updates documentation for SvelteKit server adapter and TanStack Query client SDK. The SvelteKit guide restructures API mounting approaches, introduces API Routes as the recommended method with deprecation notice for Server Hooks, and updates import patterns. The TanStack Query docs adds a preview feature banner for Svelte support.

Changes

Cohort / File(s) Summary
SvelteKit Server Adapter Documentation
docs/reference/server-adapters/sveltekit.mdx
Restructures "Mounting the API" section with dual approaches: API Routes (new, recommended) and Server Hooks (deprecated). Adds detailed API Routes example with HTTP method handlers (GET, POST, PUT, DELETE, PATCH) and wildcard path parameter. Updates server hooks example from client.$setAuth(...) to db.$setAuth(...). Streamlines initialization description phrasing.
TanStack Query Documentation
docs/service/client-sdk/tanstack-query/index.md
Adds PreviewFeature component import and injects preview feature banner for Svelte support in documentation content.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 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 accurately summarizes the main changes: documentation updates to both the SvelteKit adapter and Svelte/TanStack Query integration docs.
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 (1)
docs/reference/server-adapters/sveltekit.mdx (1)

55-59: Clear deprecation notice.

The deprecation warning effectively communicates that Server Hooks are deprecated and directs users to use API Routes instead.

Optional: Consider adding timeline information

If there's a specific version or timeframe for removal, consider adding it to help users plan their migration:

 :::warning
-The server hooks method is deprecated and will be removed in a future release. Use API routes instead.
+The server hooks method is deprecated and will be removed in version X.X. Use API routes instead.
 :::
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b105e22 and 8762cfe.

📒 Files selected for processing (2)
  • docs/reference/server-adapters/sveltekit.mdx
  • docs/service/client-sdk/tanstack-query/index.md
🔇 Additional comments (7)
docs/service/client-sdk/tanstack-query/index.md (2)

54-55: LGTM!

The PreviewFeature banner is appropriately placed to highlight that Svelte support is in preview. The placement right after the version requirements makes it clear to users that this is a newer feature.


13-13: The import path is valid and the PreviewFeature component file exists at the expected location.

docs/reference/server-adapters/sveltekit.mdx (5)

22-22: LGTM!

The updated description clearly communicates both mounting approaches and immediately signals that Server Hooks are deprecated, setting the right expectations for users.


24-50: LGTM!

The API Routes example is comprehensive and follows SvelteKit conventions correctly. The explicit note about the wildcard route parameter needing to be named path (line 49) is particularly helpful, as this is a requirement that users might otherwise miss.


67-67: LGTM!

The variable naming change from client to db improves semantic clarity, making it more obvious that this is a database client (likely Prisma) being authenticated.

Also applies to: 75-75


83-83: LGTM!

The simplified phrasing "The hooks handler takes..." is more concise while context is already established by the "Server Hooks" section heading.


51-53: LGTM!

The options documentation properly references the shared AdapterOptions component and provides a clear type signature for the getClient parameter specific to SvelteKit's RequestEvent.

@ymc9 ymc9 merged commit 6a82197 into main Dec 31, 2025
4 checks passed
@ymc9 ymc9 deleted the doc/svelte-updates branch December 31, 2025 06:20
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