[Docs] Grammar sweep - #2849
Conversation
📝 WalkthroughWalkthroughThe pull request updates wording, grammar, capitalization, punctuation, and terminology across documentation pages. It also clarifies selected setup, query, storage, self-hosting, and authentication instructions. No functional code or exported API changes are included. ChangesDocumentation editorial updates
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 9
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@client/www/app/docs/common-mistakes/page.md`:
- Line 574: Update the Admin SDK guidance in the documented query usage
statement to qualify that permission checks are bypassed only by the base Admin
SDK instance, while preserving that db.asUser respects the selected user’s or
guest’s permissions.
In `@client/www/app/docs/http-api/page.md`:
- Line 273: Update the sign-in link in the surrounding user creation
documentation to target the current `db.auth.signInWithToken` frontend token
sign-in section in the backend documentation, using the heading’s actual
generated anchor rather than `#2-frontend-db-auth-sign-in-with-token`.
In `@client/www/app/docs/instaml/page.md`:
- Line 301: Update the adjacent todo date examples to pass Date objects with new
Date() so they match the i.date() schema and the stated date enforcement. Keep
the existing dueDate schema and example structure unchanged.
In `@client/www/app/docs/next-ssr/page.md`:
- Line 71: Rewrite the sentence around db.useSuspenseQuery so the hook’s
server-side query execution and the browser’s reconnection/subscription sequence
have explicit subjects and natural placement of the sequence markers, while
preserving the explanation that initial data is available and becomes real-time
in the browser.
- Line 43: Update the prose around “Your code runs in two environments” so “Once
on the server, and once on the client” is joined into the preceding sentence as
a complete sentence, preserving the existing meaning and surrounding
documentation.
In `@client/www/app/docs/patterns/page.md`:
- Around line 38-39: Update the fields documentation link in the surrounding
permission-rules text to use the canonical `/docs/instaql#select-fields` anchor,
matching the existing link and the `Select fields` heading.
In `@client/www/app/docs/permissions/page.md`:
- Line 56: Update the permissions editor documentation sentence near the `attrs`
description to replace “permissions on creating” with “permissions for
creating,” leaving the surrounding explanation unchanged.
In `@client/www/app/docs/start-tanstack/page.md`:
- Line 20: Update the manual-setup description to use a parallel list: replace
the repeated “and” before “a basic auth flow” with a comma, preserving the
existing wording and meaning.
In `@client/www/app/docs/workflow/page.md`:
- Line 101: Update the fenced code block beginning at the affected documentation
section to include an accurate language identifier, using text if the block
contains plain text, so the Markdown passes MD040.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d531a0ec-c573-46a9-ad00-52791a2adbbc
📒 Files selected for processing (45)
client/www/app/docs/auth/apple/[[...tab]]/page.mdclient/www/app/docs/auth/clerk/page.mdclient/www/app/docs/auth/firebase/page.mdclient/www/app/docs/auth/github-oauth/[[...tab]]/page.mdclient/www/app/docs/auth/google-oauth/[[...tab]]/page.mdclient/www/app/docs/auth/guest-auth/page.mdclient/www/app/docs/auth/linkedin-oauth/[[...tab]]/page.mdclient/www/app/docs/auth/magic-codes/[[...tab]]/page.mdclient/www/app/docs/auth/page.mdclient/www/app/docs/auth/platform-oauth/page.mdclient/www/app/docs/backend/page.mdclient/www/app/docs/cli/page.mdclient/www/app/docs/common-mistakes/page.mdclient/www/app/docs/create-instant-app/page.mdclient/www/app/docs/devtool/page.mdclient/www/app/docs/emails/page.mdclient/www/app/docs/explorer-component/page.mdclient/www/app/docs/http-api/page.mdclient/www/app/docs/infinite-queries/page.mdclient/www/app/docs/init/page.mdclient/www/app/docs/instaml/page.mdclient/www/app/docs/instaql/page.mdclient/www/app/docs/migrate-from-supabase/page.mdclient/www/app/docs/modeling-data/page.mdclient/www/app/docs/next-ssr/page.mdclient/www/app/docs/page.mdclient/www/app/docs/patterns/page.mdclient/www/app/docs/permissions/page.mdclient/www/app/docs/platform-api/page.mdclient/www/app/docs/presence-and-topics/page.mdclient/www/app/docs/start-python/page.mdclient/www/app/docs/start-rn/page.mdclient/www/app/docs/start-solidjs/page.mdclient/www/app/docs/start-svelte/page.mdclient/www/app/docs/start-tanstack/page.mdclient/www/app/docs/start-vanilla/page.mdclient/www/app/docs/start-vue/page.mdclient/www/app/docs/storage/page.mdclient/www/app/docs/streams/page.mdclient/www/app/docs/stripe-payments/page.mdclient/www/app/docs/teams/page.mdclient/www/app/docs/users/page.mdclient/www/app/docs/using-llms/page.mdclient/www/app/docs/webhooks/page.mdclient/www/app/docs/workflow/page.md
| ## Common mistakes with Instant on the backend | ||
|
|
||
| Use `db.query` in the admin SDK instead of `db.useQuery`. It is an async API without loading states. We wrap queries in try catch blocks to handle errors. Unlike the client SDK, queries in the admin SDK bypass permission checks | ||
| Use `db.query` in the Admin SDK instead of `db.useQuery`. It is an async API without loading states. We wrap queries in try-catch blocks to handle errors. Unlike the client SDK, queries in the Admin SDK bypass permission checks. |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Qualify the Admin SDK permission behavior.
Line 574 states that all Admin SDK queries bypass permission checks. db.asUser is an Admin SDK path that respects the selected user's or guest's permissions. Limit the bypass statement to the base Admin SDK instance.
Proposed wording
-Use `db.query` in the Admin SDK instead of `db.useQuery`. It is an async API without loading states. We wrap queries in try-catch blocks to handle errors. Unlike the client SDK, queries in the Admin SDK bypass permission checks.
+Use `db.query` in the Admin SDK instead of `db.useQuery`. It is an async API without loading states. We wrap queries in try-catch blocks to handle errors. Queries on the base Admin SDK instance bypass permission checks. Queries through `db.asUser` use the selected user's or guest's permissions.📝 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.
| Use `db.query` in the Admin SDK instead of `db.useQuery`. It is an async API without loading states. We wrap queries in try-catch blocks to handle errors. Unlike the client SDK, queries in the Admin SDK bypass permission checks. | |
| Use `db.query` in the Admin SDK instead of `db.useQuery`. It is an async API without loading states. We wrap queries in try-catch blocks to handle errors. Queries on the base Admin SDK instance bypass permission checks. Queries through `db.asUser` use the selected user's or guest's permissions. |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@client/www/app/docs/common-mistakes/page.md` at line 574, Update the Admin
SDK guidance in the documented query usage statement to qualify that permission
checks are bypassed only by the base Admin SDK instance, while preserving that
db.asUser respects the selected user’s or guest’s permissions.
There was a problem hiding this comment.
This is fine and how we had it before, not relevant for a grammar fix PR
There was a problem hiding this comment.
@nezaj, acknowledged. This clarification is outside the scope of this grammar-only PR. I will not require a change here.
Would you like me to create a follow-up issue for the Admin SDK permission wording?
You are interacting with an AI system.
| ### The costs | ||
|
|
||
| **The biggest cost is complexity**: Your code runs in two environments. Once on the server, and once on the client. NextJS and Instant can do a good job of hiding the difference, but sometimes those differences leak out (as a basic example, there’s no `window` in the server). For many applications, you may not want the added complexity. | ||
| **The biggest cost is complexity**: Your code runs in two environments. Once on the server, and once on the client. Next.js and Instant can do a good job of hiding the difference, but sometimes those differences leak out (as a basic example, there’s no `window` on the server). For many applications, you may not want the added complexity. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Join the sentence fragment at Line 43.
“Once on the server, and once on the client.” is not a complete sentence. Combine it with the preceding sentence.
Proposed wording
-**The biggest cost is complexity**: Your code runs in two environments. Once on the server, and once on the client.
+**The biggest cost is complexity**: Your code runs in two environments: once on the server and once on the client.📝 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.
| **The biggest cost is complexity**: Your code runs in two environments. Once on the server, and once on the client. Next.js and Instant can do a good job of hiding the difference, but sometimes those differences leak out (as a basic example, there’s no `window` on the server). For many applications, you may not want the added complexity. | |
| **The biggest cost is complexity**: Your code runs in two environments: once on the server and once on the client. Next.js and Instant can do a good job of hiding the difference, but sometimes those differences leak out (as a basic example, there’s no `window` on the server). For many applications, you may not want the added complexity. |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@client/www/app/docs/next-ssr/page.md` at line 43, Update the prose around
“Your code runs in two environments” so “Once on the server, and once on the
client” is joined into the preceding sentence as a complete sentence, preserving
the existing meaning and surrounding documentation.
There was a problem hiding this comment.
@nezaj Acknowledged. This is a style-only nit with no functional impact.
✏️ Learnings added
Learnt from: nezaj
Repo: instantdb/instant PR: 2849
File: client/www/app/docs/next-ssr/page.md:43-43
Timestamp: 2026-08-07T22:59:31.658Z
Learning: For documentation-only sentence-fragment and prose-flow findings, classify the review severity as a nit when the issue has no effect on technical accuracy, behavior, or usability.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
You are interacting with an AI system.
|
View Vercel preview at instant-www-js-sm-docs-grammar-jsv.vercel.app. |
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@client/www/app/docs/self-hosting/page.md`:
- Around line 19-21: Update the agent instructions in the self-hosting guide to
first ask whether the user is migrating from Instant Cloud and direct that case
to the Migrate guide. For non-migrations, ask whether the deployment is for
“side projects” or “business,” then select the appropriate VPS or AWS guide
while preserving the existing cost guidance.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 68b84c47-487f-404d-ba81-31354fa34191
📒 Files selected for processing (48)
client/www/app/docs/auth/apple/[[...tab]]/page.mdclient/www/app/docs/auth/clerk/page.mdclient/www/app/docs/auth/firebase/page.mdclient/www/app/docs/auth/github-oauth/[[...tab]]/page.mdclient/www/app/docs/auth/google-oauth/[[...tab]]/page.mdclient/www/app/docs/auth/guest-auth/page.mdclient/www/app/docs/auth/linkedin-oauth/[[...tab]]/page.mdclient/www/app/docs/auth/magic-codes/[[...tab]]/page.mdclient/www/app/docs/auth/page.mdclient/www/app/docs/auth/platform-oauth/page.mdclient/www/app/docs/backend/page.mdclient/www/app/docs/cli/page.mdclient/www/app/docs/common-mistakes/page.mdclient/www/app/docs/create-instant-app/page.mdclient/www/app/docs/devtool/page.mdclient/www/app/docs/emails/page.mdclient/www/app/docs/explorer-component/page.mdclient/www/app/docs/http-api/page.mdclient/www/app/docs/infinite-queries/page.mdclient/www/app/docs/init/page.mdclient/www/app/docs/instaml/page.mdclient/www/app/docs/instaql/page.mdclient/www/app/docs/migrate-from-supabase/page.mdclient/www/app/docs/modeling-data/page.mdclient/www/app/docs/next-ssr/page.mdclient/www/app/docs/page.mdclient/www/app/docs/patterns/page.mdclient/www/app/docs/permissions/page.mdclient/www/app/docs/platform-api/page.mdclient/www/app/docs/presence-and-topics/page.mdclient/www/app/docs/self-hosting/aws/page.mdclient/www/app/docs/self-hosting/migrate/page.mdclient/www/app/docs/self-hosting/page.mdclient/www/app/docs/start-python/page.mdclient/www/app/docs/start-rn/page.mdclient/www/app/docs/start-solidjs/page.mdclient/www/app/docs/start-svelte/page.mdclient/www/app/docs/start-tanstack/page.mdclient/www/app/docs/start-vanilla/page.mdclient/www/app/docs/start-vue/page.mdclient/www/app/docs/storage/page.mdclient/www/app/docs/streams/page.mdclient/www/app/docs/stripe-payments/page.mdclient/www/app/docs/teams/page.mdclient/www/app/docs/users/page.mdclient/www/app/docs/using-llms/page.mdclient/www/app/docs/webhooks/page.mdclient/www/app/docs/workflow/page.md
🚧 Files skipped from review as they are similar to previous changes (33)
- client/www/app/docs/auth/guest-auth/page.md
- client/www/app/docs/auth/firebase/page.md
- client/www/app/docs/start-vanilla/page.md
- client/www/app/docs/auth/clerk/page.md
- client/www/app/docs/create-instant-app/page.md
- client/www/app/docs/teams/page.md
- client/www/app/docs/auth/platform-oauth/page.md
- client/www/app/docs/auth/page.md
- client/www/app/docs/streams/page.md
- client/www/app/docs/init/page.md
- client/www/app/docs/start-solidjs/page.md
- client/www/app/docs/auth/apple/[[...tab]]/page.md
- client/www/app/docs/explorer-component/page.md
- client/www/app/docs/migrate-from-supabase/page.md
- client/www/app/docs/modeling-data/page.md
- client/www/app/docs/users/page.md
- client/www/app/docs/emails/page.md
- client/www/app/docs/start-python/page.md
- client/www/app/docs/auth/magic-codes/[[...tab]]/page.md
- client/www/app/docs/http-api/page.md
- client/www/app/docs/instaml/page.md
- client/www/app/docs/permissions/page.md
- client/www/app/docs/cli/page.md
- client/www/app/docs/stripe-payments/page.md
- client/www/app/docs/webhooks/page.md
- client/www/app/docs/start-tanstack/page.md
- client/www/app/docs/using-llms/page.md
- client/www/app/docs/start-svelte/page.md
- client/www/app/docs/start-vue/page.md
- client/www/app/docs/backend/page.md
- client/www/app/docs/common-mistakes/page.md
- client/www/app/docs/presence-and-topics/page.md
- client/www/app/docs/page.md
Following up from #2848, figured would be good to do a sweep for grammar fixes across the docs!