Skip to content

[Docs] Grammar sweep - #2849

Merged
nezaj merged 5 commits into
mainfrom
sm-docs-grammar
Aug 7, 2026
Merged

[Docs] Grammar sweep#2849
nezaj merged 5 commits into
mainfrom
sm-docs-grammar

Conversation

@nezaj

@nezaj nezaj commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Following up from #2848, figured would be good to do a sweep for grammar fixes across the docs!

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The 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.

Changes

Documentation editorial updates

Layer / File(s) Summary
Documentation editorial corrections
client/www/app/docs/**
Updates authentication, backend, query, setup, product, and self-hosting documentation. Changes include terminology corrections, clearer instructions, punctuation, capitalization, and minor clarifications to documented behavior.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

Suggested reviewers: stopachka

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies a documentation grammar sweep, which matches the primary changes across the documentation.
Description check ✅ Passed The description accurately states that the pull request performs grammar fixes across the documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

@stopachka stopachka 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.

nice!

@coderabbitai coderabbitai 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 729cbd0 and 76c0de4.

📒 Files selected for processing (45)
  • client/www/app/docs/auth/apple/[[...tab]]/page.md
  • client/www/app/docs/auth/clerk/page.md
  • client/www/app/docs/auth/firebase/page.md
  • client/www/app/docs/auth/github-oauth/[[...tab]]/page.md
  • client/www/app/docs/auth/google-oauth/[[...tab]]/page.md
  • client/www/app/docs/auth/guest-auth/page.md
  • client/www/app/docs/auth/linkedin-oauth/[[...tab]]/page.md
  • client/www/app/docs/auth/magic-codes/[[...tab]]/page.md
  • client/www/app/docs/auth/page.md
  • client/www/app/docs/auth/platform-oauth/page.md
  • client/www/app/docs/backend/page.md
  • client/www/app/docs/cli/page.md
  • client/www/app/docs/common-mistakes/page.md
  • client/www/app/docs/create-instant-app/page.md
  • client/www/app/docs/devtool/page.md
  • client/www/app/docs/emails/page.md
  • client/www/app/docs/explorer-component/page.md
  • client/www/app/docs/http-api/page.md
  • client/www/app/docs/infinite-queries/page.md
  • client/www/app/docs/init/page.md
  • client/www/app/docs/instaml/page.md
  • client/www/app/docs/instaql/page.md
  • client/www/app/docs/migrate-from-supabase/page.md
  • client/www/app/docs/modeling-data/page.md
  • client/www/app/docs/next-ssr/page.md
  • client/www/app/docs/page.md
  • client/www/app/docs/patterns/page.md
  • client/www/app/docs/permissions/page.md
  • client/www/app/docs/platform-api/page.md
  • client/www/app/docs/presence-and-topics/page.md
  • client/www/app/docs/start-python/page.md
  • client/www/app/docs/start-rn/page.md
  • client/www/app/docs/start-solidjs/page.md
  • client/www/app/docs/start-svelte/page.md
  • client/www/app/docs/start-tanstack/page.md
  • client/www/app/docs/start-vanilla/page.md
  • client/www/app/docs/start-vue/page.md
  • client/www/app/docs/storage/page.md
  • client/www/app/docs/streams/page.md
  • client/www/app/docs/stripe-payments/page.md
  • client/www/app/docs/teams/page.md
  • client/www/app/docs/users/page.md
  • client/www/app/docs/using-llms/page.md
  • client/www/app/docs/webhooks/page.md
  • client/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.

@coderabbitai coderabbitai Bot Aug 7, 2026

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.

🔒 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.

Suggested change
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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is fine and how we had it before, not relevant for a grammar fix PR

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.

@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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No need

Comment thread client/www/app/docs/http-api/page.md
Comment thread client/www/app/docs/instaml/page.md
### 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.

@coderabbitai coderabbitai Bot Aug 7, 2026

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.

📐 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.

Suggested change
**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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a nit

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.

@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.

Comment thread client/www/app/docs/next-ssr/page.md
Comment thread client/www/app/docs/patterns/page.md Outdated
Comment thread client/www/app/docs/permissions/page.md Outdated
Comment thread client/www/app/docs/start-tanstack/page.md Outdated
Comment thread client/www/app/docs/workflow/page.md
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

View Vercel preview at instant-www-js-sm-docs-grammar-jsv.vercel.app.

Base automatically changed from sm-self-host-grammar to main August 7, 2026 22:56
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>

@coderabbitai coderabbitai 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 58340c4 and d69e478.

📒 Files selected for processing (48)
  • client/www/app/docs/auth/apple/[[...tab]]/page.md
  • client/www/app/docs/auth/clerk/page.md
  • client/www/app/docs/auth/firebase/page.md
  • client/www/app/docs/auth/github-oauth/[[...tab]]/page.md
  • client/www/app/docs/auth/google-oauth/[[...tab]]/page.md
  • client/www/app/docs/auth/guest-auth/page.md
  • client/www/app/docs/auth/linkedin-oauth/[[...tab]]/page.md
  • client/www/app/docs/auth/magic-codes/[[...tab]]/page.md
  • client/www/app/docs/auth/page.md
  • client/www/app/docs/auth/platform-oauth/page.md
  • client/www/app/docs/backend/page.md
  • client/www/app/docs/cli/page.md
  • client/www/app/docs/common-mistakes/page.md
  • client/www/app/docs/create-instant-app/page.md
  • client/www/app/docs/devtool/page.md
  • client/www/app/docs/emails/page.md
  • client/www/app/docs/explorer-component/page.md
  • client/www/app/docs/http-api/page.md
  • client/www/app/docs/infinite-queries/page.md
  • client/www/app/docs/init/page.md
  • client/www/app/docs/instaml/page.md
  • client/www/app/docs/instaql/page.md
  • client/www/app/docs/migrate-from-supabase/page.md
  • client/www/app/docs/modeling-data/page.md
  • client/www/app/docs/next-ssr/page.md
  • client/www/app/docs/page.md
  • client/www/app/docs/patterns/page.md
  • client/www/app/docs/permissions/page.md
  • client/www/app/docs/platform-api/page.md
  • client/www/app/docs/presence-and-topics/page.md
  • client/www/app/docs/self-hosting/aws/page.md
  • client/www/app/docs/self-hosting/migrate/page.md
  • client/www/app/docs/self-hosting/page.md
  • client/www/app/docs/start-python/page.md
  • client/www/app/docs/start-rn/page.md
  • client/www/app/docs/start-solidjs/page.md
  • client/www/app/docs/start-svelte/page.md
  • client/www/app/docs/start-tanstack/page.md
  • client/www/app/docs/start-vanilla/page.md
  • client/www/app/docs/start-vue/page.md
  • client/www/app/docs/storage/page.md
  • client/www/app/docs/streams/page.md
  • client/www/app/docs/stripe-payments/page.md
  • client/www/app/docs/teams/page.md
  • client/www/app/docs/users/page.md
  • client/www/app/docs/using-llms/page.md
  • client/www/app/docs/webhooks/page.md
  • client/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

Comment thread client/www/app/docs/self-hosting/page.md
@nezaj
nezaj merged commit 30561b0 into main Aug 7, 2026
29 checks passed
@nezaj
nezaj deleted the sm-docs-grammar branch August 7, 2026 23:51
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