Commit Graph
40478 Commits
Author SHA1 Message Date
alexisintech d903f1f267 [create-pull-request] automated change 2026-12-03 23:10:41 +00:00
supabase-vercel-tedd[bot]andalexisintech 9ca221ee86 docs(storage): explain which policies a public bucket needs (#54558)
## Problem

The public buckets section says that anyone with a file's URL can
download it and that other operations still use access control. It
doesn't say which policies a public bucket needs, so readers can't tell
that a broad `SELECT` policy lets clients list the whole bucket, or that
writes stay blocked until a policy allows them.

Related to
[FDBKIN-5481](https://linear.app/supabase/issue/FDBKIN-5481/document-best-practices-for-securing-public-storage-buckets)
Closes
[DOCS-1852](https://linear.app/supabase/issue/DOCS-1852/explain-how-to-lock-down-a-public-storage-bucket)

## Solution

A new "Control access to a public bucket" subsection on the Storage
buckets page covers several points. Reads by public URL need no `SELECT`
policy, and a bucket-wide `SELECT` policy opens listing. Listing,
overwrites, moves, copies, and deletes each need a `SELECT` policy, so
the subsection says how to scope it to the user's objects and, with the
operation helpers, to the operations that need it. Writes stay blocked
until a scoped write policy allows them. It links the existing policy
examples, upload restrictions, and helper functions instead of repeating
them, and names the Security Advisor lint and the Dashboard warning that
flag a listable public bucket. The Related resources line for access
control now covers both bucket types.

Three related fixes support the new subsection. The public buckets intro
now says Storage skips access controls when it serves a file from a
public bucket, and names listing among the operations that still need
policies. The access control page has a sentence-case title and
descriptive link text instead of "here". "Restricting uploads" on the
Creating buckets page shows how to change limits on an existing bucket
with `updateBucket`, notes that the JavaScript SDK requires `public`,
and names the `fileSizeLimit` option correctly.

Both of those pages also lose old wording. The Creating buckets title is
in sentence case, and its intro and upload-rejection sentences no longer
use "Here we", "above", or the future tense. Its Restricting uploads
example sentence is shorter and writes "1 MB" with a space. The access
control intro and Policy examples drop "perfectly", "incredibly
powerful", and "An easy way", and the upsert sentence drops "you will
need to additionally grant".

The new title also appears in the docs nav entry for the page and in the
link text on the Storage upload limits page. The Dashboard steps for
creating a bucket, on the Creating buckets page and the Storage
quickstart, now use Studio's current labels: **New bucket** and
**Create**.

## How to verify

1. Open each changed page in the preview:
-
https://docs-git-tedd-docs-1852-supabase.vercel.app/docs/guides/storage/buckets/fundamentals#public-buckets
-
https://docs-git-tedd-docs-1852-supabase.vercel.app/docs/guides/storage/security/access-control#access-policies
-
https://docs-git-tedd-docs-1852-supabase.vercel.app/docs/guides/storage/buckets/creating-buckets#restricting-uploads
-
https://docs-git-tedd-docs-1852-supabase.vercel.app/docs/guides/storage/uploads/file-limits
-
https://docs-git-tedd-docs-1852-supabase.vercel.app/docs/guides/storage/quickstart
2. The "Control access to a public bucket" subsection says public URL
reads need no `SELECT` policy on `storage.objects`.
3. It says a bucket-wide `SELECT` policy lets clients list every object,
and that listing, overwrites, moves, copies, and deletes need a `SELECT`
policy scoped to the user's objects and the operations.
4. It says uploads and other writes stay blocked until a policy allows
them, and links Access policies and Policy examples.
5. It links Restricting uploads for file size and MIME type limits.
6. It says the Security Advisor flags a public bucket that allows
listing.
7. The public buckets intro says downloads from a public bucket skip
access controls, and that uploading, listing, deleting, moving, and
copying still need policies.
8. The access control page title is "Storage access control", and its
"Access policies" section has no "here" link text. The page has no
"perfectly", "incredibly powerful", "An easy way", or "you will need to
additionally grant".
9. The Creating buckets page title is "Creating buckets". Its intro has
no "Here we", the Restricting uploads example sentence has no "You can
achieve the following" and writes "1 MB", and the sentence after the
example has no "above" or "will be rejected".
10. "Restricting uploads" has an `updateBucket` snippet with `public:
true` and a sentence that the JavaScript SDK requires `public`.
11. The Storage nav shows "Creating buckets" for that page, and the
Storage upload limits page links it as "Creating buckets".
12. The Dashboard tabs on the Creating buckets page and the Storage
quickstart say **New bucket** and **Create**.
13. Each changed link opens the right page and section, including the
`0025_public_bucket_allows_listing` tab on the Advisors page.

## Checks

Ran `pnpm exec oxfmt --check` on the changed files, and `eslint` on
`NavigationMenu.constants.ts`. The `updateBucket` snippet typechecks
with its hidden setup (`tsc --ignoreConfig --moduleResolution bundler
--module esnext --skipLibCheck`). MDX has no ESLint config in apps/docs.
Behavior was checked against `supabase/storage` and against a local
stack running storage-api v1.98.7. Public downloads skip RLS, both
through the public URL and through `download()`, because `getObject.ts`
reads public-bucket objects as superuser. Listing and writes go through
RLS. Delete, move, copy, and upsert fail without a `SELECT` policy and
work with a scoped one. `updateBucket` leaves omitted fields unchanged.
The Advisor claim was checked against splinter lint 0025, and the
Dashboard warning against Studio's `PublicBucketWarning`. The Dashboard
labels come from Studio's `NewBucketButton` and `CreateBucketModal`.
Skipped `pnpm build:guides-markdown`, which needs GitHub credentials for
federated content.

## Follow-ups

- The JavaScript reference for `update()` says it needs `update` and
`select` on `storage.objects`. A local run on storage-api v1.98.7 showed
that it also needs `insert`. That text comes from supabase-js, so this
PR can't fix it.

## Checklist

- [x] I have read the [Contributing
Guidelines](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] I have checked that the change follows the docs style guide
- [ ] I have checked that the change works in the preview deployment

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[DOCS-1852](https://linear.app/supabase/issue/DOCS-1852/explain-how-to-lock-down-a-public-storage-bucket).
Tedd doesn't read comments on this PR.

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: alexisintech <98043211+alexisintech@users.noreply.github.com>
2026-12-03 16:10:00 -07:00
supabase-vercel-tedd[bot]andalexisintech 7c9b65e21d docs(auth): say where proxy.ts goes in a Next.js project with a src folder (#54556)
## Problem

The Next.js setup in the server-side client guide doesn't say where to
put the `proxy.ts` (or `middleware.ts`) file. The Next.js user
management tutorial tells readers to put it at the project root. In a
project that uses a `src` folder, a file at the project root never runs,
sessions don't refresh, and nothing reports an error.

Related to
[FDBKIN-6704](https://linear.app/supabase/issue/FDBKIN-6704/clarify-middlewarets-file-placement-for-nextjs-ssr-in-documentation)
Closes
[DOCS-1851](https://linear.app/supabase/issue/DOCS-1851/say-where-proxyts-goes-in-a-nextjs-project-that-uses-a-src-folder)

## Solution

The "Hook up proxy" section of the Next.js tab now opens by saying where
the file goes: at the same level as the `app` or `pages` folder, which
is the project root or the `src` folder. It covers `middleware.ts` on
Next.js 15 and earlier, and warns that Next.js silently skips the file
anywhere else. It follows the wording the page already uses for the
`lib/supabase` folder and doesn't repeat the existing rename note.

The Next.js tutorial gets the same placement note in its "Next.js proxy"
step. Its "Supabase utilities" step now also says the `lib/supabase`
folder goes inside `src` in a `src` project, because the `@/` import
alias points there and the proxy import doesn't resolve otherwise.

## How to verify

1. Open
https://docs-git-tedd-docs-1851-supabase.vercel.app/docs/guides/auth/server-side/creating-a-client?queryGroups=framework&framework=nextjs#hook-up-proxy
and
https://docs-git-tedd-docs-1851-supabase.vercel.app/docs/guides/getting-started/tutorials/with-nextjs#nextjs-proxy.
2. The guide's section says to put `proxy.ts` at the same level as `app`
or `pages`: the project root, or the `./src` folder when the project
uses one.
3. The guide's section says `middleware.ts` goes in the same place on
Next.js 15 and earlier.
4. The guide's section says Next.js doesn't run the file from any other
location and shows no error.
5. The tutorial's "Next.js proxy" step says to put `proxy.ts` at the
same level as `app` (the project root or `./src`), and that Next.js
doesn't run it from any other location and shows no error.
6. The tutorial's "Supabase utilities" step says to put the
`lib/supabase` folder at the project root, or inside `./src` when the
project uses one.

## Checks

Ran `pnpm turbo run lint --filter='[origin/master]'` and `pnpm exec
oxfmt --check` on the changed files. The change is MDX prose only, so no
typecheck or tests cover it. Facts checked against the Next.js
`proxy.js`, `middleware.js`, and `src` folder references and the Next.js
build source. They were confirmed with `next build` and `next start` on
test projects with the files in and out of `src`, including
`create-next-app` scaffolds with and without `--src-dir`.

## Checklist

- [x] I have read the [Contributing
Guidelines](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] I have checked that the change works in the preview deployment

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[DOCS-1851](https://linear.app/supabase/issue/DOCS-1851/say-where-proxyts-goes-in-a-nextjs-project-that-uses-a-src-folder).
Tedd doesn't read comments on this PR.

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: alexisintech <98043211+alexisintech@users.noreply.github.com>
2026-12-03 16:08:41 -07:00
Miranda Limonczenko 1bdb8d849f docs: apply the quickstart template to the remaining quickstarts (#54502)
Closes DOCS-1616

## Problem

The remaining quickstarts don't follow the [quickstart
template](https://github.com/supabase/supabase/blob/docs/quickstart-template/apps/docs/style-guide/templates/quickstart.md)
either.

## Solution

- **Heading IDs:** each numbered step ends with the template's ID, such
as `[#create-the-client]`.
- **Heading wording:** eight headings now use the template's wording,
such as `Create the Supabase client`.
- **Style:** the prose follows the word list and elements rules.

**Not changed:** RedwoodJS, Spring Boot, and Refine. DOCS-1624 covers
them.

**Before and after:** numbered headings that use the template's wording.

| Page | Before | After |
| --- | --- | --- |
| iOS | 5/8 | 6/8 |
| Kotlin | 4/8 | 5/8 |
| Flask, Flutter, Unity | 5/7 | 6/7 |
| Expo | 6/7 | 7/7 |
| Reflex | 7/7 | 7/7 |
| Laravel | 3/7 | 3/7 |
| Rails | 3/6 | 3/6 |

**Possible errors, not changed:**

- The iOS page opens **Xcode > New Project > iOS > App**. Xcode's menu
might be **File > New > Project**.
- The Vue page says to drop a type import that `supabaseClient.ts`
doesn't have.

## Preview links

| Page | Preview |
| --- | --- |
| Flask |
[Preview](https://docs-git-docs-quickstart-rework-other-supabase.vercel.app/docs/guides/getting-started/quickstarts/flask)
|
| Reflex |
[Preview](https://docs-git-docs-quickstart-rework-other-supabase.vercel.app/docs/guides/getting-started/quickstarts/reflex)
|
| Expo React Native |
[Preview](https://docs-git-docs-quickstart-rework-other-supabase.vercel.app/docs/guides/getting-started/quickstarts/expo-react-native)
|
| Flutter |
[Preview](https://docs-git-docs-quickstart-rework-other-supabase.vercel.app/docs/guides/getting-started/quickstarts/flutter)
|
| iOS SwiftUI |
[Preview](https://docs-git-docs-quickstart-rework-other-supabase.vercel.app/docs/guides/getting-started/quickstarts/ios-swiftui)
|
| Kotlin |
[Preview](https://docs-git-docs-quickstart-rework-other-supabase.vercel.app/docs/guides/getting-started/quickstarts/kotlin)
|
| Unity |
[Preview](https://docs-git-docs-quickstart-rework-other-supabase.vercel.app/docs/guides/getting-started/quickstarts/unity)
|
| Laravel |
[Preview](https://docs-git-docs-quickstart-rework-other-supabase.vercel.app/docs/guides/getting-started/quickstarts/laravel)
|
| Ruby on Rails |
[Preview](https://docs-git-docs-quickstart-rework-other-supabase.vercel.app/docs/guides/getting-started/quickstarts/ruby-on-rails)
|

## Review category (docs PRs only)

<!--
If this PR changes docs and you're on the Supabase team, select one
category.
PRs from forks are always reviewed as Low, so you can skip this section.
-->

- [ ] Critical: needs a review as soon as possible
- [ ] Urgent: the feature ships soon, or it's blocking something else
- [ ] Moderate: good to have soon, not urgent
- [ ] Low: get to it when you can

## Review instructions

1. Open the [Kotlin
preview](https://docs-git-docs-quickstart-rework-other-supabase.vercel.app/docs/guides/getting-started/quickstarts/kotlin)
and click **Create the Supabase client** in the table of contents. The
URL ends in `#create-the-client`.
2. Open the [Laravel
preview](https://docs-git-docs-quickstart-rework-other-supabase.vercel.app/docs/guides/getting-started/quickstarts/laravel)
and click the **Run the database migrations** link in step 4. The page
scrolls to step 7.

## 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)
2026-12-03 14:40:59 -08:00
Miranda Limonczenko c5057afe5e docs: apply the quickstart template to the web framework quickstarts (#54501)
Part of DOCS-1616

## Problem

The web framework quickstarts don't follow the [quickstart
template](https://github.com/supabase/supabase/blob/docs/quickstart-template/apps/docs/style-guide/templates/quickstart.md)
from #54496.

## Solution

- **Heading IDs:** each numbered step ends with the template's ID, such
as `[#query-data]`.
- **Heading wording:** five headings now use the template's wording,
such as `Query data from the app`.
- **Style:** the prose follows the word list and elements rules, and
`/ui` links point to `/library`.

**Before and after:** numbered headings that use the template's wording.

| Page | Before | After |
| --- | --- | --- |
| Astro (pilot) | 4/8 | 6/8 |
| TanStack Start | 4/7 | 5/7 |
| Next.js | 4/6 | 5/6 |
| Hono | 5/7 | 5/7 |
| Nuxt, React, SolidJS, SvelteKit, Vue | 7/7 | 7/7 |

**Not measured:** search top-k. The eval scorer can't score a preview.

## Preview links

| Page | Preview |
| --- | --- |
| Astro |
[Preview](https://docs-git-docs-quickstart-rework-web-supabase.vercel.app/docs/guides/getting-started/quickstarts/astrojs)
|
| Hono |
[Preview](https://docs-git-docs-quickstart-rework-web-supabase.vercel.app/docs/guides/getting-started/quickstarts/hono)
|
| Next.js |
[Preview](https://docs-git-docs-quickstart-rework-web-supabase.vercel.app/docs/guides/getting-started/quickstarts/nextjs)
|
| Nuxt |
[Preview](https://docs-git-docs-quickstart-rework-web-supabase.vercel.app/docs/guides/getting-started/quickstarts/nuxtjs)
|
| React |
[Preview](https://docs-git-docs-quickstart-rework-web-supabase.vercel.app/docs/guides/getting-started/quickstarts/reactjs)
|
| SolidJS |
[Preview](https://docs-git-docs-quickstart-rework-web-supabase.vercel.app/docs/guides/getting-started/quickstarts/solidjs)
|
| SvelteKit |
[Preview](https://docs-git-docs-quickstart-rework-web-supabase.vercel.app/docs/guides/getting-started/quickstarts/sveltekit)
|
| TanStack Start |
[Preview](https://docs-git-docs-quickstart-rework-web-supabase.vercel.app/docs/guides/getting-started/quickstarts/tanstack)
|
| Vue |
[Preview](https://docs-git-docs-quickstart-rework-web-supabase.vercel.app/docs/guides/getting-started/quickstarts/vue)
|

## Review category (docs PRs only)

<!--
If this PR changes docs and you're on the Supabase team, select one
category.
PRs from forks are always reviewed as Low, so you can skip this section.
-->

- [ ] Critical: needs a review as soon as possible
- [ ] Urgent: the feature ships soon, or it's blocking something else
- [ ] Moderate: good to have soon, not urgent
- [ ] Low: get to it when you can

## Review instructions

1. Open the [Astro
preview](https://docs-git-docs-quickstart-rework-web-supabase.vercel.app/docs/guides/getting-started/quickstarts/astrojs)
and click **Query data from the app** in the table of contents. The URL
ends in `#query-data`.
2. Compare the [React
preview](https://docs-git-docs-quickstart-rework-web-supabase.vercel.app/docs/guides/getting-started/quickstarts/reactjs)
with the [live
page](https://supabase.com/docs/guides/getting-started/quickstarts/reactjs).
Only headings and wording change.

## 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)
2026-12-03 14:40:59 -08:00
Miranda Limonczenko 0708fbf556 docs: add the quickstart template to the style guide (#54496)
Closes DOCS-1609

## Problem

Quickstart pages have no template in the style guide.

## Solution

- **Template:** add `templates/quickstart.md`. Its outline gives each
numbered step a fixed heading ID, such as `[#query-data]`.
- **Router:** add the quickstart row to Choose a template in
`03-page-structure.md`.
- **Old contract:** delete `quickstarts/_template.mdx`.

## Preview links

The style guide isn't served on the docs site, so these link to the
files on the branch.

| File | Preview |
| --- | --- |
| Quickstart template |
[`templates/quickstart.md`](https://github.com/supabase/supabase/blob/docs/quickstart-template/apps/docs/style-guide/templates/quickstart.md)
|
| Template router |
[`03-page-structure.md`](https://github.com/supabase/supabase/blob/docs/quickstart-template/apps/docs/style-guide/03-page-structure.md#choose-a-template)
|

## Review category (docs PRs only)

<!--
If this PR changes docs and you're on the Supabase team, select one
category.
PRs from forks are always reviewed as Low, so you can skip this section.
-->

- [ ] Critical: needs a review as soon as possible
- [ ] Urgent: the feature ships soon, or it's blocking something else
- [ ] Moderate: good to have soon, not urgent
- [ ] Low: get to it when you can

## Review instructions

1. Open the quickstart template preview and read it.
2. Compare its outline with [Use Supabase with
React](https://supabase.com/docs/guides/getting-started/quickstarts/reactjs).
The headings match, except for the IDs.

## 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)
2026-12-03 14:40:58 -08:00
supabase-vercel-tedd[bot] b0254cf15d chore(deps): bump ws to 8.23.1 (#54552)
## Problem

`pnpm audit` flags `ws` 8.22.1 for a high-severity advisory: memory
exhaustion through unbounded automatic pong responses (affects `>=8.0.0
<8.23.0`).

## Solution

Bump the transitive `ws` 8.x resolution to 8.23.1 in the lockfile. The
change comes from `scripts/fix-audit-vulnerability.ts ws`, which applied
the bump and confirmed the advisory is gone. No `package.json` or
`pnpm-workspace.yaml` changes, and no permanent overrides.

## How to verify

1. `pnpm install --frozen-lockfile` succeeds.
2. `pnpm tsx scripts/fix-audit-vulnerability.ts --json` no longer lists
`ws`.
3. `pnpm why ws --recursive` shows only patched copies (`ws@7.5.14`,
`ws@8.23.1`).

## Checks

Ran `pnpm tsx scripts/fix-audit-vulnerability.ts ws --json` (status
`fixed`, 8.22.1 → 8.23.1), then `pnpm install --frozen-lockfile`, the
audit listing above, and `pnpm why ws --recursive`. Only
`pnpm-lock.yaml` changed. No typecheck, lint, or tests ran, because no
source file changed; CI runs them on the PR.

## Checklist

- [x] I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] I have checked that the change works in the preview deployment

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[FE-5304](https://linear.app/supabase/issue/FE-5304/bump-a-single-vulnerable-dependency).
Tedd doesn't read comments on this PR.

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-12-03 21:54:57 +02:00
Alexis Aguilar dcf7ea584b chore(github): select Low as the default docs review category (#54561)
## Problem

A docs PR can be opened without a review category. Without one, the docs
team can't tell how quickly it needs a review.

## Solution

Low is now selected by default in the **Review category** section of the
PR template, so every PR has a category. Authors who need a faster
review select another category and clear Low. The template comment says
so.

This replaces a CI check that would have failed docs PRs with no
category (#54092, closed).

Part of the Docs PR Tracker
([DOCS-1689](https://linear.app/supabase/issue/DOCS-1689)).

## Review instructions

1. Open a new PR and confirm **Low** is selected in the **Review
category** section.
2. Read the comment above the categories and confirm the instructions
are clear.

## Checklist

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
2026-12-03 12:48:28 -07:00
Alexis Aguilar ccabb68033 fix(docs,examples): keep auth callback redirects within the app (#54500)
## Problem

Several auth callback and email confirmation examples redirect to the
`next` query parameter without checking it. A reader who copies one gets
an open redirect: anyone can send a sign-in link with `next` set to
another site, and the app sends the signed-in user there.

The affected examples are the SvelteKit, Astro, Remix, and Express tabs
of the PKCE flow partial, which all social sign-in pages include, and
the Next.js, Astro, Remix, and Express email confirmation handlers in
the password guide. The SvelteKit and Express tabs had a partial check,
but `//evil.com` and `/\evil.com` still got through. The SvelteKit
confirmation tabs and the Next.js reset tab in the password guide copy
`next` into the URL path. That keeps the user on the same site, but
turns a full URL into a broken path.

The example apps under `examples/` have the same problem. The Next.js
email confirmation route in `examples/auth/nextjs-full` has the same
open redirect. Two SvelteKit example apps copy `next` into the URL path,
which keeps the user on the same site but turns a full URL into a broken
path.

Resolves
[DOCS-1836](https://linear.app/supabase/issue/DOCS-1836/make-the-auth-callback-examples-redirect-only-within-the-app),
[DOCS-1840](https://linear.app/supabase/issue/DOCS-1840/make-the-auth-examples-under-examples-redirect-only-within-the-app),
and
[DOCS-1844](https://linear.app/supabase/issue/DOCS-1844/handle-full-url-and-query-string-next-values-in-the-confirmation).

## Solution

Each example now reads `next` as a URL against the request's own origin.
It keeps `next` only when the result uses `http` or `https`, has the
request's host, and its path doesn't start with `//`, then redirects to
that path. Anything else falls back to `/`.

The examples accept same-site full URLs as well as paths. The signup
email template on the password page sends `next={{ .RedirectTo }}`,
which is always a full URL, so a path-only check would send every new
user to `/`. #51567 proposed a path-only check for the same examples,
and this PR builds on it with full-URL support.

The redirect itself stays relative. An absolute URL built from the
request origin can point to an internal host when the app runs behind a
proxy. `URL.parse()` returns `null` for malformed input, so a bad `next`
value or `Host` header falls back to `/` instead of throwing.

Each check compares the host of `next` with the request's host. Behind a
proxy that terminates HTTPS, Express reports the request as `http`, so
comparing full origins would send every full-URL `next` to `/`. The
redirect carries only the path, so the scheme doesn't affect where the
user lands. Other schemes are rejected, because a URL such as
`custom://example.com/\evil.com` keeps the backslash in its path, and
browsers read `/\evil.com` as another site. The Express examples also
read `next` only when it's a string, because the Express 4 query parser
can return an object.

The Next.js tab of the PKCE partial already stays on the same site, so
it's unchanged. The SvelteKit confirmation tabs and the Next.js reset
tab in the password guide get the same check as the other tabs. On
success they redirect to the checked value. On failure, the SvelteKit
tabs redirect to a fixed error page. The Next.js reset tab now matches
the signup tab, so its redirect no longer carries `token_hash` and
`type`.

The email confirmation routes in three example apps get the same check:
`examples/auth/nextjs-full`, `examples/auth/sveltekit-full`, and
`examples/user-management/sveltekit-user-management`. The user
management example falls back to `/account`, the page its tutorial sends
users to. In the SvelteKit routes, a successful confirmation redirects
straight to the checked value, and a failed one redirects to a fixed
error page. Other query parameters on the confirmation link no longer
carry over. The Next.js example pins TypeScript 5.9.3, because
TypeScript 5.3 has no type for `URL.parse` and `next build` failed its
type check. The SvelteKit tutorial embeds the user management route, so
the tutorial shows the new code.

## Verification (`/test-the-docs`)

Each handler was extracted by script from the MDX on this branch, on
`master`, and on #51567, then mounted in a minimal app for its
framework. Each app ran against a local Supabase stack in the Compose
sandbox. Confirm handlers got a fresh `generateLink` token hash per
case. PKCE callbacks got a real code from a PKCE magic-link sign-in
through Mailpit, with the code verifier cookie.

Each route ran 12 `next` cases: none, `/welcome`, `/account?tab=1`, a
same-site full URL, `//evil.com`, `/\evil.com`, `https://evil.com/x`,
`javascript:alert(1)`, `http://`, `/<tab>/evil.com`, `/.//evil.com`, and
`/a/..//evil.com`. The same-site full URL uses the origin each server
reports for itself.

| Example | Framework | This branch | `master` |
| --- | --- | --- | --- |
| PKCE partial, SvelteKit tab | SvelteKit 2.70 + adapter-node | pass
12/12 | 2 cases off-site |
| PKCE partial, Astro tab | Astro 7.4 + @astrojs/node | pass 12/12 with
`Astro.*` patched (see below) | 5 cases off-site |
| PKCE partial, Remix tab | Remix 2.17 | pass 12/12 | 5 cases off-site |
| PKCE partial, Express tab | Express 5.3 | pass 12/12 | 2 cases
off-site |
| Password signup, Next.js tab | Next.js 16.5 | pass 12/12 | 5 cases
off-site |
| Password signup and reset, Astro tabs | Astro 7.4 | pass 12/12 each |
5 cases off-site each |
| Password signup and reset, Remix tabs | Remix 2.17 | pass 12/12 each |
5 cases off-site each |
| Password signup and reset, Express tabs | Express 5.3 | pass 12/12
each | 2 cases off-site each |

- `next build` type-checks the Next.js handler. `tsc --strict` reports
the same errors for the Remix and Astro handlers as on `master`.
- Express falls back to `/` on a malformed `Host` header without
crashing.
- #51567 also kept every route on the same site, and sent the same-site
full URL case to `/`.
- The unchanged examples stay on the same site in every case.
- After review, each of the 14 changed blocks ran in Node 22 against 32
`next` values. The cases include Express behind an HTTPS proxy, an
object `next` from the Express 4 query parser, and custom-scheme URLs
with a backslash in the path.
- The SvelteKit signup and reset tabs and the Next.js reset tab also ran
end to end in Node 22, with `redirect` and `verifyOtp` stubbed. A
same-site full URL lands on its path, `/account?tab=1` keeps its query,
and the error page URL has no `token_hash` or `type`. On `master`, the
same cases redirect to `/https://…`, to `/account%3Ftab=1`, and, in the
Next.js reset tab, to a URL that still carries `token_hash`.

### Example apps

Each example app was built and run in the Compose sandbox against a
local Supabase stack. Every case used a fresh signup token, so each
request ran a real `verifyOtp` and set a session cookie. The
`sveltekit-full` example has no build setup of its own, so its route ran
inside the user management app. Each route ran the 12 cases above, plus
the same host on the other scheme and an `ftp://` URL on the same host,
plus an invalid token to check the error redirect.

| Example | Framework | This branch | `master` |
| --- | --- | --- | --- |
| `auth/nextjs-full` | Next.js 16.5 | pass 14/14, error path passes | 5
cases off-site |
| `user-management/sveltekit-user-management` | SvelteKit 2.70 | pass
14/14, error path passes | on-site, but 9 of 12 cases land on a broken
path |
| `auth/sveltekit-full` | SvelteKit 2.70 | pass 14/14, error path passes
| on-site, but 9 of 12 cases land on a broken path |

- `next build` passes. With TypeScript 5.3.3, it fails with `Property
'parse' does not exist`.
- `svelte-check` reports the same 7 errors on this branch and on
`master`, all in the database types and the account form. None are in
the confirm route.
- Behind a proxy without forwarded-host handling, `next start` sees
`localhost:3000`, so a full-URL `next` falls back to the default page
there.

### Found while testing, not changed here

These problems are on `master` too, and they're outside the scope of
this fix:

- PKCE partial, Astro tab: `Astro.request` and `Astro.cookies` don't
exist in an API route, so the callback returns a 500 error. Tracked in
[DOCS-1841](https://linear.app/supabase/issue/DOCS-1841/make-the-astro-oauth-callback-example-run-in-an-api-route).
- Password guide, Remix confirm tabs: `setAll(key, value, options)`
doesn't match the `@supabase/ssr` signature, so no session cookie is set
after confirming. Tracked in
[DOCS-1842](https://linear.app/supabase/issue/DOCS-1842/make-the-remix-email-confirmation-examples-set-the-session-cookie).
- Password guide, Express confirm tabs: no `return` after the success
redirect, so the error redirect also runs. Express 5 logs
`ERR_HTTP_HEADERS_SENT`, and Express 4 exits the process. Tracked in
[DOCS-1843](https://linear.app/supabase/issue/DOCS-1843/stop-the-express-email-confirmation-examples-from-redirecting-twice).
- PKCE partial, Express tab: the callback ignores the result of
`exchangeCodeForSession`, so a missing code or a failed exchange still
redirects to `next`. Tracked in
[DOCS-1845](https://linear.app/supabase/issue/DOCS-1845/send-failed-code-exchanges-to-the-error-page-in-the-express-oauth).
- PKCE partial and password guide, Astro tabs: `setAll` drops the cache
headers that `@supabase/ssr` passes with the session cookies. Tracked in
[DOCS-1846](https://linear.app/supabase/issue/DOCS-1846/apply-the-cache-headers-from-supabasessr-in-the-astro-auth-callback).
- Email templates guide, server-side endpoint example: it redirects to
`redirect_to` without checking it. Tracked in
[DOCS-1847](https://linear.app/supabase/issue/DOCS-1847/check-redirect-to-before-redirecting-in-the-server-side-email-template).
- Next.js examples in the PKCE partial, the password guide, and the
WorkOS and Google sign-in guides: they import the Supabase clients from
`@/utils/supabase/`, but the client guide now creates them in
`lib/supabase/`. Tracked in
[DOCS-1848](https://linear.app/supabase/issue/DOCS-1848/import-the-nextjs-supabase-clients-from-libsupabase-in-the-auth).

## Review category (docs PRs only)

- [ ] Critical: needs a review as soon as possible
- [ ] Urgent: the feature ships soon, or it's blocking something else
- [ ] Moderate: good to have soon, not urgent
- [x] Low: get to it when you can

## Review instructions

1. Check that each changed example only touches the `next` handling and
its redirect.
2. Check the changed tabs on the preview:
- [GitHub sign-in page on the
preview](https://docs-git-alexisa-docs-1836-supabase.vercel.app/docs/guides/auth/social-sign-in/auth-github):
the callback code for the SvelteKit, Astro, Remix, and Express tabs.
Every social sign-in page includes this partial.
- [Password guide on the
preview](https://docs-git-alexisa-docs-1836-supabase.vercel.app/docs/guides/auth/passwords):
under PKCE flow, every framework tab for signup confirmation and
password reset.
- [SvelteKit tutorial on the
preview](https://docs-git-alexisa-docs-1836-supabase.vercel.app/docs/guides/getting-started/tutorials/with-sveltekit#confirmation-endpoint):
the confirmation endpoint embeds the user management example's route.
3. Check the three confirm routes under `examples/` and the `typescript`
pin in `examples/auth/nextjs-full/package.json`.

## 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).
Not used: only code inside existing snippets and example apps changed,
no prose. The snippets were verified with `/test-the-docs`.
2026-12-03 12:16:02 -07:00
Joey Coleman 97736acdad chore(docs): Add Joey Coleman to humans.txt (#54560)
## Problem

I (Joey) am not yet in the humans.txt file.

## Solution

Edited humans.txt to add myself.

## Review category (docs PRs only)

- [ ] Critical: needs a review as soon as possible
- [ ] Urgent: the feature ships soon, or it's blocking something else
- [ ] Moderate: good to have soon, not urgent
- [X] Low: get to it when you can

## Review instructions

Check lexical ordering

## 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)~
2026-12-03 13:28:47 -05:00
Snehil ShahandLeandro Pereira 4697c4d836 docs(realtime): document acked broadcast error codes (#51287)
Updates the docs following the changes in
https://github.com/supabase/realtime/pull/2280 as part of
https://github.com/supabase/realtime/releases/tag/v2.140.9:

- Corrects the note on RLS denials not being communicated. It is now
returned as an error code (when `ack` is true).
- Adds a table of the error codes returned to acknowledged broadcasts.

Ref: https://github.com/supabase/realtime/issues/2273

<!--
## 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)

---------

Signed-off-by: Snehil Shah <snehilshah.989@gmail.com>
Co-authored-by: Leandro Pereira <leandro@leandro.io>
2026-12-03 18:18:47 +00:00
Francesco Sansalvadore 1550b09037 chore(studio): object versioning additions (#54432)
- Improve warning when public bucket and versions are being enabled on
storage bucket
enabling public bucket:
<img width="712" height="553" alt="Screenshot 2026-12-01 at 18 56 50"
src="https://github.com/user-attachments/assets/327f9e77-11dd-41b6-83b5-c3941aaf3d39"
/>

warning with non-public bucket:
<img width="651" height="456" alt="Screenshot 2026-12-01 at 18 56 42"
src="https://github.com/user-attachments/assets/0078abd7-7246-43c0-afca-2352329369ae"
/>

- Add "Get url" action for an object version
<img width="470" height="311" alt="Screenshot 2026-12-01 at 18 54 42"
src="https://github.com/user-attachments/assets/b3b2f92d-f341-4bda-93b8-473e59bf8ae6"
/>

- Add copy button to versionId

<img width="437" height="275" alt="Screenshot 2026-12-01 at 18 53 33"
src="https://github.com/user-attachments/assets/50a068a1-616b-42a2-bd23-7270bbef649e"
/>

- Add gh discussion link for feedback
2026-12-03 17:53:48 +01:00
Drew McLellan 923bbc16fd feat(studio): sample perf-relevant routes at a higher Sentry trace rate (#54205)
## Problem

Studio traces run at a flat `tracesSampleRate` of 0.02. That's too few
samples to trust per-surface perf numbers for the dashboard performance
work, and raising the global rate would increase Sentry quota use
everywhere.

Part of
[FE-3828](https://linear.app/supabase/issue/FE-3828/raise-sentry-sample-rate-for-perf-work-stand-up-a-studio-owned-perf).

## Solution

Replace the flat rate with a `tracesSampler`
(`lib/sentry-traces-sampler.ts`):

- Project home, editor, SQL, auth and database routes are sampled at 0.2
(10x).
- Everything else stays at 0.02.
- Both rates are named constants.
- The route pattern matches the TanStack route ID
(`/project/$ref/editor`) and the resolved path, with or without the
`/dashboard` base path. A pageload's transaction name is the raw path
when it is sampled.
- A sampling decision made upstream (for example a propagated
`sentry-trace` header) is honored on navigations.
- **Each pageload starts a new trace.** Studio serves one prerendered
`_shell.html` to every visitor, and it carries `sentry-trace` and
`baggage` meta tags frozen at build time. The pageload span continues
the trace from them, so every full load shared one trace ID and one
frozen `sample_rand`. A build whose frozen value was above the route
rate could never sample a pageload, whatever the sampler returned.
`initSentryTanStackClient` now removes those two tags before
`Sentry.init`, so each pageload gets its own trace and is sampled at the
route rate.

This is temporary while the baseline is collected. To revert, delete
`sentry-traces-sampler.ts` and restore `tracesSampleRate: 0.02` in
`buildSentryClientOptions`. To only dial the boost down, lower
`PERF_ROUTE_TRACES_SAMPLE_RATE`. The steps are also in a comment at the
top of the sampler file.

The server-side rate is unchanged.

Not in this PR: the Sentry Performance view (initial load, per-surface
navigation, request timings), which is built in the Sentry UI and
tracked on the ticket.

## Review instructions

1. Read `apps/studio/lib/sentry-traces-sampler.ts` and check the route
list, rates and pageload handling.
2. Run `pnpm --filter studio exec vitest run
lib/sentry-traces-sampler.test.ts lib/sentry-client-options.test.ts
sentry.tanstack.test.ts`.
3. On a preview, check in the Sentry transaction envelopes that a
navigation to the editor, SQL, auth or database routes records
`sample_rate` 0.2, and storage records 0.02. Do a full page load of the
project home or table editor and confirm pageload transactions are now
recorded for it, with a different trace ID per load.
2026-12-03 16:35:44 +00:00
Ganiya 874fbcae03 Fix grammatical errors in error codes documentation (#54534)
## Problem

While reviewing the Auth error codes documentation for troubleshooting,
I noticed several minor grammar and readability inconsistencies
throughout the guide.

For example, in the HTTP status codes section, the 500 error uses
"Indicate" instead of "Indicates" (breaking the verb tense pattern of
the other bullets). Additionally, some sentences in the guide were
slightly run-on or lacked proper commas, making them harder to read.
There is no specific GitHub issue for this; it is a general
documentation cleanup.

## Solution

I corrected grammatical errors and improved sentence flow for better
readability across the Auth error codes page.

Key changes include:
- Adding missing commas for readability (e.g., "Client errors differ by
language, so do refer...")
- Fixing verb tenses to match list formats (e.g., "Indicates that the
Auth server...")
- No technical content, code snippets, or error code definitions were
changed.

## Review category (docs PRs only)

- [x] Low: get to it when you can

## Review instructions

1. Open the changed file
`apps/docs/content/guides/auth/debugging/error-codes.mdx` and review the
diff.
2. Confirm that the grammatical changes do not alter the technical
meaning of the Auth error codes.
3. Ensure the `<$Show>` conditional tags remain intact and untouched.

## Checklist

- [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)
2026-12-03 14:43:42 +00:00
kemal.earth 1ef66de793 feat(studio): add trace span route query (#54391)
## Problem

The Unified Logs trace tab needs the spans for a request's trace.
Nothing in Studio fetches them yet.

Part 2 of 3. Data layer only — the tab that consumes this lands in part
3.

## Solution

Adds `unifiedLogTraceSpansQueryOptions`, fetching `GET
/v2/projects/{ref}/analytics/traces/{trace_id}`, plus the `traceSpans`
query key.

Two choices worth flagging:

**Fetched and parsed directly, not through the typed client.** The route
is live in the v2 OpenAPI spec, but it isn't in the committed
`api-types` — and `get()` is typed off the generated `paths`, so it
can't address a route that isn't there. Getting it there means
regenerating `api-types`, which currently drags in a large amount of
unrelated production drift and breaks Studio's typecheck in three
places. That's worth doing on its own, not as a side effect of this. So
the query goes through `fetchHandler` and parses the response with zod,
following the `platform-apps/platform-app-query.ts` precedent.

The parse likely stays even after a regen: the spec declares no
`additionalProperties` on a span's `attributes`, so the generated type
would describe only the seven known keys and none of the OTel attributes
the trace view actually reads (`http.route`, `url.full`, `db.*`, and
whatever else a service reports). `.passthrough()` keeps them. It also
means the parse is load-bearing — it's the only thing validating the
response shape at runtime, so a backend change surfaces as an error at
the boundary rather than a build failure.

**A temporary knip entry.** Nothing imports the query until part 3, so
knip reports it as an unused file and fails the build. Per
`apps/studio/AGENTS.md`, it's listed in `knip.jsonc` with a `used from
#NNN` comment; part 3 deletes that entry when it adds the importer.

## Review instructions

1. Check the zod schema against the live spec — it should match field
for field:
   ```bash
   curl -s https://api.supabase.com/api/v2-json \
     | jq '.components.schemas.ListSpansResponse_Output'
   ```
2. Confirm the knip entry in `knip.jsonc` is marked temporary and points
at part 3.
3. Run `pnpm knip --workspace apps/studio` and confirm it passes.

## 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)
2026-12-03 14:38:33 +00:00
Drew McLellan 6019742b8c chore(studio): remove local-only header events (#54535)
## Problem

Part of FE-5266 (remove or sample noisy Studio events).
`header_local_dropdown_opened` and `header_local_version_popover_opened`
only render in local Studio, which never sends telemetry, so they can
never fire. Their owner signed off on removing them.

## Solution

- Remove the `track()` calls from `LocalDropdown` and
`LocalVersionPopover`, along with the `useTrack` imports and the empty
`onOpenChange` wrappers they left behind.
- Remove the two event types and their `TelemetryEvent` union entries.

There is no runtime change. This is a standalone PR so it can be
reverted on its own. The catalog deletion sits next to the one in
#54533, so whichever merges second may need a trivial rebase.
2026-12-03 14:37:55 +00:00
Drew McLellan 663f077b47 chore(studio): remove header dropdown opened events (#54533)
## Problem

Part of FE-5266 (remove or sample noisy Studio events). The
`header_{organization,project,branch,user}_dropdown_opened` events are
among the highest-volume events and don't answer a product question: the
next pageview already shows what was selected. Their owner signed off on
removing them.

## Solution

- Remove the `track()` calls from the organization, project, branch and
user dropdowns. Each now passes its state setter straight to
`onOpenChange`.
- Drop the `useTrack` import from `BranchDropdown` and
`ProjectDropdown`, which no longer track anything.
- Remove the four event types and their `TelemetryEvent` union entries.

`header_feedback_dropdown_opened` is kept. `upgrade_cta_clicked` in the
user and organization dropdowns is untouched. This is a standalone PR so
it can be reverted on its own.
2026-12-03 14:18:55 +00:00
Drew McLellan 0bbbdf5c91 chore(common): remove unused integration install/uninstall completed events (#54532)
## Problem

Part of FE-5266 (remove or sample noisy Studio events).
`integration_install_completed` and `integration_uninstall_completed`
are defined in the telemetry catalog, but nothing in the repo fires
them. Their owner signed off on removing them.

## Solution

Remove both event types and their `TelemetryEvent` union entries from
`telemetry-constants.ts`. There are no call sites, so there is no
runtime change. The related `integration_install_submitted` and failure
events are untouched.
2026-12-03 14:18:31 +00:00
Drew McLellan 0a3a53298b chore(studio): remove home_connect_section_exposed event (#54531)
## Problem

Part of FE-5266 (remove or sample noisy Studio events).
`home_connect_section_exposed` fires on every project home load and is
no longer needed. Its owner signed off on removing it.

## Solution

- Remove the exposure effect from `ConnectSection` and the imports it
left unused.
- Remove the `HomeConnectSectionExposedEvent` type and its
`TelemetryEvent` union entry.

`home_connect_action_clicked` is untouched. This is a standalone PR so
it can be reverted on its own.
2026-12-03 14:18:02 +00:00
Jordi Enric 833a875ea2 fix(studio): friendly database metric errors DEBUG-155 (#52216)
## Problem

The Database section of Observability displays raw infrastructure API
errors in metric cards, making failures confusing and repetitive.

## Fix

Show one friendly alert with refresh, support, and service-status
guidance when the infrastructure request fails. Keep Slow Queries
visible, and show “Unable to load” only on affected cards for partial
failures while preserving healthy metrics.

The Overview Refresh button now invalidates the active project’s
connection-limit query. Previously it used a cache key that matched no
active query, so Peak Connections could stay on “Unable to load” while
the other cards refreshed.

Consolidates and supersedes #47491 and #47495, adapted to the current
batched metrics implementation.

## How to test

- Open Observability and verify that successful database metrics still
render.
- Simulate a failed infrastructure request. Expect one friendly alert,
no raw backend message, and Slow Queries still visible.
- Simulate an individual metric or connection-limit failure. Expect only
the affected card to show “Unable to load”.

- With the connection-limit request failing, click **Refresh** and
confirm that Peak Connections shows “Unable to load”. Restore the
response and click **Refresh** again. The card should show the peak and
limit without a browser reload.

## QA results

- **Hosted Refresh recovery passed on `ee646999af`.** After the
connection-limit request recovered, one click sent a new request and
replaced “Unable to load” with `6/90`. The other five hosted cases
passed on `dbf78487f5`. [Automated QA
review](https://github.com/supabase/supabase/pull/52216#pullrequestreview-6169329677)
- **Local Chromium recovery passed on the same commit.** With a
simulated HTTP 500 followed by success, Refresh retried the query and
displayed `12/100`. CPU, Memory, and Disk remained healthy.
- All 52 focused tests passed with retries disabled and shuffled order.
The recovery test failed with the original Refresh handler. Studio
typecheck passed. GitHub reported 38 successful checks and six skipped
checks.

Fixes
https://linear.app/supabase/issue/DEBUG-155/frontend-should-render-nice-error-message-on-infra-monitoring-api

## QA screenshots

### Peak Connections before and after the Refresh fix

**Before · `dbf78487f5`.** Peak Connections still showed “Unable to
load” after two Refresh clicks, even as the other metrics reloaded.

![Peak Connections stuck on Unable to load after
Refresh](https://k6dwnfm8zepsmdni.public.blob.vercel-storage.com/qa/wrun_41M8XTANCW0GQ8139AY6ECPK81/1796297469653-screenshot-1796297456016.png)

**After · `ee646999af`.** Once the connection-limit request could
succeed, the next Refresh click restored Peak Connections to `6/90`.

![Peak Connections showing 6/90 after in-app
Refresh](https://k6dwnfm8zepsmdni.public.blob.vercel-storage.com/qa/wrun_41M8XTANCW0GQ8139AY6ECPK81/1796299167534-screenshot-1796299160944.png)

### Local browser with HTTP overrides

Actual PR component at `dbf78487f5`, rendered in a local fixture harness
at a 1440 × 900 viewport. Playwright intercepted the infrastructure API
request; these are local simulated error states, not hosted-preview
captures.

**Full request failure:** one friendly alert; raw backend details are
hidden and Slow Queries remains visible.

![Full request failure — local HTTP
override](https://github.com/user-attachments/assets/f9b85b1d-f836-47ce-ad48-bab13e558079)

**Partial failure:** only Disk IO Budget shows “Unable to load”; healthy
metrics and Slow Queries remain visible.

![Partial metric failure — local HTTP
override](https://github.com/user-attachments/assets/f7dbc088-d505-4f20-8a55-45d832b828a8)

**Recovery:** after restoring a successful response and reloading, all
metric cards render normally.

![Healthy recovery — local HTTP
override](https://github.com/user-attachments/assets/34d3332e-717b-47ff-ba56-e00128fa474c)

### Verified hosted preview

Studio staging deployment for `dbf78487f5`, 1440 × 900. All database
metric cards and Slow Queries return after Refresh.

![Overview after
Refresh](https://github.com/user-attachments/assets/67304cac-3dfd-4afe-b717-0a1fa12a30ba)

The CPU card opens the Database report and preserves Last 24 hours.

![Database report opened from a metric
card](https://github.com/user-attachments/assets/c70eb7c8-4151-4080-ba6c-69efb675d7ab)
2026-12-03 14:03:33 +01:00
supabase-vercel-tedd[bot] 2922cc2190 feat(studio): track inline cell edits in the Table Editor grid (#54477) 2026-12-03 18:35:00 +08:00
Alaister Young 2eb00165c3 chore(studio): improve AGENTS.md and skills from PR review data (#54467) 2026-12-03 18:30:27 +08:00
supabase-vercel-tedd[bot] 5a506a54dd chore(deps): bump react-router to 7.18.7 (#54420)
## Problem

`pnpm audit` reports a high-severity advisory for `react-router` 7.18.2,
which `lite-studio` and the UI library install.

## Solution

Bump the installed `react-router` to 7.18.7, the patched release, with
`scripts/fix-audit-vulnerability.ts`. Only `pnpm-lock.yaml` changes: no
`package.json` edit and no permanent override in `pnpm-workspace.yaml`.
Every workspace that uses `react-router` now resolves the single patched
copy.

## How to verify

1. Run `pnpm install --frozen-lockfile`. It succeeds with the lockfile
as committed.
2. Run `pnpm why react-router --recursive`. Every copy is 7.18.7.
3. Run `pnpm audit`. It no longer lists `react-router`.
4. Run `pnpm turbo run typecheck --filter=lite-studio --filter=library`.
It passes.

## Checks

Ran `scripts/fix-audit-vulnerability.ts react-router --json` (status
`fixed`, 7.18.2 → 7.18.7), `pnpm install --frozen-lockfile`, `pnpm why
react-router --recursive`, `pnpm audit`, and `pnpm turbo run typecheck
--filter=lite-studio --filter=library` (10 of 10 tasks passed). No
source files changed, so no lint or format check applies.

## Checklist

- [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)

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[FE-5260](https://linear.app/supabase/issue/FE-5260/bump-a-single-vulnerable-dependency).
Tedd doesn't read comments on this PR.

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-12-03 09:52:19 +00:00
supabase-vercel-tedd[bot] e1be0f2646 chore(deps): bump cross-spawn to 7.1.2 (#54481)
## Problem

`pnpm audit` reports a critical advisory for `cross-spawn` (command
injection on Windows when spawning batch files). Versions `>=7.0.0
<7.1.0` are affected, and the lockfile resolved 7.0.6.

## Solution

Bumps the transitive `cross-spawn` 7.x resolution from 7.0.6 to 7.1.2
with `scripts/fix-audit-vulnerability.ts`. The script resolved the fix
without a permanent override, so only `pnpm-lock.yaml` changes. The 6.x
copy already resolves to 6.0.10, which is patched (`>=6.0.7`).

## How to verify

1. Run `pnpm install --frozen-lockfile`. It succeeds.
2. Run `pnpm audit`. It reports no `cross-spawn` advisory.
3. Run `pnpm why cross-spawn --recursive`. Only `cross-spawn@6.0.10` and
`cross-spawn@7.1.2` are installed.

## Checks

Ran `pnpm tsx scripts/fix-audit-vulnerability.ts cross-spawn --json`
(status `fixed`), `pnpm audit`, `pnpm why cross-spawn --recursive`, and
`pnpm install --frozen-lockfile`. No source files changed, so no
typecheck, lint, or unit tests apply.

## Checklist

- [x] I have read the [Contributing
Guidelines](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] I have checked that the change works in the preview deployment

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[FE-5295](https://linear.app/supabase/issue/FE-5295/bump-a-single-vulnerable-dependency).
Tedd doesn't read comments on this PR.

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-12-03 11:40:00 +02:00
Franco Victorio 3b41d9f421 Add Franco Victorio to humans.txt (#54479)
## Problem

I'm not on the list.

## Solution

I added myself to the list.

## Review category (docs PRs only)

- [ ] Critical: needs a review as soon as possible
- [ ] Urgent: the feature ships soon, or it's blocking something else
- [ ] Moderate: good to have soon, not urgent
- [x] Low: get to it when you can

## Review instructions

Check that the position is correct, I guess?

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
2026-12-03 10:38:14 +01:00
Danny White 9052601faf fix(studio): validate direct database access permissions (#54506)
## Problem

Direct database access requires Database management read access, but
OAuth app settings currently allow saving an invalid combination. The
consent screen’s readiness checks then fail.

## Solution

Show an inline error when direct database access lacks Database
management read access, and prevent saving through the button, keyboard
shortcut, or form submission. Both controls stay editable, and neither
changes the other automatically.

| After |
| --- |
| <img width="1280" height="1103" alt="OAuth Apps Organization Settings
Office Supabase (1)"
src="https://github.com/user-attachments/assets/6cfd203b-d320-46da-b7b5-9ede2e9d814c"
/> |
| _Immediate inline error, cleared as soon as it’s corrected._ |
| <img width="1280" height="1103" alt="OAuth Apps Organization Settings
Office Supabase"
src="https://github.com/user-attachments/assets/f2637d92-c149-4d1a-9d83-130e0f54ce66"
/> |
| _Follow-up footer pattern if that error (or any inline error) is
ignored._ |

## Review instructions

1. Open the [staging
preview](https://studio-staging-git-dnywh-trusted-partner-permis-56807c-supabase.vercel.app/dashboard)
→ Organization → OAuth Apps. Edit an organisation-bound app, or select
**Publish OAuth app**. If your organisation is not a Trusted Partner,
use the DevTools steps below first.
2. Select Direct database access, then set Database management to No
access or Write. Check that the inline error explains that “Database
management” requires at least read access and Confirm stays enabled.
Click Confirm: saving should be blocked and “Fix the errors above to
continue.” should appear in red above the footer actions.
3. Select Database management Read only or Read and write. Check that
the inline and footer errors clear. Confirm should remain enabled.
4. Repeat in the opposite order, or remove Direct database access.
Neither control should change automatically.


<details>
<summary>Review without a Trusted Partner organisation (Chrome
DevTools)</summary>

1. In the Studio dev toolbar’s **Flags** tab, enable
`enableScopedOAuthPublish` if needed.
2. Open Chrome DevTools → **Network**, then open **Publish OAuth app**
or edit an existing app.
3. Select the **GET** request whose URL ends in
`/platform/organizations/YOUR_ORG_SLUG`, without `/oauth/apps` after it.
Its response contains your organisation’s name and slug.
4. Right-click the request → **Override content**. Choose a local folder
and click **Allow**. Add `"is_trusted_partner": true` to the top-level
JSON object, or change the existing value to `true`. Keep every other
field and save with **Cmd/Ctrl+S**.
5. Reload with DevTools open and reopen the app form. For a new app,
choose **An owner, once for the whole organization** under
**Authorization**. Fill in the required name, website and callback URL
so other validation does not interfere.
6. Under **Application permissions**, select **Direct database access →
Read only** while **Database management** has **No access**. Check that
the inline error appears and **Confirm** stays enabled. Click
**Confirm** and check that saving is blocked, with “Fix the errors above
to continue.” in red above the footer actions.
7. Set **Database management → Read only** or **Read and write**. Check
that the inline and footer errors clear, while **Confirm** remains
enabled. Change it to **Write** and check that the error returns.
Neither permission should change automatically.
8. Set **Direct database access → No access**. Check that the inline and
footer errors clear. Cancel the form without saving.
9. Turn off **Sources → Overrides → Enable Local Overrides** and reload
when finished.

The override only changes the response in your browser. It does not
grant backend Trusted Partner eligibility, so use it to review the UI
validation. Saving an app with direct database access requires a
genuinely eligible organisation.

</details>
2026-12-03 13:39:50 +07:00
Danny White 0b9e4f6ab1 fix(studio): clarify token access settings and SSL prerequisites (#54507)
## Problem

- Token access confirmations use stilted copy. 
- The SSL prerequisite notice sits outside the Token access card,
repeats “enabled”, and includes an unnecessary project reference.
- SSL configuration also shows enforcement as off when the latest update
failed, and its dependency tooltip needs clearer guidance.

## Solution

- Rewrite the token access and SSL confirmations, keeping the connection
warnings.
- Group prerequisite notices inside the Token access card with one
divider, remove the project reference, and simplify their descriptions.
- Keep the SSL switch tied to the fetched configuration independently of
update success.
- Explain the token access dependency in the disabled switch’s tooltip:
“Database token access requires SSL enforcement.” Leave the existing SSL
failure warning unchanged apart from its final full stop.

| Before | After |
| --- | --- |
| <img width="727" height="501" alt="CleanShot 2026-12-03 at 11 21 35"
src="https://github.com/user-attachments/assets/9fd18a91-528a-47dd-82e8-7349e26a8daa"
/> | <img width="736" height="506" alt="CleanShot 2026-12-03 at 12 05
57"
src="https://github.com/user-attachments/assets/8263303a-49d8-4910-9c88-e2fe5ecc1c34"
/> |
| <img width="362" height="236" alt="CleanShot 2026-12-03 at 11 21 54"
src="https://github.com/user-attachments/assets/026852d4-9c1b-4a9d-9833-02e047794199"
/> | <img width="421" height="229" alt="CleanShot 2026-12-03 at 12 06
24"
src="https://github.com/user-attachments/assets/9a53c459-c7ca-4c18-8567-499d67a9c068"
/> |
| <img width="420" height="206" alt="CleanShot 2026-12-03 at 11 22 36"
src="https://github.com/user-attachments/assets/4d2f8711-fd75-4730-832f-ac9e2e3d85ad"
/> | <img width="420" height="207" alt="CleanShot 2026-12-03 at 11 52
51"
src="https://github.com/user-attachments/assets/2fce238e-c8d7-4087-8402-05c2122f92f0"
/> |
| <img width="420" height="208" alt="CleanShot 2026-12-03 at 11 32 11"
src="https://github.com/user-attachments/assets/f081e782-0a6c-499a-947d-0da149311218"
/> | <img width="417" height="219" alt="CleanShot 2026-12-03 at 11 52
05"
src="https://github.com/user-attachments/assets/6b6cfcf5-2c54-4f38-9b16-bcc0cdd500a0"
/> |
| <img width="809" height="255" alt="CleanShot 2026-12-03 at 12 28 47"
src="https://github.com/user-attachments/assets/19cffa41-691f-4f60-96b5-7ba1ebcfb78e"
/> | <img width="804" height="246" alt="CleanShot 2026-12-03 at 12 44
39"
src="https://github.com/user-attachments/assets/2c3f2b74-21a8-41e7-b25e-ea2293350fcc"
/> |


## Review instructions

1. Open Project → Database → Settings in the preview for a project that
requires SSL enforcement before token access.
2. Check that SSL enforcement required sits inside Token access,
separated by one divider, with no project reference in its description.
3. Select Enable SSL enforcement and review the confirmation copy.
Cancel without applying the change.
4. On a project where token access is available, toggle it on and off to
review both confirmations. Cancel each dialog.
5. With token access on, check that SSL enforcement stays on and locked,
with a tooltip explaining that database token access requires SSL
enforcement. Check that the tooltip also opens on keyboard focus.
6. If the API reports an unsuccessful SSL update, check that the switch
still reflects `currentConfig.database` and the existing warning remains
visible.
2026-12-03 11:46:10 +07:00
barcofourie 7e56800992 fix(assistant): update support assistant messaging for clarity and consistency (#54112)
## Problem

The AI Assistant follow-up on support requests (behind the
`supportAssistantFollowUp` flag) told users with service restrictions to
ask Support for an exception. In almost every restriction ticket we
reviewed during the production test, the Assistant suggested this, and
Support then declined.

## Solution

Rather than a rule for each ticket type, this adds one general rule to
the server-side support-mode context and removes the "a human will
reply" framing.

`escalate_to_human` is unchanged, so users who ask for a person can
still be escalated.

## Review instructions

Read the diff to `assistant-context.ts` and `SupportAssistant.utils.ts`,
and check that the rule is general and doesn't name a particular ticket
type.


## 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)
2026-12-03 06:23:54 +02:00
Danny White 52614926a3 feat(studio): promote Launch Week 16 in the Banner Stack (#54512)
## Problem

Launch Week 16 is promoted on www but needs the same promotion in hosted
Studio.

## Solution

Add a low-priority card to the existing bottom-right Banner Stack across
project, organisation, and account pages. It uses the shared dot artwork
from #54511, links to the Launch Week site, saves dismissal, and expires
after December 11 in San Francisco. Signed-out and self-hosted Studio do
not show it.

| After |
| --- |
| <img width="995" height="584" alt="1211"
src="https://github.com/user-attachments/assets/ff1a60a3-6a4e-4b32-a3df-7fdfe74f4afb"
/> |
| <img width="995" height="584" alt="68318"
src="https://github.com/user-attachments/assets/3a41c56a-fe59-4800-ae14-82ec42c6f260"
/> |

## Review instructions

1. Open a hosted project, organisation, or account page on the Studio
preview. If another notice is in front, expand the Banner Stack to find
**Launch Week 16**.
2. Check the artwork, copy, and **Claim your ticket** button in light
and dark mode. The button opens the Launch Week site in a new tab and
dismisses the card.
3. Close the card and reload. It should stay dismissed.
2026-12-03 10:56:14 +07:00
Wen Bo XieandDanny White 28c2c2dd53 feat(www): add Launch Week 16 banner (#54511)
Add a dismissible bar above the www nav that promotes Launch Week 16
(December 7-11) and links to /launch-week. Hide the bar on /launch-week
pages. Hide it on /state-of-startups too because the fixed nav on that
page would cover it.

## Banner polish

Adds shared animated dot artwork, a link CTA, and responsive spacing and
alignment. Reduced-motion preferences keep the dots static. Studio uses
this artwork in the dependent #54512.

| After |
| --- |
| <img width="500" height="584" alt="31035"
src="https://github.com/user-attachments/assets/7ebad641-158e-47ea-a8be-3097ecc5c0ae"
/> |
| <img width="500" height="584" alt="18287"
src="https://github.com/user-attachments/assets/02c87481-1dbe-4576-afc0-bdc9f22fc893"
/> |
| <img width="995" height="584" alt="89244"
src="https://github.com/user-attachments/assets/aad4b608-71f1-484f-bbf4-54c725800f52"
/> |
| <img width="995" height="584" alt="99848"
src="https://github.com/user-attachments/assets/a8b50942-1ecd-4c63-91b3-a6b4847d8830"
/> |

## Review instructions

1. Open the www homepage on the preview in light and dark mode. Check
the centred desktop message, link hover, and close button.
2. At a phone width, check the left-aligned copy and artwork on the
right. Open the mobile menu and close it; the banner should return.
3. Dismiss the banner and reload. It should stay dismissed.

Validation: scoped ESLint, formatting, and ui-patterns typecheck pass.

---------

Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
2026-12-03 10:48:20 +07:00
Alexis Aguilar cf63aa5459 ci(docs): trace docs workflow failures to the commits that introduced them (#54444)
## Problem

Since #54339, the docs alert in `docs-master-alert.yml` names only the
workflow, the run type, and the run link. That stopped it from blaming
whoever merged last, but nothing says which change broke things. A
failure needs to trace back to the commit that introduced it, for push,
scheduled, and manual runs alike. Nobody needs to be pinged.

## Solution

Each docs workflow that runs on `master` keeps a list of open failures.
The alert posts to Slack only when a failure is added or fixed. Each new
failure names the commit that introduced it, or lists the possible
commits as unconfirmed. It never names the latest commit by default.

- **What counts as a failure.**
- Accessibility scan: a page and axe rule pair, from a new Playwright
reporter (`e2e/docs/utils/a11y-failures-reporter.ts`). A guide that
returns a status of 400 or higher fails as `<page>: http-<status>`.
- Production smoke tests: one Vitest test, keyed as `<file> › <test>`,
from Vitest's JSON reporter. A run where no test passed and some timed
out counts as one failure, `every test timed out`.
  - Every other workflow: a failed job or step, from the Actions API.
- Both test workflows upload their results as a
`docs-failures-<attempt>` artifact for the alert to read, so a re-run
never picks up an earlier attempt's results.
- A Vitest file that fails to load, such as an import error, counts as
one failure for that file, and its tests keep their earlier results.
- **Which commit.**
- Accessibility scan: the commits deployed to production since the last
run, narrowed to the ones that touched the failing page's MDX file or a
partial it includes.
  - Smoke tests: the deployed commits, not narrowed further.
- Push runs: the run's own commit, plus the commits of every earlier run
since the baseline whose alert didn't run, such as one that was
cancelled or dropped. A run among them that passed still counts, since
it may have skipped the failing step.
- Other scheduled or manual runs: the commits since the last run without
that failure.
- One commit left is named. Several, or none on the failing page, are
listed as unconfirmed.
- **Deployed commits.** One GraphQL query reads the `Vercel – docs`
status on recent `master` commits. A commit counts as deployed once its
build finished before the run ended, so the range includes a commit that
deploys partway through a scan. Builds Vercel skipped as not affected
count too, because they leave the docs unchanged. The `Production –
docs` GitHub deployments stopped updating, so they can't be used. No new
secrets.
- **Flaky results.** A page or smoke test that times out keeps its
earlier result, so it doesn't count as a new failure or a fix. The same
goes for a page whose scan is missing, empty, or skipped, for a skipped
smoke test, and for a job or step that neither passed nor failed, such
as one skipped after a failed step, cancelled, or with no conclusion. A
job that timed out counts as failed. A step keeps its result when its
whole job was skipped or failed without listing its steps, or when a
passing run's condition skipped it. A guide that returns an error status
keeps its earlier axe failures until a scan runs, and a new status
replaces the earlier one. A step skipped in one run and then under a
skipped job in the next keeps the baseline from the run that last ran
it. When one of these later fails, its range starts at the last run that
actually checked it. If no run has checked it since tracking started,
the alert names no commit.
- **Saving the list.** The list is saved as a run artifact for each
workflow, kept for 90 days. The next alert downloads it. A failure
that's still open keeps the commit from when it first failed. The alert
only accepts a saved list from a `master` run in this repo, and ignores
one without the expected shape and version.
- **Pure logic and orchestration.** `e2e/docs/utils/open-failures.ts`
holds the logic and the Slack message, with unit tests.
`e2e/docs/scripts/docs-alert.ts` handles the API calls and posting.
`pageSourceFiles` in `resolve-docs-scope.ts` lists a guide's MDX file
and every partial it includes. `failure-sequences.test.ts` runs every
sequence of four runs, for a job's steps, a smoke test file's tests, and
a guide's status and scan, plus sequences that start with no saved list.
It checks the open list and each new failure's baseline against a model
of what each run observed. The axe rules and result checks the reporter
needs moved to `utils/axe-rules.ts`, so the unit tests still run before
CI installs packages.

### Behavior changes to review

1. **The alert also runs on passing runs.** It needs them to clear fixed
failures, and it posts only when the list changes. A workflow that keeps
failing no longer posts on every run.
2. **Smoke tests aren't narrowed to a page.** They test API routes, not
guides, so the alert lists every deployed commit since the last passing
run.
3. **First run.** With no saved list, the alert compares against the
previous run if that run passed. The jobs and steps that run skipped
count as never checked. Otherwise, current failures show as "already
failing when tracking started", with no commit.
4. **Fewer workflows trigger the alert.** Docs Navigation Checks, Docs
removed anchors, and Docs Tests run only on `pull_request`, so they
never matched `branches: [master]`. They're removed from the trigger
list.
5. **Runs from forks are ignored.** The `branches: [master]` filter also
matches a fork branch named `master`, and the alert now reads artifacts
from the run that triggered it. For the same reason, a saved list that a
fork or another branch uploaded is never used.
6. **Missing results.** If the scan or smoke tests have no readable
results, the list stays as it was. A scan whose spec fails to load and a
smoke run with no test files count as no results too. When the run
failed, the alert posts a plain "failed before it reported any results"
message.

## Limitations

- With no saved list, the scan and smoke tests count everything the
previous passing run skipped as checked, because the alert doesn't read
that run's results.
- Failures are matched by name, so a renamed job, step, or test, or a
moved smoke test file, looks like one fixed failure and one new failure.
- An incoming webhook can't edit an earlier message, so each change to
the list is a new post.
- The compare API returns at most 250 commits per page, oldest first. A
longer range fetches its last two pages, so the alert lists the newest
commits and the full count.
- GitHub keeps only one pending run per concurrency group. If three runs
of the same workflow finish at once, the middle alert is dropped, and
the next one covers its commits.

## Review instructions

1. Run `pnpm -C e2e/docs test` and confirm all 55 tests pass.
2. Run the scan with the new reporter on a real guide and one that
doesn't exist:
   ```bash
cd e2e/docs && CI=1 DOCS_A11Y_FAILURES_FILE=/tmp/a11y.json
PLAYWRIGHT_BASE_URL=https://supabase.com \

DOCS_E2E_PAGE_PATHS=/docs/guides/resources,/docs/guides/not-a-real-guide
pnpm exec playwright test --grep @a11y
   cat /tmp/a11y.json
   ```
Expect one failure, `/docs/guides/not-a-real-guide: http-404`, with that
guide also listed as unchecked, so its axe rules keep their earlier
results.
3. Dry-run the alert against a real smoke test run, with a fake failure.
`DRY_RUN` prints the Slack payload instead of posting it:
   ```bash
   mkdir -p /tmp/alert/results
   gh api repos/supabase/supabase/actions/runs/46574787371 \
| jq '{workflow_run: (. + {conclusion: "failure", path:
".github/workflows/docs-a11y-scan.yml", name: "Docs Accessibility
Scan"})}' > /tmp/alert/event.json
echo '{"failures":[{"key":"/docs/guides/database/custom-postgres-config:
heading-order","page":"/docs/guides/database/custom-postgres-config"}],"unchecked":[]}'
> /tmp/alert/results/a11y-failures.json
GITHUB_TOKEN=$(gh auth token) GITHUB_REPOSITORY=supabase/supabase
DRY_RUN=1 \
GITHUB_EVENT_PATH=/tmp/alert/event.json STATE_OUT=/tmp/alert/state.json
RESULTS_DIR=/tmp/alert/results \
     node e2e/docs/scripts/docs-alert.ts
   ```
Expect the failure to be `introduced by 450939c`, the only deployed
commit in that range that touched the page.
4. Run step 3 again with `STATE_IN=/tmp/alert/state.json` and no other
change. Expect no output, because the list didn't change.

Verified locally:

- Unit tests, typecheck, oxfmt, and actionlint on the changed workflows.
The unit tests also pass in a copy of the repo with no installed
packages, as CI runs them.
- Mutation probes on the rules for unchecked pages, the push range, the
unchecked baseline, Vitest files that fail to load, the saved-list
check, deploy narrowing, skipped steps, smoke runs where every test
timed out, the compare total, guides that return an error status, a
guide whose error status changes, steps under a skipped job, and step
baselines across skipped jobs. The sequence test alone catches all 14
unchecked-state bugs found in review when each is put back.
- The reporter against production, including a guide that returns 404.
- Dry runs against real runs: both workflows that test production, a
failed push run, and a failed scheduled run. These covered a step whose
range starts at the last run that ran it, a compare range of 400
commits, a new failure, a second failure added while the first stayed
open, an unchanged list, every failure fixed, a crash before results,
missing results, an older run, a saved list in the wrong shape, a
passing run whose condition skipped a step with a saved failure, a push
range that spans three pages of runs, and a first run with no saved list
after a run that skipped a step.
- The saved-list filter on real artifact data.

Not run live:

- The push and scheduled paths for the other workflows, because none had
a recent failed run to test against.
- The alert workflow itself. A `workflow_run` workflow only runs from
`master`, so the first real alert comes after merge.

Resolves
[DOCS-1831](https://linear.app/supabase/issue/DOCS-1831/trace-docs-workflow-failures-to-the-commits-that-introduced-them)

## Checklist

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
2026-12-03 02:38:39 +00:00
Alexis Aguilar c9bb8cd1c4 fix(docs): fix the accessibility scan violations on 4 guides (#54497)
## Problem

The daily Docs Accessibility Scan fails on 5 guides with blocking
violations, tracked in
[DOCS-1817](https://linear.app/supabase/issue/DOCS-1817/fix-the-accessibility-issues-the-daily-docs-scan-finds-on-5-guides).
This PR fixes 4 of them.

- Deep linking, Expo social sign-in, and push notifications repeat the
same heading text in several tabs, so two or more headings get the same
`id`. Deep linking also includes the "Universal links" partial twice.
Screen readers and in-page links can land on the wrong heading.
- On Resources, the "Migrate to Supabase" heading is an `h3` with no
`h2` above it.

The [run on
2026-12-02](https://github.com/supabase/supabase/actions/runs/46817154464)
also failed on 8 pages that returned 404. Those pages had merged to
`master` during a code freeze, so production didn't serve them yet. They
return 200 now, and
[DOCS-1839](https://linear.app/supabase/issue/DOCS-1839/scan-only-the-pages-production-serves-in-the-daily-docs-accessibility)
tracks keeping the scan from failing that way.

## Solution

- **Repeated headings in content:** The first copy of each heading keeps
its anchor. Each later copy gets a custom anchor named after its tab,
such as `#deep-link-config-swift`. The partial takes an anchor suffix
through `variables`, so each include gets its own anchor. No page in the
repo links to the changed anchors, and the visible heading text stays
the same.
- **Resources:** The "Migrate to Supabase" and "Postgres resources"
headings are now `h2`. Their anchors stay the same, so the blog posts
that link to `#migrate-to-supabase` keep working. The headings render at
`h2` size.

Advisors also has duplicate heading `id` values. #53313 fixes them by
giving IDs only to the open tab, which keeps links to each lint's
headings working. This PR leaves Advisors to #53313.

## Preview links

| Guide | Live | Preview | Check |
| -- | -- | -- | -- |
| Deep linking |
[/docs/guides/auth/native-mobile-deep-linking](https://supabase.com/docs/guides/auth/native-mobile-deep-linking)
| [Swift tab, Deep link
config](https://docs-git-alexisa-docs-1817-supabase.vercel.app/docs/guides/auth/native-mobile-deep-linking?queryGroups=platform&platform=swift#deep-link-config-swift)
| `#deep-link-config`, `#universal-links` |
| Expo social sign-in |
[/docs/guides/auth/quickstarts/with-expo-react-native-social-sign-in](https://supabase.com/docs/guides/auth/quickstarts/with-expo-react-native-social-sign-in)
| [Expo tab,
Prerequisites](https://docs-git-alexisa-docs-1817-supabase.vercel.app/docs/guides/auth/quickstarts/with-expo-react-native-social-sign-in?queryGroups=apple-authentication&apple-authentication=expo-apple-authentication#prerequisites-expo)
| `#prerequisites`, `#ios` |
| Push notifications |
[/docs/guides/functions/examples/push-notifications](https://supabase.com/docs/guides/functions/examples/push-notifications)
| [FCM tab, Supabase
setup](https://docs-git-alexisa-docs-1817-supabase.vercel.app/docs/guides/functions/examples/push-notifications?queryGroups=platform&platform=fcm#supabase-setup-fcm)
| `#supabase-setup`, `#send-push-notification` |
| Resources |
[/docs/guides/resources](https://supabase.com/docs/guides/resources) |
[Migrate to
Supabase](https://docs-git-alexisa-docs-1817-supabase.vercel.app/docs/guides/resources#migrate-to-supabase)
| "Migrate to Supabase" and "Postgres resources" are `h2` |

## Verification

- The `@a11y` spec passes for the 4 fixed guides on the preview
deployment and against a local docs server, run through `pnpm
e2e:docs:a11y`.
- The rendered HTML for each guide has no duplicate `id` values.
- `pnpm check:removed-anchors --base origin/master` reports no removed
linked anchors.
- The markdown export (`pnpm build:guides-markdown`) shows the original
heading text without the custom anchors.
- Docs typecheck, ESLint, and oxfmt pass on the changed files.

## Review category (docs PRs only)

- [ ] Critical: needs a review as soon as possible
- [ ] Urgent: the feature ships soon, or it's blocking something else
- [x] Moderate: good to have soon, not urgent
- [ ] Low: get to it when you can

## Review instructions

1. Open each preview link in the table above. Each one opens the right
tab at a heading that changed.
2. In the browser console, run
`document.querySelectorAll('[id="<anchor>"]').length` for each anchor in
the **Check** column. Each returns `1`.
3. On the Resources preview, check that "Migrate to Supabase" and
"Postgres resources" are `h2` headings.

## Checklist

- [ ] 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)

Part of
[DOCS-1817](https://linear.app/supabase/issue/DOCS-1817/fix-the-accessibility-issues-the-daily-docs-scan-finds-on-5-guides).
2026-12-02 18:03:14 -07:00
hallidayo 1ba714978e fix(docs): iOS/Swift guides do not compile (#54480) 2026-12-02 17:14:18 -03:00
Pedro Rodrigues 1d269914f7 docs(mcp): document scoped OAuth access for MCP (#54156)
## Problem

Static OAuth apps can now turn on scoped access (member permissions and
project selection), and the hosted Supabase MCP server enforces those
grants on connections and tool calls. The MCP docs still tell manual
OAuth app users to grant write access to all scopes, and the OAuth
integration guide doesn't cover how MCP behaves with scoped grants.

## Solution

Add a new `MCP with scoped OAuth access` page under the Supabase OAuth
Integration section, building on #53658. It covers which OAuth client
types use scoped grants (static apps with scoped access on vs. off, and
dynamically registered clients unchanged), account mode vs. project mode
enforcement (including `list_projects` discovery, `list_organizations`
returning empty on specific-project grants, parent-project grants for
preview branches, and uniform `403` errors at connect time), read-only
SQL when a grant has `database:read` without `database:write`, and
missing-scope vs. live permission denials with their recovery steps.

Update the MCP page's Manual OAuth app note, Configuration options
examples, and Recommendations to separate URL project targeting from
credential-level scoping, link to the new page from `scoped-access.mdx`
and `build-a-supabase-oauth-integration.mdx`, and wire it into both
navigation menus.

## Verification

- [MCP with scoped OAuth access
preview](https://docs-git-pedrorodrigues-ai-1343-document-mcp-sc-ec523d-supabase.vercel.app/docs/guides/integrations/build-a-supabase-oauth-integration/mcp-scoped-access)
- [MCP docs
preview](https://docs-git-pedrorodrigues-ai-1343-document-mcp-sc-ec523d-supabase.vercel.app/docs/guides/ai-tools/mcp#manual-oauth-app)

Closes AI-1343
2026-12-02 19:31:51 +00:00
Monica Khoury 67923f6e0b fix(studio): keep selected events while saving a webhook endpoint (#54474)
## Problem

When editing the events a webhook endpoint is subscribed to and clicking
save, the event checkboxes flip back to the previously saved selection
while the save is in progress. The saved endpoint has the correct
events, but the sheet shows the wrong ones.

Closes FE-5275.

## Solution

The edit sheet resets its form whenever the event types it receives
change. The page built that list as a new array on every render, so any
re-render of the page counted as a change. Clicking save puts the
mutation into its pending state, which re-renders the page, which reset
the form to the old saved events.

- Memoized the event type options in the page, so the array only changes
when the scope changes.
- Added tests that hold the save request open and check the checkboxes
while it is pending: one for unchecking an event and one for adding an
event. Both failed before the change.

## How to test

1. Open a webhooks page and select an endpoint that is subscribed to all
events.
2. Click Edit, uncheck a few events, and click Save changes.
3. Check that the unchecked events stay unchecked while the sheet is
saving, and that the endpoint shows the events you picked afterwards.
4. Edit an endpoint that is subscribed to only one or two events, check
an extra event, and click Save changes.
5. Check that the extra event stays checked while the sheet is saving,
and that the endpoint shows it afterwards.
6. Try the same on an organization webhooks page.
2026-12-02 18:10:54 +02:00
Jonathan Summers-MuirandClaude Opus 5.5 4da4e91a9b chore(www): make the launch week 16 rewrite readable (#54476)
Same paths as #54475, with the past launch weeks as named lists instead
of one regex.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 22:42:18 +08:00
kemal.earth ff9ff456cd feat(design-system): updated trace ui components (#54389)
## Problem

The `Trace` primitives in `ui-patterns` only supported panning and
zooming through the minimap, and had no way to show summary facts about
a trace. Using them for a real trace view in Unified Logs needs direct
manipulation on the waterfall itself, a resizable span column for long
span names, and a place to put trace-level stats.

Part 1 of 3. This PR is design-system only — nothing in Studio consumes
it yet.

## Solution

**Direct manipulation on the waterfall**

- Drag across the timeline to pan, wheel to zoom around the pointer.
Panning only starts past a small threshold, so a drag never selects the
row it ends on.
- `Trace.Scrubber` follows the pointer with the offset from the trace
start.
- The span column is resizable by a focusable separator: drag it, nudge
with the arrow keys, or jump to its bounds with Home and End. The
timeline is kept above a minimum width so the tree can't be dragged over
it.

**Minimap**

- Dragging outside the brush now selects a new window. Dragging the
brush still pans and dragging an edge still resizes; a plain click
outside still recentres.

**New parts**

- `Trace.Summary` / `Trace.SummaryItem`, with `Trace.TotalDuration`,
`Trace.SpanCount` and `Trace.Depth` as values.

**Visual**

- Leaf rows get an elbow connecting them to their parent's guide, so the
tree reads as a tree rather than floating dots.
- Minor ruler ticks between the labelled ones, and a shorter ruler,
which also shortens the span header.

**One breaking change:** `Trace.Minimap` is now passed to
`Trace.Waterfall`'s `minimap` prop instead of being a child, so it sits
outside the area that handles pointer gestures. Both demos and the docs
page are updated to match; these are the only consumers in the repo.

## Review instructions

1. Open the design-system preview and go to **UI Patterns → Tracing**.
2. On the first demo, drag left and right across the timeline to pan,
and scroll to zoom — the zoom should stay anchored under the pointer.
3. Drag a span bar and release on it. It should pan, not select the row.
4. Drag the divider between the span column and the timeline. Then tab
to it and use the arrow keys, Home and End — the handle should move from
where it appears, and End should reach the far edge.
5. Move the pointer across the timeline and confirm the scrubber line
tracks it with a readable offset.
6. Check the summary strip above the waterfall shows Duration, Depth and
Total Spans.
7. On the minimap: drag the brush to pan, drag an edge to resize, drag
outside the brush to select a new window, and click outside it to
recentre. Zoom all the way in and confirm the brush stays wide enough to
grab.
8. Scroll the docs page and confirm the code sample matches what the
demos actually do.
2026-12-02 14:24:52 +00:00
anthony lio 99e7de69a2 fix(www): forward lw16 editor steps under /launch-week/ticket/create to the card app (#54475)
## Problem

- a refresh or a link to a lw16 card editor step shows the www 404 page,
for example
[/launch-week/ticket/create/select-material](https://supabase.com/launch-week/ticket/create/select-material)
- the lw16 card app opens its editor steps under
`/launch-week/ticket/create/*`
- the rewrite from #54315 keeps `/launch-week/ticket` and its subpaths
on www, but www has a page only at the exact path

## Solution

- forwards the subpaths of `/launch-week/ticket` to the lw16 card app
while the exact path stays on the lw15 ticket page
- adds an editor step path to the security header tests

## Preview links

| Site | Live | Preview |
| ---- |
--------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------
|
| WWW |
[/launch-week/ticket/create/select-material](https://supabase.com/launch-week/ticket/create/select-material)
|
[/launch-week/ticket/create/select-material](https://zone-www-dot-com-git-antlio-fix-lw16-ticket-rewrite-supabase.vercel.app/launch-week/ticket/create/select-material)
|
| WWW | [/launch-week/ticket](https://supabase.com/launch-week/ticket) |
[/launch-week/ticket](https://zone-www-dot-com-git-antlio-fix-lw16-ticket-rewrite-supabase.vercel.app/launch-week/ticket)
|

## Review instructions

1. run `pnpm --filter www exec vitest run lib/security-headers.test.ts`
and make sure that all tests pass
2. open the preview
[/launch-week/ticket/create/select-material](https://zone-www-dot-com-git-antlio-fix-lw16-ticket-rewrite-supabase.vercel.app/launch-week/ticket/create/select-material)
and make sure that the lw16 card app loads, not the www 404 page
3. open the preview
[/launch-week/ticket](https://zone-www-dot-com-git-antlio-fix-lw16-ticket-rewrite-supabase.vercel.app/launch-week/ticket)
and make sure that the lw15 ticket page still loads

## 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)
2026-12-02 16:18:30 +02:00
kemal.earth 6d8af8e950 chore(api-types): regenerate types from production specs (#54472)
## Problem

`packages/api-types` has drifted from the production OpenAPI specs.
#54394 regenerated them but was reverted in #54404, because the API had
rolled out ahead of its OpenFGA model. That has since been fixed on the
backend, so the regen can land.

...plus I need the new spec for #54391 and didn't want to blow up my
branch.

## Solution

Regenerated with `pnpm --filter=api-types codegen:prod` (production
specs, not the localhost `codegen`), plus the type fixes the new specs
require:

- `platform-webhooks-fetchers.ts` — `page` is now a deep object in the
spec, so the query params move from `page[limit]` keys to a nested
`page` object with a `deepObject` serializer.
- `InvoicesSettings.test.tsx` — four newly-required invoice fields in
the mock.
- `packages/shared-data` — `@supabase/shared-types` 0.1.98 → 0.1.102,
matching `apps/studio`.

Notable additions: the `environment_*` FGA scopes and `GET
/v2/projects/{ref}/analytics/traces/{trace_id}`.

## Review instructions

1. `pnpm --filter=api-types run verify-production-types` — passes.
2. `pnpm typecheck` and `pnpm --filter=studio test` — pass.
3. Only the three non-generated files need reading; the rest is
generated output.

Note: `verify-production-api-types` was removed from the required checks
during the #54394 incident and hasn't been restored. Worth putting back
after this merges.
2026-12-02 13:51:52 +00:00
Danny WhiteandJoshen Lim be27ad8cf5 feat(studio): show apps and confirm token access changes (#53917)
> [!WARNING]
> This PR relies on #53705 being merged first.

## Problem

Project admins need to see authorised apps before changing token access.
[DEPR-734](https://linear.app/supabase/issue/DEPR-734)

## Solution

- Show Apps below Members only when authorised apps exist; hide the
section while loading or empty, and retain verification errors.
- Show access levels and links to each app’s access sheet.
- Include members and authorised apps in toggle confirmations; wait for
complete counts and offer retry on errors.

| After |
| --- |
| <img width="725" height="560" alt="CleanShot 2026-12-02 at 14 44 13"
src="https://github.com/user-attachments/assets/6f033b2f-a8b4-4a64-824f-ef0cc270ff6c"
/> |
| No authorised apps (no empty state) |
| <img width="728" height="773" alt="CleanShot 2026-12-02 at 14 11 31"
src="https://github.com/user-attachments/assets/76b31461-abca-4f9a-b76d-bb664093dd67"
/> |
| Loading error |
| <img width="727" height="749" alt="CleanShot 2026-12-02 at 14 38 34"
src="https://github.com/user-attachments/assets/0722002c-a5cf-4877-b00b-15f9e4a6524c"
/> |
| 1× authorised app |
| <img width="418" height="222" alt="CleanShot 2026-12-02 at 14 39 27"
src="https://github.com/user-attachments/assets/db5cc89a-2099-4a6f-969c-b4e2c38ac972"
/> |
| Disabling token access whilst 1× app is relying on it |
| <img width="424" height="387" alt="CleanShot 2026-12-02 at 14 39 58"
src="https://github.com/user-attachments/assets/e15c1227-8190-42f4-876b-5f55a321848b"
/> |
| Re-enabling token access which will immediately restore access for N
members and apps |


## Review instructions

1. Open the [staging
preview](https://studio-staging-git-dnywh-depr-734-temporary-acc-b81819-supabase.vercel.app/dashboard),
select a project you administer, and open **Database → Settings**.
Enable database token access in **Feature previews**, plus `jitDbAccess`
and `enableScopedOAuthManage` in the dev toolbar’s **Flags** tab if
needed.
2. Open DevTools → **Console**, paste the setup below and run it.
Navigate to another Studio page (possibly outside of Database) and back
to **Database → Settings**, without reloading. Check **Test Partner
App** appears under Apps with **Read and write** access.
3. Turn token access off. Check the confirmation includes the app, then
choose **Cancel**.
4. Run `tokenAccessReview.state = 'disabled'` in Console, then navigate
away and back. Turn token access on, expand **Who will regain access?**,
check the app is listed, then choose **Cancel**.
5. Run `tokenAccessReview.state = 'enabled'; tokenAccessReview.fail =
true`, then navigate away and back. Check the Apps error disables the
toggle. Run `tokenAccessReview.fail = false` and choose **Retry apps**
to recover.
6. Run `tokenAccessReview.apps = false`, then navigate outside Database
and back. Check Apps is hidden once loaded. Reload to remove the setup.

The setup mocks GET responses only, requires no app authorisation, and
does not change saved access. Use **Cancel** in both confirmations. Do
not reload between steps; reloading removes the setup. Network’s
Response tab does not show these browser-generated responses.

<details>
<summary>Console setup</summary>

```js
(() => {
  if (window.tokenAccessReview) throw new Error('Review setup is already active. Reload to reset it.')
  const projectRef = location.pathname.match(/\/project\/([^/]+)/)?.[1]
  if (!projectRef) throw new Error('Open a project’s Database Settings first.')
  const appId = '75e64165-b74e-432f-bb70-80d6ae432f06'
  const grantId = 'review-org-grant'
  const scopes = ['database_token_access:write']
  const originalFetch = window.fetch
  const review = window.tokenAccessReview = { state: 'enabled', apps: true, fail: false }
  const approvals = /\/platform\/organizations\/[^/]+\/oauth\/approvals$/
  const grants = new RegExp(`/platform/organizations/[^/]+/oauth/approvals/${appId}/grants$`)
  const page = (data) => Response.json({ data, links: { next: null, prev: null } })
  window.fetch = function (input, init) {
    const url = new URL(input instanceof Request ? input.url : input, location.href)
    const method = init?.method ?? (input instanceof Request ? input.method : 'GET')
    if (method.toUpperCase() === 'GET') {
      if (url.pathname.endsWith(`/v1/projects/${projectRef}/jit-access`)) {
        return Promise.resolve(Response.json({ state: review.state, appliedSuccessfully: true }))
      }
      if (approvals.test(url.pathname)) {
        return Promise.resolve(page(review.apps ? [{
          id: appId, type: 'oauth_app', attributes: {
            app: { name: 'Test Partner App', icon: null, created_by: null },
            last_approved_at: '', target: 'organization',
            org_grant: { grant_id: grantId, approved_scopes: scopes, approved_at: '' },
          },
        }] : []))
      }
      if (grants.test(url.pathname)) {
        if (review.fail) return Promise.resolve(Response.json({ message: 'Review: apps unavailable' }, { status: 500 }))
        return Promise.resolve(page([{
          id: grantId, type: 'oauth_grant', attributes: {
            kind: 'organization_bound', user: null, approved_at: '', approved_scopes: scopes,
            projects: [{ ref: projectRef, name: 'Review project' }],
          },
        }]))
      }
    }
    return originalFetch.call(this, input, init)
  }
})()
```

</details>

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-12-02 19:55:19 +07:00
Drew McLellan d4ef834d4d feat(studio): track usage on the org projects list (FE-5025) (#54417)
## Problem

We don't have visibility into how people use the org projects list
(`/org/[slug]`) or the organizations list (`/organizations`): whether
they search, filter, sort or switch views, and which project card
actions they use. Resolves FE-5025.

## Solution

Adds four events, defined in `packages/common/telemetry-constants.ts`
with org-level groups (no project group):

- `org_projects_filter_applied` with `filterType: 'search' | 'status' |
'sort'`. Search sends only the result count, status sends the saved
statuses (`active`/`paused`), and sort sends the sort value.
- `org_projects_view_mode_updated` with `viewMode`.
- `org_project_card_action_clicked` with `action: 'copy_id' |
'settings'` and `viewMode`, from the grid card menu and the table row
menu and inline ref button.
- `org_list_search_submitted` with `orgCount`.

Notes for review:

- Every event fires from its handler, not an effect, so restoring
filters from local storage doesn't fire anything.
- Search events use the same 500ms debounce as the query, skip empty
input, and never include the search text. The project search count is
read from the list query's cache entry via `fetchInfiniteQuery` on the
same key, which reuses the in-flight request.
- Status, sort and view events don't fire when the value didn't change.
- `HomePageActions` and `ProjectList` also render on the `/project`
picker, so `@page` lists both routes.
- I didn't add the `data-attr` attributes from the ticket: autocapture
is off, so they would send nothing, and the telemetry standards ask for
explicit `track()` calls.

## How to test

- `pnpm --filter studio exec vitest run
components/interfaces/HomePageActions.test.tsx` covers view mode, status
filter, search and clearing before the debounce settles.
- In the browser network tab on `/org/[slug]`, each action sends one
`telemetry/event` request with the properties above. Checking the events
in PostHog staging is still to do.
2026-12-02 11:47:18 +00:00
Pamela Chia 26daef1bb4 docs(telemetry): add never-sent value and result count rules (#54470)
I reviewed #54144 and #54417 and found three tracking mistakes that the
telemetry skill had no rule for. I added a rule for each.

**Changed:**
- **Values that are never sent**: a `track()` call below an early return
never sends the value of the branch that returned first, so that value
reads as zero. I added a rule to check that every value in a property's
union is sent by some call site, and to leave out a property that can
only take one value.
- **Result counts from a copy**: a search event that gets its count from
a copied query key, fetcher or filter predicate can report a number that
differs from the list on screen. I added a rule to read the count from
the query or list the page already renders.
- **Tracking that needs an org or project**: I extended the render-site
rule, which applied only to hardcoded page names, to anything the
tracking reads, for a component that also renders where no org or
project is selected.

## Linear
- fixes GROWTH-1601
2026-12-02 11:27:29 +00:00
Pamela Chia ec1b9dae02 fix(studio): drop deleted route-mock from table menu test (#54471)
The Studio typecheck fails on master: `TableEditorMenu.test.tsx` (added
in #53960) imports `@/tests/lib/route-mock`, which #54426 removed a few
hours earlier. Each PR passed on its own, so the break only showed once
both were merged, and every PR based on current master now fails
`typecheck`.

I removed the import and its `routerMock.setCurrentUrl` call, and passed
the same URL through `customRender`'s `initialUrl` option, the way
#54426 migrated the other tests that used the mock.

## Linear
- fixes GROWTH-1602
2026-12-02 11:21:35 +00:00
anthony lio e7d7345bd6 fix(telemetry): add /new/* to the pages of three account recovery events (#54469)
## Problem

- the account recovery interstitial can open on `/new/<org>` because
`canInterruptRecoveryRoute` allows it
- `@page` of three of its four events lists `/new` but not `/new/*`
- `AccountRecoveryReminderExposedEvent` lists `/new/*`, so the four
events disagree on the pages they fire on

## Solution

- adds `/new/*` to `@page` of `AccountRecoveryActionClickedEvent`,
`AccountRecoveryTaskCompletedEvent` and
`AccountRecoveryReminderClosedEvent`

## Review category (docs PRs only)

- [ ] Critical: needs a review as soon as possible
- [ ] Urgent: the feature ships soon, or it's blocking something else
- [ ] Moderate: good to have soon, not urgent
- [ ] Low: get to it when you can

## Review instructions

1. open `apps/studio/lib/account-recovery/recovery-reminder.ts` and make
sure that `canInterruptRecoveryRoute` allows `/new/<slug>`
2. make sure that the 4 `AccountRecovery*Event` interfaces in
`packages/common/telemetry-constants.ts` list the same pages
3. make sure that the diff changes only JSDoc comments

## 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)
2026-12-02 19:13:50 +08:00
Alaister YoungandAlaister Young 217b9ca3f3 [FE-5024] feat(studio): track Table Editor sidebar and side panels (#53960)
Adds PostHog telemetry events across the Table Editor sidebar, new-tab
page, and column/table/row/cell side panels so we can measure schema
usage, entity-list search/filtering, entity menu actions, and panel
saves without logging schema, table, column, or search names.

**Added:**

- Event definitions in `packages/common/telemetry-constants.ts` (added
to `TelemetryEvent`):
- `table_editor_schema_selector_updated` (`schemaType: 'public' |
'protected' | 'custom'`) when switching schemas in `TableEditorMenu`. It
uses the same `schemaType` property and derivation as the existing
`database_schema_selector_updated` (now shared through
`getDatabaseSchemaType`), so the two selectors can be compared in one
insight
- `table_editor_new_item_clicked` (`itemType: 'schema'` or `itemType:
'table'` with `trigger: 'sidebar' | 'new_tab_card'`) from the sidebar
and `NewTab` card
- `table_editor_table_search_submitted` (debounced 500ms, cancelled on
clear, schema switch via selector or URL/tab change, and unmount)
- `table_editor_entity_filter_updated` (`visibleTypeCount`) on
entity-type checkbox toggle, "Select only", and filter reset
- `table_editor_entity_action_clicked` (`action`, `entityType`) across
dropdown and context menus in `useEntityActionHandlers` (excluding the
`View policies` link, which is covered by pageviews)
- `table_column_created` / `table_column_updated` (`hasForeignKey`,
`isArray`) on column side-panel saves via `SidePanelEditor.utils.tsx`,
with `hasForeignKey` scoped to the saved column and no-op saves skipped
- `table_updated` (`columnCountChanged`) on existing table edits in
`SidePanelEditor.tsx` once table, column, primary key, foreign key,
Realtime, and Data API updates succeed and at least one change was
persisted; no-op saves and saves where any step fails are skipped
- `table_editor_row_updated` (`editMethod: 'side_panel'`) when an
existing row edit from the row side panel is persisted. Saves from the
expanded cell editors and the foreign row selector don't count, and
neither do edits queued with queue operations enabled. The grid ticket
(FE-5023) can add more `editMethod` values when it tracks inline edits
- `table_editor_cell_editor_opened` (`editorType: 'json' | 'text'`) when
expanding JSON or text cell editors from the grid cell editors
(`JsonEditor` / `TextEditor`) or `RowEditor`
- Column, table and row save events are attributed to the project the
save ran against (third `track()` argument), and fire only after the
save succeeds
- Focused MSW-backed tests for non-obvious telemetry edge cases (search
debounce + cancellation on clear and selector/external schema switches,
schema switch single-fire + PII checks, column-scoped FK/array
derivation and no-op gating in `createColumn`/`updateColumn`,
change/error reporting in `updateTable` without double-firing column
events)

## To test

Watch `POST /platform/telemetry/event` in DevTools (and confirm arrival
in staging PostHog):

- Switch schemas (`public` -> `auth` -> custom schema -> `public`):
fires `table_editor_schema_selector_updated` with `schemaType`
`protected` -> `custom` -> `public` and no schema name; re-selecting the
active schema fires nothing
- On the Database > Schemas visualizer, switching schemas still fires
`database_schema_selector_updated` with the same `schemaType` values as
before
- Click **Create a new schema** and **New table** in the sidebar, plus
**Create a table** on `/project/[ref]/editor/new`: fires
`table_editor_new_item_clicked` with the expected `itemType` and
`trigger`
- Type in **Search tables...** and pause >500ms: fires one
`table_editor_table_search_submitted` with no query text; clearing or
switching schemas (via the selector or clicking a tab in another schema)
before 500ms fires nothing
- Toggle entity-type checkboxes, click **Select only**, or reset
filters: fires `table_editor_entity_filter_updated` with the new
`visibleTypeCount`
- Trigger actions from a table/view menu (both ⋮ and right-click): fires
`table_editor_entity_action_clicked` with `action` and `entityType`
(**View policies** does not fire it)
- Create and edit a column via the column panel: fires
`table_column_created` / `table_column_updated` with `hasForeignKey`
(scoped to that column) and `isArray`; clicking **Save** with no changes
fires nothing
- Edit an existing table (with and without adding/removing a column, or
toggling Realtime alone): fires `table_updated` with
`columnCountChanged`, without firing `table_column_*`; clicking **Save**
with no changes fires nothing
- Edit an existing row in the row side panel: fires
`table_editor_row_updated` with `editMethod: 'side_panel'`. Inserting a
new row, saving from an expanded JSON/text cell editor, picking a
foreign row, or saving with queue operations enabled does not fire it
- Edit an existing table so that adding a column (or updating
Realtime/Data API) fails: `table_updated` does not fire
- Expand JSON and text cell editors from both the grid and inside the
row panel: fires `table_editor_cell_editor_opened` with `editorType:
'json' | 'text'`

Notes for review:

- No `data-attr`s were added. Autocapture is off, so each tracked
interaction gets an explicit `track()` call instead.
- `table_editor_cell_editor_opened` counts the expand buttons in both
the grid cell editors and the row side panel fields. It's the same click
on both surfaces.
- `table_editor_row_updated` only has `editMethod: 'side_panel'` for
now. The grid toolbar ticket (FE-5023) can add values when it tracks
inline edits.

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-12-02 18:54:08 +08:00
supabase-cli-releaser[bot]andgithub-actions[bot] 8028b576ed chore: update cli config schemas (#54428)
Updates the published JSON Schemas from the supabase/cli release
workflow.

Generated by `scripts/publish-schemas.ts` in supabase/cli from
`apps/cli/schemas`. Regenerate them in supabase/cli rather than editing
this folder.
Published versions below the current one are frozen and never rewritten.

Auto-merge is enabled: the PR squash-merges once a reviewer approves it.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-12-02 09:20:05 +00:00
Danny WhiteandJoshen Lim 4dbb966b2e feat(studio): show Trusted Partner access on OAuth consent (#53583)
> [!WARNING]
> Live readiness checks require
[CTRL-2277](https://linear.app/supabase/issue/CTRL-2277) in the target
environment; production deployment is pending.

## Problem

Trusted Partner consent must explain direct database access and project
blockers before authorisation.
[DEPR-732](https://linear.app/supabase/issue/DEPR-732)

## Solution

- Show Direct database access alongside the requested permissions.
- Check selected projects, or every project page for organisation-wide
grants.
- Separate blocking issues from SSL notices; block authorisation during
loading or errors and offer retry.

| After |
| --- |
| <img width="1280" height="1323" alt="Authorize API Access Supabase"
src="https://github.com/user-attachments/assets/adb6367a-bace-4b62-81b5-68ba4c11396c"
/> |
| Consent screen with Direct database access (previously “Table data”)
and Database management |
| <img width="1280" height="1323" alt="Authorize API Access Supabase"
src="https://github.com/user-attachments/assets/0c35900c-1059-49cd-b1c5-4e0cf5441b9b"
/> |
| Selected-project blockers and the separate SSL notice |
| <img width="1280" height="1323" alt="95741"
src="https://github.com/user-attachments/assets/1fbef4f0-0433-4c93-b390-84d210dfb665"
/> |
| Organisation-wide blockers _without_ project-removal actions |

## Review instructions

1. Open the [staging consent
screen](https://studio-staging-git-dnywh-depr-732-trusted-partn-f24cfb-supabase.vercel.app/dashboard/authorize?auth_id=11666aa8-7f7e-4705-b33a-981903fd682e).
Enable `enableScopedOAuthConsent` in the dev toolbar’s **Flags** tab if
needed.
2. Open Chrome DevTools → **Network** and reload. Select the **GET**
request ending in `/platform/oauth/authorizations/{id}`.
3. Right-click that request → **Override content**. Choose a local
folder and click **Allow**. Add `database_token_access:read` and
`database_token_access:write` to `scopes`. Use only the read scope to
check read-only access. Keep every other field, save with
**Cmd/Ctrl+S**, then reload with DevTools open.
4. Select projects. Override each **GET** request ending in
`/platform/organizations/{slug}/oauth/authorizations/{id}/projects/{ref}/database-access`.
Use `{"issues":[],"enables_ssl":false}` for ready projects, then
`{"issues":[],"enables_ssl":true}` for an SSL notice. Save and reload
after each change. Check Direct database access and Database management
are separate, and SSL alone allows authorisation.
5. Change a readiness response to
`{"issues":["postgres_upgrade_required","platform_unsupported"],"enables_ssl":true}`.
Save and reload. Check blockers prevent authorisation, SSL stays
separate, and removing a blocked project clears its blockers.
6. Set `project_scoping_mode: false` in the authorisation override. Save
and reload. Check any blocked project prevents organisation-wide
authorisation, with no project-removal actions.
7. Block a database-access request in Network and reload. Check
authorisation stays disabled. Unblock it and choose **Retry checks**.
8. For a returning app, override `existing_grant.approved_scopes` in the
request ending in `/preflight`. Save and reload. Check added, removed
and unchanged permissions.
9. Disable **Sources → Overrides → Enable Local Overrides**. Repeat
ready and blocked project checks with a real staging authorisation
before approving live readiness behaviour.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-12-02 16:19:30 +07:00
Alaister YoungandAlaister Young 0c97b9789b [FE-3107] chore(studio): remove remaining Next.js references (#54426)
Removes the remaining Next.js dependencies, compatibility shims, test
mocks, ESLint/TypeScript presets, and webpack/Next workarounds from
Studio following the TanStack Start migration.

Addresses FE-3107.

**Removed:**

- `next` and `next-router-mock` from `apps/studio/package.json` (and
updated `pnpm-lock.yaml`)
- Orphaned `apps/studio/compat/next/script.tsx` shim, `script.test.tsx`,
`compat/**` knip entry, and `nextCompat()` / `ssr.noExternal` `/^next/`
plumbing from `apps/studio/vite.config.ts`
- `apps/studio/tests/lib/route-mock.ts` and all `next-router-mock`
setup/imports across `tests/vitestSetup.ts`,
`tests/lib/custom-render.tsx`, and 12 test files
- `apps/studio/tests/pages/` directory (moved the 3 remaining tests to
`components/interfaces/Organization/Organization.utils.test.ts` and
`apps/studio/tests/routes/`)
- Unused `'use client'` directives across 23 Studio files
- Next.js/webpack workarounds: `graphiqlViteWorkers()` in
`vite.config.ts`, webpack `import.meta.glob` `try/catch` fallback in
`ConnectStepsSection.tsx`, shell `NODE_ENV=test` override in
`vite.config.ts` / root `package.json` / `studio-e2e-test.yml`, Next
`getPathMatch` and `_next` passthrough in `redirects.shared.*`,
`window.next?.router` check in `monaco-graphiql-coexistence.spec.ts`,
and unused `ANALYZE` env var in `apps/studio/turbo.jsonc`
- Next-only Sentry/chunk-load filters (`NEXT_NOT_FOUND`,
`NEXT_REDIRECT`, Next `/org/[slug]/` regex, `/app:\/\//`, dead
`includeThirdPartyErrorFilter` plumbing, webpack chunk error regex) and
stale Next/Pages Router comments, docs, and `#__next` CSS selector

**Changed:**

- `apps/studio/eslint.config.cjs`: switched from
`eslint-config-supabase/next` to the new `eslint-config-supabase/react`
preset (dropping `@next/next/no-img-element: off`, keeping `.next` /
`next-env.d.ts` ignored for local checkouts with stale pre-migration
build artifacts)
- `apps/studio/tsconfig.json`: extends `tsconfig/base.json` directly
instead of `tsconfig/nextjs.json` (identical resolved compiler options)
- `apps/studio/.github/eslint-rule-baselines.json`: pruned 33 stale
`pages/...` and `types/next.ts` entries without changing any rule
thresholds
- `apps/studio/tests/lib/custom-render.tsx`: backed
`TestFrameworkProvider` with TanStack Router instead of
`next-router-mock`
-
`apps/studio/components/interfaces/Integrations/GraphQL/GraphiQLTab.tsx`:
imports `graphiql/setup-workers/vite` directly
- `apps/studio/styles/globals.css`: replaced `@source
'../pages/**/*.{js,ts,jsx,tsx}'` with `@source
'../routes/**/*.{js,ts,jsx,tsx}'`
- `apps/studio/turbo.jsonc`: declared `"NEXT_PUBLIC_*"` in
`tasks.build.env` now that Turborepo infers `nitro` instead of `nextjs`
-
`apps/studio/components/interfaces/Organization/Organization.utils.ts`:
narrowed `buildOrgUrl`'s `slug` parameter to `string[] | undefined`

**Added:**

- `packages/eslint-config-supabase/shared.js` and
`packages/eslint-config-supabase/react.js` (plus `presets.test.ts`),
decoupling non-Next React apps from `eslint-config-next` with verified
zero non-`@next/*` rule drift while keeping
`eslint-config-supabase/next` unchanged for the Next.js apps

## To test

- Run `pnpm --filter eslint-config-supabase run test` and confirm preset
parity tests pass
- Run `pnpm --filter studio run lint`, `pnpm --filter studio run
lint:ratchet`, `pnpm --filter studio run typecheck`, `pnpm knip
--workspace apps/studio`, and `pnpm --filter studio run test`
- Run `pnpm --filter studio run build` and verify the production build,
prerendered routes, chunk-cycle check, and GraphiQL web workers succeed
- Smoke-test Studio locally (`pnpm dev:studio`): verify GraphiQL loads
cleanly, ConnectSheet framework steps render, and Tailwind styles on
route pages are intact

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-12-02 17:01:50 +08:00
Sreyas Udayavarmanandanthony lio c2ff38bb40 Update resolution for max_clients limit issue (#54458)
Consolidate resolution steps for max_clients limit.

## Problem

Updating max_clients limit separately isn't supported, its bind to
compute instance.

## Solution

Clarify that increasing max_clients limit requires scaling compute
instance.

## Review category (docs PRs only)

- Low: get to it when you can

---------

Co-authored-by: anthony lio <lionnet.ant@gmail.com>
2026-12-02 13:52:07 +05:30
Danny WhiteandJoshen Lim 05cbf8ca50 feat(studio): show Trusted Partner access in Authorized Apps (#53705)
## Problem

Organisation admins need to see authorised apps’ direct database access.
[DEPR-731](https://linear.app/supabase/issue/DEPR-731)

## Solution

- Show the approved direct-access level in Authorized apps.
- Show permissions and project coverage in **View access**.

| After |
| --- |
| <img width="1280" height="813" alt="OAuth Apps Organization Settings
Basket Supabase"
src="https://github.com/user-attachments/assets/d2bbc682-6e6f-462f-b5c2-3a2a8ff813ba"
/> |
| Authorized apps list showing read-only direct access |
| <img width="1280" height="813" alt="OAuth Apps Organization Settings
Basket Supabase (4)"
src="https://github.com/user-attachments/assets/24506547-461a-44e0-880f-6ade23fd734c"
/> |
| Authorized apps list showing read-write direct access |
| <img width="1280" height="813" alt="OAuth Apps Organization Settings
Basket Supabase (1)"
src="https://github.com/user-attachments/assets/53ac2662-9fb7-4cfc-b118-31ef5778b339"
/> |
| View access sheet with permission groups and project coverage |
| <img width="1280" height="813" alt="OAuth Apps Organization Settings
Basket Supabase (3)"
src="https://github.com/user-attachments/assets/a21cefa7-c656-4b5c-bb0c-075c724350f9"
/> |
| View access sheet with permission groups and project coverage |
| <img width="424" height="297" alt="CleanShot 2026-12-02 at 15 09 39"
src="https://github.com/user-attachments/assets/e1f83068-21a8-43c4-9ca8-dcf6a3164b01"
/> |
| Added second paragraph for revoking access to apps with direct
database access. This “existing connections will close shortly” is only
accurate one CTRL-2141 merges, as discussed
[here](https://github.com/supabase/supabase/pull/53705/changes#r4764576735).
|

## Review instructions

1. Open the [staging
preview](https://studio-staging-git-dnywh-depr-731-authorized-apps-supabase.vercel.app/dashboard),
select a test organisation and open **Apps**
(`/dashboard/org/{slug}/apps`). Enable `enableScopedOAuthManage` in the
Studio dev toolbar’s **Flags** tab if needed.
2. Open Chrome DevTools → **Network** and reload. Select the **GET**
request ending in `/platform/organizations/{slug}/oauth/approvals`.
3. Right-click that request → **Override content**. Choose a local
folder and click **Allow**. For an existing organisation-bound app, add
`database_token_access:read` to `attributes.org_grant.approved_scopes`.
Keep every other field, save with **Cmd/Ctrl+S**, then reload with
DevTools open.
4. Open the app’s **View access**. Override the **GET** request ending
in `/platform/organizations/{slug}/oauth/approvals/{app_id}/grants`. Add
the same scope to the matching grant’s `attributes.approved_scopes`.
Save and reload.
5. Check read-only direct access in the list and access sheet. Change
the scope to `database_token_access:write` in both overrides, save and
reload. Check read-write access and compare it with a standard app.
6. Compare the grants response’s existing `attributes.projects` list
with `null` for all projects. Save and reload after each change. Check
permission groups, project coverage and the app ID in **View access**.
7. Open **Revoke access**, check the existing OAuth access explanation,
then choose **Cancel**.
8. Disable **Sources → Overrides → Enable Local Overrides**. Repeat with
real authorised staging apps.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-12-02 14:05:39 +07:00