mirror of
https://github.com/supabase/supabase.git
synced 2026-12-05 07:59:03 +00:00
create-pull-request/patch
22209
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
8a78b7e5be |
docs: call Edge Functions from Postgres with the secret key (#51990)
Found during my dogfooding project :) ## Problem Three guides give conflicting guidance on how Postgres should authenticate when it calls an Edge Function: - **Securing Edge Functions:** calls from `pg_net` and cron jobs send the secret key on `apikey`, with `auth: 'secret'` and `verify_jwt = false`. The Dashboard agrees: the webhook and cron job forms only offer **Add secret key**. - **Scheduling Edge Functions:** the only example that stores a key in Vault sends the publishable key. A request with only the publishable key passes the `verify_jwt` check, so anyone who has that public key can call the function. - **Database Webhooks:** doesn't cover calling an Edge Function or authenticating to it. Its SQL example writes headers inline, so a webhook created in a migration puts the secret key in a committed file. Resolves [DOCS-1458](https://linear.app/supabase/issue/DOCS-1458), [FDBKIN-19992](https://linear.app/supabase/issue/FDBKIN-19992) ## Solution All three pages now recommend the secret key for calls from Postgres. - **Scheduling Edge Functions:** stores and sends the secret key, explains why the publishable key isn't safe here, and links to the function-side setup. - **Database Webhooks:** a new Call an Edge Function section covers the Supabase Dashboard flow and a migration. The migration reads the key from Vault in a `security definer` trigger function. The section explains that the definer is required, because the roles that insert rows can't read Vault. - **Securing Edge Functions:** the service-to-service section is now a two-step setup. It shows how to disable the `verify_jwt` check in `supabase/config.toml`, with a link to the Authorization headers guide, and how to use `auth: 'secret'` in the function. It then links to Database Webhooks and Scheduling Edge Functions. - **`pg_net` queue:** Database Webhooks and Scheduling Edge Functions show a caution that any role that can log in to the database can read the secret key while the request waits, because `pg_net` writes the decrypted key to `net.http_request_queue` until it sends the request. Both pages include the caution from a new partial, `_partials/pg_net_queued_key.mdx`, which links to the troubleshooting article. ## Verification (`/test-the-docs`) | Snippet / step | Class | Sandbox | Result | Notes | | --- | --- | --- | --- | --- | | Function with `auth: 'secret'` and `verify_jwt = false`, called with the secret key on `apikey` | runnable-with-setup | Compose runner + `supabase start` | pass | Returns `200` | | Same function, called with the publishable key, then no key | runnable-with-setup | Compose runner + `supabase start` | pass | Rejected with `INVALID_API_KEY`, then `MISSING_CREDENTIALS` | | Scheduling Edge Functions: Vault secrets, then `cron.schedule` | runnable-with-setup | Compose runner + `supabase start` | pass | The cron run succeeded, and the function returned `200` | | Database Webhooks: Vault-based trigger function and trigger | runnable-with-setup | Compose runner + `supabase start` | pass | Inserts as `postgres` and as `authenticated` both reached the function with the documented payload | | Same trigger function as `security invoker`, insert as `authenticated` | runnable-with-setup | Compose runner + `supabase start` | pass | Fails with `permission denied for schema vault`, which confirms the page's explanation | | Database Webhooks: Dashboard steps | deferred | — | deferred | Needs a hosted project. Labels confirmed in the Studio source. | **Tier A path:** Vault secrets → `pg_cron` job → `pg_net` request → Edge Function with `auth: 'secret'` returns `200`. **Environment:** OrbStack; compose sandbox (`sandbox/run.sh`); fences in-container only. Two deviations from the stock sandbox, neither committed: - The sandbox pins Supabase CLI v2.39.2, which predates `sb_secret_` and `sb_publishable_` keys. The run used v2.121.0. - The `dind` service doesn't mount `/work`, so local functions fail with `failed to determine entrypoint`. The function file was copied into the DinD filesystem. `project_url` pointed at the local API gateway, because the database container can't reach the runner's `127.0.0.1`. ## Preview links - [Database Webhooks](https://docs-git-alexisa-docs-1458-supabase.vercel.app/docs/guides/database/webhooks) - [Scheduling Edge Functions](https://docs-git-alexisa-docs-1458-supabase.vercel.app/docs/guides/functions/schedule-functions) - [Securing Edge Functions](https://docs-git-alexisa-docs-1458-supabase.vercel.app/docs/guides/functions/auth) ## Post-merge > [!IMPORTANT] > After this PR merges, post the following comment on [FDBKIN-19992](https://linear.app/supabase/issue/FDBKIN-19992) and close it: > > The "Missing required headers" error happens when the webhook doesn't send an auth header to the Edge Function. Database Webhooks send only the headers you configure. [Database Webhooks → Call an Edge Function](https://supabase.com/docs/guides/database/webhooks#call-an-edge-function) shows how to add the secret key, either in the Dashboard with **Add secret key** or in a migration that reads the key from Vault. [Securing Edge Functions](https://supabase.com/docs/guides/functions/auth#service-to-service-calls) covers the function side: disable `verify_jwt` and use `auth: 'secret'`. |
||
|
|
70fe3de074 |
docs: move social login URLs to social sign-in (#52111)
## Problem [supabase/supabase#52102](https://github.com/supabase/supabase/pull/52102) and [supabase/supabase#52109](https://github.com/supabase/supabase/pull/52109) rename *social login* to *social sign-in* in visible text, so every sign-in method follows the same pattern. The URLs still say `social-login`, and the Expo quickstart's says `social-auth`. Keeping feature names consistent includes the URLs: readers see them in the address bar, in search results, and in links shared between docs, the Dashboard, and the marketing site. Part of [DOCS-1459](https://linear.app/supabase/issue/DOCS-1459). ## Solution | Old URL | New URL | | --- | --- | | `/docs/guides/auth/social-login` | `/docs/guides/auth/social-sign-in` | | `/docs/guides/auth/social-login/*` (18 provider pages) | `/docs/guides/auth/social-sign-in/*` | | `/docs/guides/auth/quickstarts/with-expo-react-native-social-auth` | `/docs/guides/auth/quickstarts/with-expo-react-native-social-sign-in` | | `/features/social-login` | `/features/social-sign-in` | - **Redirects:** `apps/www/lib/redirects.js` has a permanent redirect for each old URL. One `:path*` entry covers the provider pages. Existing redirects that pointed at the old URLs point straight at the new ones, so no URL redirects twice. - **Links:** docs content, navigation, provider data, and SDK specs, Studio's Auth provider settings (29 "Learn more" links), the marketing site, the UI library docs, and the knowledge base use the new paths. - **Code name:** the docs navigation list `SocialLoginItems` is `SocialSignInItems`. Intentionally unchanged: - **Blog posts:** their links keep the old URLs and use the redirects. - **Sitemaps:** the `refresh-sitemaps.yml` workflow regenerates them. - **Image file names:** for example, `social-login.png` and `supabase-expo-social-auth-login.png`. Readers don't see them. - **UI library blocks:** the blocks are named `social-auth`, and the name is part of their install commands, so renaming them is a decision for the UI library's owners. ## Related PRs The rename spans three PRs, so the feature has one name on every surface: - [supabase/supabase#52102](https://github.com/supabase/supabase/pull/52102) (merged): the docs. - [supabase/supabase#52109](https://github.com/supabase/supabase/pull/52109) (merged): the marketing site, the Dashboard command menu, the UI library docs, the knowledge base, and the Docker configuration comments. - **This PR:** the URLs, including the Expo quickstart's, move to `social-sign-in` with redirects. ## Verification - Docs typecheck and the guides Markdown build pass. - `redirects.js` loads with 841 entries and no conflicting sources. - No `social-login` path remains outside blog posts, snapshots, generated files, the redirect sources, and image file names. To check the redirects, use the marketing site's preview, because `www` applies the docs redirects and the docs preview doesn't. If that preview serves production docs, the redirected page shows as missing until the new paths deploy. The redirect itself is what to check: - [/docs/guides/auth/social-login](https://zone-www-dot-com-git-alexisa-docs-1459-urls-supabase.vercel.app/docs/guides/auth/social-login) - [/docs/guides/auth/social-login/auth-google](https://zone-www-dot-com-git-alexisa-docs-1459-urls-supabase.vercel.app/docs/guides/auth/social-login/auth-google) - [/docs/guides/auth/quickstarts/with-expo-react-native-social-auth](https://zone-www-dot-com-git-alexisa-docs-1459-urls-supabase.vercel.app/docs/guides/auth/quickstarts/with-expo-react-native-social-auth) - [/features/social-login](https://zone-www-dot-com-git-alexisa-docs-1459-urls-supabase.vercel.app/features/social-login) ## Preview links - [Social sign-in](https://docs-git-alexisa-docs-1459-urls-supabase.vercel.app/docs/guides/auth/social-sign-in) - [Sign in with Google](https://docs-git-alexisa-docs-1459-urls-supabase.vercel.app/docs/guides/auth/social-sign-in/auth-google) - [Expo quickstart](https://docs-git-alexisa-docs-1459-urls-supabase.vercel.app/docs/guides/auth/quickstarts/with-expo-react-native-social-sign-in) - [Social sign-in feature page](https://zone-www-dot-com-git-alexisa-docs-1459-urls-supabase.vercel.app/features/social-sign-in) |
||
|
|
919f65d0a3 |
test(kb): expect case-preserving search slugs (#52173)
## Problem `apps/kb/api/search/_search.test.ts` fails on master after #52089, so the "KB tests" check fails on each PR that runs it as the handler keeps the slug case ## Solution - updates the `href` assertion - updates the fetch assertion <!-- ## 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 Provide a clear numbered procedure that the PR reviewer can walk through. 1. For example, `Open the live and preview links side-by-side.` 2. For example, `See the issue is fixed.` ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] 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) |
||
|
|
29ee3dcaa0 |
feat(kb): og image (#52096)
## Problem `apps/kb` sends no open graph or meta tags ## Solution - adds open graph and twitter tags same way as docs to kb <!-- ## 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 Provide a clear numbered procedure that the PR reviewer can walk through. 1. visit [a guide](https://kb-f9n61h6cb-supabase.vercel.app/kb/guides/migrate-from-auth0) 2. inspect and check og image url or use a meta tag checker ## 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) |
||
|
|
1bcc472d64 |
feat(studio): add Grant type and useGrant/getGrant/ensureGrant (#52105)
## Problem
Resolves FE-4688.
Core types and minting for endpoint-bound FGA grants. A `Grant<E, V>` is
minted by checking the user's v2 permissions against the generated
`fgaRequirements` map for endpoint `E` (and optional variant `V`).
Nothing consumes grants yet: the fetch wrappers that require them come
in a follow-up PR.
## Solution
### What changed
- **`lib/grants.ts`** (new)
- `Grant<E, V>`: the brand is a function type, so it's invariant in both
the endpoint and the variant. A grant only satisfies its exact endpoint
and variant.
- `GrantResult` is `loading | granted | denied | error`, and `.grant` is
defined only when granted.
- `GrantFor<Method, Path>` resolves to the grant type for an annotated
endpoint, or `never` otherwise.
- Minting functions:
- `getGrant` is pure.
- `useGrant` resolves org and project from the URL unless the scope
overrides them.
- `ensureGrant` is for imperative code and prefetch.
- Self-hosted always mints. A failed permissions request returns
`error`. Grants are never part of query keys.
- **`lib/fga-refinements.ts`** (new): an empty map defining the shape
for named variants. Each entry records the base annotation it was
written against, so typecheck fails if that annotation changes.
- **`permissions-query-v2.ts`**: adds a `permissionsQueryOptionsV2`
factory. `usePermissionsQueryV2` is now a thin wrapper around it, with
the same signature and the same 5-minute `staleTime`.
- **`doPermissionsCheckV2`**:
- Now accepts OR-of-AND requirement groups. Existing single-permission
and flat-list calls behave as before.
- Empty input never grants, including an empty group.
- **`usePermissionScopeV2`**: org/project/branch-parent resolution
extracted from the V2 hook, so `useGrant` and
`useAsyncCheckPermissionsV2` share one implementation.
- **Invalidation**: the role assign, unassign, and update mutations,
`UpdateRolesConfirmationModal`, and project creation now invalidate the
v2 permissions query.
- **knip**: temporary `files` ignore for `lib/grants.ts` until its first
consumer lands.
### Behavior change
`useAsyncCheckPermissionsV2` with an explicit `projectRef` equal to the
URL's project ref now resolves branch projects to their parent before
checking. Previously, any explicit ref skipped that resolution, so users
with project-scoped roles were denied on branch projects. An explicit
ref that differs from the URL ref is still used as-is.
## Review instructions
### Tests
- Unit tests for `doPermissionsCheckV2` with OR-of-AND groups.
- `lib/grants.test.ts`:
- `getGrant`, `useGrant`, and `ensureGrant` across OR-of-AND groups,
branch projects, explicit scope, self-hosted, and loading/denied/error
states.
- Type tests: a grant can't be used for a different endpoint, a plain
object isn't a grant, `GrantFor`, and status narrowing.
The type test that a grant without a variant can't satisfy a variant
parameter moves to the api-keys refinement PR, since no endpoint has
variants yet.
1. Run `pnpm test:studio` and confirm the `doPermissionsCheckV2` and
`lib/grants` tests pass.
2. Run `pnpm typecheck` to confirm the grant type tests hold.
3. Check the branch-project behavior in `useAsyncCheckPermissionsV2`
with an explicit `projectRef` matching the URL's project ref.
## Checklist
Check all before review:
- [ ] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] 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)
|
||
|
|
831d6302c7 |
chore: use social sign-in on the marketing site, Dashboard, UI library, and KB (#52109)
## Problem [supabase/supabase#52102](https://github.com/supabase/supabase/pull/52102) renames *social login* to *social sign-in* in the docs, so every sign-in method follows the same pattern: social sign-in, phone sign-in, anonymous sign-in, and passwordless email sign-in. The marketing site, the Dashboard, the UI library docs, the knowledge base, and the Docker configuration still say "social login". Keeping one name per feature across every surface matters: readers and AI agents moving between the Dashboard, the docs, and the marketing site see the same term, and search finds one name. Part of [DOCS-1459](https://linear.app/supabase/issue/DOCS-1459). ## Solution "Social login" is "social sign-in" in visible text on: - **Marketing site:** the Auth product page, including an icon grid's `aria-label`, the home page's frameworks section, the social sign-in feature page's title, subtitle, and description, the Markdown versions of the Auth and home pages, and the Supabase vs Firebase comparison. - **Dashboard:** the command menu entry for Auth providers, "Auth: Providers (Social Sign-in, SSO)". - **UI library docs:** the link to the docs on six social auth block pages, and one sentence on the React Router page. - **Knowledge base:** the link text in the Auth0 migration guide. - **Docker configuration:** the comments in `docker-compose.yml` and `.env.example`. Intentionally unchanged: - **URLs, code names, and file names:** `/features/social-login`, links to `/docs/guides/auth/social-login/...`, `handleSocialLogin` in the UI library blocks, and image files such as `social-login.png`. A separate PR moves the URLs to `social-sign-in` with redirects. - **Dated and quoted content:** blog posts, an event page, a customer story, and a quoted user tweet. ## Review notes - **Dashboard search:** the command menu's `value` is also its search text, so typing "social login" no longer matches the Auth providers entry. "Social", "providers", and "SSO" still match. - **UI library block names:** the blocks are named `social-auth` (for example, `social-auth-nextjs`), and the name is part of their install commands. Renaming a block breaks those commands, so that's a decision for the UI library's owners. ## Preview links - [Auth product page](https://zone-www-dot-com-git-alexisa-docs-1459-surfaces-supabase.vercel.app/auth) - [Home page](https://zone-www-dot-com-git-alexisa-docs-1459-surfaces-supabase.vercel.app/) - [Social sign-in feature page](https://zone-www-dot-com-git-alexisa-docs-1459-surfaces-supabase.vercel.app/features/social-login) - [Supabase vs Firebase](https://zone-www-dot-com-git-alexisa-docs-1459-surfaces-supabase.vercel.app/alternatives/supabase-vs-firebase) - [UI library: Social auth (Next.js)](https://ui-library-git-alexisa-docs-1459-surfaces-supabase.vercel.app/ui/docs/nextjs/social-auth) - [Knowledge base: Migrate from Auth0](https://kb-git-alexisa-docs-1459-surfaces-supabase.vercel.app/kb/guides/migrate-from-auth0) |
||
|
|
2b3159381f |
blog: give your supabase app its own mcp server (#52119)
## 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? - Adds the blog post "Give your Supabase app its own MCP server" at `apps/www/_blog/2026-10-22-give-your-supabase-app-its-own-mcp-server.mdx` - Adds the OG image, thumbnail, and two inline images under `apps/www/public/images/blog/give-your-supabase-app-its-own-mcp-server/` - Adds `raul_barroso` to `apps/www/lib/authors.json` ## What is the current behavior? N/A ## What is the new behavior? - New post at `/blog/give-your-supabase-app-its-own-mcp-server`, dated 2026-10-22 - Covers the MCP Server block, `withOAuthProtectedResource()` and `withSupabase({ auth: 'user' })` from `@supabase/server`, writing tools that run as the signed-in user under RLS, MCP Apps UI in the chat, and the OAuth 2.1 server and consent page setup - Authors: `raul_barroso`, `gregnr`, `saxon_fletcher` ## Additional context Follow-up to the Supabase Select post `2026-10-02-select-2026-build-anything.mdx`. The two TypeScript code blocks use `{/* prettier-ignore */}` to keep their line breaks. `apps/www/public/rss.xml` is not included because it is gitignored and generated at build time. --------- Co-authored-by: Ana <ana1337x@users.noreply.github.com> |
||
|
|
bbbc4daab5 |
feat(www): add server sdk feature page (#52128)
## 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? - Adds a Server SDK entry to `apps/www/data/features.tsx`, rendered at `/features/server-sdk` and placed after Supabase Middleware - Status Public Beta, available on self-hosted, tagged Authentication and Edge Functions ## What is the current behavior? supabase.com/features has no page for the Server SDK (`@supabase/server`). ## What is the new behavior? - New page `/features/server-sdk` with key benefits, when to use it, how it works, and get started links - Links to the Server SDK reference, the MCP Server block, the Deploy MCP servers guide, and the authenticated MCP server example ## Additional context Copy matches the Server SDK row in the Features Page in Notion. Placed after Supabase Middleware so it does not touch the lines #51819 changes; both merge cleanly in either order. Co-authored-by: Ana <ana1337x@users.noreply.github.com> |
||
|
|
8b4be6cdfd |
feat: Add search to kb (#52089)
## Problem There's currently no search on kb. ## Solution - Move components used in Docs' Search V2 project to a common package for re-usage. - Use these components on the Search V2 on docs - Refactor useDocsSearchV2 to accept endpoint for other solutions - Connect the search with the new `kb_search` table <!-- ## 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 For both, the kb preview and the docs preview with the search v2 experiment active using the `?docs-search-v2=search-v2-active`: - Open the preview link of the project - On the homepage, press cmd/ctrl + k or click the search trigger - A search panel should open, type something, for example "edge functions" and wait for results to appear - Clicking a result should lead to the desired page <img width="1173" height="832" alt="Screenshot 2026-10-22 at 13 34 43" src="https://github.com/user-attachments/assets/1c3a3d7f-2fe3-452a-91dd-20ba7be3ef1b" /> _Search modal working on kb preview_ ## 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) |
||
|
|
3f4ff4fd4d |
docs: use social sign-in and phone sign-in consistently (#52102)
## Problem The docs used several names for the same sign-in methods: "social auth", "social authentication", and "social login" for social providers, and "Phone Auth" and "Phone Login" for phone. Other methods use *sign-in*, such as passwordless email sign-in and anonymous sign-in. The Auth overview also listed the sign-in methods without linking to their pages, and the custom OAuth/OIDC provider note had two different versions. Resolves [DOCS-1459](https://linear.app/supabase/issue/DOCS-1459). ## Decision This PR first standardized on *social login*, which the [word list](https://github.com/supabase/supabase/blob/master/apps/docs/style-guide/WORD_LIST.md) named as an exception to *sign-in*. @czenko approved dropping the exception, so the feature is now *social sign-in*, and every sign-in method follows the same pattern. One name per feature keeps the docs consistent for readers and AI agents, and new pages don't need a special case. ## Solution - **Social sign-in:** "social auth", "social authentication", and "social login" are "social sign-in" in docs page titles, headings, body text, link text, navigation labels, the getting started listing, and the C# SDK reference specs. - **Phone sign-in:** the Auth overview's providers list and both phone navigation labels match the phone pages' titles. - **Word list:** drops *social login* as an exception, and names *social sign-in*, *phone sign-in*, and *anonymous sign-in* as feature names. - **Auth overview:** each sign-in method links to its page. - **Custom provider note:** a new partial, `_partials/custom_oauth_providers_note.mdx`, is included by the providers list and Social sign-in. - **Expo quickstart:** both image alt texts describe their screenshots. Intentionally unchanged: - **URLs, code names, and file names:** `/docs/guides/auth/social-login/...`, `SocialLoginItems`, MDX file names, and image files such as `social-login.png`. - **Dated and quoted content:** blog posts, an event page, a customer story, and a quoted user tweet. - **JS SDK reference text:** "Social Login (OAuth) providers" in `signInWithOAuth` comes from the `supabase-js` repository. ## Related PRs The rename spans three PRs, so the feature has one name on every surface: - **This PR:** the docs. - [supabase/supabase#52109](https://github.com/supabase/supabase/pull/52109): the marketing site, the Dashboard command menu, the UI library docs, the knowledge base, and the Docker configuration comments. The UI library's blocks keep the name `social-auth`, because the name is part of their install commands, so renaming them is a decision for the UI library's owners. - [supabase/supabase#52111](https://github.com/supabase/supabase/pull/52111): the URLs, including the Expo quickstart's, move to `social-sign-in` with redirects. Merge this PR and #52109 first, then rebase #52111, because it edits some of the same lines. ## Preview links - [Auth overview](https://docs-git-alexisa-docs-1459-supabase.vercel.app/docs/guides/auth) - [Social sign-in](https://docs-git-alexisa-docs-1459-supabase.vercel.app/docs/guides/auth/social-login) - [Build a Social Sign-in App with Expo React Native](https://docs-git-alexisa-docs-1459-supabase.vercel.app/docs/guides/auth/quickstarts/with-expo-react-native-social-auth) - [Choosing the Right SSO Sign-in Flow](https://docs-git-alexisa-docs-1459-supabase.vercel.app/docs/guides/platform/sso/choosing-login-flow) - [Understanding SSO Sign-in Flows](https://docs-git-alexisa-docs-1459-supabase.vercel.app/docs/guides/platform/sso/login-flows) - [SSO Testing and Best Practices](https://docs-git-alexisa-docs-1459-supabase.vercel.app/docs/guides/platform/sso/testing-best-practices) - [Restore a Platform Project to Self-Hosted](https://docs-git-alexisa-docs-1459-supabase.vercel.app/docs/guides/self-hosting/restore-from-platform) - [Configure Social Sign-in (OAuth) Providers](https://docs-git-alexisa-docs-1459-supabase.vercel.app/docs/guides/self-hosting/self-hosted-oauth) |
||
|
|
99fd573d1a |
feat(kb): add unit test CI, search API tests, and Playwright smoke tests (#52151)
kb's unit tests weren't run in CI and there were no functional tests. Adds a CI job for kb unit tests, unit tests for the search API, and a bare-bones Playwright suite (`e2e/kb`) that runs against the kb Vercel preview on PRs and against production daily. Fixes DOCS-1506 |
||
|
|
2aed6c5ea8 |
fix(kb): render callouts in troubleshooting articles (#52152)
## Problem GFM alerts (`> [!NOTE]`, `> [!WARNING]`, …) in troubleshooting articles render as plain blockquotes with the literal marker text, e.g. [/kb/troubleshooting/supavisor-error-password-authentication-failed-after-password-rotation](https://supabase.com/kb/troubleshooting/supavisor-error-password-authentication-failed-after-password-rotation). The source files in `supabase/troubleshooting` are `.mdx`, but `fetch-federated-content.ts` writes them out as `.md`. `rehype-admonitions` is only registered on the MDX processor in `astro.config.mjs`. Plain `.md` stays on Astro's default pipeline, so the alerts are never converted. Guides aren't affected because they're all `.mdx`. ## Solution - Write fetched troubleshooting articles with the `.mdx` extension so they go through the MDX processor. - Update `sync-troubleshooting-entries.ts` and `sync-troubleshooting-updates.ts`, which only read `.md` files from that directory. - Clear `src/content/troubleshooting/` before fetching, so `.md` files from earlier local fetches don't linger as duplicate entries. Verified locally: all 231 articles compile as MDX, and no troubleshooting page contains a literal `[!NOTE]`/`[!WARNING]` marker. ## Deploying **After merging, redeploy production once without build cache.** Otherwise production keeps serving the broken pages. Astro caches each article's rendered HTML and reuses it when the article's text is unchanged, without checking the file extension. That cache lives in `node_modules/.astro`, which Vercel restores between builds. Renaming `.md` → `.mdx` doesn't change the text, so a normal build reuses the HTML rendered from the old `.md` files. In the Vercel dashboard: kb project → the production deployment from the merge commit → ⋯ → Redeploy → uncheck "Use existing Build Cache". After that one clean build, the cache holds the `.mdx` output and stays correct. Locally, run `astro build --force` (or delete `node_modules/.astro`) once if you've built KB before. ## Review instructions 1. On the Vercel preview, open `/kb/troubleshooting/supavisor-error-password-authentication-failed-after-password-rotation`. The note and warning should render as callouts. (The preview's cache was already rebuilt cleanly by an earlier commit on this branch, so it won't show the production cache issue.) 2. Open a couple of troubleshooting articles without callouts and check they render the same as production. |
||
|
|
2ea3566dec |
feat(kb) - Add in structured FAQ generation + FAQ reference (#51795)
## Problem FAQs will be an important content type within the new KB... but 3 problems typically emerge for this content type: 1. Reuse. 2. Structure, specifically related to formatting into machine favorable [FAQ structured data](https://schema.org/FAQPage). It's really hard to get multiple contributors structuring these so they're easily converted into specific component, so separating into individual, structured files is the best approach here. 3. Tracking... b/c it's hard to know which questions specifically get referenced on larger pages with multiple Q's. ## Solution Adds in a new `faq` content collection that has Individual .mdx entries per question, which are then turned into standalone pages with structured data. I'd prefer this structure as opposed to others b/c it addresses the issues I mentioned above (reuse, structure, tracking). In the future, this also sets us up to use these in various places as an `FAQ` component or something to help re-use question / answers on multiple pages. ## Preview links https://kb-git-kody-devrel-717-begin-faq-structure-supabase.vercel.app/kb/topics/faqs https://kb-git-kody-devrel-717-begin-faq-structure-supabase.vercel.app/kb/faqs/auth/supabase-auth-required-for-supabase [Schema validation](https://validator.schema.org/#url=https%3A%2F%2Fkb-git-kody-devrel-717-begin-faq-structure-supabase.vercel.app%2Fkb%2Ffaqs%2Fauth%2Fsupabase-auth-required-for-supabase) <img width="1427" height="794" alt="image" src="https://github.com/user-attachments/assets/cfb268da-f129-4c89-8ac5-a03c8c3d20fb" /> --------- Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com> |
||
|
|
6e656789f2 |
chore(docs) - Remove dupe entries in sitemap (#52083)
## Problem Dupe entries for `/docs/reference/cli` pages due to I guess them getting grabbed in the `Reference Sitemap` generation as well? ## Solution Removes CLI sitemap generation script + reference from the sitemap generation. ## Preview links [Production](https://supabase.com/docs/sitemap.xml) - 2898 entries - 2773 uniques <img width="1427" height="794" alt="image" src="https://github.com/user-attachments/assets/1a4b329f-0fa9-458f-a80f-6e0a24f5766b" /> <img width="1427" height="794" alt="image" src="https://github.com/user-attachments/assets/cbce086f-37db-4828-bb38-d62f7239e9f1" /> [Preview](https://docs-git-docs-sitemap-dupes-supabase.vercel.app/docs/sitemap.xml) - 2773 entries - 2773 uniques <img width="1427" height="794" alt="image" src="https://github.com/user-attachments/assets/8162dc85-14a1-49e4-95df-87cf471a3548" /> <img width="1427" height="794" alt="image" src="https://github.com/user-attachments/assets/8313b037-b203-4979-bc5e-a85336bfb04f" /> |
||
|
|
d4a2c464b2 |
chore(docs) - update troubleshooting links to new destinations (#52095)
## Problem KB now has definitive version of the troubleshooting guides. Need to update the in content links to match work happening in #52088. ## Preview links N/A... all atomic changes to links, so previews not very helpful here. |
||
|
|
3526a26063 |
chore(www) - redirect hygiene pass (#52103)
Does the following: - Removes duplicate redirect targets (3) - Fixes one destination with a missing leading `/` - Removes one unused redirect (`/blog/2021/03/08/toad-a-link-shorterner-with-simple-apis-for-low-coders`) - Adds a missing redirect from #52088 (for the main `/docs/guides/troubleshooting` page) - Updates many redirect chains to instead point to their final destination, so consolidates redirect hops. All new destinations return 200 status codes. --------- Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com> |
||
|
|
8ba2f0a63b |
feat(studio): clarify memory commitment risk thresholds FE-4467 (#51799)
## Problem The memory commitment chart presents the kernel commit limit as a hard failure threshold, even though committed memory can remain unused. Closes [FE-4467](https://linear.app/supabase/issue/FE-4467/update-memory-commitment-ui-with-risk-zones). ## Fix Show only the highest risk threshold exceeded anywhere in the selected time range: Acknowledgment (yellow), Problematic (orange), or Severe (red). Draw its dashed line and place a matching Warning badge in the card header with keyboard-accessible guidance. Show neither a warning line nor a badge when no threshold is exceeded; equality alone does not trigger a warning. Thresholds remain 50%, 80%, and 90% of estimated physical RAM plus 1 GiB of swap, using each timestamp's capacity. Missing readings stay unavailable. Remove in-chart labels and keep only Committed in the source legend. Keep the vertical range anchored at zero and full estimated capacity, expanding for observed overcommitment. A neutral dashed capacity line follows historical infrastructure changes. Dashed references render above the bars and area fills. The hover tooltip identifies Full commitment capacity at that timestamp and excludes it from Total. The developer toolbar includes a Metrics tab with a Memory commitment selector: Default (real data), Warn, Problematic, and Severe. Simulated states include a capacity change and apply only to the selected project’s memory chart. Overrides are in-memory, leave real query data untouched, and are enabled only in local/staging. Both Studio runtimes register the tab. ## Screenshots ### Capacity changes with connected dashed lines  ### Chart tooltip with full commitment capacity  ### Problematic warning and connected threshold lines  ## How to test 1. Open Observability > Database and inspect Memory commitment in bar and line views. 2. With no threshold exceeded, confirm no warning badge or threshold line appears. 3. In the developer toolbar, open Metrics and select Warn, Problematic, then Severe. Confirm the matching badge and only the highest crossed warning threshold appear. Close the toolbar to inspect the chart; the selected state remains active. 4. Hover or focus Warning to read the matching threshold and guidance. 5. Confirm the neutral capacity line steps down midway through each simulated range. 6. Select Default (real data) to restore live readings. Reloading also clears simulations. Validation: 168 affected tests passed with retries disabled and shuffled runs. Production-guard and incorrect-risk-level mutations failed as expected; tests passed after restoring the implementation. Formatting and code review passed. |
||
|
|
cf5a236910 |
Restrict unsupported file types in support form attachments (#52086)
## What Restricts support form attachments to a safe allowlist (`.txt`, `.log`, `.png`, `.jpg`, `.jpeg`, `.pdf`, `.json`, `.har`) and shows a clear "unsupported file type" error for anything else. Also fixes the upload filename-suffix logic, which previously derived the extension from MIME type and would have produced wrong suffixes for the newly-allowed text-based formats. ## Why Arbitrary file types (e.g. `.zip`, `.py`, executables) could previously be attached to support tickets, which is an unnecessary security risk. Closes FE-3471. ## How to test 1. Open the support form and try attaching a `.zip`, `.exe`, or `.py` file (rename a file if the OS picker filters it out) - confirm you get an "unsupported file type" error toast and it's not added to the attachment list. 2. Attach a mix of valid and invalid files in one selection - confirm only the valid ones are added, and the error lists the rejected filenames. 3. Attach a valid file of each allowed type (`.txt`, `.log`, `.png`, `.jpg`, `.pdf`, `.json`, `.har`) - confirm each uploads and submits successfully. 4. Confirm the "Supported formats" caption is visible under the Attachments section. |
||
|
|
3d326d7644 |
feat(ui): prose table component (#51794)
## Problem - docs and kb render markdown tables in different ways - docs uses its own `Table` component with its own scroll listener - kb has no scroll container which can lead on phones to overflow - design system `Table` already scrolls with `ShadowScrollArea` which was not used within guides ## Solution - docs and kb article tables use the `ui` `Table` - (proposal) `Table` gets a `prose` variant - kb guides map `table` to `<Table prose />` - `ShadowScrollArea` shows and hides the edge shadows without a fade (no strong opinion but felt snappier) - refactor table components to use `ref` vs deprecated `forwardRef` - fixes #52065 cc @jbergstroem <!-- ## 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. open `/docs/guides/ai/choosing-compute-addon` on [prod](https://supabase.com/docs/guides/ai/choosing-compute-addon#hnsw) and on [preview](https://docs-3t4ed5odv-supabase.vercel.app/docs/guides/ai/choosing-compute-addon#hnsw) 2. open `/kb/guides/migrate-from-postgres` on [prod](https://supabase.com/kb/guides/migrate-from-postgres) and on [preview](https://docs-3t4ed5odv-supabase.vercel.app/kb/guides/migrate-from-postgres). on live, the table goes out of the article. on preview, the table scrolls in the article. ## 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) |
||
|
|
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) |
||
|
|
a2ee9a94df |
fix(studio): push advisor to health checks by default (#52064)
## Problem A small quirk since we launched health checks is that our Advisor top level menu was still going to security advisors by default. This mean't the second item on the sub menu is highlighted. ## Solution Defaults to first item on the list, health advisors. ## Review instructions 1. Open studio. 2. Click the Advisors tab on the sidebar. |
||
|
|
b410764409 |
test(studio): wait for pipeline step url before continuing (#52135)
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
The "edits each section from Review" test clicks Continue as soon as the
step text shows. That text updates before the URL does. The step query
uses nuqs with `{ history: 'push', shallow: true }`, and
`NuqsTestingAdapter` resets its queue on every render. The previous push
then re-renders the adapter and drops the click that is still queued, so
the wizard snaps back and `Step 2 of 4` (or step 3) never stays. I
logged one run moving to Data, then the "Cannot update
PipelineCreationFlow while rendering NuqsTestingAdapter" warning, then a
render back on Connection.
This is flaky, not a broken wizard. The Next and TanStack adapters do
not reset that queue on render, and the browser Back/Forward tests in
this file still pass. The racy clicks have been in the test since
`306cd88a2b`. Master CI first failed it on `b7638a7244` (step subtitles
and Docs landed in the same test), passed once on `655a6624cf`, and
failed again on `bbf0e730f2`.
**Changed:**
- `PipelineCreationFlow.test.tsx` — wait for each step's URL write
before the next Continue or edit, including the empty query when
Destination is cleared by `clearOnDefault`
## To test
- `pnpm --filter studio exec vitest --run
components/interfaces/Database/Replication/CreatePipeline/PipelineCreationFlow.test.tsx`
— I ran this file 12 times (36 tests each, all passed)
- `pnpm --filter studio test` — 802 files, 9447 passed, 1 expected fail
- `pnpm --filter studio typecheck`, Prettier on the test file, and `pnpm
--filter studio run lint:ratchet`
<!-- CURSOR_AGENT_PR_BODY_END -->
<div><a
href="https://cursor.com/agents/bc-df2f864a-51a2-57e3-9a2a-c69a8a135b2c?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a
href="https://cursor.com/background-agent?bcId=bc-df2f864a-51a2-57e3-9a2a-c69a8a135b2c&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
|
||
|
|
dd09501bac |
Revert "Port private link endpoints from platform to v2" (#52139)
Reverts supabase/supabase#51996 |
||
|
|
1818b713b9 |
Revert "Port POST project transfer from platform to v2" (#52140)
Reverts supabase/supabase#52000 |
||
|
|
d8b4d7bc8f |
Revert "Joshenlim/fe 4676 port log drains api endpoints from platform to v2" (#52137)
Reverts supabase/supabase#51995 |
||
|
|
bbf0e730f2 |
fix(studio): keep sidebar deep link on initial load (#51952)
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> A full page load with `?sidebar=` loses the param on TanStack Studio, so the side panel never opens. `LayoutSidebarProvider` treats the initial empty `activeSidebar` as a close and calls `setSidebarUrlParam(null)` while the URL still has `sidebar`; that queued nuqs replace flushes late and wins over the effect that opens the panel. Reproduces on master (TanStack only). Found while testing #51442. This only clears `?sidebar=` after a sidebar has actually been opened and then closed during the visit. **Changed:** - `apps/studio/components/layouts/ProjectLayout/LayoutSidebar/LayoutSidebarProvider.tsx` / `hasOpenedSidebarRef` – skip `setSidebarUrlParam(null)` until a sidebar has been opened this visit, including when it opened before the project finished loading. Closing still clears the param with a replace. If #51442 lands on the same line, combine the guards: `hasOpenedSidebarRef.current && sidebarURLParam !== null`. **Added:** - `LayoutSidebarProvider.test.tsx` – initial mount with `?sidebar=advisor-panel` and `?sidebar=ai-assistant` does not clear the param and opens the sidebar; open-then-close clears it with a replace; a panel that opens before the project loads still clears on close. These fail without the fix. Checks: `pnpm --filter studio typecheck`, `pnpm --filter studio run lint:ratchet`, `pnpm knip --workspace apps/studio`, Prettier, and the sidebar vitest files. ## To test (Next and TanStack) - Full load `/project/<ref>/editor/<id>?schema=shop&sidebar=advisor-panel` – param stays, Advisor panel opens, `schema=shop` stays - Full load `/project/<ref>?sidebar=ai-assistant` – param stays, Assistant panel opens - Close the panel – `?sidebar=` is removed with a replace; Back returns to the previous page and Forward returns here - Open a panel from its icon – URL unchanged - Full load without `?sidebar=` – no panel, and the URL is not rewritten - Switch between Advisor and Assistant – other params stay; closing clears `?sidebar=` - Change the table editor schema, add a table filter, and open an auth provider panel – those params update as before, and Back/Forward still move through them <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-6a57b74c-4b55-576d-b656-f20a2799f9e4?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-6a57b74c-4b55-576d-b656-f20a2799f9e4&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> |
||
|
|
6827b821df |
test(studio): re-enable TanStack redirect E2E tests (#51970)
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> The hang behind the #51141 skips was fixed by the leaf-route subscription in #51067, so this re-enables those tests and extends the existing shim regression test. Supersedes #51157. **Added:** - Re-enabled the four E2E tests skipped in #51141 (API access edit, grant preservation, trigger actions, trigger CRUD) **Changed:** - `router-navigation.test.tsx` now also asserts the router changes on navigation **Removed:** - `STUDIO_FRAMEWORK` from `e2e/studio/env.config.ts`, which those skips were the only consumer of ## To test - [x] `pnpm --filter studio exec vitest run compat/next/router-navigation.test.tsx compat/next/router.test.ts --coverage.enabled=false` – 18 pass; the loader-refresh test fails if `useMatches()` is subscribed without `select` - [x] TanStack, three sequential runs of the four specs (`--workers=1`, no retries) – all pass - [x] Next, one run of the same four specs – all pass Validation: Prettier, Studio typecheck, lint ratchet, and knip all passed. <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-266677df-fd82-5155-8395-c2eeb609cc73?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-266677df-fd82-5155-8395-c2eeb609cc73&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> |
||
|
|
1055bc6b45 |
Update limitations section for Supabase OAuth guide - no longer endorse DB password storage (#52126)
Removed mention of prompting for database password in limitations section. This is no longer official guidance. ## Problem Our documentation authored 3 years ago suggested storing user passwords as an integration workaround to OAuth limitations. We no longer endorse this practice. ## Solution Removed out of date guidance. <!-- ## 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 Provide a clear numbered procedure that the PR reviewer can walk through. 1. For example, `Open the live and preview links side-by-side.` 2. For example, `See the issue is fixed.` ## 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) |
||
|
|
655a6624cf |
test(studio): restore data value check across destination changes (#51931)
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> Follow-up from #51924. Splitting the old flow test dropped the check that Data step values survive a destination switch, and this adds that check back to the connection test. Open #51900 already conflicts with master on this file. This branch is based on master and only edits the connection test. **Changed:** - `apps/studio/components/interfaces/Database/Replication/CreatePipeline/PipelineCreationFlow.test.tsx` – set Batch wait time to 750 before leaving Data and assert it is still 750 after switching BigQuery → Snowflake → BigQuery, so a destination change that resets Data values fails the test ## To test - [x] `pnpm --filter studio exec vitest run components/interfaces/Database/Replication/CreatePipeline` – all pass (13 files, 89 tests) - [x] Resetting `maxFillMs` to `10000` on a destination change fails the new assertion (`toHaveValue(750)`, received `10000`) - [x] `pnpm --filter studio run lint:ratchet` – pass - [x] `pnpm --filter studio typecheck` – pass - [x] Prettier check on the changed file – pass - [x] `pnpm knip --workspace apps/studio` – pass - [x] `test (1)` on this PR – green <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-59590606-1fef-5afa-afbf-cd3a89249c56?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-59590606-1fef-5afa-afbf-cd3a89249c56&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
b8483fc454 |
refactor(ui): remove migrated inline code compatibility styles (#51986)
## Problem All eight apps now import the shared inline-code styles, so the old utility and prose rules are redundant. ## Solution Remove those definitions and the remaining `text-code-inline` classes from four shared components and one Studio payment label. Behaviour stays the same. Code should keep the shared appearance established earlier in the stack, with possible small differences in text size, weight and spacing where the old class still took precedence. ## Review instructions - **Design:** check the config removals and four shared-component class removals. Optional spot checks: [Markdown examples](https://design-system-git-dnywh-depr-707-code-cleanup-supabase.vercel.app/design-system/docs/ui-patterns/markdown#inline-code) and [MCP configuration](https://studio-staging-git-dnywh-depr-707-code-cleanup-supabase.vercel.app/dashboard/project/_?showConnect=true&connectTab=mcp). - **Security:** check the single class removal in `CreditCard.tsx`. No payment logic changes or payment-flow testing needed. Optional: in [Studio](https://studio-staging-git-dnywh-depr-707-code-cleanup-supabase.vercel.app/dashboard/organizations), choose an organisation with a Stripe-managed payment method and check “Token ending in …” under Billing > Payment methods. You can see what it looks like on master based on [these screenshots](https://github.com/supabase/supabase/pull/44965) with `VOLZ`. |
||
|
|
8a26dbedd0 |
feat(apps): adopt inline code defaults in learn lite-studio and ui-library (#51985)
## Problem Learn, lite-studio and UI library still use separate inline-code styles. ## Solution Import the shared styles from #51980 in all three apps. Remove duplicate styles from MDX renderers and component previews. All eight apps now import the shared stylesheet, so #51986 can remove the old definitions. ## Review instructions This PR changes only Learn, lite-studio and UI library. 1. Open [password-based auth in UI library](https://ui-library-git-dnywh-depr-707-code-remaining-apps-supabase.vercel.app/library/docs/nextjs/password-based-auth). Check inline code, highlighted examples and copy controls. Learn and lite-studio have no deployment links in the Vercel PR comment; check them locally or just code-review, since neither are yet public facing (and are both designed to consume core styles). | Before | After | | --- | --- | | <img width="1418" height="1728" alt="CleanShot 2026-10-20 at 16 45 37@2x" src="https://github.com/user-attachments/assets/1cf25017-f5ee-410a-8bec-46ea61414b7b" /> | <img width="1438" height="1742" alt="CleanShot 2026-10-20 at 16 55 58@2x" src="https://github.com/user-attachments/assets/b4a5f11b-98fd-4209-ac93-f13d5e31703d" /> | |
||
|
|
9bd86bee93 |
feat(design-system): document shared inline code defaults (#51984)
## Problem The design system repeats inline-code styles and does not document the new shared defaults. ## Solution Import the shared styles from #51980 and document how sizing, colour, weight and wrapping work. Add examples of bare and linked code, tables, long values, Tailwind overrides and `data-code-style="plain"`. Remove repeated styles from existing examples. Highlighted code blocks keep an explicit `text-sm` size so removing inline-code classes does not enlarge them. ## Review instructions This PR changes the design-system app only. 1. Open the [Layout page](https://design-system-git-dnywh-depr-707-code-design-system-supabase.vercel.app/design-system/docs/ui-patterns/layout). Check the inline-code examples at narrow and desktop widths in both themes. 2. Check code in headings, long values, explicit size overrides and the plain display example. Code should use the default foreground colour and follow the surrounding weight unless a class overrides it. 3. Check the [chart palette example](https://design-system-git-dnywh-depr-707-code-design-system-supabase.vercel.app/design-system/docs/ui-patterns/charts). CSS variable names should remain `<code>` elements with their own display styles. | Before | After | | --- | --- | | <img width="1666" height="770" alt="CleanShot 2026-10-20 at 16 37 20@2x" src="https://github.com/user-attachments/assets/2ac87442-12a9-49ab-8e4f-f82436308567" /> | <img width="1680" height="782" alt="CleanShot 2026-10-20 at 16 36 12@2x" src="https://github.com/user-attachments/assets/b0074844-3431-4fb9-827b-c6fd0de889fe" /> | | _Layout ([live](https://supabase.com/design-system/docs/ui-patterns/layout))_ | _Layout ([preview](https://design-system-git-dnywh-depr-707-code-design-system-supabase.vercel.app/design-system/docs/ui-patterns/layout))_ | | <img width="1072" height="476" alt="CleanShot 2026-10-20 at 16 35 14@2x" src="https://github.com/user-attachments/assets/242bf850-58fa-4b29-a978-bd0e296c2e8b" /> | <img width="1072" height="484" alt="CleanShot 2026-10-20 at 16 34 47@2x" src="https://github.com/user-attachments/assets/962adef0-05b7-47ed-8fdc-5229a3a332e1" /> | | _Charts ([live](https://supabase.com/design-system/docs/ui-patterns/charts))_ | _Charts ([preview](https://design-system-git-dnywh-depr-707-code-design-system-supabase.vercel.app/design-system/docs/ui-patterns/charts)): no visual changes as `data-code-style="plain"` has been used_ | |
||
|
|
7e44d321b3 |
feat(www): adopt shared inline code defaults (#51983)
## Problem WWW has duplicate inline-code styles. Changelog code stays at a fixed size even when the surrounding text is larger. ## Solution Import the shared styles from #51980 and remove duplicate Markdown styling. Code uses the default foreground colour and follows the surrounding weight, and scales from 12.5px beside 14px text to 14px beside 16px text, with a `0.75rem` minimum (normally 12px). Region labels keep their own styles. ## Review instructions 1. Open the [branch configuration blog post](https://zone-www-dot-com-git-dnywh-depr-707-code-www-supabase.vercel.app/blog/how-a-new-branch-gets-its-config-migrations-and-functions). The filename “`config.toml`” should be 14px beside 16px prose. 2. Open the [changelog](https://zone-www-dot-com-git-dnywh-depr-707-code-www-supabase.vercel.app/changelog). Check code in headings, paragraphs and tables at narrow and desktop widths, in both themes. 3. Check that code blocks and region labels keep their existing appearance. | Before | After | | --- | --- | | <img width="1306" height="494" alt="CleanShot 2026-10-19 at 14 34 58@2x" src="https://github.com/user-attachments/assets/349f5eb5-7a4a-44ae-ba3a-ae75f083dea2" /> | <img width="1244" height="448" alt="CleanShot 2026-10-19 at 14 35 33@2x" src="https://github.com/user-attachments/assets/61753f8a-f6e3-4482-b19a-ac9d39609545" /> | | <img width="1308" height="246" alt="CleanShot 2026-10-20 at 15 59 46@2x" src="https://github.com/user-attachments/assets/db7cca69-7009-44d1-bae3-a5424e367e36" /> | <img width="1312" height="266" alt="CleanShot 2026-10-20 at 15 58 58@2x" src="https://github.com/user-attachments/assets/720c6370-5ce2-4be3-8346-0852f7803c26" /> | |
||
|
|
a649e69e07 |
feat(docs): adopt shared inline code defaults in docs and kb (#51982)
## Problem Docs and KB style inline code separately from the other apps. ## Solution Import the shared styles from #51980 in both apps. Remove duplicate Docs styling and renderers that only add styles. Keep code annotations, table headers that do not wrap, and word wrapping in the first table column. Other long values wrap only when needed. ## Review instructions 1. Open the [API keys guide](https://docs-git-dnywh-depr-707-code-docs-kb-supabase.vercel.app/docs/guides/getting-started/api-keys). Check the bold introduction and “Legacy `anon` and `service_role` keys” heading. Code should use the default foreground colour and match the surrounding weight. Identifiers should stay intact when they fit on the next line. 2. Check code in links and tables at narrow widths. Code blocks, annotations, highlighting and copy controls should still work. 3. Open [Migrate from Postgres](https://kb-git-dnywh-depr-707-code-docs-kb-supabase.vercel.app/kb/guides/migrate-from-postgres) in KB. Check inline code and code blocks in both themes. | Before | After | | --- | --- | | <img width="1232" height="376" alt="CleanShot 2026-10-19 at 14 10 09@2x" src="https://github.com/user-attachments/assets/27079b1a-2856-4e99-bb05-adb89e7f27c2" /> | <img width="1250" height="380" alt="CleanShot 2026-10-20 at 15 35 36@2x" src="https://github.com/user-attachments/assets/9d98e18b-bec7-4595-84c6-9b2b7b3a5cd6" /> | | <img width="736" height="626" alt="CleanShot 2026-10-20 at 15 17 21@2x" src="https://github.com/user-attachments/assets/3d4dedee-11f4-44fa-b2fa-3aafefa5f0fb" /> | <img width="724" height="608" alt="CleanShot 2026-10-20 at 15 35 12@2x" src="https://github.com/user-attachments/assets/ac220f58-d904-40f5-8d6b-cdb36fd7c76d" /> | | <img width="1476" height="844" alt="CleanShot 2026-10-20 at 15 37 32@2x" src="https://github.com/user-attachments/assets/5eab79cd-dc99-4c38-b410-9caa91dd6a88" /> | <img width="1484" height="864" alt="CleanShot 2026-10-20 at 15 38 00@2x" src="https://github.com/user-attachments/assets/4517cf02-4336-4183-a4d7-d0c4965f3ba8" /> | | <img width="988" height="788" alt="CleanShot 2026-10-20 at 16 27 22@2x" src="https://github.com/user-attachments/assets/fc0aee4b-6da8-4ec0-84a9-392df6b8491b" /> | <img width="974" height="794" alt="CleanShot 2026-10-20 at 16 27 01@2x" src="https://github.com/user-attachments/assets/c1383927-6b5a-47b6-bd54-b986cee33cc3" /> | | _This last one just shows that annotation tags are unchanged_ | _Though perhaps them and these backticks should be addressed at some point_ | |
||
|
|
9be9e570c3 |
feat(studio): adopt shared inline code defaults (#51981)
## Problem Studio relies on repeated classes to style inline code. Bare `<code>` elements can miss those styles. ## Solution Import the shared styles from #51980 and remove the repeated classes. Keep Markdown renderer behaviour and existing size overrides. Use `data-code-style="plain"` for webhook headers, CLI and upgrade commands, configuration comparisons and connected-resource labels that have their own layout. ## Review instructions Dashboard review: this PR changes Studio only. 1. Open [Database > Extensions](https://studio-staging-git-dnywh-depr-707-code-studio-supabase.vercel.app/dashboard/project/_/database/extensions). Search for `pg_trgm` or another disabled extension and turn on its toggle to open the Enable dialog. Check the Extension and Schema values and the help text under “Install in a different schema”. The SQL block should keep its highlighting and copy control. Close without installing. 2. Open [Edge Functions > Secrets](https://studio-staging-git-dnywh-depr-707-code-studio-supabase.vercel.app/dashboard/project/_/functions/secrets). Scroll to “Default secrets” and check `SUPABASE_URL` and `SUPABASE_DB_URL`: both should use the bordered inline-code style. Hover a name to see “Click to copy”, then click it and confirm the name is copied. No custom secret or deployed function is needed. 3. Compare light and dark themes at narrow and desktop widths. | Before | After | | --- | --- | | <img width="812" height="1066" alt="CleanShot 2026-10-19 at 15 35 10@2x" src="https://github.com/user-attachments/assets/e4a21310-1fac-4143-9ee6-d2452ab4f314" /> | <img width="812" height="1068" alt="CleanShot 2026-10-20 at 15 39 20@2x" src="https://github.com/user-attachments/assets/d2c91ef6-7836-4c71-8f15-d0c0df8e969d" /> | |
||
|
|
b7638a7244 |
fix(studio): preserve pipeline wizard loading context and guidance (#52053)
## Problem Opening the pipeline creation wizard hides the top bar and shows an unrelated loading skeleton. Steps also lack their subtitles and contextual documentation links from #49243. ## Solution Keep the wizard header visible during access checks and redirects, with a skeleton matching the initial destination selection. Restore all four step subtitles and destination-specific Docs links on Connection. Link Data to the current table-selection guidance. | Before | After | | --- | --- | | <img width="1024" height="759" alt="31447" src="https://github.com/user-attachments/assets/e628831a-f916-43c4-81a5-8e3219f6310b" /> | <img width="1024" height="759" alt="New Pipeline Supabase" src="https://github.com/user-attachments/assets/1cc5548a-c4a8-4d3f-ac4f-c6cde54920d1" /> | | <img width="1024" height="759" alt="New Pipeline Supabase" src="https://github.com/user-attachments/assets/1ed91bf3-6b74-4e0b-a575-b3faeeffb1d5" /> | <img width="1024" height="759" alt="30316" src="https://github.com/user-attachments/assets/fbf2a703-d175-438c-be8c-0a11a921d2bc" /> | ## Review instructions 1. Enable **Pipeline creation wizard** in Feature Previews. Open `/project/<ref>/database/pipelines` and click **Add pipeline**, with network throttling enabled. Confirm the top bar stays visible while the destination skeleton loads. 2. Continue to Connection for each available destination. Confirm the subtitle names that destination and **Docs** opens its setup guide. 3. Continue to Data. Confirm its subtitle and **Docs** link cover publication and initial-sync selection. Review should also show its subtitle. 4. While the initial screen loads, confirm **Close** returns to Pipelines and the form footer is disabled. |
||
|
|
d458429081 |
fix(studio): clarify pipeline validation feedback (#52055)
## Problem Pipeline review shows validation failures below the cost estimate, far from the settings that need changes. Publication-loading failures also appear in several places with conflicting retry instructions. ## Solution Attach full-width errors and warnings to their Connection or Data sections. Keep the current scroll position and show description-only guidance above the footer. Consolidate publication-loading failures into one Data-step error with Continue to retry, preserving the existing sheet behaviour. _The main fix, spreading out the error and warnings to their respective sections:_ | Before | After | | --- | --- | | <img width="1280" height="1522" alt="New Pipeline Supabase" src="https://github.com/user-attachments/assets/36df1814-e73f-4440-b338-79b672431c60" /> | <img width="1280" height="1522" alt="15619" src="https://github.com/user-attachments/assets/08e39cdd-0e69-4318-b992-dfa81ad8a6c2" /> | | _All at bottom_ | _Attached to each section_ | _Misc fixes for API blocks:_ | Before | After | | --- | --- | | <img width="1516" height="1350" alt="CleanShot 2026-10-21 at 15 19 24@2x" src="https://github.com/user-attachments/assets/56ac9cf7-9c30-4129-8fbc-2708f35a51b9" /> | <img width="1520" height="1232" alt="CleanShot 2026-10-21 at 15 22 56@2x" src="https://github.com/user-attachments/assets/c4f4b039-38de-4af0-9bb9-b487ff6ddb63" /> | ## To test 1. Enable **Pipeline creation wizard** in Feature Previews and open `/project/<ref>/database/pipelines/new`. Complete Connection and Data to reach Review. 2. In Chrome DevTools → Network, right-click a captured POST ending `/replication/<ref>/destinations/validate` (Connection) or `/replication/<ref>/pipelines/validate` (Data), then select **Override content**. Reach Review before enabling the destination override. Keep HTTP status **200** and save: ```json {"validation_failures":[{"name":"Test validation issue","reason":"Test failure for the review screen.","failure_type":"critical"}]} ``` 3. Click **Start pipeline**. Expect a flush Admonition at the bottom of the matching section and danger guidance above the footer, without automatic scrolling. Change `critical` to `warning` to check warning guidance and **Start pipeline anyway**. Edit and retry to confirm values persist. 4. On Data, block the GET ending `/replication/v2/<ref>/sources/<id>/publications/<name>`. Expect one flush publication-loading failure above the footer, including with Advanced settings open. **Continue** retries; remove the block and retry to recover. 5. Check desktop and phone widths. Stop before confirming creation, then remove overrides and request blocks. |
||
|
|
d1e251181f |
fix(studio): improve pipeline cost estimate loading and recovery (#52056)
## Problem Pipeline review permits starting before the initial cost estimate finishes. Estimate failures and background refresh errors also need to preserve a usable review state. ## Solution Share cost-query state between the wizard and cost display. Disable **Start pipeline** only until the first estimate attempt finishes. After its first failure, show a flush, description-only note and permit starting while retries continue. Retain cached estimates if a background refresh fails, and announce unavailable estimates through a persistent status region. _All “After” states for Review step:_ | Loading | Loaded | Failed | | --- | --- | --- | | <img width="1024" height="686" alt="31887" src="https://github.com/user-attachments/assets/80b8623e-65ab-4bbb-8fcf-1e5e29a0dcd5" /> | <img width="1024" height="686" alt="New Pipeline Supabase" src="https://github.com/user-attachments/assets/ce49550c-d8cf-42b3-98f3-4520ae6b1229" /> | <img width="1024" height="686" alt="62823" src="https://github.com/user-attachments/assets/958b2bb3-e7ee-4214-b900-2e634adca05f" /> | ## To test 1. Enable **Pipeline creation wizard** in Feature Previews and open `/project/<ref>/database/pipelines/new`. Complete Connection and Data to reach Review. With network throttling, **Start pipeline** stays disabled during the initial estimate request; **Back** remains available. 2. Filter Network for `cost-estimate`. Block the GET ending `/replication/<ref>/sources/<id>/publications/<name>/cost-estimate`, then reload and complete the wizard again to clear the in-memory estimate cache. After the first failed request, expect “A cost estimate is unavailable. You can still start the pipeline.” in a full-width note, and an enabled **Start pipeline**. 3. Remove the block and obtain an estimate. Block the request again, go Back and return to Review. A failed background refresh should retain the cached numbers and allow starting. 4. Check desktop and phone widths. Stop before creating the pipeline and remove the request block. --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
397cc79fdb |
fix(docs): generate sitemap before next build (#52110)
## Problem `/docs/sitemap.xml` returns a 404 after the Next.js 16 upgrade (#52045). Resolves [FE-4704](https://linear.app/supabase/issue/FE-4704/fix-missing-sitemapxml-on-the-docs-site). The sitemap is written to `public/sitemap.xml` by `pnpm run build:sitemap`, which ran in `postbuild`, after `next build` had finished. On a preview deployment built that way, the file was deployed but only served at `/sitemap.xml`, not under the `/docs` base path. `public/` files that exist at build time, like `robots.txt`, are served at both `/robots.txt` and `/docs/robots.txt`. The Next.js docs say only files in `public/` at build time are served ([static assets, v14](https://nextjs.org/docs/14/app/building-your-application/optimizing/static-assets): "Only assets that are in the `public` directory at build time will be served by Next.js"). The current docs no longer include that note, and nothing I found says Next.js 16 changed this behavior. The likely cause is that Vercel maps build-time `public/` files under the base path, while files added afterward are only served as plain static files at the root. I couldn't confirm this, or why it worked before the Next.js 16 upgrade. ## Solution Run `build:sitemap` at the end of `prebuild`, so `public/sitemap.xml` exists before `next build`. The generator only reads source content and the references codegen output, which `prebuild` already produces earlier. `postbuild` now only runs the static assets upload. The generator also sorts entries by link, so the sitemap order is stable across builds. ## How to test Check `/docs/sitemap.xml` on the preview deployment. It returns 200 with the same set of URLs as the sitemap currently served in production. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
96d51239c6 |
refactor(studio): migrate update_opt_in_level to a tool contract (#52081)
## Problem `update_opt_in_level` is the last local assistant tool not on the tool contract pattern. Its input schema is built for each request: a transform captures the org's opt-in level, stamps `levelWhenAsked`, and drops `requiredLevel` when the org already has it. The SDK stores that parsed value, and the approval card reads it before the tool runs. A contract has one static `inputSchema`, so this didn't fit. Separately, `pages/api/ai/sql/policy.ts` passes every assistant tool to a one-shot `generateText` and only removes `update_opt_in_level`. Any tool with `needsApproval` (`execute_sql`, `deploy_edge_function`, the notebook mutation and run tools) stops the step loop with no result, so `output` is never set and the route returns a 500. ## Solution - `ToolContract` gains an optional `createInputSchema(ctx)`. `toolFromContract` parses with it when present. `inputSchema` stays the shape stored on the message, which is what history replay and the client parse. - `update_opt_in_level` moves to `update-opt-in-level.ts` and `update-opt-in-level.server.ts`: - The per-request transform becomes `createInputSchema`; the stored shape is `inputSchema`. - The output schema moves out of `OptInRequest.tsx` into the contract; `toModelOutput` returns it unchanged, since it only contains level names. - `minOptInLevel: null` and `needsApproval: true`, as before. It uses plain `toolFromContract`, since it promotes no SQL. - Registered in `TOOL_CONTRACTS`, removed from `TOOL_CATEGORY_MAP`. `getOptInTools` still registers it on platform at every level. - `Message.Parts.tsx`, `OptInRequest.tsx`, and `evals/opt-in-replay.ts` use the contract's schemas; the old schemas in `tool-filter.ts` and `studio-tools.ts` are removed. - `ToolContext.aiOptInLevel` is now required. The `'schema'` defaults in `toolFromContract`, `execute-sql.server.ts`, and `run-notebook.server.ts` are gone, and every caller passes the real level. The eval mocks pin the mocked studio tools to `'schema'` so eval results don't shift. - New `withoutApprovalTools(tools)` in `tool-filter.ts` drops any tool whose `needsApproval` is set (including a function, and privacy-stubbed tools). `policy.ts` uses it instead of deleting one tool. ## Behavior changes - Replayed `update_opt_in_level` outputs are validated against the output schema and dropped if invalid (previously unchecked). - The policy generator no longer offers approval-gated tools to the model. ## Testing - New `update-opt-in-level.test.ts` (transform, per-request schema, execute at a new level, replay) and `tool-from-contract.test.ts` (`createInputSchema` used when present and receives the context). - `withoutApprovalTools` tests in `tool-filter.test.ts`. - `pnpm exec vitest run lib/ai components/ui/AIAssistantPanel evals` passes in `apps/studio`. |
||
|
|
44386580e3 |
feat(docs): upgrade to Next.js 16 (#52045)
## Problem The docs site (`apps/docs`) is still on Next.js 15, which is close to the end of its support window under the [Next.js support policy](https://nextjs.org/support-policy). Resolves [DOCS-1485](https://linear.app/supabase/issue/DOCS-1485/upgrade-the-docs-site-to-nextjs-16). ## Solution Upgrades `apps/docs` to Next.js 16.3.6. The scope is limited to what Next.js 16 requires, so existing routes, redirects, and responses stay the same. - **Dependencies:** `next` uses the workspace catalog, and `@next/mdx` and `@next/bundle-analyzer` are bumped to 16.3.6. - **Webpack:** `dev` and `build` run with `--webpack`, because the docs config loads `.include`, `.toml`, and YAML files through webpack, and the MDX remark plugins have non-serializable options. - **Proxy:** `middleware.ts` is renamed to `proxy.ts`. - **Cache revalidation:** `revalidateTag` is called with `{ expire: 0 }` to keep immediate expiration. - **Images:** `images.localPatterns` allows guide images with `?v=N` cache-busting query strings. Without it, those pages return 500. - **Scroll behavior:** `data-scroll-behavior="smooth"` on `<html>` keeps route changes jumping to the top instantly. - **Config:** the `eslint` key is removed from `next.config.mjs`, and Sentry options use their new names. - **`next-env.d.ts`:** gitignored, like in the other apps, because Next.js 16 regenerates it differently for `dev` and `typegen`. ### Dependency on the marketing site upgrade The docs chat edge function (`/api/ai/docs`) stays under the Vercel Edge Function size limit because #52001 ([FE-4673](https://linear.app/supabase/issue/FE-4673/upgrade-the-marketing-site-to-nextjs-16)) removed `js-tiktoken` from `ai-commands`. This branch is based on `master` with that change. ## Known limitations - `proxy.ts` runs on the Node.js runtime instead of edge. - `nuqs` v1 doesn't declare support for Next.js 15 or 16. The troubleshooting filters work on Next.js 16, but the dependency is outside its supported range. - `next/legacy/image` and `unstable_cache` are deprecated but still supported. - Tabs opened before the deploy keep running the Next.js 15 client. On their next client-side navigation, the router loads the page in full instead. Docs pages are prerendered, so these requests don't reach the renderer or report errors to Sentry. ## Review instructions 1. Run `pnpm --filter=docs typecheck` and `pnpm --filter=docs test:local`. 2. Run `pnpm dev:docs` and open a guide, a client library reference page, and `/guides/troubleshooting` with a filter applied. 3. Check the Vercel preview against production docs: every sitemap URL returns the same status code, and redirects, `.md` responses, search, and the AI chat behave the same. A local production build already matches production for the following: - All 2,564 sitemap URLs - The redirects in `next.config.mjs`, except where a www redirect handles the path first - `.md` negotiation, including the 406 response - Reference rewrites, including bot requests Search and the AI chat need the preview, because they depend on production data and keys. 4. Confirm the preview build has enough memory. Locally, `next build` peaked at about 4 GB. ## Future work - Upgrade `nuqs` to v2. - Replace `next/legacy/image` with `next/image`. - Replace `unstable_cache` with `use cache`. ## Checklist Check all before review: - [ ] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] 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) |
||
|
|
53c3b41065 |
feat(studio): show Realtime on High Availability projects in production (#52091)
## Problem The Realtime pages, publications, the Realtime toggle in the table editor and the Realtime status on the project home are hidden for High Availability projects outside staging and local. That was a temporary gate while Realtime on High Availability projects was validated, and the platform now registers those projects as Realtime tenants. ## Solution Remove the gate instead of flipping a default. It always resolved to available once enabled, so keeping `resolveRealtimeUnavailable` and its second argument would only leave dead code: - `useHighAvailability.ts`: drop `resolveRealtimeUnavailable` and `useIsRealtimeUnavailable`. - `RealtimeLayout`, the two publications pages and `ServiceStatus`: drop the "unavailable on High Availability projects" states. `PublicationsAvailability` and `resolveRealtimeServiceStatus` are deleted. - `TableEditor`: `TableRealtimeToggle` no longer takes the unavailable and pending props, and the toggle is never forced off. - Tests for the removed code are deleted, and the toggle test now covers the toggle itself. Whether a project is actually registered as a Realtime tenant is still decided by the platform, so this should land after the platform change. ## Review instructions 1. On a High Availability project, open Realtime in the sidebar: the inspector, policies and settings pages load instead of the "unavailable" empty state. 2. Open Database > Publications: the list loads. 3. Open the table editor's new-table panel: the "Enable Realtime" checkbox is enabled. 4. On the project home, the Realtime service reports its health check status instead of "Disabled". 5. A standard (non-High Availability) project looks the same as before. `pnpm vitest run` on the affected folders passes (28 files, 184 tests). |
||
|
|
c80e4279fb |
chore(kb, docs) - add in redirects for troubleshooting guides (#52088)
## Problem Having duplicate pages between /docs and /kb is an issue. ## Solution Easiest solution is to add in redirects covering the relevant paths. Should eventually remove the generation scripts from docs, but this is a clearer two-way door. ## Preview links n/a, can't evaluate redirects at the moment b/c not all apps have them set on the individual project |
||
|
|
c870822992 |
docs(design-system): add AI Tools fragment page (#52047)
## Problem The AI tools sidebar section (Copy as Markdown, Ask ChatGPT, Ask Claude) appears on docs guides, docs troubleshooting pages, and knowledge base guides. #51565 moved it into `ui-patterns` as `AiTools`, so every surface renders the same component. The design system has no page for it, so teams building new surfaces such as Learn can't find it or see its options. Resolves [DOCS-1453](https://linear.app/supabase/issue/DOCS-1453/move-the-supastart-component-into-the-design-system). ## Solution The design system has an AI Tools page under Fragment Components. It covers: - **Examples:** one with every action, and one with only the required props. - **Usage:** the canonical URL that the Ask prompts use, and the fallback text that Copy as Markdown copies when the Markdown file isn't available. - **Analytics:** AI Tools sends no telemetry. Each surface sends its own events from the component's callbacks, as the docs wrapper does. - **Props:** every prop with its type and default. ## Preview links [/design-system/docs/fragments/ai-tools](https://design-system-git-alexisa-docs-1453-supabase.vercel.app/design-system/docs/fragments/ai-tools) ## Review instructions 1. Open the preview link. 2. Check that AI Tools appears under Fragment Components in the sidebar. 3. In the first example, click Copy as Markdown. The button changes to "Copied!", and the clipboard holds `# Getting started`. 4. Check that Ask ChatGPT and Ask Claude open with a prompt that includes the page URL. ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] 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) |
||
|
|
9ac3f4d78b |
docs(blog): publish .NET SDK blog posts on Oct 21 (#51910)
## 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? - Restores the two .NET SDK blog posts reverted in #51624 and #51625 - Moves both posts to October 21, 2026 (filenames, `date`, and image folders) - Re-adds Guillaume Faas to `apps/www/lib/authors.json` - Points the repo links at `supabase/supabase-csharp`, updates the upgrade line to the latest v8, and fixes three typos ## What is the current behavior? Neither .NET SDK blog post is on master. ## What is the new behavior? - `/blog/introducing-the-unified-supabase-net-sdk` and `/blog/getting-started-with-the-supabase-dotnet-sdk` publish, dated October 21, 2026 - Blog URLs are unchanged from the original PRs ## Additional context Merge on October 21, not before. The blog lists a post as soon as it merges, regardless of its date. Original PRs: #50001 and #50209. --------- Co-authored-by: Ana <ana1337x@users.noreply.github.com> Co-authored-by: Dion Zeneli <101271736+Dionysos288@users.noreply.github.com> |
||
|
|
5491fb60bc |
chore(docs, www) - add more redirects (#52046)
## Problem Adds more redirects for missing paths that have high-ish traffic (above 20 404 responses over the past 24 hours) |
||
|
|
86ce3af1b4 |
Assign region for available-versions to be americas if region is auto (#52078)
## Context Tiny change from [here](https://github.com/supabase/supabase/pull/52062), to set the region when fetching `available-versions` as 'Americas' when the region selected is "Auto" - as the `available-versions` endpoint doesn't accept "auto" for its region parameter and currently throws a 400 in this case (this endpoint is for internal to choose a specific postgres version anyways so not public facing) Note that region sent for POST project creation should still be "Auto" in this case, its only being sent as "Americas" for the available-versions endpoint |
||
|
|
4825c6d9f5 |
fix(studio): clarify disk IO balance FDBKPRI-2885 (#51943)
## Problem Infrastructure and Observability label consumed disk IO burst credits as “Disk IO,” so a value of 1% appears inconsistent with a remaining balance of 99% in AWS or Grafana. Both surfaces request `disk_io_consumption`, which is the inverse of `disk_io_budget`. ## Fix Show `disk_io_budget` as “Disk IO balance” and explain that it represents the lower of the remaining throughput and IOPS burst balances. Infrastructure shows the lowest sampled balance over seven days; Observability shows the selected-window average. Keep Infrastructure's overall Compute score based on consumed credits, so a full balance stays healthy and a low balance still warns. Missing balance remains unavailable. Update the compute and disk guide and disk IO troubleshooting page to explain the remaining balance, its direction, and the different aggregation windows. ## How to test - Open Infrastructure settings for a project with burstable IO. Verify the balance headline and chart show remaining credits, with 100% full and 0% exhausted. - Open Observability and verify “Disk IO balance” shows the average remaining balance for the selected window. - Hover the labels to check the explanation and aggregation window. - Verify a high balance does not inflate Compute usage, a low balance raises the warning, and missing balance does not appear as 0% or 100%. - Focused unit and MSW component tests: 79 passed, including shuffled runs with retries disabled; regression mutations caught wrong metric selection, reversed pressure, and maximum-versus-minimum selection. ## Validation Studio typecheck, changed-file ESLint, and Prettier pass locally. Verified both surfaces on the deployed preview, including Observability refresh and the balance tooltip. Documentation formatting and review pass. The local markdown build is blocked by missing generated federated content and its GitHub credentials; docs CI validates the deployed build. ## Screenshots Same project on `supabase.green` (before) and the PR preview (after), captured October 20. Infrastructure uses the same seven-day window; Observability uses Last 24 hours. ### Infrastructure | Before | After | | --- | --- | |  |  | ### Observability | Before | After | | --- | --- | |  |  | Observability balance explanation:  Fixes FDBKPRI-2885 |
||
|
|
497cbecfd3 |
feat: Generate sitemap.md file in kb, fix markdown slug reconciliation, update llms file (#52076)
## Problem We need a general entry level file for kb discovery for agents. ## Solution - Generate a sitemap.md file with all relevant links listed within the project - Set redirects so supabase.com/kb/sitemap.md and supabase.com/kb.md lead to that file - Add link to the file in the llms.txt file - Fix some slug reconciliation issues within troubleshooting suffixes - Move scripts to .ts to follow architectural conventions <!-- ## 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. Make sure troubleshooting markdown files work correctly, go to the preview site of kb in this PR, open a troubleshooting guide with a suffix, add .md at the end, it should return markdown version of the page 2. Go to the preview site of kb in this PR, add /sitemap.md, a markdown file with a list of all topics, guides and troubleshooting articles should appear (sadly www redirects cannot be tested on preview environments) ## 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) |
||
|
|
31d21ae69f |
chore(kb) - update visibility across properties (#51804)
## Problem KB needs more visibility when we're ready to launch it. ## Solution - Adds in sitemap reference to `/sitemap.xml` - Removes `robots` meta tags from current layout in KB project - Adds reference to KB in www footer - Removes `sample-guide.mdx` page, which shouldn't exist in the live, launched site - Adds `/kb` to existing `/docs` and `/blog` pattern for x-robots-tag ## Preview links [KB](https://kb-git-kody-docs-1450-update-kb-visibility-supabase.vercel.app/kb/guides/migrate-from-amazon-rds) <img width="1101" height="700" alt="image" src="https://github.com/user-attachments/assets/8bb5dd63-ccf9-4817-bf28-162201ca1336" /> [www sitemap](https://zone-www-dot-com-git-kody-docs-1450-update-kb-v-694f6a-supabase.vercel.app/sitemap.xml) <img width="699" height="292" alt="image" src="https://github.com/user-attachments/assets/4adfc401-d1d9-4de0-b325-0c21fd4da7fa" /> [www footer](https://zone-www-dot-com-git-kody-docs-1450-update-kb-v-694f6a-supabase.vercel.app/) <img width="1101" height="700" alt="image" src="https://github.com/user-attachments/assets/472f4923-d7fa-4a6a-9d4d-5cfbd88afa7f" /> |