mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
create-pull-request/patch
25
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ac87f00328 |
docs(functions): explain how a local function reaches the local stack and host services (#54557)
## Problem When a function runs locally with `supabase start` or `supabase functions serve`, calls to `localhost` or `127.0.0.1` inside it fail with "Connection refused". The Edge Functions development environment page didn't say that the function runs in a Docker container, or how to reach the local Supabase services and servers on the reader's machine. Related to [FDBKIN-6695](https://linear.app/supabase/issue/FDBKIN-6695/document-how-local-edge-functions-can-call-services-on-the-host) Closes [DOCS-1853](https://linear.app/supabase/issue/DOCS-1853/explain-how-a-local-edge-function-reaches-the-local-stack-and-services) ## Solution Adds a "Reach other services from a local function" section to the Edge Functions development environment page. It explains that `localhost` inside a local function means the container, points to `SUPABASE_URL` (and `SUPABASE_DB_URL`) for the local Supabase services, and shows `host.docker.internal:<port>` for a server on the host, including the Linux requirement to listen on `0.0.0.0`. Under `supabase start`, `SUPABASE_DB_URL` uses a `supabase_db_` host that some clients, such as Postgres.js, can't resolve, so the section says to swap that host for `db`. A one-line `.env` example keeps the host URL in a local secret, so deployed code uses a production secret instead. It also drops the claim under `supabase start` that local development is the exact same environment as production, which the new section contradicts. The Postgres tab note on the CLI getting-started page told readers to reach the database from a function through `host.docker.internal`. It now says a local function can't reach the database at that URL, and links to the new section, so both pages give the same advice. On the Drizzle page, the garbled note in the "Connect" step now says the `db.ts` sample swaps the `supabase_db_` host for `db` in a local Edge Function, and links to the new section. The same step now links the **Connect** panel straight to the **Transaction pooler** URI, since the panel has no "Shared pooler" option. The `db.ts` comment now says `prepare: false` disables prepared statements, not prefetch. The page gets a task title and a description that say what it helps the reader do. Smaller fixes: the password instruction is plainer, "connection pooler" is lowercase, a double space is gone, and "Related resources" is in sentence case. The Prisma and Postgres.js quickstarts had the same bare title and "Quickstart" description, so they get task titles and descriptions too, and the three ORM quickstarts now match. The Postgres.js page uses "Query" rather than "Connect to", because "Connect to Postgres with Postgres.js" is over the style guide's 35-character title limit. ## How to verify 1. Open https://docs-git-tedd-docs-1853-supabase.vercel.app/docs/guides/functions/development-environment#reach-other-services-from-a-local-function, https://docs-git-tedd-docs-1853-supabase.vercel.app/docs/guides/local-development/cli/getting-started (the **Postgres** tab under "Access your project's services"), https://docs-git-tedd-docs-1853-supabase.vercel.app/docs/guides/database/drizzle (step 3, "Connect"), https://docs-git-tedd-docs-1853-supabase.vercel.app/docs/guides/database/prisma, and https://docs-git-tedd-docs-1853-supabase.vercel.app/docs/guides/database/postgres-js. 2. The section states that a locally served function runs in a Docker container, so `localhost` and `127.0.0.1` in function code mean the container. 3. Under "Reach the local Supabase services", the section says to use `SUPABASE_URL` for the local Supabase services, notes it is `http://kong:8000` locally, and links to the default secrets table on the secrets page. It says to swap a `supabase_db_` host in `SUPABASE_DB_URL` for `db` for clients that can't resolve it. 4. The section says to reach a server on the host through `host.docker.internal:<port>`, and that on Linux the server must listen on `0.0.0.0`. 5. The example sets `API_URL` in `supabase/functions/.env`. The local secrets and production secrets links open the matching sections of the secrets page. 6. The `supabase start` paragraph no longer claims the local environment is identical to production. 7. The getting-started Postgres tab note no longer mentions `host.docker.internal`, and its link opens the "Reach the local Supabase services" section. 8. On the Drizzle page, step 3 says the `db.ts` sample swaps the `supabase_db_` host for `db` in a local Edge Function, and links to "Reach the local Supabase services". The **Connect** panel link opens the **Direct** tab with **Transaction pooler** selected. The `db.ts` comment mentions prepared statements, and the last heading reads "Related resources". 9. The Drizzle page's title reads "Connect to Postgres with Drizzle", the Prisma page's reads "Connect to Postgres with Prisma", and the Postgres.js page's reads "Query Postgres with Postgres.js". The sidebar keeps its existing labels for all three. ## Checks Ran `pnpm exec oxfmt --check` on the changed files. Typechecked the snippet with `tsc --strict` (with a `Deno` declaration); it was also run with `deno check`, `deno lint`, and served with `supabase functions serve` on Linux, where `localhost` and a `127.0.0.1`-bound host server were refused and `host.docker.internal` to a `0.0.0.0`-bound server returned 200. Under `supabase start`, Postgres.js failed to resolve the `supabase_db_` host in `SUPABASE_DB_URL` and connected with the host set to `db`, and `localhost:54322` from a function was refused. The Drizzle `db.ts` host check was run under `supabase start` with a project ID that contains an underscore: it rewrote the host to `db` and a Drizzle query succeeded. Checked `SUPABASE_URL=http://kong:8000`, `SUPABASE_DB_URL`, and the Linux `host.docker.internal:host-gateway` mapping against `supabase/cli` (`apps/cli/src/shared/functions/serve.ts`, `apps/cli/src/commands/start/start.handler.ts`, `apps/cli/src/commands/start/services/edge-runtime.service.ts`). Checked the **Connect** panel labels and its `connectTab` and `method` query parameters against `apps/studio/components/interfaces/ConnectSheet`, and `prepare: false` against the Postgres.js source. The ORM quickstart titles and descriptions follow the style guide's length limits, and each description matches its page's steps. The navigation sets its own labels, and no nav entry, breadcrumb, or test reads the old titles. ESLint ignores MDX files, and the docs build was not run in the sandbox. ## Follow-ups - `apps/docs/content/guides/database/drizzle.mdx`: the `db.ts` sample is written for Node (`import 'dotenv/config'`, `process.env.DATABASE_URL`), but its `supabase_db_` host check only applies inside a Deno Edge Function under `supabase start`. A reader in either runtime gets a sample that half fits. - `apps/docs/content/guides/database/drizzle.mdx`: the page has no value statement and no next steps. It opens straight into the gerund heading "Connecting with Drizzle" and ends after the connection step. Step 1 installs `drizzle-kit`, but no step uses it, so the reader can't create the `users` table from `schema.ts`. ## Checklist - [x] I have read the [Contributing Guidelines](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] I have checked that the change works in the preview deployment ## Feedback for Tedd To ask Tedd for a change to this PR, reply in Tedd's session on [DOCS-1853](https://linear.app/supabase/issue/DOCS-1853/explain-how-a-local-edge-function-reaches-the-local-stack-and-services). Tedd doesn't read comments on this PR. --------- Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com> Co-authored-by: alexisintech <98043211+alexisintech@users.noreply.github.com> |
||
|
|
ceae23e199 |
docs: add cross-links in guides (AI, API, Auth, Database, Functions, deployment) (#53560)
## What Adds internal cross-links to docs guides ## Testing - Prettier passes on the changed lines. - Docs build passes (`pnpm build --filter=docs`). - Docs link e2e run locally against the production build for every changed page across this PR --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
038e68b777 |
docs: unify pooler guidance across the docs (#52332)
Closes DOCS-1519 ## Problem DOCS-1519 asks the docs team to do two things: unify the connection recommendations, and remove PgBouncer deprecation notices. PgBouncer isn't deprecated. It runs the dedicated pooler. **Deprecation notices:** no page in `apps/docs` says PgBouncer is deprecated. The last notice was in a 2021 blog post, and #52249 removed it. Two notices remain outside the docs: - **Studio:** the support form's IPv4 alert links to a "PGBouncer and IPv4 Deprecation" discussion. - **Blog:** a September 2023 update says PgBouncer is deprecated as of January 2024. **Recommendations:** Supabase runs two server-side poolers. The shared pooler runs on Supavisor and is on every plan. The dedicated pooler runs on PgBouncer and is on the Pro Plan and above. The docs name the two poolers in many ways, and many pages leave out the dedicated pooler. Some pages contradict the recommendations table in [Connect to your database](https://supabase.com/docs/guides/database/connecting-to-postgres#choose-a-connection-method): - **Prepared statements:** `connecting-to-postgres` says transaction mode doesn't support them. That is true for the shared pooler only. The dedicated pooler supports them on PgBouncer 1.21 and later. - **Migrations:** the restore pages, the quickstart partial, and the RedwoodJS quickstart send migrations and `pg_dump` through session mode. The table says to use the direct connection. - **Dedicated pooler:** `pooling-and-limits` says to use it on any IPv6 network. The table keeps it for high-load apps. ## Solution - **Names:** pages say _shared pooler_ and _dedicated pooler_, in lowercase. Each page names Supavisor or PgBouncer once, after the pooler name. _Session pooler_ and _Transaction pooler_ stay only where a page quotes the Connect dialog. - **Plans:** pooler and connection pages say _Pro Plan and above_ instead of _paid plans_. - **Recommendations:** every page above now matches the table. The shared pooler in session mode is the fallback for IPv4-only networks. - **Dedicated pooler coverage:** Managing connections and the IPv4 add-on page now cover the dedicated pooler. - **Word list:** `WORD_LIST.md` gets `dedicated pooler`, `shared pooler`, and `paid plan` entries. **Also fixed:** - The direct connection examples in both restore pages had the wrong username and `.supabase.com`. - The Managing connections heading changed. It keeps the `#configuring-supavisors-pool-size` anchor, because Studio links to it. **Not changed:** billing and usage pages that say _paid plans_, self-hosting pages, `apps/www`, and Studio. The Postgres and Render migration guides moved to `apps/kb` on `master` while this PR was open, so their edits are no longer in this diff. **Troubleshooting articles:** production redirects `/docs/guides/troubleshooting/` to `/kb/troubleshooting/`, which builds from the troubleshooting repo. The troubleshooting edits move there under DOCS-1521. **Size:** 25 files, 115 lines added and 97 removed. ## Preview links | Page | Live | Preview | Search for | | ---- | ---- | ------- | ---------- | | /connecting-to-postgres | [Live](https://supabase.com/docs/guides/database/connecting-to-postgres) | [Preview](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/database/connecting-to-postgres) | A high-load application on the Pro Plan and above | | /pooling-and-limits | [Live](https://supabase.com/docs/guides/database/connecting-to-postgres/pooling-and-limits) | [Preview](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/database/connecting-to-postgres/pooling-and-limits) | Use it for high-load applications | | /connection-management | [Live](https://supabase.com/docs/guides/database/connection-management) | [Preview](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/database/connection-management) | The pool size applies to both the shared pooler | | /ipv4-address | [Live](https://supabase.com/docs/guides/platform/ipv4-address) | [Preview](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/platform/ipv4-address) | When using the dedicated pooler in an IPv6-incompatible network | | /backup-restore | [Live](https://supabase.com/docs/guides/platform/migrating-within-supabase/backup-restore) | [Preview](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/platform/migrating-within-supabase/backup-restore) | Use the direct connection string. If your network | | /dashboard-restore | [Live](https://supabase.com/docs/guides/platform/migrating-within-supabase/dashboard-restore) | [Preview](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/platform/migrating-within-supabase/dashboard-restore) | Use the direct connection string. If your ISP | | /redwoodjs | [Live](https://supabase.com/docs/guides/getting-started/quickstarts/redwoodjs) | [Preview](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/getting-started/quickstarts/redwoodjs) | This quickstart uses two connection strings | ## Review instructions 1. Open [Connect to your database](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/database/connecting-to-postgres). The table and the **Dedicated pooler** section say _Pro Plan and above_. 2. Open [Connection pooling and limits](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/database/connecting-to-postgres/pooling-and-limits). It recommends the dedicated pooler for high-load apps only. 3. Open [Managing connections](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/database/connection-management). The pool size section covers both the shared pooler and the dedicated pooler. 4. Open [Backup and restore](https://docs-git-docs-unify-pooler-guidance-supabase.vercel.app/docs/guides/platform/migrating-within-supabase/backup-restore). Step 3 says to use the direct connection string. ## Checklist Check all before review: - [ ] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [x] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) |
||
|
|
8bcbe3dcc7 |
feat(docs): extracts code block component (#51661)
## Problem new surfaces display code blocks their own way while docs has the full implementation but it lives inside `apps/docs` ## Solution - moves the docs code block parts to `ui-patterns/CodeBlock` as separate imports - kb code blocks now show line numbers, which matches docs | state | preview | | -------|------| | before | <img width="913" height="509" alt="image" src="https://github.com/user-attachments/assets/76ff0096-433a-4b06-9eca-1d79c4940e24" /> | | after | <img width="913" height="509" alt="image" src="https://github.com/user-attachments/assets/4f5d91d9-13df-44a0-9e65-edf605773c5f" /> | <!-- ## Preview links If relevant, include links to changed pages for easy review access. Copy the preview base URL from the Vercel bot comment on this PR. Use the following table as an example template. | Site | Live | Preview | Search for | | -------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------- | | WWW | [/blog/your-post](https://supabase.com/blog/your-post) | [/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post) | unique phrase from the change | | Docs | [/docs/guides/your-page](https://supabase.com/docs/guides/your-page) | [/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page) | unique phrase from the change | | Studio | [/dashboard](https://supabase.com/dashboard) | [/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard) | unique phrase from the change | | Design system | [/design-system](https://supabase.com/design-system) | [/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system) | unique phrase from the change | | UI library | [/library](https://supabase.com/library) | [/library](https://ui-library-git-branch-name-supabase.vercel.app/library) | unique phrase from the change | | Knowledge base | [/kb/guides/your-page](https://supabase.com/kb/guides/your-page) | [/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page) | unique phrase from the change | --> <!-- ## Additional context Optionally add any other context or screenshots. --> ## Review instructions 1. visit /[docs/guides/database/tables#enabling-row-level-security ](https://docs-git-feat-shared-code-block-parts-supabase.vercel.app/docs/guides/database/tables#enabling-row-level-security)code blocks, line numbers, colors in light and dark mode, copy, and word wrap match 2. visit [/docs/guides/auth/passwords](https://docs-git-feat-shared-code-block-parts-supabase.vercel.app/docs/guides/auth/passwords) hover over a typed identifier tooltip should still show 3. visit a kb guide with code, for example [/kb/guides/migrate-from-mysql](https://kb-git-feat-shared-code-block-parts-supabase.vercel.app/kb/guides/migrate-from-mysql) 4. visit the [design system code block page](https://design-system-git-feat-shared-code-block-parts-supabase.vercel.app/design-system/docs/fragments/code-block) ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [x] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) |
||
|
|
32341830b3 |
docs: organize observability by task and move SQL logs to Explorer (#50074)
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. Yes. ## What kind of change does this PR introduce? Documentation update. ## What is the current behavior? The observability overview and access page overlap; configuration interrupts querying; related guides send log queries to the old editor. ## What is the new behavior? The observability overview and navigation follow the same four sections: Read project data, Detect and diagnose, Hire an agent, and Configure and export. The overview absorbs the redundant access page, with permanent redirects for both HTML and Markdown URLs. “Query logs with SQL” owns ClickHouse querying through MCP, the Management API, and Explorer with query source Logs. Logging configuration moves to its own guide; sources, captured headers, and limits live in the field reference. Inspection links to canonical diagnostic SQL. Related Storage and database guides use the replacement Explorer workflow and retain existing anchors where headings move. ## Additional context Validation: Markdown generation, docs typecheck, targeted ESLint, formatting, and content-listing tests. Browser overview/navigation checked; old HTML and Markdown URLs return 308, and the new configuration page returns 200 in both formats. Three ClickHouse examples and the Postgres configuration query ran in a disposable container sandbox. Changed pages have no MDX lint violations; repository-wide existing failures remain. Self-review: the Management API request was verified against its published schema but not sent to a hosted project. Realtime ingestion and hosted logging configuration still need a hosted smoke check. No compatibility path for the deprecated logs engine is documented. Stage 2 of 3; depends on stage 1. Stack: #50073 → #50074 → #50075. Production docs build also passes at the stack tip after standard reference generation. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Reorganized observability guidance around reading data, detecting issues, diagnosing problems, agent setup, and exporting data. - Added a guide for configuring Postgres and Realtime logging. - Updated log investigation instructions to use Explorer, SQL queries, and clearer filters. - Added log source, field, and captured-header references. - Improved advisor guidance and database performance troubleshooting. - Added redirects for moved observability content. - **Accessibility** - Improved screen-reader labels for copy and feature-selection controls. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
de2f8bbd03 |
fix(docs): prima guide yarn panel display npx (#50186)
## What kind of change does this PR introduce? bug fix in prisma guide page code example ## What is the current behavior? yarn panel display `npx` command in code example ## What is the new behavior? favor `yarn` command in yarn panel code example | state | preview | | -------|------| | before | <img width="760" height="315" alt="image" src="https://github.com/user-attachments/assets/d7dc9004-9618-48ff-9b6c-4b7da4e8c44e" /> | | after | <img width="760" height="315" alt="image" src="https://github.com/user-attachments/assets/a7cee65f-2038-4f5a-81e3-1cb627cb73b9" /> | ## Test 1. visit `/docs/guides/database/prisma` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated Yarn Prisma command examples to use Yarn-specific syntax for project initialization, migrations, database pulls, migration diffs, migration resolution, and client generation. * npm, pnpm, and Bun examples remain unchanged. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
45199443c8 |
fix(ui): admonition component parity (#49925)
## what is the current behavior? admonition icon <> text not optically aligned + rendered differently in docs and the design system _ docs showed admonition text at 15px/28px because the page's prose styles reached inside the component, while the same callout was 13px in the design system _ lists ## what is the new behavior? - the title offset is now conditional. a title and body copy have different line heights, so they need different nudges to sit level with the icon. - fixes list markers and the ordered-list chip alignment inside callouts. - removes `.admonition-content` css that nothing referenced - fixes 5 admonition titles that were not capitalized. | state | preview | | -------|------| | before | <img width="902" height="279" alt="image" src="https://github.com/user-attachments/assets/2fffb183-81e2-4eff-8f0d-8a07649390e8" /> | | after | <img width="902" height="279" alt="image" src="https://github.com/user-attachments/assets/22abe3ed-fd6d-49ac-aa37-4292bca5850a" /> | ## follow ups - better composition: title, description and actions are still props _ a compound api (`Admonition.Title`, `Admonition.Actions`) would remove the `childProps` escape hatch <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Improved capitalization of note and warning titles in the Metabase and Prisma guides for consistency. * Updated the contributing guide’s table of contents to exclude feedback headings. * Improved heading structure for the documentation feedback section. * **UI Improvements** * Refined admonition and alert typography, spacing, list formatting, and ordered-list alignment. * Improved content spacing when titles, descriptions, or icons are present. * Updated action links and buttons for more consistent sizing. * Adjusted alert content styling for a clearer presentation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
e5f12b4252 |
fix(docs): fix step code block spacing and Prisma guide tabs (#49263)
Two fixes for the [Prisma guide](https://supabase.com/docs/guides/database/prisma): - `StepHikeCompact.Code` marked its whole subtree `not-prose`, so the labels and admonitions that steps interleave with their code samples rendered at 16px with zero margins, flush against the samples and tab bars. Dropping `not-prose` restores body typography and spacing; back-to-back samples now get a gap too, since they have no prose between them. - The guide's three outer tab groups omitted `type`, so they fell back to pill styling — the only pills among 395 `<Tabs>` in the content tree. Fixes DOCS-1327 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Improved spacing and prose behavior for code samples in the documentation. * Preserved existing code margin customizations. * Updated Prisma guide tabs with a consistent compact, underlined appearance. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
0d465e7b5f |
chore(ui): Remove 'tip' from Admonition (#48419)
Closes FE-3966 ## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## Problem - The admonition uses both 'tip' and 'note', but the visual distinction has long-ago collapsed. - 'Note' is used far more frequently than 'tip' - The two are very similar and it is confusing to know which one to use when they are visually identical ## Solution Collapse 'tip' and 'note' into one by removing all places where there is 'tip' and updating all references to 'tip' into 'note'. **Note:** This PR also resolves new broken links flagged by the E2E docs checker. It may move to another PR since E2Es keep erroring. ### Specific changes See below for an AI-generated list of changes: - **Type system** — removed `'tip'` from `AdmonitionType`, its `TYPE_TO_VARIANT`/`TYPE_LABEL` entries, and the test case in [`packages/ui-patterns/src/Admonition/](packages/ui-patterns/src/Admonition/) - **Remark plugin** — [remarkAdmonition.ts](apps/docs/lib/mdx/plugins/remarkAdmonition.ts) now maps mkdocs `tip` → `note` - **Lint allowlist** — `tip` dropped from `supa-mdx-lint.config.toml` - **Content migration** — all 109 files with `type="tip"` (across `apps/docs`, `apps/www`, `apps/studio`) converted to `type="note"`; zero remaining hits confirmed by repo-wide grep - **Style guide** — `CONTRIBUTING.md` and `contributing/content.mdx` updated to describe 4 admonition types instead of 5 ### Usage before implementation See the usage table that points toward 'note' as being dominant across all apps: Here's the usage table: | Location | `note` | `tip` | |---|---|---| | apps/docs | ~480 | ~143 | | apps/studio | 34 | 6 | | apps/www (blog) | 19 | 3 | | packages/ui-patterns (tests) | 3 | 1 (parametrized) | | design-system / ui-library / packages/ui / packages/common | 0–1 (test fixture only) | 0 | ## Preview links | App | Page | Search text (Ctrl+F) | Verify | |---|---|---|---| | docs | [/docs/guides/ai-tools/byo-mcp](https://docs-git-admonition-collapse-note-tip-supabase.vercel.app/docs/guides/ai-tools/byo-mcp) | official MCP TypeScript SDK | callout's aria-label="Note" | | docs | [/docs/guides/ai-tools/mcp](https://docs-git-admonition-collapse-note-tip-supabase.vercel.app/docs/guides/ai-tools/mcp) | MCP server is available at | callout's aria-label="Note" | | docs | [/docs/guides/ai/python-clients](https://docs-git-admonition-collapse-note-tip-supabase.vercel.app/docs/guides/ai/python-clients) | Click Connect at the top of any project page | callout's aria-label="Note" | | docs | [/docs/guides/auth/audit-logs](https://docs-git-admonition-collapse-note-tip-supabase.vercel.app/docs/guides/auth/audit-logs) | Disabling Postgres storage reduces your database storage costs | callout's aria-label="Note" | | docs | [/docs/guides/database/tables](https://docs-git-admonition-collapse-note-tip-supabase.vercel.app/docs/guides/database/tables) | access a custom schema through the Supabase Data API | callout's aria-label="Note" | | docs | [/docs/guides/troubleshooting/edge-function-404-error-response](https://docs-git-admonition-collapse-note-tip-supabase.vercel.app/docs/guides/troubleshooting/edge-function-404-error-response) | Always configure an appropriate time frame | callout's aria-label="Note" (was single-quoted type='tip') | | www | [blog: cli-v2-config-as-code](https://zone-www-dot-com-git-admonition-collapse-note-tip-supabase.vercel.app/blog/cli-v2-config-as-code) | Detecting config drift | callout's aria-label="Note" | | www | [blog: cli-v2-config-as-code](https://zone-www-dot-com-git-admonition-collapse-note-tip-supabase.vercel.app/blog/cli-v2-config-as-code) | Setting Edge Function secrets | callout's aria-label="Note" | | www | [blog: nosql-mongodb-compatibility-with-ferretdb-and-flydotio](https://zone-www-dot-com-git-admonition-collapse-note-tip-supabase.vercel.app/blog/nosql-mongodb-compatibility-with-ferretdb-and-flydotio) | If your network supports IPv6 connections | callout's aria-label="Note" | Note: the `www` rows use the `zone-www-dot-com` preview host, not the `docs` one you gave — since blog pages are served from the www app, not docs. ## Manual testing 1. Open preview links for affected pages. 2. Inspect. Open console. 3. Paste the following in and see there is no 'Tip' on the page: ``` document.querySelectorAll('[role="alert"]').forEach(el => console.log(el.getAttribute('aria-label'), el.textContent.slice(0,60))) ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Standardized informational callouts across docs and tutorials from **“Tip”** to **“Note”**, updating multiple examples and guidance blocks. * Updated a few related doc references/links and conditional “Next steps” content. * **UI Updates** * Switched various in-app banners and notices to the **“Note”** style variant. * **Bug Fixes / Improvements** * Removed support for the retired **“Tip”** callout type and aligned docs linting, component behavior, and aria labeling to the remaining admonition types. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
3dffdefd6e |
fix(docs) Resolve 196 mdx lint warnings for just, quickly, actually, PostgreSQL (#47358)
Closes DOCS-1057 Contributes to DOCS-1052 ## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## Problem We have hundreds of MDX lint warnings in our docs going against style best practices. ## Solution Remove and replace in context the following: - PostgreSQL. There was only one. There was concern about exceptions, but I found none. - Just - Quickly - Actually ### What changed Edits follow the [Google developer documentation style guide](https://developers.google.com/style): concise, direct, active voice. The flagged words were removed when the sentence still read well, or replaced when meaning needed to be preserved. ### Common patterns | Flagged word | Approach | Example | |---|---|---| | **just** (filler) | Removed | "you just installed" → "you installed" | | **just** (limiting) | **only** | "just one row" → "only one row" | | **just like** | **like** / **the same as** | "function just like regular users" → "function like regular users" | | **not just** | **not only** | "not just errors" → "not only errors" | | **quickly** (performance) | **efficiently** or removed | "find rows quickly" → "find rows efficiently" | | **quickly** (time) | **soon** / **rapidly** / removed | "expires too quickly" → "expires too soon" | | **actually** (filler) | Removed | "actually execute" → "execute"; "is actually the most common" → "is the most common" | ## Tophatting 1. See the diff. 2. See that content continues to make sense in context. 3. Locally, `cd apps/docs` and run `pnpm run lint:mdx`. 4. Search for "just," "actually," "quickly", and "PostgreSQL" and see there are 0 warnings. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated wording across quickstarts, guides, and troubleshooting articles for grammar, clarity, and consistent step-by-step phrasing. * Clarified key concepts including Row Level Security policy evaluation across Supabase products, deferred foreign key constraint behavior, and when `EXPLAIN ANALYZE` executes queries (and related side effects). * Refined several troubleshooting instructions and added guidance to cap log payload size to reduce billed Logs Ingest volume. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Nik Richers <nrichers@gmail.com> Co-authored-by: Chris Chinchilla <chris.ward@supabase.io> |
||
|
|
ab106f6110 |
docs: fix broken internal links in database and telemetry guides (#46569)
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Bug fix (documentation) — fixes three internal links that currently 404. ## What is the current behavior? Three docs pages link to internal paths that do not resolve (no matching page, and no redirect in `apps/www/lib/redirects.js`): | File | Link | Problem | | --- | --- | --- | | `guides/telemetry/reports.mdx` (×3) | `/docs/content/guides/database/query-optimization` | Stray `content/` path segment (the content folder name leaked into the public URL) | | `guides/database/prisma.mdx` | `/docs/guides/database/prisma-troubleshooting` | Page lives under the `prisma/` subfolder | | `guides/database/postgres/data-deletion.mdx` | `/docs/blog/postgres-bloat` | Blog posts are served from `/blog`, not `/docs/blog` | No related issue — these are self-evident broken links found by checking every internal `/docs/...` link against the actual pages, the redirects config, and the dynamic doc routes. ## What is the new behavior? The links now point to the correct, existing pages: - `/docs/guides/database/query-optimization` (page: `apps/docs/content/guides/database/query-optimization.mdx`) - `/docs/guides/database/prisma/prisma-troubleshooting` (page: `apps/docs/content/guides/database/prisma/prisma-troubleshooting.mdx`) - `/blog/postgres-bloat` (post: `apps/www/_blog/2024-04-26-postgres-bloat.mdx`; consistent with the ~30 other `/blog/...` links across the docs) Docs-only change; no wording changes beyond the URLs. The `reports.mdx` tables were re-aligned by Prettier as a result of the shortened links. ## Additional context For each link I confirmed the target page/post file exists, that the broken path has no rule in `apps/www/lib/redirects.js`, and that it is not served by a dynamic Next.js route under `apps/docs/app/`. |
||
|
|
701a220d9d |
fix(docs): update Prisma docs to v7 (#46082)
**I have read the CONTRIBUTING.md file.**
YES
**What kind of change does this PR introduce?**
Docs update
**What is the current behavior?**
The Prisma quickstart and troubleshooting pages reference Prisma v6
patterns: `prisma-client-js` generator, `datasource db` with
`url`/`directUrl`, CommonJS imports, `ts-node`, and no driver adapter
setup.
**What is the new behavior?**
Updated for Prisma ORM v7:
- Install steps use `tsx`, `@prisma/adapter-pg`, `dotenv`, and `pg`
- New step for `prisma.config.ts` with `dotenv/config` and `DIRECT_URL`
- Schema uses `prisma-client` generator with explicit output,
provider-only `datasource db`
- Removed old `datasource db { url, directUrl }` block from serverless
tab
- Test file uses ESM imports from `./generated/prisma/client` and
`PrismaPg` driver adapter
- Troubleshooting cross-schema example updated to match v7 patterns
**Additional context**
Prisma v7 requires driver adapters, moves datasource config to
`prisma.config.ts`, and deprecates the `prisma-client-js` generator in
favor of `prisma-client`.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Updated Prisma quickstart: refreshed install and setup steps, added a
new runtime configuration step, adjusted migration + generate workflow,
and replaced the test API example with an ESM-style, dotenv-powered
snippet.
* Refined troubleshooting examples: clarified schema configuration
syntax and improved multi-schema guidance.
<!-- review_stack_entry_start -->
[](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46082?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)
<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>
|
||
|
|
9c03ad6b02 |
chore(docs): migrate Admonition labels to titles (#46053)
## What kind of change does this PR introduce? Docs update. Related to DEPR-551. ## What is the current behavior? Docs MDX still uses the legacy `label` prop for Admonitions, even though #45618 added `title` and kept `label` only as a backwards-compatible alias after #45302 was reverted in #45535. ## What is the new behavior? Migrates Docs-owned Admonitions from `label=` to `title=` without changing rendered copy, component APIs, Studio callsites, design-system examples, or the legacy `label` alias. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Standardized admonition headings across the docs by switching how admonition headings are provided (preserving all visible guidance and examples). Content and instructions remain unchanged; this ensures consistent rendering of callouts and improves uniformity across guides and reference pages. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46053?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Chris Chinchilla <chris.ward@supabase.io> |
||
|
|
a9e5506e3d |
fix: prisma to-schema-datamodel option is removed and replaced by to-schema (#42131)
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? docs update ## What is the current behavior? prisma fails with error: ``` Error: `--to-schema-datamodel` was removed. Please use `--[from/to]-schema` instead. ``` ## What is the new behavior? prisma command runs successfully ## Additional context <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated database guide with current Prisma migration command syntax for improved accuracy and reliability. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
47705a8968 |
chore: replace all supabase urls with relative urls (#38537)
* fix: rewrite relative URLs when syncing to GitHub discussion Relative URLs back to supabse.com won't work in GitHub discussions, so rewrite them back to absolute URLs starting with https://supabase.com * fix: replace all supabase urls with relative urls * chore: add linting for relative urls * chore: bump linter version * Prettier --------- Co-authored-by: Chris Chinchilla <chris.ward@supabase.io> |
||
|
|
e2fecc0f5d |
chore(docs linter): bump version (#36715)
* chore(docs linter): bump version * style: format |
||
|
|
6a812a04b6 |
Update docs for new connection strings and disk/compute pages in the dashboard (#35128)
* Update all docs that make references to the database settings to find the connection strings. Update all docs that references the database settings for the compute and disk page * run prettier * run pnpm format instead of prettier directly. * first run through, fix grammar and reword awkward sentences * Fix typos and remove unnecessary whitespace * Apply suggestions from code review Co-authored-by: Tyler <dshukertjr@gmail.com> --------- Co-authored-by: Tyler <dshukertjr@gmail.com> |
||
|
|
fca59906dd |
docs: update prisma installation using yarn (#33437)
* Update prisma.mdx * Update all yarn issues in this page |
||
|
|
2d55512553 | chore: activate spelling and admonitions lints for docs (#33292) | ||
|
|
f9c2397faa |
fix: prisma docs (#33017)
Replace hardcoded region with placeholder string |
||
|
|
de7d344fb3 |
update prisma docs (#31216)
Co-authored-by: Brian Brennglass <brian@Brians-MacBook-Pro.local> |
||
|
|
d2facb942c | Update prisma.mdx | numbered list correctly (#30609) | ||
|
|
dd4788bce4 |
Chore/move advisors (#30283)
* Move advisory things to Advisors page, move schema visualizer to top of database section * Tiny clean up * Tiny clean up --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
4da7d9563f | Update prisma.mdx | rewrite links (#29699) | ||
|
|
a0eff938ff |
New connection management docs (#29166)
* recreated connecting-to-postgres * adding GUI quickstart section with DBeaver * moved psql and pgadmin docs to GUI quickstart * added Prisma installation docs. Moved postgres.js and Drizzle into own section * added connection management docs * moved supavisor troubleshooting guide into troubleshooting section. Probably should not merge without adding more guides * updated IPv4 Add ons docs * removed typo * Update apps/docs/content/guides/platform/ipv4-address.mdx Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> * Update apps/docs/content/guides/platform/ipv4-address.mdx Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> * Update apps/docs/content/guides/database/supavisor.mdx Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> * Update apps/docs/content/guides/database/prisma.mdx Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> * Update apps/docs/content/guides/database/connection-management.mdx Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> * Update apps/docs/content/guides/database/connection-management.mdx Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> * Update apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> * removed repetition in connection-management | added photos * Update apps/docs/content/guides/database/connecting-to-postgres.mdx Co-authored-by: Stas <sts@abc3.dev> * Update apps/docs/content/guides/platform/ipv4-address.mdx Co-authored-by: Stas <sts@abc3.dev> * Update apps/docs/content/guides/database/connection-management.mdx Co-authored-by: Stas <sts@abc3.dev> * Update apps/docs/content/guides/database/connecting-to-postgres.mdx Co-authored-by: Stas <sts@abc3.dev> * Update apps/docs/content/guides/platform/ipv4-address.mdx Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> * Update apps/docs/content/guides/database/connecting-to-postgres.mdx Co-authored-by: Stas <sts@abc3.dev> * updated proxy suggestions * added redirects * added images to connection-management guide * added unique ids to titles in prisma-troubleshooting section * added images to connection guide * added new images to prisma guide * reformatted admonition --------- Co-authored-by: Brian Brennglass <brian@Brians-MacBook-Pro.local> Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> Co-authored-by: Stas <sts@abc3.dev> |