96 Commits
Author SHA1 Message Date
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
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
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
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
supabase-vercel-tedd[bot] dd15ef008c chore(docs): add Lauren Godfrey to humans.txt (#54435)
## Problem

The team list in `humans.txt` is missing a new team member.

## Solution

Adds Lauren Godfrey to the team list in `apps/docs/public/humans.txt`,
in alphabetical order.

## How to verify

1. Open
https://docs-git-tedd-add-lauren-godfrey-humans-supabase.vercel.app/humans.txt
and confirm "Lauren Godfrey" appears between "Laura C" and "Laurence
Isla".

## Checks

Static text file only, so no typecheck, lint, or tests apply. `git diff`
shows a single added line.

## Checklist

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

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-12-01 19:05:49 +00:00
supabase-vercel-tedd[bot]andIvan Vasilov 31f68587f6 feat(studio): track remaining usage on project home (#54143)
## Problem

Project home tracked most interactions, but not which credential people
copy from the "Copy" popover, or how often they use the custom report
and notebooks beyond adding blocks. Opening the Connect sheet from the
popover's "Get Connected" button also reported a stale
`connect_sheet_opened` source, because the popover never set one.

## Solution

Project home gets three new events: `home_project_credential_copied`
(with a `credentialType` enum), `home_custom_report_refresh_clicked`,
and `home_notebook_action_clicked` (`action: 'create' | 'analyze'`).
"Get Connected" in the popover now sets a new `home_popover` Connect
sheet source. The compute and GitHub stats now send
`home_activity_stat_clicked` as well, with two new `stat_type` values.
Every event fires from its click handler with a typed `track()` call,
and none sends the copied value or any user-defined name. This follows
the telemetry standards, so no `data-attr` attributes are added.

## How to verify

1. On a project's home page, open the "Copy" popover and copy each item.
Each copy sends one `home_project_credential_copied` event, with
`credentialType` set to `project_url`, `publishable_key`,
`direct_connection_string`, or `cli_setup`. No event contains the copied
value.
2. In the same popover, click "Get Connected". The Connect sheet opens
and sends `connect_sheet_opened` with `source: 'home_popover'`. Opening
it from the header button afterwards still sends `source:
'header_button'`.
3. Click the "Compute size" stat. It sends `home_activity_stat_clicked`
with `stat_type: 'compute'` and no `stat_value`.
4. Click the "GitHub" stat. It sends `home_activity_stat_clicked` with
`stat_type: 'github'`, and `stat_value` is 1 when a repository is
connected and 0 when none is.
5. With the custom report section shown, click "Refresh report". It
sends one `home_custom_report_refresh_clicked` event.
6. With the Notebooks section shown, click "New notebook" (or "Create
your first notebook" when there are none). It sends
`home_notebook_action_clicked` with `action: 'create'`. Click "Analyze"
on a notebook with cells: it sends `action: 'analyze'`.

## Checks

Ran `tsc --noEmit` in `apps/studio` and `packages/common`, `eslint` and
the type-aware `eslint.type-checks.config.cjs` lint on the changed
Studio files, `oxfmt --check` on every changed file, and `vitest run`
for `ProjectConnectionPopover.platform.test.tsx` and
`ActivityStats.test.tsx`.

## 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-5026](https://linear.app/supabase/issue/FE-5026/track-usage-on-project-home-gaps-only).
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: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-12-01 11:54:29 +01:00
supabase-vercel-tedd[bot] f4a929907b chore(studio): promote jsx-a11y/heading-has-content to error (#54320)
## Problem

`jsx-a11y/heading-has-content` is tracked by the Studio ESLint ratchet
with a baseline of 0 violations. The ratchet stops new violations from
adding up, but the rule is still only a warning, so the editor and
`lint` don't flag a new empty heading as an error.

## Solution

Promote the rule to `error` in the Studio ESLint config, and remove its
ratchet bookkeeping from `.github/eslint-rule-baselines.json` and
`scripts/ratchet-rules.json`. No source file breaks the rule, so no code
changes are needed.

## How to verify

1. `pnpm --filter studio run lint:ratchet` reports no regressions.
2. `pnpm --filter studio run lint` reports 0 errors.
3. `pnpm exec eslint --print-config <any studio file>` from
`apps/studio` shows `jsx-a11y/heading-has-content` at severity 2
(error).

## Checks

Ran `pnpm --filter studio run lint:ratchet` (no regressions), `eslint .`
in `apps/studio` (0 errors, no `heading-has-content` findings), `eslint
--print-config` (rule resolves to error), and `oxfmt --check` on the
changed files. Skipped the typecheck because no TypeScript file changed.

## 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-5253](https://linear.app/supabase/issue/FE-5253/weekly-eslint-ratchet-review-for-supabasesupabase-appsstudio).
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-01 11:02:14 +01:00
supabase-vercel-tedd[bot]andJoshen Lim bd4912cbdc feat(studio): track SQL editor sidebar, snippet and editor tab usage (#54170)
## Context
Adds seven PostHog events through `useTrack` for the SQL Editor to
better identify usage patterns there, each fired from its click or
submit handler:
- `sql_editor_new_item_clicked` (`itemType`) for the "+" menu.
<img width="229" height="150" alt="image"
src="https://github.com/user-attachments/assets/f6281bdb-d70e-4e7c-adf3-edce0ec2116c"
/>
- `sql_editor_snippet_search_submitted`: once per search session, on the
first keystroke into an empty search box.
<img width="285" height="214" alt="image"
src="https://github.com/user-attachments/assets/4c482385-cab1-49d3-9aaa-e2be1aafb1af"
/>
- `sql_editor_snippet_sort_updated` (`sortBy`) when the sort order
changes.
<img width="226" height="121" alt="image"
src="https://github.com/user-attachments/assets/0e7268ee-bf4a-46d4-ba8d-f07a6e9b0675"
/>
- `sql_editor_snippet_action_clicked` (`action`, `isBulk`) for snippet
and folder context-menu actions.
<img width="254" height="275" alt="image"
src="https://github.com/user-attachments/assets/7338df06-47df-47be-b44d-6fc2dd49c586"
/>
- `sql_editor_snippet_share_submitted` when the share modal is
confirmed.
<img width="531" height="309" alt="image"
src="https://github.com/user-attachments/assets/997e7567-9fdb-400e-af1a-147a5dcbb7a7"
/>
- `sql_editor_snippet_moved` (`snippetCount`, `toNewFolder`) after a
move succeeds.
<img width="539" height="247" alt="image"
src="https://github.com/user-attachments/assets/f0da9544-d29e-402f-a0d3-9b7f5e3fa3c6"
/>
- `editor_tab_closed` (`closeType`, `editor`) in the tab bar that the
SQL, Table and Explorer editors share. It fires when the tabs actually
close, after any unsaved-changes confirmation.
<img width="147" height="64" alt="image"
src="https://github.com/user-attachments/assets/96073c69-acf1-4829-8532-beb283b7f373"
/>

No property carries names, SQL or search text, and every event is sent
with an explicit `track()` call.

## How to verify

On the PR's Studio preview, with analytics consent accepted, watch the
network requests to the telemetry endpoint:

1. In the SQL editor, open the "+" menu and pick a new snippet, a new
folder and (when available) a new logs query. Each one sends
`sql_editor_new_item_clicked` with the matching `itemType`.
2. Type into the snippet search box. One
`sql_editor_snippet_search_submitted` goes out on the first character,
and none on later ones. Clear the box and type again: one more goes out.
3. Change the sort to Alphabetical, then to Created At. Each change
sends `sql_editor_snippet_sort_updated` with `sortBy` `name` or
`inserted_at`. Picking the current sort again sends nothing.
4. Right-click a snippet and pick each action (open in new tab, rename,
move, share, unshare, duplicate, add to or remove from favorites,
export, delete). Each sends `sql_editor_snippet_action_clicked` with
that `action` and `isBulk: false`. Shift-click several snippets and pick
move or delete: `isBulk: true`.
5. Right-click a folder and pick create snippet, rename or delete:
`action` is `folder_create_snippet`, `folder_rename` or `folder_delete`.
6. Confirm the share modal: `sql_editor_snippet_share_submitted` goes
out. Move a snippet into a new folder: after it succeeds,
`sql_editor_snippet_moved` goes out with `snippetCount: 1, toNewFolder:
true`.
7. In the SQL editor and the Table editor tab bars, use Close, Close
Others, Close to the Right and Close All, and the tab's X button. Each
sends `editor_tab_closed` with the matching `closeType` and `editor`. If
you cancel an unsaved-changes prompt, nothing is sent.

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-12-01 13:29:53 +07:00
supabase-vercel-tedd[bot]andIvan Vasilov e3684c034c feat(studio): track usage on Project Settings: General (#54081)
## Problem

Project Settings → General has almost no usage tracking. We can't tell
how often users restart, pause, resume, or transfer projects from here.
We also can't tell how often they copy the project ID or region, use the
custom domain flow, or toggle high compliance mode.

## Solution

Adds six PostHog events to `packages/common/telemetry-constants.ts`:
`project_name_updated`, `project_settings_value_copied`,
`project_lifecycle_action_submitted`, `project_compliance_mode_updated`,
`custom_domain_step_submitted`, and `custom_domain_dns_record_copied`.
Each event fires from the user's submit, confirm, copy, or toggle
handler, never on render. Properties are only enums and booleans. No
project names, domains, DNS record contents, or other typed values are
sent.

`ResumeProjectButton` is shared between settings and the paused-project
home state, so it now takes a required `source` prop. The two call sites
pass `settings_general` and `project_home`. Restart fires from the
confirmation modal, with `restart_project` or `restart_database`
depending on the chosen restart type. `DNSRecord` now types its `type`
prop as `'CNAME' | 'TXT'`, so the copy event sends the record type as an
enum. No `data-attr` attributes are added, because PostHog autocapture
is off and they would not be collected.

## How to verify

1. On Project Settings → General, save a new project name. One
`project_name_updated` event fires.
2. Copy the project ID, then the region. Each copy fires one
`project_settings_value_copied` event, with `field` set to `projectRef`
and then `region`.
3. Open the restart modal, then cancel it. No event fires. Confirm a
restart (project or fast database reboot). One
`project_lifecycle_action_submitted` fires with `action:
restart_project` or `restart_database` and `source: settings_general`.
4. Confirm a pause, a resume, and a transfer. Each fires
`project_lifecycle_action_submitted` with the matching `action`. A
resume from settings sends `source: settings_general`; a resume from the
paused project home page sends `source: project_home`.
5. Toggle high compliance mode. One `project_compliance_mode_updated`
fires, with `isSensitive` set to the new value.
6. In the custom domain flow, Add, Verify, confirm Activate, and confirm
Delete each fire `custom_domain_step_submitted` with `step` set to
`configure`, `verify`, `activate`, and `remove`.
7. In the custom domain verification step, copy a DNS record's name,
then its value. Each copy fires one `custom_domain_dns_record_copied`
event, with `recordType` set to `CNAME` or `TXT` and `field` set to
`name` and then `value`.

## Checks

Ran `tsc --noEmit` in `apps/studio` and `packages/common`. Ran `eslint`
(default config and `eslint.type-checks.config.cjs`) on the changed
Studio files: no errors, only warnings that were already there. Ran
`oxfmt --check` on all changed files. Ran `vitest run` on
`General.test.tsx`, `Project.test.tsx`, `PauseProjectButton.test.tsx`,
and `RestartServerButton.test.tsx`: all pass.

## 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-5029](https://linear.app/supabase/issue/FE-5029/track-usage-on-project-settings-general).
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: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-11-30 20:38:20 +01:00
supabase-vercel-tedd[bot]andAli Waseem 08753bf24f docs: remove 90-day restore window screenshots from pausing guides (#54302)
## Problem

The docs state that a paused Free plan project can be restored for 1
year. Screenshots on the Upgrading guide and the local backup restore
guide still showed the old 90-day restore window, which contradicts the
text.

## Solution

The Upgrading guide drops the paused-project screenshot that showed a
90-day countdown. The download-backups screenshots on the Upgrading
guide and the "Restoring a downloaded backup locally" guide are cropped
to the Download backups menu, so they keep the useful part (where to
download the backup and find its Postgres version) without the outdated
90-day banner. Both images get alt text that describes what they show.
The `#90-day-window-to-restore` anchor on the Project Pausing page stays
as it is, so existing links keep working.

## How to verify

1. Open
https://docs-git-tedd-paused-restore-window-screenshots-supabase.vercel.app/docs/guides/platform/upgrading#time-limits
and
https://docs-git-tedd-paused-restore-window-screenshots-supabase.vercel.app/docs/guides/local-development/restoring-downloaded-backup#downloading-your-backup.
2. The Time limits section shows no "90 Days Remaining" screenshot, and
its one remaining backup screenshot shows only the Download backups
menu.
3. The Downloading your backup section shows the Download backups menu
with the Postgres version highlighted, and no "90 days" text.
4.
https://docs-git-tedd-paused-restore-window-screenshots-supabase.vercel.app/docs/guides/platform/free-project-pausing#90-day-window-to-restore
still jumps to the Restore window section.

## Checks

Ran `pnpm exec oxfmt --check` on both changed MDX files. Searched
`apps/docs/content` for remaining 90-day restore references and the repo
for references to the removed image. Checked the 1-year window against
the Studio paused-project screens (`PauseDisabledState.tsx`,
`formatRestoreWindow`). No TypeScript changed, so typecheck and lint
were not affected; `build:guides-markdown` was not run in this
environment.

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

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Ali Waseem <waseema393@gmail.com>
2026-11-30 14:07:11 +00:00
supabase-vercel-tedd[bot] d86bc8fb9d fix(studio): keep the new MFA factor when clicking outside the verify dialog (#54223)
## Problem

On the account Security page, when you set up an authenticator app, a
click outside the "Verify authenticator app" dialog counts as a cancel
and unenrolls the factor that was just created. The dialog stays open
while that request runs, so you can still type a code and click Confirm,
and verification then fails with an unexpected server error. A page
element that stays clickable above the dialog, such as a consent banner,
triggers this easily.

## Solution

`ConfirmationModal` gets an optional `dismissOnInteractOutside` prop
(default `true`, so no other dialog changes). The authenticator verify
step turns it off. Only Cancel, the close button, or Escape cancel setup
and remove the unverified factor. The verify step also stays in its
loading state while an unenroll is in flight, so Confirm can't run
against a factor that is being deleted.

## How to verify

1. Open Account → Security and click Set up MFA. Enter a name and click
Generate QR code.
2. Click anywhere outside the "Verify authenticator app" dialog. The
dialog stays open, and the QR code and secret do not change.
3. Enter a valid code from the authenticator app and click Confirm. The
method is added ("MFA method added").
4. Repeat steps 1–2, enter a wrong code, and click Confirm. The toast
reports an invalid TOTP code, not an unexpected failure.
5. Repeat step 1, then click Cancel. The dialog closes and no unverified
authenticator remains in the list.
6. Open any other confirmation dialog in Studio and click outside it. It
still closes as before.

## Checks

Ran `pnpm turbo run typecheck --filter=studio --filter=ui-patterns`,
`eslint` (default and type-checks configs) on the changed Studio files,
`oxfmt --check` on the changed files, and `vitest run
components/interfaces/Account/TOTPFactors/AddNewFactorModal.test.tsx`.
The new test checks that an outside pointer or focus event does not
unenroll the factor and that Confirm then verifies it. It fails without
the fix.

## 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
- [x] I have added or updated tests where applicable

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[FE-5246](https://linear.app/supabase/issue/FE-5246/clicking-outside-the-mfa-setup-dialog-deletes-the-new-factor-so).
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-11-30 13:39:16 +00:00
supabase-vercel-tedd[bot] a36d21848c feat(studio): note that edge function secrets can't be retrieved once saved (#54037)
## Problem

The "Add or replace secrets" form on the Edge Functions secrets page
doesn't tell users that a secret's value can't be viewed again after
saving. Only the "Edit secret" sheet says so, after the value is already
saved.

## Solution

The Value field's description in the "Add or replace secrets" form now
says that secrets can't be retrieved once saved, using the same wording
as the Edit secret sheet. Users see this before they save a value.

## How to verify

1. Open `/project/<ref>/functions/secrets` in the Studio preview.
2. In the "Add or replace secrets" card, the Value field's description
reads "Supports multi-line values such as PEM keys, JSON, or functions.
Secrets can’t be retrieved once saved."
3. Click "Add another": the new row's Value field shows the same
description.
4. Add a secret and save it: it saves and appears in the secrets list as
before.
5. Open an existing secret's Edit sheet: its note is unchanged.

## Checks

Ran `pnpm turbo run typecheck --filter=studio`, `eslint` on the changed
file, `oxfmt --check` on the changed file, and `vitest run` on
`AddNewSecretForm.test.tsx`. All pass.

## 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-5223](https://linear.app/supabase/issue/FE-5223/add-mention-that-edge-function-secrets-cannot-be-retrieved-after).
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-11-25 06:55:15 -06:00
supabase-vercel-tedd[bot] e508c3c3f0 feat(studio): track schema visualizer usage (#53955)
## Problem

The schema visualizer (`/project/[ref]/database/schemas`) sends no
telemetry. We can't tell whether people use it to explore a schema or to
export it, which export format they pick, or whether they edit tables
from the graph.

## Solution

Adds PostHog events for the visualizer's main actions: changing the
schema, selecting a Find table result, copying (schema or table as
SQL/Markdown, table or column name), downloading the graph as PNG or
SVG, applying Auto layout, and choosing Edit table or Edit column from a
node menu. Each event fires from the action's handler, so actions
started from a keyboard shortcut count too. Properties are only fixed
enums (`schemaType`, `content`, `format`, `action`); no schema, table,
or column names are sent. Each tracked element also gets a `data-attr`
for autocapture. View in Table Editor and the empty state's New table
link get a `data-attr` only, because the pageview already records them.

It also fixes an empty canvas after switching back to a schema that was
already loaded. The graph stays mounted in that case and fitted the view
only on first load, so the new schema's tables could sit off-screen
until a reload. The view now fits whenever the schema on the canvas
changes. Edits within the same schema still keep the current view.

Studio's database pages keep the selected schema name in the `schema`
URL param, and that name is chosen by the customer. Telemetry now
redacts its value to `redacted` wherever it already redacts `keywords`:
the event and pageview `page_url`, the query string, the referrer,
first-touch data, and the URL properties posthog-js adds. This applies
to every Studio event and pageview, not just this page. Params that only
contain the word, such as `schemas` or `myschema`, are left alone.

## How to verify

On the PR preview, open a project's Database > Schema Visualizer with
PostHog debugging on (or watch the network requests to the telemetry
endpoint), then:

1. Change the schema in the selector: one
`database_schema_selector_updated` event with `schemaType` of `public`,
`protected` (for example `auth`), or `custom`.
2. Open Find table and select a table: one
`database_schema_visualizer_find_table_clicked` event.
3. Click Copy as SQL: one `database_schema_visualizer_copied` with
`content: 'schema_sql'`. Copy as Markdown from the export menu sends
`content: 'schema_markdown'`.
4. Download as PNG and as SVG: one
`database_schema_visualizer_image_download_clicked` each, with `format`
of `png` or `svg`.
5. Open Auto layout and click Apply: one
`database_schema_visualizer_auto_layout_applied`. Cancel sends nothing.
6. From a table node menu, choose Copy name, Copy as SQL, and Copy as
Markdown: `database_schema_visualizer_copied` with `content` of
`table_name`, `table_sql`, and `table_markdown`. Column menu Copy name
sends `column_name`.
7. From a table node menu choose Edit table, and from a column menu
choose Edit column: `database_schema_visualizer_node_menu_clicked` with
`action` of `edit_table` and `edit_column`.
8. No event carries a schema, table, or column name.
9. Switch the schema from public to auth, then back to public, with no
reload: the public tables are shown and fitted on the canvas each time.
Repeat auth → public → auth.
10. Edit a column from the graph and save: the view does not jump.
11. In the telemetry requests from steps 1 to 7 and in the pageview,
`page_url` and `ph.search` show `schema=redacted`, never the schema
name. The page itself still shows and switches the real schema.

## Checks

Ran `pnpm turbo run typecheck --filter='...[origin/master]'`. Every
package passed except studio, which ran out of memory beside a parallel
lint run. `pnpm --filter studio run typecheck` alone then passed, and
passed again after the view fix. `pnpm turbo run lint
--filter='[origin/master]'` ran out of memory twice on studio's
`lint:type-checks` (2 GB default heap). So I ran `eslint` and `eslint
--config eslint.type-checks.config.cjs` on the changed Studio files with
a larger heap: no errors, only pre-existing warnings. `vitest run
components/interfaces/Database/Schemas/Schemas.utils.test.ts` passed.
For the redaction, `vitest run` in `packages/common` (all 310 tests,
including the new `schema` cases) and its `typecheck` passed; `common`
has no lint script. `oxfmt --check` passes on all changed files. Event
names and properties follow the repo's `telemetry-standards` skill.

## Checklist

- [x] I have read the [contributing
guidelines](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] The change is scoped to one feature
- [x] Events are defined in `packages/common/telemetry-constants.ts` and
added to the `TelemetryEvent` union

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[FE-5031](https://linear.app/supabase/issue/FE-5031/track-usage-on-the-schema-visualizer).
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-11-25 11:35:03 +00:00
supabase-vercel-tedd[bot] 3272305eb6 chore(deps): bump postcss-selector-parser to 7.2.1 (#54012)
## Problem

The lockfile resolves `postcss-selector-parser` 7.x to 7.1.5. That
version has a moderate advisory: flat selector parsing has quadratic
complexity, which allows CPU exhaustion (vulnerable `>=7.0.0 <7.1.6`,
patched in 7.1.6).

## Solution

`scripts/bump-package.ts postcss-selector-parser` moves the 7.x copy,
which `shadcn` pulls in, from 7.1.5 to 7.2.1. The script added a
temporary override, installed, then removed the override and
reinstalled. Only `pnpm-lock.yaml` changes: no override stays in
`pnpm-workspace.yaml`, and no `package.json` changes.

This is a partial fix. The copy that `@tailwindcss/typography@0.5.19`
pulls in stays at 6.0.10, which is still affected by the 6.x range of
the same advisory (patched in 6.1.5). Updating it needs a change to
`@tailwindcss/typography`, so `pnpm audit` still reports
`postcss-selector-parser` after this PR.

## How to verify

1. `pnpm install --frozen-lockfile` succeeds.
2. `pnpm why postcss-selector-parser --recursive` lists 7.2.1 and
6.0.10, with no 7.1.5.
3. `git diff origin/master --stat` shows only `pnpm-lock.yaml`.

## Checks

Ran `pnpm tsx scripts/bump-package.ts postcss-selector-parser` (exit 0),
`pnpm install --frozen-lockfile`, and `pnpm why postcss-selector-parser
--recursive`. Did not run typecheck, lint, or builds: the change is a
lockfile-only patch bump of a transitive dependency.

## Checklist

- [x] I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
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
[FE-5206](https://linear.app/supabase/issue/FE-5206/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-11-25 11:20:23 +01:00
supabase-vercel-tedd[bot] 36e370aa5c docs(ai): explain how hnsw.ef_search caps HNSW results and how to set it (#53997)
## Problem

The HNSW tuning section said only that a higher `ef_search` gives better
accuracy and slower queries. A reader whose query uses a `limit` above
`ef_search` gets fewer rows back. The docs didn't explain why, what the
range is, or how to change the setting.

Related to
[FDBKIN-12895](https://linear.app/supabase/issue/FDBKIN-12895/document-performance-trade-offs-of-pgvectors-hnsw-ef-search-parameter)
Closes
[DOCS-1800](https://linear.app/supabase/issue/DOCS-1800/explain-that-hnswef-search-caps-hnsw-results-and-how-to-set-it)

## Solution

The `ef_search` bullet on the "Going to production" guide now names the
`hnsw.ef_search` setting, its default, and its valid range. Plain
paragraphs after the list explain how it caps the rows an HNSW scan
returns and how to set it. They cover a session, one transaction, a
transaction-mode pooler, and a database function called through the Data
API. They also point to iterative index scans for returning more rows,
and don't repeat that explanation. The filtering section of the HNSW
indexes page now names `hnsw.ef_search` as the limit, so the two pages
agree.

## How to verify

1. Open
https://docs-git-tedd-docs-1800-supabase.vercel.app/docs/guides/ai/going-to-prod#hnsw-understanding-efconstruction--efsearch--and-m
and
https://docs-git-tedd-docs-1800-supabase.vercel.app/docs/guides/ai/vector-indexes/hnsw-indexes#filtering-with-hnsw-indexes.
2. The `ef_search` bullet states the `hnsw.ef_search` default (40) and
range (1 to 1,000), and stays one paragraph like the `m` and
`ef_construction` bullets.
3. A paragraph after the list says that without iterative index scans,
an HNSW index scan returns at most `ef_search` rows, even when the
query's `limit` is larger.
4. A SQL block shows a `set` statement and a `set local` statement
inside `begin` / `commit`. A second SQL block shows a database function
with a `set hnsw.ef_search = 100` clause.
5. The paragraph about setting the value links to "Transaction mode
limitations" and to "Querying a vector / embedding", and both links land
on those sections.
6. A paragraph links to "Filtering with HNSW indexes", and the link
lands on that section.
7. In "Filtering with HNSW indexes", the sentence about selective
filters names `hnsw.ef_search` as the limit on rows a scan returns, and
its link lands on the going-to-prod HNSW section.

## Checks

Ran `pnpm turbo run typecheck`, `pnpm turbo run lint`, and `pnpm exec
oxfmt --check` on the changed docs. Ran both SQL blocks in page order on
Postgres 18 with pgvector 0.8.1, against 20k random vectors with an HNSW
`vector_l2_ops` index and `vector` installed in the `extensions` schema.
At the default, `limit 100` returned 40 rows. With `set` or `set local
hnsw.ef_search = 100`, it returned 100 rows. The `set local` value reset
after `commit`, and `1001` was rejected as outside 1..1000. The function
with `set hnsw.ef_search = 100` returned 100 rows for `limit 200`, and
the session value stayed at 40. At `ef_search = 1000`, `limit 1500`
returned 1000 rows, and 1500 after `set hnsw.iterative_scan =
relaxed_order`. Docs tests skipped: they need Docker.

## 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-1800](https://linear.app/supabase/issue/DOCS-1800/explain-that-hnswef-search-caps-hnsw-results-and-how-to-set-it).
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-11-24 20:02:50 -07:00
supabase-vercel-tedd[bot] 528e2d0a98 docs(self-hosting): explain how Edge Functions workers are reused across requests (#53996)
## Problem

The self-hosted Functions guide lists worker timeouts and idle cleanup,
but never says that a running worker serves later requests. The Docker
guide says the main worker loads each function from disk per request,
which suggests top-level setup runs on every request.

Related to
[FDBKIN-22732](https://linear.app/supabase/issue/FDBKIN-22732/clarify-edge-functions-worker-lifecycle-and-reuse-strategy-for-self)
Closes
[DOCS-1799](https://linear.app/supabase/issue/DOCS-1799/explain-how-self-hosted-edge-functions-reuse-workers-across-requests)

## Solution

A new "Worker lifecycle" section on the self-hosted Functions guide
explains that the default `per_worker` policy sends requests to a
function's running workers. Concurrent cold requests can start up to one
worker per CPU, and later requests rotate across them. It says that
top-level code runs once per worker, so heavy setup belongs there. It
also lists the events that stop a worker from taking new requests,
including retirement at half of `workerTimeoutMs`, links to the existing
timeout and cleanup sections, and names the settings that keep workers
alive longer. The Docker guide's sentence now says that a restart stops
running workers, so the next request picks up changed code.

## How to verify

1. Open
https://docs-git-tedd-docs-1799-supabase.vercel.app/docs/guides/self-hosting/self-hosted-functions#worker-lifecycle
and
https://docs-git-tedd-docs-1799-supabase.vercel.app/docs/guides/self-hosting/docker#accessing-edge-functions.
2. The Worker lifecycle section says that requests go to a running
worker for the function, that concurrent cold requests might each start
a worker up to the number of CPUs, and that later requests rotate across
those workers.
3. It says that top-level code runs once per worker, that heavy setup
goes at the top level, and that top-level state belongs to one worker.
4. It lists reaching half of `workerTimeoutMs`, no requests, idle-worker
cleanup, an error or resource limit, and a service restart as events
that stop a worker from taking new requests, and says a new worker
starts when the function has none left. The links to Timeout errors,
Idle-worker cleanup, Per-worker memory limit, and Container memory
budget go to those sections.
5. It names `requestAbsentTimeoutMs` and `workerTimeoutMs` as the
settings to raise to keep workers alive longer.
6. The Docker guide no longer says functions load from disk per request,
and still says a restart picks up new or changed function code.

## Checks

Ran `pnpm turbo run lint typecheck` on the changed packages and `pnpm
exec oxfmt --check` on the changed files. Checked the facts against
`docker/volumes/functions/main/index.ts` and `docker/docker-compose.yml`
in this repo, and against `supabase/edge-runtime` at `v1.79.2` (the
compose image tag): `cli/src/flags.rs` (`--policy` default),
`crates/base/src/worker/pool.rs` (worker reuse, rotation, concurrent
creation, and retirement),
`crates/base/src/worker/supervisor/strategy_per_worker.rs` (early
retirement at half of the wall-clock limit), and
`ext/workers/user_workers.js` (`forceCreate` default). Docs tests need
Docker and were skipped. Reuse wasn't tested against a running stack.

## 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-1799](https://linear.app/supabase/issue/DOCS-1799/explain-how-self-hosted-edge-functions-reuse-workers-across-requests).
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-11-24 20:02:44 -07:00
supabase-vercel-tedd[bot] 74cb5aa97a docs(rls): warn that an auth.uid() is null branch exposes every row (#53995)
## Problem

The RLS guide explains that `auth.uid()` is `null` for a request without
a user, but not what happens when a policy tests for `null` on purpose.
A condition such as `auth.uid() is null or auth.uid() = user_id` returns
every row to such a request. The guide also never says which roles a
policy with no `to` clause applies to.

Related to
[FDBKIN-31059](https://linear.app/supabase/issue/FDBKIN-31059/update-rls-documentation-to-warn-against-common-anon-leak-policy)
Closes
[DOCS-1798](https://linear.app/supabase/issue/DOCS-1798/warn-that-an-authuid-is-null-or-policy-condition-exposes-every-row)

## Solution

The `auth.uid()` section of the RLS guide now states in body text when
`auth.uid()` is `null` and what an owner comparison returns then. A
`danger` admonition replaces the old caution: it shows the insecure `is
null` branch, explains why `to authenticated` alone doesn't fix it, and
gives a safe owner-only policy to copy. "Specify roles in your policies"
now says that a policy with no `to` clause applies to `public`, which
includes `anon`. The old advice to add `auth.uid() IS NOT NULL AND` is
removed, because the plain comparison already returns no rows for such
requests.

## How to verify

1. Open
https://docs-git-tedd-docs-1798-supabase.vercel.app/docs/guides/database/postgres/row-level-security#authuid
and
https://docs-git-tedd-docs-1798-supabase.vercel.app/docs/guides/database/postgres/row-level-security#specify-roles-in-your-policies.
2. The `auth.uid()` section says it returns `null` for any request whose
JWT has no `sub`, including every `anon` request.
3. A danger admonition warns that an `auth.uid() is null` branch returns
every row to such requests, and that `to authenticated` doesn't remove
the risk.
4. The admonition ends with a copyable policy that uses `to
authenticated` and `(select auth.uid()) = user_id`, with no `is null`
branch.
5. "Specify roles in your policies" says a policy with no `to` clause
applies to `public`, which every role, including `anon`, is a member of.
6. The new link from "Specify roles in your policies" (`#authuid`) jumps
to the `auth.uid()` section.

## Checks

Ran `pnpm exec oxfmt --check` on the changed page. ESLint ignores MDX
files. Ran both SQL snippets in PGlite 0.4.5 with `anon` and
`authenticated` roles, Supabase's `auth.uid()` definition, a two-row
table with `select` granted to both roles, and RLS on. With the insecure
policy and no `to`, `anon` reads both rows. With `to authenticated`, a
request with no `sub` reads both rows. With the safe policy, a user
reads only their own row and a request with no `sub` reads none. A
policy with no `to` lists `public` in `pg_policies.roles`, which matches
the Postgres `CREATE POLICY` docs. `pnpm build:guides-markdown` was not
run, because its federated-content step needs GitHub credentials.

## 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-1798](https://linear.app/supabase/issue/DOCS-1798/warn-that-an-authuid-is-null-or-policy-condition-exposes-every-row).
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-11-24 20:02:38 -07:00
supabase-vercel-tedd[bot] 13d1f13107 docs(platform): explain what a custom domain is for and that it must be a subdomain (#53993)
## Problem

The Custom Domains page didn't say what a custom domain is for. The
subdomain-only rule appeared only in the CLI prerequisites. A reader who
uses the dashboard, or reads only the intro and Limitations, could think
they can't use their own domain. They could also think the add-on hosts
their website on the root domain.

Related to
[FDBKIN-15980](https://linear.app/supabase/issue/FDBKIN-15980/clarify-that-custom-domains-are-for-api-endpoints-not-website-hosting)
Closes
[DOCS-1797](https://linear.app/supabase/issue/DOCS-1797/explain-that-a-custom-domain-replaces-the-project-api-url-and-must-be)

## Solution

The intro now says that a custom domain serves the project's API,
alongside the default `<project-ref>.supabase.co` domain, for Auth,
Storage, Edge Functions, and other API requests. Limitations now states
the subdomain rule for every setup path. It also widens the existing
hosting bullet: a custom domain isn't intended for hosting frontend
apps, and readers can host their website on the root domain with their
own hosting provider. The CLI prerequisite keeps the subdomain step
without repeating the rule.

The intro says "alongside" rather than "replaces", because the default
domain keeps working after activation. The hosting bullet keeps the "not
intended" framing, because Edge Functions can serve HTML only on a
custom domain.

Preview: [Custom
domains](https://docs-git-tedd-docs-1797-supabase.vercel.app/docs/guides/platform/custom-domains#limitations)

## Checks

Ran `pnpm exec oxfmt --check` on the changed file. Checked facts against
the page's activation steps, the Edge Functions limits page, and
Studio's custom domain form, which asks for a subdomain. Skipped `pnpm
build:guides-markdown`: its `build:federated-content` dependency needs
GitHub credentials that the build environment didn't have.

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

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[DOCS-1797](https://linear.app/supabase/issue/DOCS-1797/explain-that-a-custom-domain-replaces-the-project-api-url-and-must-be).
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-11-24 20:02:32 -07:00
supabase-vercel-tedd[bot] caf7baaf08 docs(auth): show RLS policies that match the Firebase user ID (#53992)
## Problem

The Firebase Auth guide sets up the client, the integration, the `role`
claim, and the issuer check, but never shows how to limit rows to the
signed-in Firebase user. The obvious helper, `auth.uid()`, fails with
Firebase UIDs.

Related to
[FDBKIN-16284](https://linear.app/supabase/issue/FDBKIN-16284/provide-a-clear-process-for-connecting-firebase-auth-to-supabase-rls)
Closes
[DOCS-1796](https://linear.app/supabase/issue/DOCS-1796/show-how-to-write-rls-policies-that-match-the-firebase-user-id)

## Solution

Adds a short "Write RLS policies for Firebase users" section to the
Firebase Auth guide. It explains that `sub` holds the Firebase `uid`,
shows a select policy that compares a `text` column with `(select
auth.jwt()->>'sub')`, and says to use `auth.jwt()->>'sub'` in place of
`auth.uid()`, which casts `sub` to `uuid`. The snippet uses the same
shape and placeholder as the page's other policies and the custom OIDC
guide. It points self-hosters to the restrictive issuer policy.

## How to verify

1. Open
https://docs-git-tedd-docs-1796-supabase.vercel.app/docs/guides/auth/third-party/firebase-auth#write-rls-policies-for-firebase-users.
2. The section sits between "Add a new Third-Party Auth integration to
your project" and the self-hosting restrictive policy section.
3. The SQL snippet creates a select policy on `table_name` for
`authenticated` using `user_id = (select auth.jwt()->>'sub')`.
4. The text says `user_id` must be a `text` column, and to use
`auth.jwt()->>'sub'` in place of `auth.uid()`, which fails with `invalid
input syntax for type uuid`.
5. The text asks only self-hosters to add the restrictive issuer policy.
6. The links to the RLS guide, the `role` claim section, and the
restrictive issuer policy section go to the right headings.

## Checks

Ran `pnpm exec oxfmt --check` on the changed file. Checked `auth.uid()`
against the `supabase/auth` migration
`20220224000811_update_auth_functions.up.sql` (it casts `sub` to
`uuid`), and the `sub` claim against Firebase's ID token docs. Skipped
`pnpm build:guides-markdown`, which needs GitHub credentials that the
build environment didn't have.

## 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-1796](https://linear.app/supabase/issue/DOCS-1796/show-how-to-write-rls-policies-that-match-the-firebase-user-id).
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-11-24 20:02:27 -07:00
supabase-vercel-tedd[bot] c9a093fa81 docs(auth): show the hashed nonce in the Google pre-built HTML example (#53991)
## Problem

The Google pre-built HTML example on the Google sign-in guide showed
`data-nonce=""`, while the nonce step below it said the nonce must go in
that attribute. Readers couldn't tell what value belongs in
`data-nonce`, whether the attribute is required, or how to set a value
that changes on every sign-in.

Related to
[FDBKIN-45945](https://linear.app/supabase/issue/FDBKIN-45945/clarify-data-nonce-attribute-in-google-login-documentation-html)
Closes
[DOCS-1795](https://linear.app/supabase/issue/DOCS-1795/show-where-the-hashed-nonce-goes-in-the-google-pre-built-html-example)

## Solution

The HTML example now shows a `<HASHED_NONCE>` placeholder. A line below
it says to keep the attribute only when you configure a nonce and to
remove it otherwise, because Supabase Auth rejects a sign-in whose ID
token has a nonce that `signInWithIdToken` doesn't pass (unless the
nonce check is skipped). The "Configure a nonce" step now says the
hashed nonce goes in `data-nonce` and the raw nonce in the `nonce`
option of `signInWithIdToken`, and explains why: Supabase Auth hashes
the raw value and compares it with the token's nonce. The step ends with
two ways to set a per-sign-in value from code: write the `g_id_onload`
element and then load the Google client script, or pass the hashed nonce
to `google.accounts.id.initialize` as the Next.js example does. The
nonce-generation snippet itself is unchanged.

## How to verify

1. Open
https://docs-git-tedd-docs-1795-supabase.vercel.app/docs/guides/auth/social-sign-in/auth-google#google-pre-built.
2. In the "Your final HTML code might look something like this" example,
`data-nonce` shows `<HASHED_NONCE>`, not an empty string.
3. Below that example, the page says to keep `data-nonce` only if you
configure a nonce, to remove it otherwise, and that Supabase Auth
rejects the sign-in when the ID token has a nonce and
`signInWithIdToken` doesn't pass one, unless `Skip nonce check` is
enabled.
4. The "Configure a nonce" step says the hashed nonce goes in
`data-nonce` and the raw nonce in the `nonce` option of
`signInWithIdToken`.
5. The end of that step says to generate the `data-nonce` value in page
code and gives two options: write the `g_id_onload` element from code
and then load the Google client script in place of the `<script>` tag
from the first step, or pass the hashed nonce to
`google.accounts.id.initialize`. Its "One-tap with Next.js" link jumps
to that section.

## Checks

Ran `pnpm exec oxfmt --check` on the changed MDX file; it passes. No
code changed, so no typecheck, lint, or tests apply. Checked the hashing
rule against Supabase Auth's ID-token grant
(`internal/api/token_oidc.go`: SHA-256 of the raw nonce, hex-encoded,
compared with the token's `nonce` claim; when the nonce check is not
skipped, a token nonce without a passed nonce, or the reverse, fails
with "Passed nonce and nonce in id_token should either both exist or
not.") and the Google Identity Services HTML reference for `data-nonce`
(optional). Did not run the docs build in the sandbox.

## Checklist

- [x] I have read the [Contributing
Guidelines](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] I have kept the change small and focused
- [ ] 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-1795](https://linear.app/supabase/issue/DOCS-1795/show-where-the-hashed-nonce-goes-in-the-google-pre-built-html-example).
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-11-24 20:02:21 -07:00
supabase-vercel-tedd[bot] 9298ed68c1 docs(functions): list all supported sync Deno APIs and cover self-hosted workers (#53971)
## Problem

The list of synchronous Deno APIs on the Edge Functions ephemeral
storage page leaves out three APIs that the runtime allows during
initial script evaluation. The self-hosted Functions guide doesn't say
whether these limits apply to self-hosted functions, or where to find
them.

Related to
[FDBKIN-8800](https://linear.app/supabase/issue/FDBKIN-8800/document-which-deno-sync-functions-are-supported-in-self-hosted-edge)
Closes
[DOCS-1762](https://linear.app/supabase/issue/DOCS-1762/list-every-supported-sync-deno-api-and-say-they-apply-to-self-hosted)

## Solution

The ephemeral storage page now lists all 12 sync APIs that edge-runtime
allows during initial script evaluation, adding `Deno.lstatSync`,
`Deno.makeTempFileSync`, and `Deno.copyFileSync`. The self-hosted
Functions guide gets a short "Synchronous file APIs" section: user
workers get the same init-only rule and the `blocklisted on the current
context` error, and the main worker router isn't restricted. It links to
the list instead of repeating it.

## How to verify

1. On `/docs/guides/functions/ephemeral-storage`, the "Using synchronous
file APIs" list shows 12 APIs, including `Deno.lstatSync`,
`Deno.makeTempFileSync`, and `Deno.copyFileSync`.
2. On `/docs/guides/self-hosting/self-hosted-functions`, a "Synchronous
file APIs" section says user-worker functions can use these APIs only
during initial script evaluation, names the error thrown otherwise, and
says the main worker isn't restricted.
3. The link in that section opens the list on the ephemeral storage
page, and the self-hosted page doesn't repeat the list.

## Checks

Ran `pnpm exec oxfmt --check` on both pages. Checked the API list, the
error text, and the `kind === "user"` gate against
`ext/runtime/js/bootstrap.js` in `supabase/edge-runtime` at `v1.79.2`,
the version `docker/docker-compose.yml` pins. Checked that
`docker/volumes/functions/main/index.ts` doesn't set
`useReadSyncFileAPI` when it creates user workers. `pnpm
build:guides-markdown` couldn't run in the sandbox: it needs GitHub
credentials for federated content.

## Checklist

- [x] I have read the [contributing
guidelines](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md).
- [x] The change is docs content only.

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[DOCS-1762](https://linear.app/supabase/issue/DOCS-1762/list-every-supported-sync-deno-api-and-say-they-apply-to-self-hosted).
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-11-24 13:55:50 -07:00
supabase-vercel-tedd[bot] ada003c3d7 docs(auth): explain how the SSR session carries over between requests (#53975)
## Problem

The "How it works" section of the SSR advanced guide says the tokens
must be stored in cookies, but not that `@supabase/ssr` does this. A
reader who signs a user in on one server route can't tell how a later
request gets the session back, so they may pass tokens around and call
`setSession` themselves.

Related to
[FDBKIN-20417](https://linear.app/supabase/issue/FDBKIN-20417/clarify-server-side-session-management-across-multiple-http-requests)
Closes
[DOCS-1765](https://linear.app/supabase/issue/DOCS-1765/explain-how-a-server-side-session-carries-over-to-the-next-request)

## Solution

Two paragraphs in "How it works" on the SSR advanced guide explain the
cookie round trip. On sign-in, a code exchange, a refresh, or a user
update, the server client writes the session through `setAll`. On the
next request, a new server client reads it back through `getAll`, with
no `setSession` call. The framework setup stays on "Creating a Supabase
client for SSR", which the new text links to.

## How to verify

1. Open `/docs/guides/auth/server-side/advanced-guide` on the preview
and go to "How it works".
2. Check that the section says a server-side sign-in with
`createServerClient` writes the session, access and refresh tokens
included, to the `sb-<project_ref>-auth-token` cookie through `setAll`.
3. Check that it says a new server client on a later request restores
the session through `getAll`, with no `setSession` call.
4. Click the "Creating a Supabase client for SSR" link and check that it
opens that page.

## Checks

Ran `pnpm turbo run typecheck --filter='...[origin/master]'`, `pnpm
turbo run lint --filter='[origin/master]'`, and `pnpm exec oxfmt
--check` on the changed file. Checked the facts against `@supabase/ssr`
0.12.7 (`createServerClient.js`, `cookies.js`, `utils/chunker.js`) and
the cookie name on "Creating a Supabase client for SSR". Skipped the
docs tests: they need Docker.

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

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[DOCS-1765](https://linear.app/supabase/issue/DOCS-1765/explain-how-a-server-side-session-carries-over-to-the-next-request).
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-11-24 13:54:10 -07:00
supabase-vercel-tedd[bot] 3a9459fef2 docs: say which requests count toward the Management API rate limits (#53974)
## Problem

The Management API rate limits section explains the limit, its scope,
and its headers, but not which traffic it applies to. Readers can't tell
whether CLI commands or calls to their own project, such as Edge
Function invocations, count toward it.

Related to
[FDBKIN-22153](https://linear.app/supabase/issue/FDBKIN-22153/clarify-documentation-for-management-api-rate-limits-and-what-actions)
Closes
[DOCS-1764](https://linear.app/supabase/issue/DOCS-1764/say-which-requests-count-toward-the-management-api-rate-limit)

## Solution

The "Rate limits" section of the Management API introduction now opens
by saying that only requests to `https://api.supabase.com` count, and
that requests to a project's own URL don't. The "Rate limit scope"
subsection ends with a CLI example: `supabase functions deploy` sends at
least one Management API request per function, so a large deploy to one
project might reach the per-endpoint limit. The example sits after the
scope rules so it reads as an application of them. The limits, tables,
scope rules, and headers are unchanged.

## How to verify

1. Open `/docs/reference/api/introduction` in the preview and go to
"Rate limits".
2. The intro says only requests to `https://api.supabase.com` count, and
that requests to `https://<project-ref>.supabase.co`, such as Edge
Function invocations and Data API calls, don't.
3. The end of "Rate limit scope" says the Supabase CLI uses the
Management API, and that `supabase functions deploy` to one project with
many functions might reach the per-endpoint limit.
4. The limit tables, scope list, and response headers match production.

## Checks

Ran `pnpm turbo run typecheck --filter='...[origin/master]'`, `pnpm
turbo run lint --filter='[origin/master]'` (no errors), and `pnpm exec
oxfmt --check` on the changed file. Checked the CLI claim against
`supabase/cli` `apps/cli/src/shared/functions/deploy.ts`. By default it
bundles with Docker and calls `POST /v1/projects/{ref}/functions` or
`PATCH /v1/projects/{ref}/functions/{slug}` per function, then one bulk
`PUT /v1/projects/{ref}/functions`. With `--use-api`, or when Docker
isn't running, it calls `POST /v1/projects/{ref}/functions/deploy` per
function. Because of that, the text doesn't name a single endpoint. The
Edge Function invocation URL comes from the Edge Functions quickstart.

## Checklist

- [x] I have read the [Contributing
Guidelines](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] 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-1764](https://linear.app/supabase/issue/DOCS-1764/say-which-requests-count-toward-the-management-api-rate-limit).
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-11-24 13:53:09 -07:00
supabase-vercel-tedd[bot] 101afae233 docs(auth): warn that users can change their own user metadata (#53973)
## Problem

The "Adding and retrieving user metadata" section of the Managing user
data guide shows how to set and read user metadata, but never says that
users can change it themselves. A reader could store roles or tenant IDs
there and trust them in RLS policies or app logic.

Related to
[FDBKIN-25396](https://linear.app/supabase/issue/FDBKIN-25396/document-that-raw-user-meta-data-is-client-mutable)
Closes
[DOCS-1763](https://linear.app/supabase/issue/DOCS-1763/warn-that-users-can-change-their-own-user-metadata-in-user-management)

## Solution

Adds a danger admonition at the end of the section. It explains that any
signed-in user can rewrite their own `user_metadata`, including the
claim in the JWT, so it must not hold authorization data or be trusted
in RLS. It points readers to `app_metadata` for values users must not
change, which only a trusted server with the secret key can set. It
links to the existing warnings on the Users page and in the RLS guide
instead of repeating them.

## How to verify

1. Open `/docs/guides/auth/managing-user-data` on the preview and scroll
to "Adding and retrieving user metadata".
2. Below the retrieval code tabs, a danger callout says that users can
change their own user metadata and that it must not hold roles or tenant
IDs or be trusted in RLS policies.
3. The callout says to store values that users must not change in
`app_metadata`.
4. The links to the user object
(`/docs/guides/auth/users#the-user-object`), `auth.jwt()`
(`/docs/guides/database/postgres/row-level-security#authjwt`), the
secret key page, and `auth.admin.updateUserById()` resolve and land on
the right sections.

## Checks

Ran `pnpm turbo run typecheck --filter='...[origin/master]'`, `pnpm
turbo run lint --filter='[origin/master]'`, and `pnpm exec oxfmt
--check` on the changed file; all pass. Docs tests skipped because they
need Docker. Checked behavior against `supabase/auth`
`internal/api/user.go` (`UserUpdate`: `data` updates user metadata with
no admin check; `app_metadata` from a non-admin returns `not_admin`) and
`internal/models/user.go` (`UpdateUserMetaData` merges keys and deletes
null ones).

## Checklist

- [x] I have read the [contributing
guidelines](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] The change is scoped to one docs section and adds no code samples

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[DOCS-1763](https://linear.app/supabase/issue/DOCS-1763/warn-that-users-can-change-their-own-user-metadata-in-user-management).
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-11-24 13:52:36 -07:00
supabase-vercel-tedd[bot] 962ea89399 docs: show which roles can delete the production branch (#53972)
## Problem

The project permissions table on the access control page lists Read and
Write for the production branch, but not Delete. Readers can't tell
whether a Developer can delete the production branch, though the table
shows that one can delete development branches.

Related to
[FDBKIN-36106](https://linear.app/supabase/issue/FDBKIN-36106/clarify-docs-on-branch-deletion-behavior-with-rbac-for-different-user)
Closes
[DOCS-1760](https://linear.app/supabase/issue/DOCS-1760/show-which-roles-can-delete-the-production-branch-in-the-project)

## Solution

The Branching rows on the Access Control page now have a Delete
permission for the production branch. Only Owner and Administrator can
use it. This matches the minimum role that the authorization model sets
for deleting the production branch. The other rows and the footnotes
stay the same.

## How to verify

1. Open `/docs/guides/platform/access-control#branching-permissions` on
the preview.
2. Under Production Branch, a Delete row shows a check for Owner and
Administrator and a cross for Developer and Read-Only.
3. The Development Branches rows (List, Create, Update, Delete) and the
footnotes read as before.
4. The new row has the same columns and icons as the rows around it.

## Checks

Ran `pnpm turbo run typecheck --filter='...[origin/master]'`, `pnpm
turbo run lint --filter='[origin/master]'`, and `pnpm exec oxfmt
--check` on the changed file. All passed. I checked the roles against
`branching_production_delete: 'administrator'` in
`apps/studio/components/interfaces/Account/AccessTokens/AccessToken.roles.ts`
and against the delete-branch endpoint requirements in
`packages/api-types/types/fga-requirements.ts`. I skipped the docs tests
because they need Docker.

## Checklist

- [x] I have read the [contributing
guidelines](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md).
- [x] The PR title follows the Conventional Commits format.
- [x] The change is limited to the scope described above.

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[DOCS-1760](https://linear.app/supabase/issue/DOCS-1760/show-which-roles-can-delete-the-production-branch-in-the-project).
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-11-24 13:50:05 -07:00
supabase-vercel-tedd[bot] cce655195d docs(rls): explain how policy conditions let Postgres use partial indexes (#53970)
## Problem

The "Add indexes" section of the Row Level Security guide covers plain
and composite btree indexes, but not partial indexes. A reader whose
policy filters on a fixed condition, such as a status flag, can't tell
how to index it.

Related to
[FDBKIN-31278](https://linear.app/supabase/issue/FDBKIN-31278/clarify-coordination-between-rls-policies-and-partial-indexes-for)
Closes
[DOCS-1761](https://linear.app/supabase/issue/DOCS-1761/explain-how-rls-policy-predicates-let-postgres-use-partial-indexes)

## Solution

"Add indexes" in the RLS guide now explains that Postgres applies a
policy's condition like a `where` clause. A condition that doesn't
depend on the user therefore lets queries use a partial index with the
same predicate. Postgres matches only some equivalent forms, so the
section tells readers to write the policy condition and the index
predicate the same way. The example follows the section's existing
pattern, a `test_table` policy followed by the index that serves it, and
the section links to the partial indexes section of the indexes guide.

## How to verify

1. Open `/docs/guides/database/postgres/row-level-security#add-indexes`
on the preview.
2. The section explains that a policy's fixed condition lets queries use
a partial index with the same predicate, and that both should be written
the same way.
3. The section has a `test_table` policy `using ( not is_archived )`,
then a partial index `where not is_archived`, in the same style as the
other examples in the section.
4. The section says a `using ( is_archived is false )` policy can't use
that index.
5. The "partial index" link opens the Partial indexes section of the
indexes guide.

## Checks

I ran `pnpm turbo run typecheck`, `pnpm turbo run lint`, and `pnpm exec
oxfmt --check` on the changed file. To test the snippets, I ran them in
PGlite (Postgres 17) on a 200k-row `test_table`, then ran `explain` as
`authenticated` on an `order by created_at desc limit 10` query.
Policies `not is_archived` and `is_archived = false` both used the
partial index. Policies `is_archived is false` and `using (true)` both
used a sequential scan. Behavior checked against the Postgres docs for
[partial
indexes](https://www.postgresql.org/docs/current/indexes-partial.html)
and [CREATE
POLICY](https://www.postgresql.org/docs/current/sql-createpolicy.html).
I skipped the docs tests because they need Docker.

## Checklist

- [x] I have read the [contributing
guidelines](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md).
- [x] My change follows the docs style guide.
- [x] I have checked that the links resolve.

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[DOCS-1761](https://linear.app/supabase/issue/DOCS-1761/explain-how-rls-policy-predicates-let-postgres-use-partial-indexes).
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-11-24 13:49:27 -07:00
supabase-vercel-tedd[bot] 1f6ee9e8b9 chore(www): replace markdown-toc with the local TOC helper to drop vulnerable toml (#53879)
## Problem

`markdown-toc@1.2.0` (its latest release) depends on
`gray-matter@2.1.1`, which pins `toml@^2.3.2`. That leaves `toml@2.3.6`
in the lockfile, and `pnpm audit` flags it with several high-severity
advisories (fixed in `>=5.0.1`). Neither parent has a release that moves
off toml 2.x, so a lockfile-only bump or a temporary override can't
remove it.

## Solution

The customer story (`/customers/[slug]`) and alternatives
(`/alternatives/[slug]`) pages built a `toc` prop at build time, but
neither page nor `LayoutComparison` ever read it. This PR removes that
prop, the `markdown-toc` dependency, and `apps/www/lib/toc.ts`, which
had no other callers. With `markdown-toc` gone from
`apps/www/package.json`, `gray-matter@2.1.1` and `toml` leave the
dependency tree. www keeps using `gray-matter@4.0.3` directly. The
lockfile change only removes entries.

## Review instructions

1. Run `pnpm why toml --recursive` and check it finds no `toml`.
2. Run `pnpm tsx scripts/fix-audit-vulnerability.ts --json` and check
`toml` is not in `vulnerabilities`.
3. Open a customer story on the preview, for example
`/customers/asap-work`, and an alternatives page, for example
`/alternatives/supabase-vs-auth0`. Each page builds and renders as it
does on production.

Checks run: `pnpm install --frozen-lockfile`, `pnpm run typecheck` in
`apps/www` (next typegen + tsc), eslint on both changed pages (no
errors), and `oxfmt --check` on the changed files.

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


[FE-5192](https://linear.app/supabase/issue/FE-5192/bump-a-single-vulnerable-dependency)

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[FE-5192](https://linear.app/supabase/issue/FE-5192/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-11-24 16:44:02 +01:00
supabase-vercel-tedd[bot] 8fe6df84f3 chore(deps): bump vitest to 5.1.1 (#53945)
## Problem

`pnpm audit` reports a moderate advisory for `@vitest/mocker` 5.0.0,
which `vitest` 5.0.0 pulls in. An override can't fix it, because
`vitest` pins its own `@vitest/mocker` version.

## Solution

Raise the workspace catalog entries for `vitest`, `@vitest/coverage-v8`
and `@vitest/ui` from `^5.0.0` to `^5.1.1`, and regenerate the lockfile
with `pnpm install`. The three packages ship together, so they move
together to keep their peer versions matched. Every workspace package
uses `catalog:` for them, so no `package.json` changes.

## Checks

- `pnpm install` resolves `vitest` and `@vitest/mocker` to 5.1.1. `pnpm
audit` no longer reports `@vitest/mocker`, and `pnpm peers check`
reports no vitest peer issues.
- `pnpm --filter common exec vitest run`: 302 tests pass. `pnpm --filter
ui exec vitest run`: 85 tests pass.
- `pnpm --filter dev-tools exec vitest run` has one failing test
(`getEventCountBadge > returns a capped pill for large counts`). It
fails the same way on master before this change.
- Full typecheck and the other test suites are left to CI.

## How to verify

- CI passes: typecheck, lint, and the unit test jobs for every package
that uses vitest.
- `pnpm why vitest --recursive` shows only 5.1.1.
- `pnpm audit` lists no advisory for `@vitest/mocker`.

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[FE-5188](https://linear.app/supabase/issue/FE-5188/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-11-24 16:07:40 +01:00
supabase-vercel-tedd[bot]andIvan Vasilov 245d052f9a chore(api-types): regenerate types from production API specs (#53870)
## Problem

The committed platform API types in `packages/api-types` were behind the
production OpenAPI specifications.

## Solution

Regenerated the types with `pnpm api:codegen:prod`. The v2 spec adds
Warehouse replication endpoints (`add`, `remove`, `resync`, `restart`)
with their request and response schemas, and the matching FGA
requirements. It also restructures the Warehouse table layout update
request. Nothing in the repo used that request, so no consumer needed a
change. The platform spec adds an optional runtime `diagnostic` on
pipeline status and `423` responses for operations that are already in
progress, and updates several descriptions. This PR has no hand edits
and no runtime changes.

## Review instructions

1. Run `pnpm api:codegen:prod` from the repo root and confirm that the
working tree stays clean.
2. Run `pnpm turbo run typecheck --filter='...[origin/master]'` and
confirm that it passes.

## Checks

- `pnpm turbo run typecheck --filter='...api-types' --filter='!studio'
--continue`: 23/23 passed.
- Studio's `tsc --noEmit` (TypeScript 7) passed on its own, both
single-threaded and multi-threaded. Under turbo's parallel run it can
run out of memory in an 8 GB environment.
- `oxfmt --check` passed on the three generated files.

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


[FE-5193](https://linear.app/supabase/issue/FE-5193/update-the-api-types)

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[FE-5193](https://linear.app/supabase/issue/FE-5193/update-the-api-types).
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: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-11-24 12:21:50 +01:00
supabase-vercel-tedd[bot]andAlexis Aguilar bdc7f1a527 docs(auth): add RLS policies for the profiles table in User Management (#53770)
## Problem

The "Accessing user data via API" section of the User Management guide
creates `public.profiles`, enables RLS, and adds a signup trigger, but
shows no policy. A reader who copies it gets a table that no client can
read. The section also never says that the trigger creates the profile
row, so readers try to insert it from the client after `signUp`, and
that insert fails under RLS.

Related to
[FDBKIN-20750](https://linear.app/supabase/issue/FDBKIN-20750/improve-guidance-on-creating-public-user-profile-tables-linked-to-auth)
Closes [DOCS-1728](https://linear.app/supabase/issue/DOCS-1728)

## Solution

The section now says that the trigger creates the profile row at signup,
and why it needs no insert policy: the `security definer` function runs
as `postgres`, which bypasses RLS. It explains that a client insert
fails without an insert policy, and that with no policies clients can't
read the table. Then it adds a select policy and an update policy that
let each signed-in user read and edit only their own row, keyed on this
page's `id` column. Other patterns link to the Row Level Security guide
instead of being repeated. The sentence that introduced the trigger said
it "updates" the table. It now says it creates a row.

## Checks

Ran Prettier on the changed file, plus `pnpm turbo run lint
--filter='[origin/master]'` and `pnpm turbo run typecheck
--filter='...[origin/master]'`, which passed. I ran the section's SQL
blocks in order as one script on PGlite (Postgres 17), with stub
`anon`/`authenticated`/`service_role` roles, an `auth.users` table, and
an `auth.uid()` that reads `request.jwt.claim.sub`. Results:
- The trigger created profile rows with no insert policy.
- As `authenticated`, a user read only their own row and updated only
their own row. Changing `id` to another user's, or inserting from the
client, failed with `new row violates row-level security policy for
table "profiles"`.
- `anon` read no rows.

Facts were checked against the RLS guide's select and update policy
sections and the functions guide's `security definer` section.

## Second reader

Verdict: ready, no blockers. Nits:
- The trigger's intro sentence repeated the new text and said "update".
Fixed: the intro now says it creates a row, and the paragraph after the
caution now opens with what not to do.
- The insert explanation was split around the policies. Fixed: it's now
one paragraph.
- It didn't say why `security definer` skips the insert policy. Fixed:
the page now names the `postgres` owner, which bypasses RLS.
- Link the public-profiles example directly. Fixed.
- Spell out RLS on first use. Left as is: the abbreviation predates this
change, and the page links Row Level Security by name above.

Second read of the reworded insert paragraph: ready, no blockers. Two of
its nits are fixed: the page says the owner is `postgres` when the
function is created in the Dashboard or by a migration, and it uses
"sign-up" instead of the JavaScript method name. Two were left for
review: split the "creates it" and "no insert policy" clauses, and write
"Row Level Security (RLS)". A third read of that fix found no blockers
and no nits.

Follow-ups outside this change:
- The grants block gives `anon` select and `authenticated`
insert/delete, which no policy uses.
- The quickstart SQL partial still adds a client insert policy for
profiles.

## How to verify

1. Open `/docs/guides/auth/managing-user-data` on the preview, section
"Accessing user data via API".
2. The section shows SQL for a select policy and an update policy on
`public.profiles` that use `auth.uid()` and the `id` column.
3. The text says that the trigger creates the profile row at signup and
that the client doesn't insert it.
4. The text says that without policies, clients can't read or change the
table.
5. The section links to the Row Level Security guide for other policy
patterns.
6. Pasting the section's SQL blocks, in order, into the SQL Editor runs
without errors.

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

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com>
2026-11-23 18:17:01 -07:00
supabase-vercel-tedd[bot]andAlexis Aguilar 8e50db7952 docs: link the SQL to REST API Translator from the joins guide (#53771)
## Problem

Readers who know the SQL join they want have to work out the matching
embedding syntax by hand. The joins and nesting guide never mentions the
SQL to REST API Translator, which does that conversion, so readers don't
find it.

Related to
[FDBKIN-7994](https://linear.app/supabase/issue/FDBKIN-7994/improve-documentation-and-tooling-for-postgrest-join-syntax)
Closes [DOCS-1729](https://linear.app/supabase/issue/DOCS-1729)

## Solution

In the "Join types and join modifiers" section of
`/guides/database/joins-and-nesting`, a new paragraph in the section's
intro points readers who think in SQL to the translator. The paragraph
says that the translator turns a SQL `select` query into a Data API
request and Supabase JavaScript client code, with SQL joins as embedded
relations. It also says that not every query translates, and names the
translator's join limits: it handles only left and inner joins that
compare columns with `=`, and the request it returns works only when a
foreign key links the two tables. The paragraph follows the intro's
explanation of left joins and `!inner`, so the translator's
left-and-inner limit builds on it, and readers see the shortcut before
the syntax table and the example tabs. Existing text is unchanged.

## How to verify

1. On the docs preview, open `/docs/guides/database/joins-and-nesting`
and go to "Join types and join modifiers".
2. After the paragraph that ends "use `!inner` on the embedded
relation", a paragraph names the SQL to REST API Translator and says
that it converts SQL joins into embedded relations and client code.
3. The link opens `/docs/guides/api/sql-to-rest`.
4. The paragraph says that some queries won't translate.

## Checks

Ran `pnpm turbo run typecheck --filter='...[origin/master]'`, `pnpm
turbo run lint --filter='[origin/master]'`, and Prettier on the changed
file. All pass. Skipped the docs tests, because they need Docker.
Checked the facts against `apps/docs/content/guides/api/sql-to-rest.mdx`
(the subset note), the translator component in
`packages/ui-patterns/src/SqlToRest/` (cURL, HTTP, and JavaScript
outputs), and the join handling in `@supabase/sql-to-rest` 0.1.6: it
throws on join types other than inner and left and on join conditions
other than `=`, and it does not check for a foreign key.

## Second reader

First read: ready, no blockers, three nits. All three applied: the
paragraph moved after the syntax table, two sentences merged, and the
join limits named. Second read: one blocker. The join-limit sentence had
the Data API as its subject, but the foreign key limit belongs to the
translator, and the Data API also supports computed relationships. Fixed
by making the translator the subject. Third read, after the first
sentence was split in two: one blocker. The translator doesn't check
foreign keys, so a join without one still translates, and the request
then fails. Fixed: the sentence now says the translator handles only
left and inner joins that compare columns with `=`, and that the request
works only when a foreign key links the two tables. Nits left as they
are: the translator outputs joins as flattened spread embeddings
(`...relation(...)`), which this page doesn't explain; "client code"
could read "supabase-js code". Fourth read, after the join-limits
sentence was split in two: ready, no blockers. Nit left as it is: "For
example" introduces translator limits after a sentence about Data API
limits. Fifth read, after the paragraph moved into the section intro:
ready, no blockers, and the placement matches the section's topic. Nits
left as they are: when two foreign keys link the same tables, the
translator's request is ambiguous and fails, because it never adds a
foreign key hint (ambiguous foreign keys are out of scope here); and the
last two sentences could form their own paragraph. Left as follow-ups
outside the scope: the page intro says "data APIs" in lowercase,
`guides/api/sql-to-api.mdx` doesn't link to the translator, and "We can
get…" on the page uses _we_ for the reader.

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

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com>
2026-11-23 16:18:05 -07:00
supabase-vercel-tedd[bot]andAlexis Aguilar 0af0e9aed4 docs(storage): explain which operations need policies on storage.buckets (#53769)
## Problem

The Storage access control guide only mentions policies on
`storage.objects`. A reader securing a private bucket can't tell whether
those policies are enough or whether `storage.buckets` needs its own
policies, and the private-bucket read pattern is hard to find among
examples that look like public-bucket examples.

Related to
[FDBKIN-5913](https://linear.app/supabase/issue/FDBKIN-5913/clarify-documentation-for-securing-private-storage-buckets-with-rls)
Closes
[DOCS-1727](https://linear.app/supabase/issue/DOCS-1727/explain-which-storage-operations-need-policies-on-storagebuckets)

## Solution

The "Access policies" section of
`/guides/storage/security/access-control` now states that policies on
`storage.objects` control every file operation in both private and
public buckets, and names the two cases where Storage skips the check:
public URLs of public buckets, and signed URLs. A short table lists the
bucket operations that need policies on `storage.buckets`, with the
permissions each needs on both tables. The section also points to the
existing per-user `SELECT` example as the pattern for private-bucket
reads. Existing text and the API reference link stay as they were.

Checks: Prettier on the changed file, and `pnpm turbo run lint
--filter='[origin/master]'` (0 errors). Facts were checked against the
per-method RLS notes in `apps/docs/spec/supabase_py_v2.yml` and
`supabase_kt_v1.yml`, and against `supabase/storage`, where object
routes look up the bucket as superuser
(`src/http/routes/object/getObject.ts`, `src/storage/object.ts`,
`src/storage/uploader.ts`), and public and signed-URL downloads bypass
RLS (`getPublicObject.ts`, `getSignedObject.ts`,
`uploadSignedObject.ts`). The docs tests need Docker, so they did not
run.

How to verify on the preview, at
`/docs/guides/storage/security/access-control`:

1. "Access policies" says `storage.objects` policies control every file
operation in private and public buckets, and that file operations need
no policy on `storage.buckets`.
2. A table lists create, retrieve, list, update, delete, and empty a
bucket, with the permissions on `storage.buckets` and `storage.objects`
for each.
3. The "Policy examples" link goes to the section with the "Individual
user Access" policy, and the "public bucket" link goes to the Access
model section of Buckets fundamentals.
4. The admonition link to the API reference still opens the createBucket
reference.

## Second reader

Verdict: ready, no blockers.

- Fixed: the "Empty a bucket" row was incomplete without the sentence
after the table, so the table now has a `storage.objects` column.
- Fixed: the vague "manage buckets" now reads "call bucket methods".
- Fixed: the exceptions are a separate paragraph, reworded so that
Storage, not the policies, does the checking.
- Fixed: the public-bucket exception now links to Buckets fundamentals.
- Left: moving the API reference admonition next to the table. The brief
keeps existing text in place.
- Left: linking each table row to its reference page. The table stays
short, and the existing admonition links to the reference.
- Left as follow-ups outside this change: the frontmatter `description`
and `sidebar_label` mention only uploads, the "here" link text, stray
spaces before periods, "incredibly powerful", "easy", and missing
periods in two admonitions.

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

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com>
2026-11-23 13:55:58 -07:00
supabase-vercel-tedd[bot]andAlexis Aguilar 698bb077cf docs(storage): list signed URLs in the Storage overview's key features (#53766)
## Problem

The Key features list on the Storage overview didn't mention signed
URLs. A reader who scans it to see what Storage can do finds no way to
share files from private buckets, so they could conclude that Storage
can't do it.

Related to
[FDBKIN-26964](https://linear.app/supabase/issue/FDBKIN-26964/improve-documentation-and-discovery-for-storage-signed-urls)
Closes [DOCS-1724](https://linear.app/supabase/issue/DOCS-1724)

## Solution

The Storage overview (`/guides/storage`) now lists signed URLs as a key
feature. The new item says that files in private buckets can be shared
with time-limited signed URLs, without making the buckets public, and
links to the Signing URLs section of the Serving assets page. It sits
next to Fine-grained Access Control and uses the same format as the
other items. The other items are unchanged.

## Checks

I ran `pnpm turbo run typecheck --filter='...[origin/master]'`, `pnpm
turbo run lint --filter='[origin/master]'`, and Prettier on the changed
file. All passed. I skipped the docs tests because they need Docker. I
checked the claims against the `### Signing URLs` section of
`serving/downloads.mdx` (`createSignedUrl(path, expiresIn)`, anchor
`#signing-urls`) and against `createSignedUrl` and `createSignedUrls` in
`apps/docs/spec/supabase_js_v2.yml`.

## Second reader

Verdict: ready. No blockers.

- Nit: "private buckets … the bucket" mixed plural and singular. Fixed:
it now says "the buckets".
- Nit, optional: the bold label and the link text both say "signed
URLs". I kept it, because other items in the list repeat their label the
same way.
- Outside the scope of this PR, left as is: marketing words ("robust",
"lightning-fast") and missing hyphens ("Multi Protocol", "S3
compatible") in the existing overview text, and an inconsistent "Private
buckets" list on the Serving assets page.

## How to verify

1. On the preview, open `/docs/guides/storage`. The Key features list
has a **Signed URLs** item that says files in private buckets can be
shared with time-limited signed URLs, without making the buckets public.
2. Click the link in that item. It opens
`/docs/guides/storage/serving/downloads#signing-urls` and lands on the
Signing URLs heading.
3. The other Key features items read the same as on production.

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

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com>
2026-11-23 13:54:21 -07:00
supabase-vercel-tedd[bot]andAlexis Aguilar a30c99d09d docs(platform): say that PrivateLink doesn't carry Data API or client library traffic (#53767)
## Problem

The PrivateLink page said PrivateLink doesn't support "API, Storage,
Auth, or Realtime". Readers couldn't tell that "API" meant the Data API,
so they couldn't tell whether requests from `supabase-js` and the other
client libraries go over the private connection.

Related to
[FDBKIN-15262](https://linear.app/supabase/issue/FDBKIN-15262/clarify-in-docs-what-traffic-is-routed-through-privatelink)
Closes [DOCS-1725](https://linear.app/supabase/issue/DOCS-1725)

## Solution

The PrivateLink page now names the Data API (REST and GraphQL) and links
to its guide. It also says that the client libraries call the project
URL over the public internet, not PrivateLink. A backend whose database
traffic must stay private should connect to Postgres directly or through
the dedicated pooler. "How PrivateLink works" and the "Service Scope"
limitation now say the same thing. Only that existing text changed, and
the page has no new section.

## How to verify

On the preview, open `/docs/guides/platform/privatelink`:

1. "How PrivateLink works" says PrivateLink carries only Postgres
connections on ports `5432` and `6543`. It also says the client
libraries call the Data API, Auth, Storage, and Realtime at
`https://<project_ref>.supabase.co` over the public internet.
2. The same section says what to do when a backend's database traffic
must stay private.
3. The "Service Scope" bullet under "Limitations" says the same thing.
4. Both "Data API" links open `/docs/guides/api`.

## Checks

Ran `pnpm turbo run typecheck --filter='...[origin/master]'`, `pnpm
turbo run lint --filter='[origin/master]'`, and Prettier on the changed
file. All passed. I skipped the `docs` tests because they need Docker. I
checked the facts against the page's own setup steps (the endpoint is a
database host on ports `5432` and `6543`), the Studio PrivateLink form
(each connection targets a database), and `guides/api.mdx`, which gives
the Data API URL as `https://<project_ref>.supabase.co/rest/v1/`.

## Second reader

Verdict: ready, no blockers. I fixed these nits:

- The project URL was stated twice in a row. I merged the two sentences.
- The new host clause covered the PrivateLink endpoint option but not
the VPC Lattice service network option. I dropped it, because the setup
steps already cover hostnames.
- "If your backend's traffic must stay private" promised too much,
because Auth, Storage, and Realtime can't go private. It now says
"database traffic".
- I made the run-on sentence in the "Service Scope" bullet easier to
read.

These are left as they were:

- The reader suggested
`/docs/guides/database/connecting-to-postgres#data-apis-and-client-libraries`
as the link target. I kept `/docs/guides/api`, the Data API's own guide.
- These problems are on the page but outside this change: "organisation
level" spelling, "e.g.", the missing period on "Feature Evolution", a
note written as a numbered step, and Edge Functions missing from the
list of public services.

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com>
2026-11-23 13:53:55 -07:00
supabase-vercel-tedd[bot]andAlexis Aguilar 78870669cd docs: say where to create the env file in the Vite quickstarts (#53768)
## Problem

The React, Vue, SolidJS and Refine quickstarts tell the reader to create
an env file but not where. The next step creates `src/lib`, so a reader
can put the file in `src/`. Vite loads env files only from the project
root by default, so `import.meta.env.VITE_SUPABASE_URL` then comes back
`undefined`.

Related to
[FDBKIN-25261](https://linear.app/supabase/issue/FDBKIN-25261/clarify-env-file-placement-in-the-react-quickstart-guide)
Closes
[DOCS-1726](https://linear.app/supabase/issue/DOCS-1726/say-where-to-create-the-env-file-in-the-vite-based-quickstarts)

## Solution

The env step of each of these four quickstarts now says to create the
file in the root of the project, next to `package.json`. It reuses the
"in the root of your project" wording that the TanStack and Expo
quickstarts already use, and `package.json` gives the reader a concrete
landmark that rules out `src/`. Only that one sentence changes on each
page.

## How to verify

On the docs preview:

1. `/docs/guides/getting-started/quickstarts/reactjs`, step 6: the first
sentence says to create `.env.local` in the root of your project, next
to `package.json`.
2. `/docs/guides/getting-started/quickstarts/vue`, step 6: same for
`.env.local`.
3. `/docs/guides/getting-started/quickstarts/solidjs`, step 6: same for
`.env.local`.
4. `/docs/guides/getting-started/quickstarts/refine`, step 5: same for
`.env`.
5. No other text on these pages changes.

## Checks

Ran `pnpm turbo run typecheck --filter='...[origin/master]'`, `pnpm
turbo run lint --filter='[origin/master]'` (0 errors), and Prettier on
the four changed files; all pass. Checked against Vite's `envDir` option
(defaults to the project root) and confirmed each page scaffolds a Vite
app. Skipped the docs unit tests: they need Docker.

## Second reader

Verdict: ready, no blockers. One nit: "project" could be read as the
Supabase project, since the same sentence mentions the project Connect
panel. Kept the wording, because "next to `package.json`" settles it and
it matches the sibling quickstarts. Pre-existing issues it noted outside
this change: "populate with" missing "it" on the Vue and SolidJS pages,
missing end punctuation on the React sentence, and the same missing
location in several framework tutorials and the Astro and Nuxt
quickstarts.

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

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com>
2026-11-23 13:53:35 -07:00
supabase-vercel-tedd[bot]andAlexis Aguilar 77011f0ed6 docs: enable pgvector in the extensions schema in the Next.js vector search guide (#53772)
## Problem

The Next.js vector search guide enables pgvector with `with schema
public`, but the later SQL declares columns and function parameters as
`extensions.vector(1536)`. A reader who copies the guide's SQL into one
migration gets `ERROR: type "extensions.vector" does not exist` at the
`nods_page_section` table, so `supabase start` fails.

Related to
[FDBKIN-11272](https://linear.app/supabase/issue/FDBKIN-11272/fix-outdated-langchain-sql-guide-using-non-existent-extensionsvector)
Closes
[DOCS-1730](https://linear.app/supabase/issue/DOCS-1730/enable-pgvector-in-the-extensions-schema-in-the-nextjs-vector-search)

## Solution

The "Enable the pgvector extension" step now installs pgvector in the
`extensions` schema, so the `vector` type is where the rest of the
guide's SQL expects it. This also avoids the Security Advisor's
extension-in-public lint and matches the other pgvector pages, which
already use `with schema extensions`. The `extensions.vector` references
stay as they are.

How to verify on the preview:

1. On `/docs/guides/ai/examples/nextjs-vector-search`, the "Enable the
pgvector extension" step shows `create extension if not exists vector
with schema extensions;`.
2. Copying every SQL block of the guide, in order, into one migration
runs without `type "extensions.vector" does not exist`.

## Checks

Ran the page's three SQL blocks in document order in PGlite with
pgvector, after creating an `extensions` schema, an `anon` role, and a
`"$user", public, extensions` search path. Before the change they fail
with `type "extensions.vector" does not exist`. After it they all run,
pgvector sits in `extensions`, and `match_page_sections` returns an
inserted 1536-dimension row. Also ran `pnpm turbo run typecheck
--filter='...[origin/master]'`, `pnpm turbo run lint
--filter='[origin/master]'` (warnings only, none from this page), and
Prettier on the changed file. Skipped the `docs` package tests: they
need Docker.

## Second reader

Verdict: ready. No blockers, no nits. Noted outside this change, left as
follow-ups:

- The page's Dashboard tab runs Studio's OpenAI Vector Search
quickstart, which still installs pgvector in `public`, so the two tabs
now use different schemas. The fix for that belongs in the Studio
snippet.
- Two steps of the SQL tab are both numbered `step={3}`.
- Line 12 says "Store you embeddings".
- The page uses "we/our" in places, against the style guide's voice.

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

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com>
2026-11-23 13:51:36 -07:00
supabase-vercel-tedd[bot]andAlaister Young fb3ed7ee3c fix(studio): treat WebKit's CORS-denied module load as a chunk-load error (#53532)
## Problem

When a lazily loaded module chunk fails an access-control check in
Safari/WebKit (including every iOS browser) — for example, when a
corporate proxy, VPN, or captive portal redirects a chunk request
cross-origin, or a cross-origin response lacks CORS headers — WebKit's
`ScriptModuleLoader` does not throw `"Importing a module script
failed."` Instead it rejects the dynamic `import()` with `TypeError:
Cross-origin script load denied by Cross-Origin Resource Sharing
policy.` and caches the failed module fetch in the document's module
map.

`isChunkLoadError` in `apps/studio/lib/chunk-load-error.ts` did not
recognize this message. The global error boundary and router error
component therefore skipped the guarded auto-reload, showed the error
page immediately, and reported the error without the `chunkLoadError`
tag.

## Solution

Add WebKit's access-control module load error message to
`CHUNK_LOAD_ERROR_PATTERNS`. Because WebKit only emits this message from
`ScriptModuleLoader` (never for `fetch()` or XHR) and Studio only uses
dynamic `import()` for internal chunks, it gets the same handling as
other chunk-load failures:

- one guarded page reload under the existing time window and per-tab cap
- if the error recurs inside the window, it falls through to the error
UI and is reported with the `chunkLoadError` tag

Unit tests cover the new message and verify that a generic CORS-denied
`fetch` error is still not treated as a chunk-load error.

## Review instructions

This change has no UI. Check it with:

1. `pnpm --filter studio exec vitest run lib/chunk-load-error.test.ts
components/ui/ErrorBoundary/useChunkLoadReload.test.tsx` (50 passed).
2. `pnpm --filter studio exec tsc --noEmit` and ESLint on the changed
files.

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


[FE-4940](https://linear.app/supabase/issue/FE-4940/typeerror-cross-origin-script-load-denied-by-cross-origin-resource)

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-11-23 15:20:18 +00:00
supabase-vercel-tedd[bot] ba7d7727c2 chore(deps): bump ip-address to 10.7.6 (#53858)
## Problem

`pnpm audit` reports eight advisories against `ip-address@10.2.0` (one
high, seven moderate), covering SSRF and trust-boundary bypasses and a
parsing denial of service. Studio pulls it in through
`@modelcontextprotocol/sdk` > `express-rate-limit`. Docs and the UI
library pull it in through `socks`.

## Solution

Bump `ip-address` to 10.7.6 in the lockfile only.
`scripts/bump-package.ts ip-address 10.7.4` moved the `socks` path. The
`express-rate-limit` path stayed on 10.2.0 because the existing scoped
override `express-rate-limit>ip-address: ^10.1.1` still accepted the
locked version. `pnpm update ip-address --recursive --depth Infinity`
re-resolved that path within the same override range. The lockfile now
has a single `ip-address@10.7.6`. No `package.json` or
`pnpm-workspace.yaml` changes, and `express-rate-limit`, `socks` and
`@modelcontextprotocol/sdk` keep their versions.

## Review instructions

1. Run `pnpm install --frozen-lockfile`. It succeeds.
2. Run `pnpm why ip-address --recursive`. It shows only
`ip-address@10.7.6`.
3. Run `pnpm audit --json`. It reports no advisories for `ip-address`.

Checks run: `pnpm install --frozen-lockfile`, `pnpm why` for
`ip-address`, `express-rate-limit`, `socks` and
`@modelcontextprotocol/sdk` (unchanged versions), `pnpm audit --json`,
and `pnpm turbo run typecheck --filter=studio` (9/9 tasks pass).

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


[FE-5181](https://linear.app/supabase/issue/FE-5181/bump-a-single-vulnerable-dependency)

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-23 13:23:17 +00:00
supabase-vercel-tedd[bot] 9964968b53 docs(auth): explain that supabase-js refreshes the session automatically (#53698)
## Problem

The User sessions guide explains what refreshing the session means, but
not who does it. Readers building browser apps can't tell whether they
need to write their own refresh logic for when the access token expires.

Related to
[FDBKIN-12783](https://linear.app/supabase/issue/FDBKIN-12783/provide-clear-documentation-and-examples-for-jwt-refresh-in-react)
Closes
[DOCS-1718](https://linear.app/supabase/issue/DOCS-1718/explain-that-supabase-js-refreshes-the-session-automatically-in-the)

## Solution

The "What is a session?" section of `/guides/auth/sessions` now says,
right after the refreshing-the-session sentence, that `supabase-js`
refreshes the session on its own (`autoRefreshToken` defaults to
`true`), so a browser app needs no refresh code. It notes that auto
refresh pauses while the tab is hidden and checks the session again when
the tab is visible. It shows a minimal `onAuthStateChange` listener for
the `TOKEN_REFRESHED` event and points to `refreshSession()` for a
forced refresh. Timing is described qualitatively, so the text stays
true if the client's intervals change.

## Checks

The facts come from `@supabase/auth-js` 2.117.3: the default
`autoRefreshToken: true` in `GoTrueClient.ts`, the visibility handling
in `_onVisibilityChanged`, and the tick and expiry-margin constants in
`lib/constants.ts`. The code block on the page, with its hidden setup
above `// ---cut---`, passes `tsc --strict` against
`@supabase/supabase-js` 2.117.3. Also ran `pnpm turbo run typecheck
--filter='...[origin/master]'`, `pnpm turbo run lint
--filter='[origin/master]'` and Prettier on the changed file, and all
passed. The reference link slugs `auth-onauthstatechange` and
`auth-refreshsession` come from
`apps/docs/spec/common-client-libs-sections.json`. A second reader
reviewed the change against the style guide.

### How to verify

1. On the preview, `/docs/guides/auth/sessions` shows the new paragraphs
under "What is a session?", directly after "This process is called
refreshing the session."
2. The note says `supabase-js` refreshes the session automatically with
`autoRefreshToken` defaulting to `true`, says auto refresh pauses while
the tab is hidden, and names `TOKEN_REFRESHED` and `refreshSession()`.
3. The code block shows only the `onAuthStateChange` listener; the
client setup is hidden.
4. The `onAuthStateChange` and `refreshSession()` links open their
JavaScript reference entries.

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

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-20 16:36:49 -07:00
supabase-vercel-tedd[bot] 5fb0be08b1 docs: say where to reset the database password in the connection guide (#53697)
## Problem

Step 4 of "Get your connection string" in the Postgres connection guide
tells readers to put their database password in the connection string.
It doesn't say that the dashboard stops showing the password after the
project is created, or how to get a new one.

Related to
[FDBKIN-4770](https://linear.app/supabase/issue/FDBKIN-4770/improve-documentation-and-navigation-for-finding-the-database-password)
Closes
[DOCS-1717](https://linear.app/supabase/issue/DOCS-1717/say-where-to-reset-the-database-password-in-the-connection-guide)

## Solution

A new paragraph, indented under step 4 of
`/guides/database/connecting-to-postgres`, says that the dashboard
doesn't show the database password after you create the project. It
points readers to the **Reset database password** option in the Connect
dialog and to the Database Settings section (`#database-password`), and
warns that a reset breaks existing connections that use the old
password. The wording matches the quickstart connection-string partial
and the dashboard's own copy. Step 4's own text, including the
percent-encoding guidance, is unchanged, and no other section changes.

## Checks

I ran `pnpm turbo run typecheck --filter='...[origin/master]'`, `pnpm
turbo run lint --filter='[origin/master]'`, and Prettier on the changed
file. All of them pass. I checked the facts against the Studio code: the
`database-password` section and its copy in `ResetDbPassword.tsx`, and
the **Reset database password** button in the Connect sheet's connection
step. The `docs` tests were skipped because they need Docker.

On the preview, step 4 of "Get your connection string" should:
- keep its original text, with a second paragraph that stays inside step
4
- say in that paragraph that the Supabase Dashboard doesn't show the
database password after you create the project
- name **Reset database password** and say that a reset breaks existing
connections
- link Database Settings to the dashboard's database settings page, at
`#database-password`

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

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-20 16:36:45 -07:00
supabase-vercel-tedd[bot] 57e5db42e2 docs(auth): explain how to verify JWTs without reaching the JWKS endpoint (#53696)
## Problem

The signing keys guide explains how to verify asymmetric JWTs with the
JWKS discovery endpoint and its caches. It doesn't help readers whose
backend can't make outbound requests to that endpoint.

Related to
[FDBKIN-21659](https://linear.app/supabase/issue/FDBKIN-21659/improve-guidance-on-verifying-ecc-jwts-in-environments-with-network)
Closes
[DOCS-1716](https://linear.app/supabase/issue/DOCS-1716/explain-how-to-verify-jwts-when-the-backend-cant-reach-the-jwks)

## Solution

A note at the end of "Public key discovery and caching" on
`/guides/auth/signing-keys` explains how to copy the public keys into
the app and load them at startup. It names the two ways to get the keys:
request the discovery endpoint from a machine that can reach it, or copy
each key's key set from the dashboard. Because copied keys are a cache
that never expires, the note asks readers to copy every asymmetric key
that isn't revoked (including a previously used key, which stays trusted
after a rotation), to add a standby key before rotating to it, and to
remove a revoked key by hand. Existing text in the section is unchanged.

"Verifying a JWT from Supabase" on `/guides/auth/jwts` gets one sentence
that links to the note, right after its advice not to cache the key set
for longer, so readers who start from JWT verification find the option.
Existing text on that page is unchanged.

## How to verify

1. On the docs preview, open `/docs/guides/auth/signing-keys`.
2. The note is the last content of "Public key discovery and caching",
just before "Choosing the right signing algorithm".
3. The dashboard steps use the Studio labels **More options**, **View
key details**, and **Public key set (JSON Web Key Set format)**, and the
JWT signing keys link opens the dashboard's JWT settings.
4. The note says to add a standby key to the app before rotating to it
and to remove a revoked key by hand.
5. On the docs preview, open `/docs/guides/auth/jwts`. In "Verifying a
JWT from Supabase", the paragraph after "Make sure that you do not cache
this data for longer" links to "Public key discovery and caching", and
the link scrolls to that heading on the signing keys page.

## Checks

Ran `pnpm turbo run lint` and `pnpm turbo run typecheck` filtered to the
branch's changes, and Prettier on the changed files; all pass. UI labels
and the single-key key set were checked against
`apps/studio/components/interfaces/JwtSecrets/jwt-secret-keys-table/key-details-dialog.tsx`
and `signing-key-row.tsx`. Key trust across rotation was checked against
the key lifetime table on the same page. The link's anchor was checked
against the heading slug that `getAnchor` in `packages/ui` generates.

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

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-20 16:36:40 -07:00
supabase-vercel-tedd[bot] edece97bdc docs(auth): explain why the signup trigger must schema-qualify names (#53695)
## Problem

The User Management guide shows a trigger that copies new users into
`public.profiles`, but it doesn't say why the function sets `search_path
= ''` and writes `public.profiles` in full. A reader who drops the
schema from a table name breaks every sign-up, and the page doesn't
connect that to the `Database error saving new user` response.

Related to
[FDBKIN-40810](https://linear.app/supabase/issue/FDBKIN-40810/document-best-practices-for-security-definer-triggers-on-authusers)
Closes
[DOCS-1715](https://linear.app/supabase/issue/DOCS-1715/explain-why-the-signup-trigger-must-schema-qualify-tables)

## Solution

A caution admonition right after the trigger example on
`/guides/auth/managing-user-data` tells readers to schema-qualify every
non-built-in name in the function, such as `public.profiles`. It
explains that the function sets `search_path = ''`, so Postgres can't
find an unqualified name, the trigger fails, and every sign-up fails
with `Database error saving new user`. The note leaves out the Auth
role's own search path, because it doesn't apply once the function sets
an empty one. For why the search path stays empty, it links to the
"Security `definer` vs `invoker`" section of the database functions
guide instead of repeating it. The SQL example and the rest of the page
are unchanged.

## How to verify

1. On the preview, open `/docs/guides/auth/managing-user-data`.
2. Right after the `handle_new_user` / `on_auth_user_created` SQL
example, a caution note says to schema-qualify names such as
`public.profiles`, says the function's `search_path = ''` is why an
unqualified name fails, and gives the `Database error saving new user`
error.
3. The note's link opens the "Security `definer` vs `invoker`" section
of `/docs/guides/database/functions`.
4. No other text on the page changed.

## Checks

Ran `pnpm turbo run typecheck --filter='...[origin/master]'`, `pnpm
turbo run lint --filter='[origin/master]'` (0 errors), and Prettier
`--check` on the changed file. The error string was checked against
`supabase/auth` `internal/api/signup.go` (`signupNewUser` returns
`Database error saving new user` when the user insert fails). The docs
tests were skipped because they need Docker. A second reader reviewed
the change against the style guide.

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

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-20 16:36:36 -07:00
supabase-vercel-tedd[bot]andAlexis Aguilar fbd1e34128 docs(auth): note that the Kotlin Auth plugin can't be used with Firebase accessToken (#53692)
## Problem

The Firebase Auth third-party guide shows Kotlin readers how to set
`accessToken` on a supabase-kt client, but it doesn't say that the
client then can't install the Auth plugin. A reader who adds
`install(Auth)` gets an error when the client is created, and can't tell
from the page that Supabase Auth sign-in methods aren't part of this
setup.

Related to
[FDBKIN-7469](https://linear.app/supabase/issue/FDBKIN-7469/improve-documentation-for-using-firebase-jwts-with-supabase-auth)
Closes [DOCS-1713](https://linear.app/supabase/issue/DOCS-1713)

## Solution

The Kotlin (Android) and Kotlin (Multiplatform) tabs of the client setup
section on `/docs/guides/auth/third-party/firebase-auth` now each end
with the same short note: leave out the Auth plugin on a client that
sets `accessToken`. A paragraph after the tabs covers every SDK: a
client that sets `accessToken` can't use Supabase Auth methods, so users
sign in and out with Firebase Auth on that client, and a second client
without `accessToken` serves Supabase Auth when the app uses both. Each
user's requests go through the client that matches how they signed in.
The code samples and the TypeScript, Flutter, and Swift tabs are
unchanged.

## Checks

Ran `pnpm turbo run typecheck --filter='...[origin/master]'`, `pnpm
turbo run lint --filter='[origin/master]'`, and Prettier on the changed
file. All pass. The Kotlin note was checked against supabase-kt at
commit `1ea6e8e`: the Auth plugin's `init` in
`Auth/src/commonMain/kotlin/io/supabase/auth/AuthImpl.kt` (line 148)
throws when the client has a custom access token provider. The paragraph
after the tabs was checked against the `auth` accessor guards in
supabase-js (`packages/core/supabase-js/src/SupabaseClient.ts`),
supabase-flutter (`packages/supabase/lib/src/supabase_client.dart`), and
supabase-swift (`Sources/Supabase/SupabaseClient.swift`, whose doc
comment recommends a separate client without `accessToken` for Supabase
Auth). The token each client sends was checked in the same files and in
supabase-kt's `AccessToken.kt`: a client with `accessToken` sends that
token, and a client without it sends its Supabase Auth session. The
change adds no code, so there is nothing to run. Docs tests were skipped
because they need Docker.

## How to verify

1. Open `/docs/guides/auth/third-party/firebase-auth` on the docs
preview.
2. In the client setup tabs, select **Kotlin (Android)**: a note below
the code sample says to leave out the Auth plugin (`install(Auth)`) on a
client that sets `accessToken`.
3. Select **Kotlin (Multiplatform)**: the same note appears below its
code sample.
4. Below the tabs, before "Add a new Third-Party Auth integration to
your project", a paragraph says a client that sets `accessToken` can't
use Supabase Auth methods, that users sign in and out with Firebase Auth
on that client, that a second client without `accessToken` can use
Supabase Auth, and that each user's requests go through the client that
matches how they signed in. It shows whichever tab is selected.
5. The TypeScript, Flutter, and Swift tabs and all code samples match
production.

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

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com>
2026-11-20 11:39:44 -07:00
supabase-vercel-tedd[bot]andAlaister Young 6fda122771 chore(studio): show the TanStack devtools only with ?tanstack-devtools (#53708)
## What kind of change does this PR introduce?

Chore (local developer experience)

## What is the current behavior?

In local development, Studio renders the TanStack devtools floating
trigger in the bottom-right corner on every page. It overlaps Studio's
own dev toolbar trigger and gets in the way.

## What is the new behavior?

The TanStack devtools (Router and Query panels) only show when Studio is
loaded with `?tanstack-devtools` in the URL, using the library's
built-in `requireUrlFlag` setting. Once loaded, they stay available
while navigating within Studio, and a reload without the flag hides them
again.

Use a URL that doesn't redirect, for example
`/org/<slug>?tanstack-devtools` or `/project/<ref>?tanstack-devtools`.
The library reads the flag when the devtools mount, so a redirect that
drops the query string can hide them.

**If you've opened the devtools before**, the library has saved its
settings to localStorage, and those override the `config` prop. Turn on
**Require URL Flag** in the devtools Settings tab once, or delete the
`tanstack_devtools_settings` localStorage key.

## How to verify

- With no `tanstack_devtools_settings` in localStorage, run `pnpm
dev:studio` and open `/org/<slug>`: no TanStack trigger appears.
- Open `/org/<slug>?tanstack-devtools`: the trigger appears and opens
the panel. Click through to another page: it's still there.
- Reload without the flag: the trigger is gone.
- Production and test builds are unchanged.

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-11-20 07:40:47 +00:00
supabase-vercel-tedd[bot] 656aa60b20 docs(database): explain which role a security_invoker view checks (#53641)
## Problem

The "View security" section of the views guide explains
`security_invoker` but not which role is checked when the view is
queried through the Data API, or why a `security_invoker` view over
`auth` tables fails with every API key.

Related to
[FDBKIN-21897](https://linear.app/supabase/issue/FDBKIN-21897)
Closes [DOCS-1687](https://linear.app/supabase/issue/DOCS-1687)

## Solution

Adds two paragraphs of body text after the SQL example in "View
security" (`apps/docs/content/guides/database/views.mdx`). The existing
paragraph and SQL are unchanged.

- The first paragraph says that through the Data API, Postgres checks
the role from the request's API key or JWT (`anon`, `authenticated`, or
`service_role`). That role needs privileges, such as `select`, on every
table the view reads, not only on the view. Postgres logs show
`authenticator`, the role the Data API connects as, not the role the
view checks.
- The second paragraph says that by default, API roles have no
privileges on tables in the `auth` schema, so a `security_invoker` view
over `auth.users` fails with `permission denied for table users`, even
with a secret key. It points readers to storing user data in a `public`
table, with a link to the User management guide. It does not recommend
granting `auth` tables to any role.

Needs review: the text says "by default" for `auth` grants because older
projects may carry extra grants.

Checks run: `prettier --check` on the changed file and `pnpm turbo run
lint --filter='[origin/master]'` pass on the latest commit. `pnpm turbo
run typecheck --filter='...[origin/master]'` passed on the first commit;
the second commit changes only MDX prose. Docs tests were skipped
because they need a local Supabase stack (Docker).


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

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-19 22:23:43 +00:00
supabase-vercel-tedd[bot] 58e0d8067d docs(rls): add an example for rows shared by two users (#53640)
## Problem

The RLS guide shows policies for rows that belong to one user
(`user_id`), but not for a row that two users share through two columns,
such as the buyer and the seller of an order.

Related to
[FDBKIN-27655](https://linear.app/supabase/issue/FDBKIN-27655)
Closes [DOCS-1686](https://linear.app/supabase/issue/DOCS-1686)

## Solution

Adds a `### Share rows between users` section to the RLS guide, between
"Write a policy for each operation" and "Specify roles in your
policies". The section spans operations, so it sits beside the
per-operation subsections, not among them. It has:

- An `orders` table with `buyer_id` and `seller_id`. RLS is enabled,
grants are revoked from `anon, authenticated`, and `select, update` are
granted to `authenticated`, following the page's grant pattern.
- A select policy and an update policy that both use `(select
auth.uid()) in (buyer_id, seller_id)`. The update policy uses the same
expression in `using` and `with check`, so the updated row must still
include the user as buyer or seller.
- A sentence on `insert` and `delete`: check only the user who can
create or remove the row, because a delete policy that checks both
columns lets one user remove the row for both.
- A note that this needs no `security definer` function, with a link to
"Use security definer functions" for checks against another table.
- A note to index `buyer_id` and `seller_id` separately, with a link to
"Add indexes".

No existing section is changed.

### Verification

- I ran the SQL in PGlite (Postgres 17) with an `authenticated` role, an
`auth.uid()` that reads `request.jwt.claim.sub`, and an index on each of
`buyer_id` and `seller_id`:
- Buyer: selects 1 row and updates 1 row. Setting both IDs to a third
user fails with `new row violates row-level security policy for table
"orders"`.
  - Seller: same as the buyer.
  - Another user: selects 0 rows and updates 0 rows.
- `explain select * from orders` with `enable_seqscan=off` shows a
`BitmapOr` over both indexes, with `auth.uid()` in InitPlans.
- `pnpm turbo run lint --filter='[origin/master]'` passes, with no
findings on the changed file.
- Prettier `--check` passes on the changed file.
- The page compiles with `@mdx-js/mdx`.
- `build:guides-markdown` could not run in the sandbox: it needs GitHub
credentials for federated content.

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

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-19 22:23:39 +00:00
supabase-vercel-tedd[bot] 00c96d23f0 docs(auth): update Keycloak client settings to the current admin console (#53638)
## Problem

The Keycloak social sign-in guide still describes the legacy Keycloak
admin console: it tells readers to set "Access Type" to "confidential",
a field that no longer exists. The current console configures this under
**Capability config** with **Client authentication** and **Standard
flow**.

Related to [FDBKIN-4596](https://linear.app/supabase/issue/FDBKIN-4596)
Closes [DOCS-1684](https://linear.app/supabase/issue/DOCS-1684)

## Solution

In `apps/docs/content/guides/auth/social-sign-in/auth-keycloak.mdx`:

- **Overview list:** the client uses **Client type** **OpenID Connect**,
with **Client authentication** and **Standard flow** on under
**Capability config**. The secret bullet now says **Client Secret** on
the **Credentials** tab.
- **One client procedure:** merged "Create a Keycloak client" and
"Client settings" into one numbered procedure that follows the Create
client screens:
  1. **Clients** > **Create client**
  2. Set **Client type** to **OpenID Connect**
  3. Set **Client ID**, then **Next**
4. In **Capability config**, turn on **Client authentication** and leave
**Standard flow** on, then **Next**
5. In **Login settings**, add the callback URL to **Valid redirect
URIs**
  6. **Save**

Each step is an instruction. The labels match the Keycloak tab of the
self-hosted OAuth guide. The "Client settings" heading is gone, and
nothing in the repo links to its anchor.
- **Client secret:** "Obtain the client secret" says to copy the
**Client Secret** from the client's **Credentials** tab.
- **Screenshots:** removed every screenshot of the legacy console from
the page and deleted the files under
`apps/docs/public/img/guides/auth-keycloak/`, which nothing else
references:
  - `keycloak-create-realm.png`
  - `keycloak-add-client.png`
  - `keycloak-client-id.png`
  - `keycloak-redirect-uri.png`
  - `keycloak-client-secret.png`
  - `keycloak-openid-endpoint-config.png`

  No new screenshots are added.

Supabase Auth's Keycloak provider uses a confidential Authorization Code
flow (client secret plus code exchange). That flow needs Client
authentication and Standard flow, so the guide does not ask readers to
enable Direct access grants.

Unchanged: the `docker run` command and the text of the realm section.

Checks: `pnpm turbo run typecheck --filter='...[origin/master]'`, `pnpm
turbo run lint --filter='[origin/master]'`, and Prettier on the changed
MDX file all pass. The docs tests were skipped because they need Docker.

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

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-19 22:23:33 +00:00
supabase-vercel-tedd[bot] 39295dd584 docs(api): explain that default privilege changes leave existing tables exposed (#53639)
## Problem

The Securing your API guide explains how to stop new objects in `public`
from getting Data API grants. It doesn't say that this only changes the
defaults for objects created later. Existing tables keep their grants
and stay reachable through the Data API.

Related to
[FDBKIN-41883](https://linear.app/supabase/issue/FDBKIN-41883)
Closes [DOCS-1685](https://linear.app/supabase/issue/DOCS-1685)

## Solution

Adds text to `apps/docs/content/guides/api/securing-your-api.mdx` and
rewrites no existing text:

- **Default privileges:** a new paragraph says that changes to default
privileges, including the platform default change, apply only to new
objects, so existing tables keep their grants and stay reachable through
the Data API. A per-table revoke follows it: `revoke all on table
public.your_table from anon, authenticated, service_role;`. A sentence
after it says that leaving out `service_role` keeps server-side access
with a secret key.
- **Revoke default privileges:** a new sentence says that existing
tables, sequences, and functions keep their current grants. It links to
the per-table revoke in `#default-privileges`.

Sources for the behavior:
- The Dashboard toggle's SQL (`buildDefaultPrivilegesSql` in
`packages/pg-meta/src/sql/studio/database/privileges.ts`) runs only
`alter default privileges … grant/revoke` statements. It runs no revoke
on existing tables.
- The Postgres docs for `ALTER DEFAULT PRIVILEGES` say it affects only
objects created later.
- `getting-started/api-keys.mdx` says that a secret key uses
`service_role`, which bypasses RLS but still needs table grants.
- Checked on PGlite (PostgreSQL 18.6). After `alter default privileges …
revoke all on tables`, a table created earlier kept its `anon`,
`authenticated`, and `service_role` grants, and a table created later
had none. After the per-table revoke, `has_table_privilege('anon',
'public.old_t', 'select')` returned false. With `service_role` left out
of the revoke, `service_role` still read an RLS-enabled table. With
`service_role` included, it got `permission denied`.

Checks run: `pnpm turbo run lint --filter='[origin/master]'` (0 errors),
`pnpm turbo run typecheck --filter='...[origin/master]'`, Prettier
`--check` on the changed file, and `pnpm -C apps/docs run
check:removed-anchors`. `pnpm build:guides-markdown` didn't run locally:
its federated-content step needs GitHub credentials. The docs tests
weren't run because they need Docker.

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

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-19 22:23:30 +00:00
supabase-vercel-tedd[bot] 12bd59d18a chore(deps): bump nuxt to 4.6.4 (#53541)
## Problem

`pnpm audit` reports a moderate-severity advisory for `nuxt` 4.6.3,
which `@supabase/vue-blocks` (`blocks/vue`) pulls in.

## Solution

Bump `nuxt` from 4.6.3 to 4.6.4 in `pnpm-lock.yaml` with
`scripts/fix-audit-vulnerability.ts nuxt`. The script resolved it
without a permanent override, so `pnpm-workspace.yaml` and every
`package.json` are unchanged. The lockfile diff is nuxt 4.6.4 and the
`@nuxt/*` packages it pins at the same version.

## Review instructions

This change has no UI. To verify it:

1. `pnpm install --frozen-lockfile` succeeds.
2. `pnpm why nuxt --recursive` shows a single version, `nuxt@4.6.4`.
3. `pnpm --silent tsx scripts/fix-audit-vulnerability.ts nuxt --json`
returns `"status": "not_vulnerable"`.
4. `pnpm --filter @supabase/vue-blocks run typecheck` passes.

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


[FE-5131](https://linear.app/supabase/issue/FE-5131/bump-a-single-vulnerable-dependency)

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-19 12:17:55 +01:00
supabase-vercel-tedd[bot] aac6e0aad7 fix(studio): catch tus terminate rejection when cancelling storage uploads (#53505)
## Problem

When a user cancels resumable uploads in the storage explorer, Studio
calls `upload.abort(true)` on each tus upload. In tus-js-client v4,
`abort()` returns a promise that sends a DELETE to terminate the upload
on the server. The call was wrapped in a synchronous `try/catch`, which
does not catch a rejected promise. When the terminate request fails (for
example because the network is unreachable), every cancelled upload
produced an unhandled promise rejection: `tus: failed to terminate
upload`.

## Solution

Attach a `.catch()` to `upload.abort(true)` in
`apps/studio/state/storage-explorer.tsx` and log the failure with
`console.warn`. The upload is already stopped on the client, so a failed
server-side terminate is safe to ignore. Cancel behaviour is otherwise
the same: the upload promise still rejects with `Upload aborted by
user`, and the toast flow does not change.

## Review instructions

1. Open a project's storage bucket in the Studio preview and start
uploading several large files.
2. While they upload, cancel the upload from the upload toast. The
uploads stop and the toast shows the cancellation as it did before.
3. Optional: in DevTools, set the network to Offline, then cancel during
an upload. The console shows a `Failed to terminate upload on the
server` warning and no `Uncaught (in promise)` error.

Checks run:
- `pnpm turbo run typecheck --filter='...[origin/master]'`: passed
- `eslint state/storage-explorer.tsx` (in `apps/studio`): no errors
- Prettier check on the changed file: passed
- `pnpm turbo run lint --filter='[origin/master]'`
(`studio#lint:type-checks`) ran out of memory twice in the build
sandbox.

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


[FE-5117](https://linear.app/supabase/issue/FE-5117/error-tus-failed-to-terminate-upload-caused-by-networkunreachable)

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-19 14:11:08 +07:00
supabase-vercel-tedd[bot] 800a8ef0b8 fix(studio): return correct status codes from self-hosted API handlers (#53530)
## Problem

Several self-hosted Studio API route handlers report success after a
failure or send invalid responses:

- `DELETE /api/platform/auth/{ref}/users/{id}/factors` started the
factor deletions with `forEach(async ...)` and returned 200 without
waiting. A failed delete was never reported.
- `POST /api/platform/auth/{ref}/{invite,magiclink,otp,recover}` called
`res.status(code)` with the upstream error code. When the request failed
with no HTTP response (a network error or an abort), `code` is undefined
and the web response adapter fell back to 200.
- `PUT /api/platform/projects/{ref}/analytics/log-drains/{uuid}` wrote a
500 inside `.catch` and then continued to `res.status(200)`. It also
returned 200 when Logflare answered with a non-2xx status.
- `DELETE` on the same route had the same `.catch` problem and sent
`res.status(204).json(...)`. The web `Response` constructor rejects a
body on a 204, so every successful delete threw and became a 500.
- `GET /api/connect` pushed every file path twice.
- The 405 `Allow` headers were wrong: `['PATCH']` on `users/{id}` (which
also handles DELETE) and `['GET', 'POST']` on `log-drains/{uuid}` (which
handles GET, PUT, and DELETE).

## Solution

- Factors: await every `deleteFactor` call with `Promise.all`, and
return 400 with the first error message if any delete failed.
- Auth senders: `res.status(code ?? 500)`.
- Log drain PUT/DELETE: use `try`/`catch` around `fetch`, check
`response.ok`, and return 500 from the handler itself on failure. DELETE
returns `res.status(204).end()` with no body.
- Connect: remove the duplicate `push` (`.DS_Store` is already skipped
earlier in the loop).
- Fix both `Allow` headers.

## Review instructions

On a self-hosted Studio:

1. Delete a log drain. The request returns 204 with an empty body, the
drain disappears from the list, and no error toast shows.
2. Update a log drain with values that Logflare rejects. The request
returns 500 and Studio shows an error, not success.
3. `GET /api/connect` returns each file path once.
4. Remove MFA factors for a user who has factors. The request returns
200 only after the factors are deleted, and the user's factor list is
empty afterwards.
5. Send an unsupported method (e.g. `GET`) to
`/api/platform/auth/{ref}/users/{id}`. The 405 response has `Allow:
PATCH, DELETE`.

Checks run: `pnpm turbo run typecheck --filter='...[origin/master]'`,
`pnpm turbo run lint --filter='[origin/master]'`, and prettier on the
changed files. Lint ran out of memory twice at the default heap size,
then passed with `NODE_OPTIONS=--max-old-space-size=8192`. No unit tests
cover these route files.

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


[FE-5124](https://linear.app/supabase/issue/FE-5124/self-hosted-studio-api-handlers-hide-errors-and-return-wrong-status)

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-19 14:49:30 +09:00
supabase-vercel-tedd[bot] 8feb4a04a4 fix(docs): correct OpenCode MCP config, Python type examples, and small docs gaps (#53637)
## Problem

Several docs snippets and statements are wrong or incomplete:

- The OpenCode MCP config generated by `McpUrlBuilder` uses the old
shape (`mcp.supabase` with `enabled: true`). Current OpenCode config
expects servers under `mcp.servers.<name>` and uses `disabled` instead
of `enabled`, so the snippet does not register the server.
- The Python type generation guide builds Pydantic models with
`PublicMovies(m)`. `BaseModel` does not accept a positional dict, so the
example raises `TypeError`.
- The API keys page does not mention that the Data API OpenAPI root
(`GET /rest/v1/`) accepts only secret keys, so a publishable key gets a
401 there.
- The logs page says retention depends on the plan but does not give the
values.
- The Auth Hooks page names the Send SMS hook secret
`SEND_SMS_HOOK_SECRETS`, while the Send SMS hook page, the other hook
pages, and the self-hosting guide use the singular `..._HOOK_SECRET`.

## Solution

- `packages/ui-patterns/src/McpUrlBuilder`: OpenCode config now emits `{
"mcp": { "servers": { "supabase": { "type": "remote", "url": ... } } }
}`. Updated `OpenCodeMcpConfig`, `isOpenCodeMcpConfig`, and `getMcpUrl`
to match.
- `generating-python-types.mdx`: use `PublicMovies.model_validate(m)` in
the select, insert, and update examples.
- `getting-started/api-keys.mdx`: add a Known limitations bullet about
`GET /rest/v1/` requiring a secret key, with table routes or
`/auth/v1/health` as the check for a publishable key.
- `observability/logs.mdx`: add a per-plan retention table (Free 1 day,
Pro 7 days, Team 28 days, Enterprise 90 days), matching
`packages/shared-data/pricing.ts`.
- `auth/auth-hooks.mdx`: rename `SEND_SMS_HOOK_SECRETS` to
`SEND_SMS_HOOK_SECRET`.

Checks run: `pnpm turbo run typecheck --filter='...[origin/master]'`
(passed, run with `--concurrency=1` after the first run was OOM-killed),
`pnpm turbo run lint --filter='[origin/master]'` (passed, no errors),
`vitest run src/McpUrlBuilder` in `packages/ui-patterns` (37 passed),
and Prettier on changed files. Docs tests were skipped because they need
Docker.

## Review instructions

1. On the docs preview, open `/docs/guides/getting-started/mcp`, select
OpenCode, and confirm the config shows `mcp.servers.supabase` with
`type: "remote"` and the URL, and no `enabled` field.
2. Open `/docs/guides/ai-tools/mcp`, select OpenCode, and confirm the
same config.
3. Open `/docs/guides/api/rest/generating-python-types` and confirm the
select, insert, and update examples use
`PublicMovies.model_validate(m)`.
4. Open `/docs/guides/getting-started/api-keys#known-limitations` and
confirm the bullet about `GET /rest/v1/` accepting only secret keys.
5. Open `/docs/guides/observability/logs` and confirm the retention
table lists Free 1 day, Pro 7 days, Team 28 days, Enterprise 90 days.
6. Open `/docs/guides/auth/auth-hooks` and confirm the Send SMS examples
use `SEND_SMS_HOOK_SECRET`, not `SEND_SMS_HOOK_SECRETS`.

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

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-18 20:46:10 +00:00
supabase-vercel-tedd[bot] 7b1def73c8 fix(common): add queryWordCount to the telemetry flag-stamping test fixture (#53619)
## Problem

`SearchQueryProperties` now requires `queryWordCount`, but the fixture
in the `stamps each PostHog flag as $feature/<key>` test in
`packages/common/telemetry-event.test.ts` still used the old shape. `tsc
--noEmit` in `packages/common` fails with TS2322/TS2352 on that test,
which breaks the `common#typecheck` task.

## Solution

Add `queryWordCount: 1` to the fixture so it matches
`SearchQueryProperties` and the other `kb_search_submitted` fixtures in
the same file. This changes only the test, not runtime code.

## How to verify

- `pnpm --filter common run typecheck` passes
- `pnpm --filter common exec vitest run telemetry-event.test.ts` passes
(9 tests)

Also ran `pnpm turbo run typecheck lint --filter='[origin/master]'` and
a Prettier check on the changed file.

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-18 14:42:55 +00:00
supabase-vercel-tedd[bot] 248dbefbe9 fix(studio): skip notifications and service status queries without a session (#53538)
## Problem

`useNotificationsV2Query` and `useProjectServiceStatusQuery` run
whenever their component is mounted, whether or not a session exists.
When a session ends and the app redirects to `/sign-in`, they can still
fetch (or refetch) `/platform/notifications` and
`/v1/projects/{ref}/health` with no `Authorization` header. The API then
responds 401 `No access token provided`, and the response is classified
as an `UnclassifiedApiError` and reported.

## Solution

Both hooks now gate `enabled` on `useIsLoggedIn()` from `common`.
`usePermissionsQuery` and `useOverdueInvoicesQuery` already follow this
pattern. The caller's `enabled` option still applies on top of it.
Self-hosted builds always count as logged in, so their behavior is
unchanged.

Checks run:
- `pnpm turbo run typecheck --filter='...[origin/master]'`: passes
- `pnpm turbo run lint --filter='[origin/master]'`: passes. The first
run of `studio#lint:type-checks` ran out of heap memory. It passed on a
rerun with `NODE_OPTIONS=--max-old-space-size=8192`.
- `pnpm exec vitest run
components/layouts/AppLayout/AdvisorButton.test.tsx
components/layouts/AppLayout/AdvisorButton.platform.test.tsx
components/ui/AdvisorPanel/AdvisorSignals.integration.test.tsx` (in
`apps/studio`): passes
- Prettier check on the changed files: passes

## Review instructions

1. Sign out of the Studio preview. Open
`/dashboard/sign-in?returnTo=/project/<ref>`, keep the network tab open,
and confirm that no request to `/platform/notifications` or
`/v1/projects/<ref>/health` returns 401.
2. Sign in and open a project's home page. The service status indicator
still loads its status.
3. Open the Advisor/Issues panel from the header. Notifications still
load, and the header button still shows the unread/critical indicator
when it 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)


[FE-4989](https://linear.app/supabase/issue/FE-4989/unclassifiedapierror-no-access-token-provided)

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-18 08:51:47 -05:00
supabase-vercel-tedd[bot] f0986f5f24 fix(studio): treat 401 API errors as a user fault for Sentry routing (#53411)
## Problem

A 401 from the platform API means the browser sent no valid session
token: the user signed out, or the session expired. Studio then
redirects to sign-in. `classifyResponseError` turns any 4xx into
`UnclassifiedApiError` with `fault: 'studio'`, so every query that fails
while the session is gone goes to Sentry at the Studio-owned sample
rate. The first query to fail is often the read-replicas query. Sentry
fills with errors that Studio can't fix.

## Solution

- `UnclassifiedApiError` now derives its fault from the status: a 401 is
`user`, and every other 4xx stays `studio`.
- `ERROR_ROUTING.UnclassifiedApiError` gets a `user` entry at
`SAMPLE_USER_FAULT`. 401s still send a small trickle to catch
misclassification, and 403/404/429 keep `SAMPLE_OWNED`.
- Because the fault is `user`, `AlertError` shows the user-fault
presentation for a 401 ("try again / refresh"), with no contact-support
prompt.
- Tests: `handleError.test.ts` expects `user` for a 401, and
`error-routing.test.ts` covers the 401 and 403 routing.

## Review instructions

This change has no new UI. To check it:

1. In `apps/studio`, run `vitest run lib/errors data/handleError.test.ts
data/error-classification.test.ts data/fetchers-errors.test.ts
data/query-client-reporting.test.ts components/ui`. All tests pass.
2. In `apps/studio`, run `eslint` on the changed files. It reports
nothing.
3. `tsc --noEmit` in `apps/studio` reports one error, in
`packages/ui-patterns/src/McpUrlBuilder/components/InstructionBlocks.tsx`.
The same error appears without this change: it comes from running `tsc`
without `next typegen` first.


[FE-5086](https://linear.app/supabase/issue/FE-5086/unclassifiedapierror-no-access-token-provided)

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-18 16:48:25 +07:00
supabase-vercel-tedd[bot] f1e7e6e339 fix(studio): redirect to sign-in when sign-out fails on the logout page (#53529)
## Problem

The `/logout` route awaited `signOut()` without handling errors, and the
returned promise was not handled either. If any step of sign-out threw
(for example clearing local storage or the assistant's IndexedDB
storage), the rejection went unhandled, the redirect to `/sign-in` never
ran, and the page stayed on the loading spinner indefinitely.

## Solution

Wrap the sign-out in `try / catch / finally` in
`apps/studio/routes/logout.tsx`:

- On success, show the existing "Successfully logged out" toast.
- On failure, log the error and show an error toast.
- In both cases, navigate to `/sign-in`.

The promise from the async `logout()` call is now explicitly discarded
with `void`, since it can no longer reject.

## Review instructions

1. Sign in to the preview, then open `/dashboard/logout`. You see
"Successfully logged out" and land on `/dashboard/sign-in`.
2. To check the failure path, make sign-out throw (for example, block
IndexedDB for the site, or temporarily throw in `useSignOut`), then open
`/dashboard/logout`. You see an error toast and still land on
`/dashboard/sign-in` instead of a spinner that never ends.

Checks run: `pnpm turbo run typecheck --filter='...[origin/master]'`,
`pnpm turbo run lint --filter='[origin/master]'`, and Prettier on the
changed file. There are no unit tests for this route. The Studio lint
type-check ran out of memory on the first run with the default Node heap
and passed with a larger heap.

## Checklist

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)


[FE-5123](https://linear.app/supabase/issue/FE-5123/logout-page-gets-stuck-if-sign-out-fails)

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-18 16:00:40 +09:00
supabase-vercel-tedd[bot] be19e47cf3 fix(studio): keep homepage service chart order stable across intervals (#53522)
## Problem

On the project homepage, the service usage cards (Postgres, Edge
Functions, Auth, Storage, Realtime, API Gateway) were sorted by request
total for the selected interval. Changing the interval changes the
totals, so the cards reshuffled every time the interval changed (and
while data was loading, when totals are briefly zero).

## Solution

- `buildSortedServiceCards` → `buildServiceCards` in
`ProjectUsage.metrics.ts`: it still drops disabled services and maps
stats, but keeps the order the services are declared in
`ProjectUsageSectionDeltas.tsx` instead of sorting by traffic.
- Removed the now-unused `sortServicesByTraffic` helper and its tests.
- Added a test that the card order is the same when totals change.

## How to verify

On a project's homepage (Studio preview), in the usage section with the
"Total Requests" / "Success Rate" header:

1. Note the order of the service cards.
2. Switch the interval dropdown between "Last 60 minutes", "Last 24
hours", and "Last 7 days".
3. The cards stay in the same order for every interval: Postgres, Edge
Functions, Auth, Storage, Realtime, API Gateway (services that are not
enabled for the project are skipped).
4. Reloading the page with any interval shows the same order, including
while the charts are loading.

## Checks run

- `pnpm turbo run typecheck --filter='...[origin/master]'`: pass
- `vitest run
components/interfaces/ProjectHome/ProjectUsage.metrics.test.ts`: 12
passed
- `eslint` on the changed files: pass
- Prettier check on the changed files: pass
- `pnpm turbo run lint --filter='[origin/master]'`:
`studio#lint:type-checks` ran out of memory twice in the sandbox
(JavaScript heap out of memory).
- `vitest related` for the changed files fails on clean master too, with
an unrelated parse error on wrapper markdown imports.

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-17 14:25:21 -06:00
supabase-vercel-tedd[bot] cf556ebd2a fix(studio): wait for permissions before showing no-permission on auth logs (#53527)
## Problem

The auth logs route rendered the full-page `NoPermission` state whenever
`useAsyncCheckPermissionsV2` returned `can: false`. The hook returns
`can: false` until the permissions query succeeds. Users who can read
logs therefore saw a short "No permission" flash before the logs loaded.

## Solution

`apps/studio/routes/project/$ref/logs/auth-logs.tsx` now reads
`isSuccess` from `useAsyncCheckPermissionsV2`:

- While permissions load, the route renders nothing.
- Once they load, a user without `ANALYTICS_LOGS_READ` gets the
full-page `NoPermission` state.
- Otherwise the route renders `LogsPreviewer` as before.

This is the same `isSuccess && !can` gating that other routes use, such
as `database/extensions.tsx`. No other route under
`routes/project/$ref/logs/` uses this pattern.

## How to verify

- As a user with log access, open `/project/<ref>/logs/auth-logs`.
Hard-reload the page. The "No permission" state never appears, and the
auth logs view loads.
- As a user without analytics log read access, open
`/project/<ref>/logs/auth-logs`. The page shows the full-page "No
permission" state for authentication logs.

## Checks run

- `pnpm turbo run typecheck --filter='...[origin/master]'`: pass
- `pnpm turbo run lint --filter='[origin/master]'`: pass, no errors. It
ran out of memory once at the default heap and passed with
`NODE_OPTIONS=--max-old-space-size=8192`.
- Prettier check on the changed file: pass
- No unit tests cover this route.


[FE-5121](https://linear.app/supabase/issue/FE-5121/auth-logs-page-flashes-no-permission-while-permissions-load)

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-17 09:18:05 -06:00
supabase-vercel-tedd[bot] 943f02f413 fix(studio): make organization search case-insensitive (#53526)
## Problem

The search on the organizations page lowercased each organization's name
and slug but compared them with the raw input. Any search term with an
uppercase letter matched nothing, and leading or trailing spaces broke
matches too.

## Solution

Normalize the input once (`search.trim().toLowerCase()`) and use it for
the filter and for the empty-state check. A whitespace-only search now
counts as no filter, and the no-results message shows the trimmed term.

## Review instructions

1. Sign in to the preview with an account that has at least one
organization and open `/dashboard/organizations`.
2. Type an organization's name in a different case (for example all
uppercase). The organization still shows.
3. Type part of an organization's slug in uppercase. The organization
still shows.
4. Add spaces before and after a matching term. The organization still
shows.
5. Type only spaces. Every organization shows, and the no-results state
does not appear.
6. Type a term that matches no organization. The no-results state
appears.

Checks run: `pnpm turbo run typecheck --filter='...[origin/master]'`
(pass), `eslint` on the changed file (pass), Prettier check (pass).
`pnpm turbo run lint` ran out of memory twice in the
`studio#lint:type-checks` step.

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


[FE-5119](https://linear.app/supabase/issue/FE-5119/organization-search-on-the-organizations-page-is-case-sensitive)

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-17 14:48:00 +00:00
supabase-vercel-tedd[bot] 6d2cf769a5 fix(studio): replace history entry in project billing usage redirect (#53525)
## Problem

`/project/[ref]/settings/billing/usage` only redirects: to
infrastructure settings for the `#cpu`, `#ram` and `#disk_io` hashes,
and to the org usage page otherwise. The redirect runs on the client
because it reads the URL hash. It used `navigate` with the default push
behaviour, so the redirect page stayed in history. Pressing Back landed
on the redirect page, which sent the user forward again, and the user
could not go back.

## Solution

Pass `replace: true` to both `navigate` calls in
`apps/studio/routes/project/$ref/settings/billing/usage.tsx`, so the
redirect replaces its own history entry.

## How to verify

1. From any project page, open
`/project/<ref>/settings/billing/usage#cpu`. You land on
`/project/<ref>/settings/infrastructure#cpu`. Pressing Back returns to
the project page you came from, not to the infrastructure page again.
2. From any project page, open `/project/<ref>/settings/billing/usage`
with no hash. You land on `/org/<slug>/usage?projectRef=<ref>`. Pressing
Back returns to the project page you came from.

## Checks

- `pnpm turbo run typecheck --filter='...[origin/master]'`: passed.
- `eslint` on the changed file: passed. Prettier `--check`: passed.
- `pnpm turbo run lint --filter='[origin/master]'` ran out of memory
twice in the sandbox (`studio#lint:type-checks`).


[FE-5120](https://linear.app/supabase/issue/FE-5120/project-billing-usage-redirect-breaks-the-back-button)

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-17 08:43:39 -06:00
supabase-vercel-tedd[bot] 91a6bd3bfb chore(docs): add Alex Venter to humans.txt (#53521)
## Problem

`apps/docs/public/humans.txt` is missing a team member.

## Solution

Adds `Alex Venter` to the team list, in alphabetical order between `Alex
Ives` and `Alexander Alexandrov`. No other changes.

## Review instructions

1. Open `/docs/humans.txt` on the docs preview.
2. Check that `Alex Venter` appears between `Alex Ives` and `Alexander
Alexandrov`.

Verified with `git diff` (one added line). The file is plain text, so
the typecheck, lint, and prettier checks do not apply to it.

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

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-17 08:15:50 -06:00
supabase-vercel-tedd[bot] fb6bfd86ea chore(deps): bump next to 16.4.6 (#53509)
## Problem

`pnpm audit` reports a moderate advisory for `next` 16.4.3, which the
lockfile resolves today. Versions `>=16.4.5` are patched.

## Solution

Ran `scripts/fix-audit-vulnerability.ts next`. It added a temporary
override to resolve `next` to `^16.4.5`, reinstalled, removed the
override, reinstalled again, and confirmed that the audit passes without
the override. Every workspace now resolves `next@16.4.6`.

Only `pnpm-lock.yaml` changes. No `package.json` edits and no permanent
overrides in `pnpm-workspace.yaml`.

## Review instructions

1. `pnpm install --frozen-lockfile` succeeds.
2. `pnpm why next --recursive` lists only `next@16.4.6`.
3. `pnpm audit` reports no advisory for `next`.
4. `pnpm turbo run typecheck --filter='...[origin/master]'` passes
(25/25 tasks, run with `--concurrency=1`).
5. The Studio, docs and www previews build and load.

Note: `pnpm turbo run lint --filter='[origin/master]'` ran out of memory
twice in `studio#lint:type-checks` (JavaScript heap out of memory) in
the build sandbox. The other lint tasks passed. CI should run it.

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


[FE-5089](https://linear.app/supabase/issue/FE-5089/bump-a-single-vulnerable-dependency)

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-17 14:06:02 +01:00
supabase-vercel-tedd[bot] 805dfd71d1 chore(deps): bump hono to 4.13.18 (#53465)
## Problem

`pnpm audit` reports a moderate-severity advisory for `hono@4.13.14`,
patched in `>=4.13.16`. `hono` is a transitive dependency (via
`@hono/node-server`, used by `@modelcontextprotocol/sdk` and
`@modelcontextprotocol/node`) of `studio`, `library` and
`@supabase/vue-blocks`.

## Solution

Ran `scripts/fix-audit-vulnerability.ts hono`, which temporarily
overrides the version, reinstalls, removes the override, and checks the
audit again. The result changes only `pnpm-lock.yaml`: `hono` resolves
to `4.13.18` (one version across the workspace). There are no permanent
overrides and no `package.json` changes.

## Review instructions

1. `pnpm install --frozen-lockfile` succeeds with no changes.
2. `pnpm why hono --recursive` shows a single version, `hono@4.13.18`.
3. `pnpm --silent tsx scripts/fix-audit-vulnerability.ts hono --json`
returns `"status": "not_vulnerable"`.
4. `pnpm --filter studio typecheck` passes.

No UI changes.

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


[FE-5103](https://linear.app/supabase/issue/FE-5103/bump-a-single-vulnerable-dependency)

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-16 19:31:57 +00:00
supabase-vercel-tedd[bot] 756d782304 docs(kb): explain why troubleshooting articles don't accept pull requests (#53455)
## Problem

The kb README says troubleshooting content is fetched from a private
repository, but it doesn't say why, or what a contributor can do instead
of opening a pull request against those articles.

## Solution

Adds a "Contributing to troubleshooting articles" subsection under
"Federated troubleshooting content" in `apps/kb/README.md`. It explains:

- troubleshooting articles can't be changed with a pull request to this
repository
- the source is private because unpublished guides are often drafted
from support cases and can contain customer data before review
- how to suggest a fix: comment on the article's GitHub Discussion (the
"Go to the GitHub discussion" link on each article) or open an issue
that links the article
- pull requests for other `/kb` content, such as `src/content/guides/`,
are welcome

No code changes.

## Review instructions

1. Open `apps/kb/README.md` in the PR's "Files changed" view.
2. Check that the new "Contributing to troubleshooting articles"
subsection explains the restriction, the reason (customer data in
unpublished guides), and the two ways to suggest a fix.
3. Check that the "open an issue" link points to
`https://github.com/supabase/supabase/issues/new/choose`.

Checked with: `prettier --check apps/kb/README.md` and `pnpm turbo run
typecheck lint --filter='[origin/master]'`. Both pass, and lint reports
only existing warnings.

## 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).
(Not applicable: README only.)


[DOCS-1673](https://linear.app/supabase/issue/DOCS-1673/clarify-troubleshooting-article-contribution-restrictions-in-the-kb)

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-16 13:58:27 +00:00
supabase-vercel-tedd[bot] 6196382e8e chore(deps): bump astro to 7.4.10 (#53406)
## Problem

`pnpm audit` reports moderate advisories for `astro` (vulnerable range
`<=7.4.6`; the lockfile resolved `7.4.2`). `astro` is used by `apps/kb`
directly and through `@astrojs/mdx`.

## Solution

Updated `astro` in `pnpm-lock.yaml` from `7.4.2` to `7.4.10` using
`scripts/fix-audit-vulnerability.ts astro`. The script resolved the fix
with a temporary override, then removed it; the patched version stays
resolved without any permanent override. Only `pnpm-lock.yaml` changes
(the extra lockfile lines are transitive dependencies of the new `astro`
version). No `package.json` or `pnpm-workspace.yaml` changes.

## Review instructions

1. `pnpm install --frozen-lockfile` succeeds.
2. `pnpm why astro --recursive` shows a single `astro@7.4.10`.
3. `pnpm audit` reports no advisories for `astro`.
4. `cd apps/kb && pnpm exec astro build` completes (73 pages built
locally).
5. On the kb preview, `/kb` pages render as before.

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


[FE-5085](https://linear.app/supabase/issue/FE-5085/bump-a-single-vulnerable-dependency)

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-16 11:55:23 +01:00
supabase-vercel-tedd[bot] 4c9304d385 chore(deps): bump @hono/node-server to 2.1.6 (#53378) 2026-11-13 17:06:54 +00:00
supabase-vercel-tedd[bot]andIvan Vasilov c8748c7c26 chore: pin Node.js to v24 across the repository (#53287)
## Problem

`engines.node` used open-ended ranges (`>=22.23.4` at the root,
`>=22.12.0` in `apps/kb`). Vercel resolves an open-ended range to the
newest Node.js major, so it overrides the project's configured version
and warns that future majors will be picked automatically. The other
apps declared no engine at all, and `.nvmrc` (used by local dev and CI)
still pointed at Node 22.

## Solution

Pin Node.js 24 everywhere the repo declares a Node version:

- `.nvmrc`: `22.23.4` -> `24.22.3` (latest v24 LTS). CI workflows read
`node-version-file: .nvmrc`, so they follow.
- Root `package.json` and `apps/kb/package.json`: `engines.node` ->
`24.x`.
- Every other app (`design-system`, `docs`, `learn`, `lite-studio`,
`studio`, `ui-library`, `www`): add `engines.node: "24.x"`. Vercel reads
the Node.js version from `engines.node` in the project's `package.json`;
`vercel.json` has no setting for it, so this is how each Vercel project
gets an explicit version.
- `.agents/skills/test-the-docs/sandbox/Dockerfile`:
`node:22-bookworm-slim` -> `node:24-bookworm-slim`.
- `AGENTS.md`: update the stated Node requirement.

Notes:

- `engineStrict: true` is set in `pnpm-workspace.yaml`, so `pnpm
install` now requires Node 24 locally.
- `.github/workflows/self-host-tests-smoke.yml` hardcodes `node-version:
'22'` and is not changed here.
- No builds or tests were run for this change. Checked that all changed
`package.json` files parse and that Prettier passes on the changed
files.

## Review instructions

1. Open the Vercel build logs for this PR's deployments (studio, docs,
www, kb, and so on).
2. Confirm each build uses Node.js 24.x.
3. Confirm the logs no longer show the warning that the `engines` field
overrides the project's Node.js version, or the warning about automatic
upgrades to new major versions.
4. Confirm CI jobs that use `.nvmrc` set up Node 24.22.3.

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


[FE-5004](https://linear.app/supabase/issue/FE-5004/bump-the-nodejs-version-across-the-repository)

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-11-13 15:30:34 +01:00
supabase-vercel-tedd[bot]andAli Waseem 0e29dfda1b fix(studio): return no edge functions when the self-hosted functions folder is missing (#53229)
## Problem

In self-hosted and local Studio, `FileSystemFunctionsArtifactStore`
reads the folder set by `EDGE_FUNCTIONS_MANAGEMENT_FOLDER` with
`readdir`. When that folder does not exist yet (for example, a fresh
project before any function is created), `readdir` throws `ENOENT`, the
`/api/v1/projects/[ref]/functions` route returns a 500, and the Edge
Functions page shows "Failed to retrieve edge functions" instead of its
empty state.

## Solution

- Add a private `readFunctionsFolder()` helper that returns an empty
list when the folder is missing (`ENOENT`) and rethrows every other
error.
- `getFunctions()` now returns `[]` and `getFunctionBySlug()` returns
`undefined` for a missing folder.
- Add `fileSystemStore.test.ts`, which uses real temp folders to cover
the missing folder, a non-ENOENT error (path is a file), and the normal
listing (skips `main` and folders without an `index` entrypoint).

No change to the hosted platform path.

## Review instructions

This only affects self-hosted Studio, so the Vercel preview cannot show
it. Check it with:

1. `cd apps/studio && pnpm exec vitest run
lib/api/self-hosted/functions/`: all tests pass.
2. Optional, locally: run self-hosted Studio with
`EDGE_FUNCTIONS_MANAGEMENT_FOLDER` pointing to a folder that does not
exist, open Edge Functions, and see the empty state instead of a 500.

Checks run: the Vitest command above, `pnpm turbo run typecheck
--filter='...[origin/master]'`, ESLint and Prettier on the changed
files.

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


[FE-4923](https://linear.app/supabase/issue/FE-4923/fix-studio-edge-functions-500-error-when-local-functions-folder-does)

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Ali Waseem <waseema393@gmail.com>
2026-11-12 06:58:24 -06:00
supabase-vercel-tedd[bot]andIvan Vasilov 86f9c0c250 chore(deps): bump node-forge to 1.4.3 (#53261)
## Problem

`pnpm audit` reports a moderate advisory for `node-forge` 1.4.2 (patched
in `>=1.4.3`). It is a transitive dependency, pulled in through `nuxt` >
`@nuxt/nitro-server` > `nitropack` > `listhen` by
`@supabase/vue-blocks`.

## Solution

Ran `scripts/fix-audit-vulnerability.ts node-forge`, which resolved
`node-forge` to 1.4.3 without leaving a permanent override. The only
change is in `pnpm-lock.yaml` (`node-forge` 1.4.2 to 1.4.3). No
`package.json` or `pnpm-workspace.yaml` changes.

Checks run:
- `pnpm install --frozen-lockfile` succeeds.
- `pnpm why node-forge --recursive` shows a single version, 1.4.3.
- `pnpm tsx scripts/fix-audit-vulnerability.ts --json` no longer lists
`node-forge`.
- `pnpm --filter @supabase/vue-blocks run typecheck` passes.

## Review instructions

No UI change. To verify:

1. Run `pnpm install --frozen-lockfile`; it succeeds.
2. Run `pnpm why node-forge --recursive`; it shows only
`node-forge@1.4.3`.
3. Run `pnpm tsx scripts/fix-audit-vulnerability.ts --json`;
`node-forge` is not in `vulnerabilities`.
4. Confirm the diff touches only `pnpm-lock.yaml`.

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


[FE-4990](https://linear.app/supabase/issue/FE-4990/bump-a-single-vulnerable-dependency)

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-11-11 10:02:42 +00:00
supabase-vercel-tedd[bot] 5f77aa07ea fix(studio): keep a cron job's stored command when opening the editor (#53172)
## Problem

The cron job editor could rewrite a job's SQL just by opening it, and
the result depended on how the editor was opened:

- Opened from the jobs list ("..." menu > Edit), the sheet is already
mounted with an empty job. Opening it resets the form to the parsed
values, which re-runs the effect that rebuilds `values.snippet` from the
form fields. The stored command gets replaced by a regenerated one.
- Opened from the job's own page, the sheet mounts with the job, so the
fields don't change on open and the stored command is kept.

The regenerated command is lossy for `net.http_*` calls the HTTP form
can't represent. For example, a header value such as `'Bearer ' ||
(select decrypted_secret from vault.decrypted_secrets ...)` turned into
a literal JSON string, and a chained `|| jsonb_build_object(...)` was
dropped. Saving would silently overwrite a working job.

## Solution

- `parseCronJobCommand` now checks that a `net.http_get` /
`net.http_post` command can be represented by the HTTP form before
parsing it into fields. It needs named arguments only (`url`, `headers`,
`body`, `timeout_milliseconds`), literal values (headers may also be a
single `jsonb_build_object` of literals), and nothing after the call
besides `;`. Anything else (SQL expressions, `||` concatenation, unknown
arguments such as `params`, extra statements) opens as a SQL snippet
with the stored command unchanged. The argument splitter used for
`jsonb_build_object` is generalised and reused for this check.
- `CreateCronJobSheet` keeps the stored command while the form fields
still describe it. It compares the command built from the current fields
with the one built from the parsed stored values. The SQL is regenerated
only after a field actually changes, so both ways of opening the editor
behave the same.

## How to verify

On a project with `pg_cron` and `pg_net` enabled, create a cron job (via
the SQL editor) whose command is a `net.http_post` with headers that use
a SQL expression, for example:

```sql
select cron.schedule('expr-headers', '*/5 * * * *', $$
select net.http_post(
  url:='https://example.com/hook',
  headers:=jsonb_build_object('Authorization', 'Bearer ' || (select current_user)) || jsonb_build_object('x-fired-at', to_char(now(), 'YYYY')),
  body:='{}'::jsonb,
  timeout_milliseconds:=5000
);
$$);
```

- Integrations > Cron > Jobs, "..." menu on the job > Edit: the editor
opens as a SQL snippet showing exactly the stored command.
- Click the job row to open its page, then Edit: the editor shows the
same command.
- Edit a simple HTTP job (literal URL and headers) from both places: it
opens in the HTTP request / Edge Function form, and the SQL preview
equals the stored command until a field is changed.
- Change a header value in that simple job: the SQL preview updates to
reflect the change.

Checks run: `vitest run components/interfaces/Integrations/CronJobs`
(new fallback cases in `CronJobs.utils.test.ts`), `pnpm turbo run
typecheck --filter='...[origin/master]'`, eslint and prettier on the
changed files.


[FE-4980](https://linear.app/supabase/issue/FE-4980/fix-cron-job-editor-serialization-different-sql-generated-for-menu-vs)

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-10 07:07:34 -06:00
supabase-vercel-tedd[bot] c1b32d9596 chore(www): ignore browser-extension noise in Sentry (#53200)
## Problem

The www browser Sentry client reports errors that come from browser
extensions, not from site code. One example is `Invalid call to
runtime.sendMessage(). Tab not found.`, which is raised by the extension
messaging API (`chrome.runtime` / `browser.runtime`). Site code never
calls that API. Studio and docs already ignore known browser noise
through the shared `BROWSER_NOISE_IGNORE_ERRORS` list, but www does not
use that list.

## Solution

- `packages/common/sentry.ts`: add `/Invalid call to
runtime\.sendMessage\(\)/` to `BROWSER_NOISE_IGNORE_ERRORS`, under the
browser-extension section. Studio and docs pick it up too.
- `apps/www/instrumentation-client.ts`: pass
`BROWSER_NOISE_IGNORE_ERRORS` as `ignoreErrors`, the same way docs does.
www now ignores the shared network, extension, non-Error and
cross-origin script noise too.
- `apps/www/lib/sentry-capture.test.tsx`: add a test that an error with
this message is not sent.

## How to verify

This change has no UI. Check it with these commands:

- `pnpm --filter www exec vitest run --config vitest.sentry.config.mts`:
all tests pass, including "does not send browser extension messaging
errors".
- `pnpm --filter common exec vitest run sentry.test.ts` passes.
- `pnpm turbo run typecheck --filter='...[origin/master]'` and `pnpm
turbo run lint --filter='[origin/master]'` pass.

The full typecheck run ran out of memory on `studio#typecheck` once. Run
again on its own with `--filter=studio`, it passed.

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-10 09:05:43 +00:00
supabase-vercel-tedd[bot] b1cc9cf436 fix(studio): show an error toast when deleting a JWT signing key fails (#53087)
## What kind of change does this PR introduce?

Bug fix

## What is the current behavior?

On the JWT Keys settings page, the delete mutation for a signing key is
called with a custom `onError` that only closes the dialog. A custom
`onError` replaces the hook's default error toast, so when the API
rejects the delete (for example a 422 for a revoked key that cannot be
deleted yet), the dialog closes and nothing tells the user why.

## What is the new behavior?

The custom `onError` still closes the dialog, and now also shows `Failed
to delete JWT signing key: <API error message>` as an error toast.

## How to verify

1. Open Project Settings > JWT Keys on a project with a revoked signing
key that the API refuses to delete.
2. Click Delete on the revoked key and confirm.
3. An error toast appears with the API's error message, and the dialog
closes.
4. Deleting a revoked key that the API accepts still shows "Successfully
deleted key" and removes it from the list.

## Checks run

- `pnpm turbo run lint --filter='[origin/master]'`
- Studio typecheck (`tsc --noEmit` in `apps/studio`; the turbo run ran
out of memory, the direct run passed)
- Prettier check on the changed file


[FE-4943](https://linear.app/supabase/issue/FE-4943/no-error-message-shown-when-deleting-revoked-jwt-key-fails)

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-06 07:56:18 -06:00
supabase-vercel-tedd[bot] f8990cbda7 fix(studio): only show free Micro upgrade banner on paid plans (#53041)
## What kind of change does this PR introduce?

Bug fix

## What is the current behavior?

The project homepage shows the "free upgrade to Micro" banner
(`BannerFreeMicroUpgrade`) for any project on Nano compute that is near
resource exhaustion, regardless of the organization's plan. The free
Micro upgrade only applies to paid plans, so organizations on the Free
plan can see a banner offering something they are not eligible for.
`ComputeBadgeWrapper` already gates the equivalent upgrade glow on
`plan.id !== 'free'`.

## What is the new behavior?

`ProjectLayout` only shows the banner when the selected organization's
plan is known and is not `free`. The plan comes from the already-loaded
selected organization, so this adds no new request. While the plan is
unknown, the banner stays hidden.

## How to verify

- In a project of a Free plan organization on Nano compute with a
resource exhaustion warning, the project homepage does not show the free
Micro upgrade banner.
- In a project of a paid (Pro or higher) organization on Nano compute
with a resource exhaustion warning, the project homepage still shows the
banner.
- Projects not on Nano compute, or without exhaustion warnings, show no
banner, same as before.

## Checks run

- `pnpm turbo run typecheck --filter='...[origin/master]'`: pass
- `pnpm turbo run lint --filter='[origin/master]'`: pass
- Prettier check on the changed file: pass
- `vitest related` for the changed file could not run in the sandbox (it
stopped on a parse error in an unrelated static `.md` file before
reaching any test). No existing test covers this banner condition.


[FE-4366](https://linear.app/supabase/issue/FE-4366/free-micro-upgrade-banner-missing-plan-tier-gate-in-projectlayout)

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-06 07:22:25 -06:00
supabase-vercel-tedd[bot]andJoshen Lim df043b168c fix(studio): show unavailable notice on self-hosted Realtime settings page (#53042)
## Problem

In self-hosted / CLI Studio, `/project/[ref]/realtime/settings` shows a
skeleton loader forever. `useRealtimeConfigurationQuery` is disabled
when `IS_PLATFORM` is false, so its `isPending` never clears and
`RealtimeSettings` never leaves the loading state.

## Solution

`RealtimeSettings` now returns an `Admonition` ("Realtime settings are
not available for self-hosted projects") before the loading check when
`IS_PLATFORM` is false. This follows the existing Storage settings
pattern. Platform behavior does not change.

Added a component test for the self-hosted case. The `IS_PLATFORM` mock
in `RealtimeSettings.test.tsx` is now a toggleable getter.

## How to verify

- Self-hosted Studio (`IS_PLATFORM=false`): open
`/project/default/realtime/settings`. The page shows the "Realtime
settings are not available for self-hosted projects" notice and no
skeleton loader.
- Platform preview: open `/project/<ref>/realtime/settings`. The
Realtime settings form loads and saves as before.

Checks run: `pnpm turbo run typecheck --filter='...[origin/master]'`,
`pnpm turbo run lint --filter='[origin/master]'`, `vitest --run
components/interfaces/Realtime/RealtimeSettings.test.tsx` (11 passed),
prettier check.


[FE-4872](https://linear.app/supabase/issue/FE-4872/fix-infinite-skeleton-loader-on-realtime-settings-page-in-self-hosted)

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-11-06 12:00:45 +08:00
c5cdb59c47 feat(studio): prerender signed-out auth pages in the TanStack build (#52690)
## Problem

The TanStack Start build serves every document from the prerendered SPA
shell (`_shell.html`). For signed-out pages such as `/sign-in` and
`/sign-up`, the first HTML response holds only the loading fallback and
the generic `<title>Supabase</title>`. The page content and route
`head()` tags only appear after the JS bundle hydrates.

## Solution

On platform builds, prerender `/sign-in`, `/sign-up`, `/sign-in-sso` and
`/forgot-password` to static HTML next to the shell.

- `lib/prerendered-routes.ts`: the list of prerendered paths, shared by
the build config, the Vercel routes and the root route.
- `vite.config.ts`: passes the paths to `tanstackStart({ pages })` with
link crawling off, so only these pages are prerendered. Self-hosted
builds prerender nothing (self-hosted sign-in redirects straight to the
default project).
- `scripts/vercel-spa-routes.ts`: serves `<path>/index.html` for each
prerendered path (with and without the base path, optional trailing
slash, case-sensitive), ahead of the shell catch-all.
- `routes/__root.tsx`: renders `<Outlet />` once hydrated, or before
hydration when the path is prerendered; otherwise `<ShellFallback />`.
The Outlet stays at the same position in the tree, so navigating away
from a prerendered page doesn't remount it.

One prerendered file serves every visitor and every query string, so the
first render of these pages can't depend on per-visitor state:

- Search-param reads that affect render return empty until
`useHydrated()`, then update. `useInboundBranding` checks this directly,
and the "Sign up", "Sign in" and "Continue with SSO" link hrefs read
from `useHydratedQuery`.
- The "Sign in" links on `/sign-up` and `/forgot-password` now carry the
query params. The `/sign-up` link drops `returnTo=/new`, the default the
"Sign up" link sets, so existing users don't land in the new-org flow.
- Form controls sit in a `DisabledUntilHydrated` fieldset, so input
typed before hydration isn't lost and Enter can't natively POST the
form.
- The sign-in/forgot-password logo switches light/dark via CSS (`dark:`
classes) instead of `resolvedTheme` after mount, so dark-theme users
don't see the light logo first.
- `SignInLayout`'s session redirect effect skips the redirect after
unmount.

Also adds page titles for `/sign-in-sso` and `/forgot-password`.

## Review instructions

1. View source (not the inspector) of `/dashboard/sign-in`,
`/dashboard/sign-up`, `/dashboard/sign-in-sso` and
`/dashboard/forgot-password` on the preview: the HTML holds the form and
the page title, not the loading fallback. `/dashboard/organizations`
still returns the shell.
2. Load `/dashboard/sign-in?returnTo=%2Fproject%2F<ref>`: no hydration
errors in the console, and the "Sign up" link (hover / open in new tab)
carries the same `returnTo`. The "Sign in" links on `/dashboard/sign-up`
and `/dashboard/forgot-password` carry the query params too.
3. Sign in from that URL: you land on the project, with no second
redirect to `/organizations`.
4. Load `/dashboard/sign-in?destination=cli`: the CLI-branded heading
renders without a hydration error.
5. Links between the four pages navigate client-side, and dark mode
shows the dark logo straight away.

## Checks

- Platform `vite build` (`NEXT_PUBLIC_IS_PLATFORM=true
NEXT_PUBLIC_BASE_PATH=/dashboard`): prerenders the four pages plus the
shell; each file has its title, inputs and a disabled fieldset.
Self-hosted build prerenders only the shell.
- Served the build locally with Vercel-equivalent routing and checked in
a browser: no hydration errors for plain, `?returnTo=…`,
`?destination=cli` (with and without `method`),
`/sign-up?destination=cli` and `/Sign-In`; hrefs carry `returnTo` after
hydration; navigating from `/sign-in` to other routes doesn't remount
the sign-in form or flash the shell loader; with JS blocked, inputs and
submit are disabled.
- Unit tests for `isPrerenderedRoute` and the prerendered Vercel routes;
`tsc --noEmit`, ESLint on changed files, Prettier, knip and the lint
ratchet pass.
- Not covered locally: the signed-in `returnTo` redirect end to end
(review step 3).

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

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Kody Jackson <kody.jackson@supabase.io>
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-11-05 10:31:28 -06:00
supabase-vercel-tedd[bot] 4ea48d0e2a fix(scripts): keep fix-audit-vulnerability --json stdout parseable (#52987)
## Problem

`scripts/fix-audit-vulnerability.ts --json` is meant to print a single
JSON object to stdout. In practice, after any failed fix attempt, the
next run printed pnpm install output (`Scope: all 31 workspace
projects`, `Lockfile is up to date...`, `Done in ...`) before the JSON,
so `JSON.parse(stdout)` failed.

The script itself already routes its logs to stderr and pipes every
`execSync`. The extra output comes from pnpm: when a failed attempt is
reverted, the script restores `pnpm-lock.yaml` / `pnpm-workspace.yaml`
from a snapshot but leaves `node_modules` on the bumped versions. On the
next `pnpm tsx ...` call, pnpm sees `node_modules` out of sync with the
lockfile, runs an install before starting the script, and prints it to
stdout.

## Solution

- Add `syncNodeModules()` to `scripts/bump-package.ts`. It runs `pnpm
install --frozen-lockfile --silent` with piped output, and only logs a
warning to stderr if it fails.
- Call it after every revert: in `bumpPackage`'s `revert()` and in the
three lockfile-restore paths of `fixModule` in
`scripts/fix-audit-vulnerability.ts`. `node_modules` now matches the
restored lockfile after a failed attempt.
- Recommend `pnpm --silent tsx ...` in the usage text. Even when
`node_modules` is out of sync for another reason (a fresh pull, for
example), `--silent` keeps pnpm's own output off stdout.

## Review instructions

No UI. Verify from the repo root:

1. Run `pnpm tsx scripts/fix-audit-vulnerability.ts --json 2>/dev/null |
node -e 'JSON.parse(require("fs").readFileSync(0,"utf8"))'` and confirm
it exits 0.
2. Pick a dependency from that list that the script cannot fix (it
returns `still_vulnerable`), and run `pnpm tsx
scripts/fix-audit-vulnerability.ts <dep> --json 2>/dev/null` twice. Both
runs print only a JSON object to stdout.
3. After the failed attempt, `git status` shows no change to
`pnpm-lock.yaml` or `pnpm-workspace.yaml`, and `pnpm install
--frozen-lockfile` reports `Already up to date`.
4. `touch pnpm-lock.yaml && pnpm --silent tsx
scripts/fix-audit-vulnerability.ts --json 2>/dev/null` still parses as
JSON.
5. Progress logs still appear on stderr.

Checks run: the steps above, end to end; Prettier on both files; `tsc
--noEmit` on both files shows only an existing error at the final
`result.status` access in `main()`, which master also has. `turbo
typecheck`/`lint` pass but cover no package, because root `scripts/` is
not a workspace package.

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


[FE-4918](https://linear.app/supabase/issue/FE-4918/bump-a-single-vulnerable-dependency)

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-05 17:25:28 +01:00
supabase-vercel-tedd[bot] 04f3c6c41c fix(studio): return to the buckets list after deleting a bucket from its page (#53028)
## Problem

Deleting a bucket from its own page
(`/storage/files/buckets/[bucketId]`) could leave Studio on the deleted
bucket's route. The page kept loading and then showed "Failed to fetch
buckets" / "Bucket not found".

On success, `DeleteBucketModal` called `onClose()` and then
`router.push` to the buckets list. On the bucket page, `onClose` clears
the `?delete` query param through nuqs, which queues its own shallow
push to the current bucket URL. That push could race with the navigation
to the list and land back on the deleted bucket. The page then
re-rendered with the bucket query already removed from the cache,
refetched the missing bucket, and got a 404.

## Solution

- On the bucket's own page, the success handler now awaits `router.push`
to the buckets list and does not call `onClose`. The modal closes when
the page unmounts. When there is no `bucketId` in the route, it still
calls `onClose` as before.
- Added a component test for deleting from the bucket page. It checks
that Studio ends up on `/project/<ref>/storage/files` and that `onClose`
is not called. The test opts out of the global `useParams` stub so the
modal reads `bucketId` from the mocked route. It fails without the fix.

## How to verify

1. Open a project, go to Storage > Files, and open any bucket.
2. Choose Edit bucket > Delete bucket, type the bucket name, and
confirm.
3. Studio shows the success toast and lands on the buckets list
(`/project/<ref>/storage/files`). The deleted bucket no longer appears
there.
4. Studio never shows the deleted bucket's page with a spinner that
keeps loading, "Failed to fetch buckets" or "Bucket not found".

## Checks run

- `pnpm --filter studio exec vitest run
components/interfaces/Storage/FilesBuckets/DeleteBucketModal.test.tsx`
(2 passed)
- `pnpm turbo run typecheck --filter='...[origin/master]'`
- `pnpm turbo run lint --filter='[origin/master]'`
- Prettier check on the changed files


[FE-4926](https://linear.app/supabase/issue/FE-4926/deleting-a-bucket-leaves-its-page-loading-until-an-error)

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-05 08:15:41 -06:00
supabase-vercel-tedd[bot] f4b60922e4 fix(studio): stop retrying client errors in the storage buckets query (#53026)
## Problem

The storage buckets queries (`usePaginatedBucketsQuery`,
`useBucketQuery`) override the global retry rule with
`shouldRetryBucketsQuery`, which retried every error except 404 and two
specific messages. A permanent client error, such as a 402 returned when
a project's service is restricted, was retried 3 times with exponential
backoff. The Storage files page showed its loading skeleton for that
whole time instead of the error that `FilesBuckets` already renders.

## Solution

`shouldRetryBucketsQuery` now skips retries for any 4xx response except
429. This matches the global default in `data/query-client.ts`. The
existing checks for 404, "Missing tenant config" and "Project has no
active API keys" are kept, with 404 now covered by the 4xx rule. 5xx and
429 errors are still retried up to `MAX_RETRY_FAILURE_COUNT`.

The function is exported so it can be unit-tested, and
`data/storage/buckets-query.test.ts` covers the new behaviour.

Checks run:
- `pnpm exec vitest run data/storage/buckets-query.test.ts` (3 passed)
- `pnpm turbo run typecheck --filter='...[origin/master]'`
- `pnpm turbo run lint --filter='[origin/master]'`
- prettier `--check` on the changed files

## Review instructions

1. Open Storage > Files (`/project/<ref>/storage/files`) for a project
whose buckets request returns a 4xx (for example a 402 for a restricted
project). The "Failed to retrieve buckets" error with the API message
shows after one request, with no long loading state.
2. Open the same page for a healthy project. Buckets load and list as
before.

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


[FE-4925](https://linear.app/supabase/issue/FE-4925/storage-loads-endlessly-without-showing-error-message-if-organization)

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-05 07:45:16 -06:00
4a04bb1fc9 chore(deps): bump nuxt to 4.6.3 to resolve audit advisory (#52714)
## Problem

`pnpm audit` reports a moderate advisory for `nuxt` (patched in
`>=4.6.2`). The lockfile resolves `nuxt` to 4.5.2 for `blocks/vue`.

## Solution

- Ran `pnpm tsx scripts/fix-audit-vulnerability.ts nuxt --json`. It
resolved `nuxt` from 4.5.2 to 4.6.3 without a permanent override
(`pnpm-lock.yaml` only). The other lockfile changes are the transitive
re-resolutions that come with the nuxt upgrade.
- nuxt 4.6 types `useRequestEvent()` through `ServerTypes`, which
`@nuxt/nitro-server` augments inside a Nuxt app. `blocks/vue` is not a
Nuxt app, so the call resolved to the generic `RequestEvent`, and
`@supabase/vue-blocks` failed typecheck where it passes that value to
`createSupabaseServerClient(event: H3Event | undefined)`. The nuxtjs
`is-authenticated` middleware now casts the event to h3's `H3Event`.
Under Nitro that is its runtime type, so the block works the same in
user apps.
- Regenerated `apps/ui-library/public/r/supabase-client-nuxtjs.json`
with `pnpm build:registry`.

## Review instructions

1. `pnpm install --frozen-lockfile` succeeds.
2. `pnpm audit --json` lists no advisory for `nuxt`.
3. `pnpm turbo run typecheck --filter='...[origin/master]'` passes
(17/17 tasks, including `@supabase/vue-blocks`).
4. `pnpm turbo run lint --filter='[origin/master]'` passes.
5. On the UI library preview, the Supabase client for Nuxt.js block
shows the updated `is-authenticated.ts` middleware with the `H3Event`
cast.

Verification: ran all of the commands above, plus Prettier on the
changed files. The first studio typecheck run was killed for running out
of memory (exit 137). Rerun with turbo concurrency 1, it passed.

## Checklist

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


[FE-4886](https://linear.app/supabase/issue/FE-4886/bump-a-single-vulnerable-dependency)

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 10:58:53 +00:00
supabase-vercel-tedd[bot] 1e26878d7f docs: correct gp3 disk throughput price in Compute and Disk guide (#52715)
## Problem

The disk types table in the Compute and Disk guide listed gp3 throughput
over-usage as $0.95 per MB/s. The Disk Throughput usage page lists
$0.095 per MB/s per month ($0.00013 per MB/s-Hr), so the two pages
disagreed.

## Solution

Change the gp3 throughput price in the table on
`guides/platform/compute-and-disk.mdx` from `0.95` to `0.095`. The other
table rows only changed whitespace, because Prettier realigned the table
columns.

Checks run: `pnpm turbo run lint --filter='[origin/master]'` and
Prettier `--check` on the changed file.

## Review instructions

1. Open `/docs/guides/platform/compute-and-disk#disk-types` on the docs
preview.
2. In the disk types table, the gp3 **Pricing** cell reads "Throughput:
125 MB/s included, then $0.095 per MB/s".
3. The other values in the table (disk $0.125 per GB, IOPS $0.024 per
IOPS, io2 disk $0.195 per GB, io2 IOPS $0.119 per IOPS) are unchanged.

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


[FE-4887](https://linear.app/supabase/issue/FE-4887/correct-gp3-throughput-pricing-in-compute-and-disk-docs)

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-03 11:59:14 -06:00
supabase-vercel-tedd[bot] 381f8d51a5 chore(deps): bump @hono/node-server to 2.1.5 (#52687)
## Problem

`pnpm audit` reports a moderate advisory for `@hono/node-server`
(patched in `>=2.1.3`). The lockfile resolves it to `1.19.17`, a
transitive dependency of `@modelcontextprotocol/sdk` and
`@modelcontextprotocol/node` (used by Studio).

## Solution

Ran `pnpm tsx scripts/fix-audit-vulnerability.ts @hono/node-server
--json`, which resolved the advisory without a permanent override.
Lockfile only:

- `@hono/node-server` `1.19.17` -> `2.1.5`. Both parents already declare
ranges that allow 2.x (`^1.19.9 || ^2.0.5` and `^1.19.9 || ^2.1.3`).
- pnpm also re-pointed two `@aws-sdk` entries from `@smithy/core`
`3.23.17` to `3.31.1`, a version already in the lockfile.

## Review instructions

1. `pnpm install --frozen-lockfile` succeeds.
2. `pnpm audit` no longer reports `@hono/node-server`.

Checked locally: frozen install, `pnpm audit`, `pnpm turbo run typecheck
--filter='...[origin/master]'` (studio, library, vue-blocks), `pnpm
turbo run lint --filter='[origin/master]'`, and Prettier on
`pnpm-lock.yaml` all pass. No source files changed, so no unit tests
apply.

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


[FE-4845](https://linear.app/supabase/issue/FE-4845/bump-a-single-vulnerable-dependency)

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-03 10:19:07 +00:00
supabase-vercel-tedd[bot] 512b15e3dd chore(deps): bump follow-redirects to 1.16.2 (#52612)
Bumps the transitive dependency `follow-redirects` from 1.16.1 to 1.16.2
in `pnpm-lock.yaml` to resolve a high-severity advisory reported by
`pnpm audit`.

## Problem

`pnpm audit` flags `follow-redirects` 1.16.1 for
[GHSA-mrwp-f3q8-3g9p](https://github.com/advisories/GHSA-mrwp-f3q8-3g9p)
(CVE-2026-116689): "Cross-realm sensitiveHeaders arrays are discarded
and custom credentials can follow redirects". Affected range is
`>=1.16.0 <=1.16.1`, patched in 1.16.2.

It comes in through `axios`:

- `apps/studio > @stripe/sync-engine > supabase-management-js > axios >
follow-redirects`
- `apps/ui-library > axios > follow-redirects`

## Solution

Ran `scripts/fix-audit-vulnerability.ts follow-redirects`, which moved
the lockfile to 1.16.2 and confirmed with `pnpm audit` that the advisory
is gone without needing a permanent override. No manifest or code
changes.

The `pnpm install` run by the script also rewrote some unrelated
`@smithy/*` lockfile entries (deprecation notes and a `@smithy/core`
resolution for two `@aws-sdk/*` packages). Those hunks were dropped so
the diff only touches the three `follow-redirects` lines. `pnpm install
--frozen-lockfile` passes on the result.

Packages tried first, in the order the script lists them (both reverted
cleanly by the script):

- `@graphql-tools/utils` (GHSA-7mx3-vvmw-hjmv): `still_vulnerable`. The
vulnerable copy is still resolved after the temporary override is
removed, so it needs a parent dependency update.
- `@vue/server-renderer` (GHSA-g2v6-rqmx-r4w6): `still_vulnerable`, same
reason.

## Validation

- `pnpm audit` no longer reports `follow-redirects`; `pnpm why
follow-redirects -r` shows only 1.16.2.
- `pnpm install --frozen-lockfile`: passes.
- `pnpm --filter studio lint`: passes (0 errors).
- `pnpm --filter studio typecheck`: could not finish locally, `tsc` was
killed for running out of memory (exit 137) on both runs. The change is
lockfile-only, so CI typecheck is the check to rely on.

## Review instructions

1. Open the Studio preview and load the dashboard.
2. Open a project's home page, the Table Editor, and the SQL Editor, and
check that they work with no new console errors.

## Checklist

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


[FE-4840](https://linear.app/supabase/issue/FE-4840/bump-a-single-vulnerable-dependency)

Out of memory: `pnpm --filter studio typecheck`

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-02 11:54:29 +01:00
supabase-vercel-tedd[bot] 2afde3d093 fix(deps): bump node-forge to 1.4.2 (#52562) 2026-10-30 17:15:10 +00:00
ab175516ba chore: Bump seroval vuln dependency (#52517)
Bumps `seroval` in the lockfile to a patched version, using
`scripts/fix-audit-vulnerability.ts`.

**Why**

`pnpm audit` reports `seroval` as vulnerable (high). Advisories:
GHSA-f86p-h4j2-7qgj, GHSA-9wx9-5pv9-3349, GHSA-97r2-qh9m-474h,
GHSA-wp97-x4hv-qvhp and GHSA-7rv5-mrxv-xcr9 (code and script injection,
and deserialization DoS). Patched in `>=1.6.11`.

**Package and versions**

- `seroval` 1.6.7 -> 1.6.12
- `seroval` 1.6.9 -> 1.7.2

Both versions are at or above the patched release. Only `pnpm-lock.yaml`
changes (transitive dependency, no override needed). `pnpm audit` no
longer lists `seroval`.

**Validation**

- `pnpm audit --json` has no `seroval` entry.
- `pnpm --filter studio lint`: 0 errors.
- `pnpm --filter studio typecheck`: the local sandbox ran out of memory
(exit 137) twice, so it relies on CI.


[FE-4819](https://linear.app/supabase/issue/FE-4819/bump-a-single-vulnerable-dependency)

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: tedd <tedd@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-10-30 13:12:48 +01:00
supabase-vercel-tedd[bot] e9325aa3fa FE-4754 (#52450)
`CommandMenuInput` now supports controlled `value` / `onValueChange`
props. Before, these props replaced the input's internal handlers, so
the shared query stayed empty. Results in the RLS Policies, Edge
Functions and Storage search views never updated, and Backspace went
back to the parent menu instead of deleting a character. The shown value
(controlled or internal) now drives the query, telemetry and the
empty-input Backspace check, and the caller's `onValueChange` is still
called. Added `CommandMenuInput.test.tsx` covering typing and Backspace
in both modes.

Studio typecheck (`pnpm --filter studio typecheck`) ran out of memory.


[FE-4754](https://linear.app/supabase/issue/FE-4754/studio-pressing-backspace-or-typing-in-command-menu-context-search)

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-10-29 08:57:27 -06:00
supabase-vercel-tedd[bot] 47c0322476 chore: Bump astro to non-vuln version (#52460)
Bumps `astro` from 7.2.9 to 7.4.2 in `pnpm-lock.yaml` to fix two
advisories. Only the lockfile changes; `apps/kb` is the only consumer
(directly and via `@astrojs/mdx`).

**Why**

`pnpm audit` reports `astro` as vulnerable (<7.3.2 / <=7.3.2):
- npm advisory 1242877 (moderate): reflected/stored XSS via unescaped
`<script>`/`<style>` content in JSX/MDX rendering. Patched in >=7.3.2.
- npm advisory 1242878 (low): arbitrary CSS injection in Astro View
Transitions. Patched in >=7.3.3.

**Approach**

Ran `pnpm tsx scripts/fix-audit-vulnerability.ts <package> --json` down
the list of patchable vulnerabilities, in order, and stopped at the
first that succeeded. The existing `^7.2.6` specifier in `apps/kb`
already allows 7.4.2, so no manifest or `pnpm-workspace.yaml` change is
needed. The lockfile also picks up astro's own transitive updates (for
example `@astrojs/compiler-rs` 0.5.2, `@astrojs/telemetry`, `magicast`,
`yaml` 2.9.1) and the peer-suffix changes they cause in a few importers.

Packages tried first and why they did not work (working tree reset after
each):
- `@graphql-tools/utils`: still vulnerable after the override was
removed. The script reverted.
- `@vue/server-renderer`, `happy-dom`, `ip-address`, `path-to-regexp`,
`toml`, `zod`, `@nuxt/nitro-server`, `@vitest/mocker`: same, still
vulnerable after the override was removed.
- `node-forge`: `pnpm install` with the override failed (likely blocked
by `minimumReleaseAge`).

**Validation**

- `pnpm install --frozen-lockfile` passes with the new lockfile.
- `pnpm --filter studio lint`: 0 errors (existing warnings only).
- `apps/kb` `astro.config.test.ts` passes.
- `pnpm --filter studio typecheck`: could not finish. `tsc` was killed
for running out of memory (exit 137) on three runs in the sandbox. This
change does not touch Studio sources or dependencies.


[FE-4764](https://linear.app/supabase/issue/FE-4764/bump-a-single-vulnerable-dependency)

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-10-29 11:32:59 +01:00
supabase-vercel-tedd[bot] b5e9388ea7 fix(studio): redirect logged-out users from the logs index to sign-in (#52455)
Logged-out visitors who open `/project/<ref>/logs` directly now get sent
to sign-in. Before this change they stayed on a loading screen.

**Why**

Protected project pages get their auth guard from the layout:
`AuthLayout`, `LogsLayout`, `ProjectLayoutWithAuth` and so on all wrap
`withAuth`. `pages/project/[ref]/logs/index.tsx` is the exception.
Depending on the unified logs preview, it renders one of three things:

- `null` while the preview flags are still loading,
- a plain, unguarded `ProjectLayout` with `UnifiedLogs`,
- or a redirect to `/logs/explorer`, which is guarded by `LogsLayout`.

The unified logs preview is now on by default on the platform
(`isDefaultOptIn: true`), and a fresh browser has no stored opt-out. So
a logged-out visitor lands on the unguarded `ProjectLayout` branch.
Nothing in that tree runs `withAuth`, so no redirect ever fires and the
page waits forever on project data. `/auth/users` doesn't have this
problem because `AuthLayout` is wrapped in `withAuth`.

**Approach**

The page has no guarded layout, so this change wraps the page itself:
`export default withAuth(LogPage)`. Several pages already do this
(`authorize`, `cli/login`, `claim-project`, ...). A page-level guard is
mounted from the first render, so it also covers the `null` phase while
the preview flags load, not only the unified logs branch. `withAuth`
keeps `getLayout`, and the TanStack route
(`routes/project/$ref/logs/index.tsx`) renders the default export, so
both runtimes get the guard. The existing redirect logic is reused as
is, so `returnTo` is still kept on the redirect to sign-in. Signed-in
rendering is the same as before.

**Validation**

- New `tests/pages/project/[ref]/logs/index.platform.test.tsx` (runs
with `IS_PLATFORM=true`):
- no session, unified logs on: redirects to
`/sign-in?returnTo=/project/default/logs`
  - no session, preview still loading: redirects to sign-in
  - signed in: renders the logs view, no redirect
- Without the fix, both logged-out cases fail. With the fix, all 3 tests
pass.
- `eslint` and `prettier --check` pass on the changed files.
- Studio `tsc --noEmit` ran out of memory on the sandbox (8 GB) twice,
so it is not verified locally.

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-10-28 15:52:53 +00:00
supabase-vercel-tedd[bot] 91b780c7d7 feat(studio): layout-shaped loading state for compute instance detail (#52453)
Replaces the three generic shimmer bars on the Compute instance detail
page with a placeholder that follows the loaded layout.

**Why**

While the instance loads, the page showed three full-width bars with no
header, tabs or sections. When the data arrived, the whole page jumped
into a different shape.

**Approach**

A new `ComputeInstanceDetailSkeleton` reuses the same page primitives as
the loaded view (`PageBreadcrumbs`, `PageHeader`, `PageNav`,
`PageContainer`, `PageSection`) and the existing `ShimmeringLoader`, so
widths, padding and breakpoints match the real page:

- Breadcrumbs: the static Compute link, with a placeholder for the
instance name
- Header: a 56px icon placeholder, a title placeholder and three
metadata placeholders (state, runtime, version)
- Tabs: four placeholders sized like the tab labels
- Overview: the static Instances, Container and Resources section
headings, the ready-count line, the 2/4-column instance count grid, and
the container and resource rows

No instance values are shown until the data loads. On a non-overview tab
(`?tab=logs`, etc.), the content area falls back to the same
`GenericSkeletonLoader` the logs tab already uses. Data fetching, error
handling, the "instance does not exist" state and the loaded view are
unchanged.

**Validation**

- New `ComputeInstanceDetail.platform.test.tsx`: holds the instance
request open, checks that the placeholder renders (section headings,
breadcrumb link, no instance name, no tabs, no row labels), then
releases it and checks that the header, tabs, instance counts and
container rows render and the placeholder is gone. The existing Compute
tests still pass.
- `eslint` on the changed files: clean. `pnpm --filter studio lint`: 0
errors.
- `pnpm --filter studio typecheck` (`tsc --noEmit`) ran out of memory in
the sandbox (exit 137) twice, so it was not run to completion.

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-10-28 15:56:23 +01:00
supabase-vercel-tedd[bot] 2fc4ac187a chore: Bump launch-editor to fix a vulnerability (#52442)
Bumps the transitive dependency `launch-editor` from 2.14.1 to 2.14.2 in
`pnpm-lock.yaml` to resolve a high-severity `pnpm audit` advisory
(patched in >=2.14.2).

The update was produced by `pnpm tsx scripts/fix-audit-vulnerability.ts
launch-editor --json`, which returned `status: "fixed"` after re-running
`pnpm audit` without a permanent override. Only the lockfile changes; no
`package.json` or `pnpm-workspace.yaml` edits. `pnpm install
--frozen-lockfile` passes on the current base.


[FE-4761](https://linear.app/supabase/issue/FE-4761/bump-a-single-vulnerable-dependency)

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-10-28 10:55:40 +00:00
supabase-vercel-tedd[bot]andIvan Vasilov ef45cf8d07 chore: Bump nextjs to 16.4.3 (#52438)
Bumps `next` from 16.3.6 to 16.4.3 in `pnpm-lock.yaml` to resolve a
critical `pnpm audit` advisory. The lockfile was updated with `pnpm tsx
scripts/fix-audit-vulnerability.ts next`, which then reran `pnpm audit`
and confirmed the advisory is gone. No permanent override was needed.
Package manifests are unchanged; the other lockfile changes are
transitive dependencies of the new `next` version (`@next/*` and `sharp`
0.35.5).


[FE-4760](https://linear.app/supabase/issue/FE-4760/bump-a-single-vulnerable-dependency)

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-10-28 10:40:21 +00:00
supabase-vercel-tedd[bot] 601c091d8f fix(studio): keep edit secret sheet footer visible with long values (#52014)
## Problem

In the Edge Function Edit secret sheet, a long secret value (for example
a multi-line private key) made the Value textarea grow without a limit.
On smaller screens this pushed the Cancel and Save buttons out of view,
so the secret couldn't be saved.

Fixes
[FE-4680](https://linear.app/supabase/issue/FE-4680/cannot-save-long-edge-function-secrets-on-smaller-screens).

## Solution

- Replace the hand-rolled auto-resize `Textarea` with the shared
`ExpandingTextArea`, the same component the Add new secrets form uses.
It grows with its content up to 320px, then scrolls inside itself.
- Make the sheet body the scroll area (`grow min-h-0 overflow-y-auto`),
so the footer with Cancel and Save stays visible on short windows.
- Move the show/hide (eye) toggle to `right-3 top-2` to match the add
form, and add right padding so it stays clear of the textarea's
scrollbar.
- Add a test that pastes a long multi-line value and checks that Save
becomes enabled.

## Review instructions

1. Open Edge Functions > Secrets and click Edit on any secret.
2. Paste a very long multi-line value into the Value field.
3. Confirm the field stops growing at about 320px and scrolls
internally.
4. Shrink the browser window height and confirm Cancel and Save remain
visible and Save is enabled.
5. Confirm the eye toggle doesn't overlap the textarea's scrollbar.

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-10-20 16:58:49 +02:00
supabase-vercel-tedd[bot] 688f5ecd55 chore: Update API types (#51798)
Regenerates `packages/api-types/types` from the production OpenAPI specs
with `pnpm api:codegen:prod` (no hand edits), so the committed types
match production and `verify-production-types` passes.

- `platform.d.ts`: adds the db-integrity operations path and schemas,
new scoped permission values, and the `t8i.nano` instance type.
- `api-v2.d.ts`: webhook event-type enums drop the legacy `project.v1.*`
/ `organization.v1.*` names, `custom_headers` in endpoint bodies is no
longer nullable, and delivery attempts gain `error_code` /
`error_message`. `api-v1.d.ts` is unchanged.
- Studio: `WebhookEndpointAttributesInput.custom_headers` no longer
allows `null`, matching the API. The mapper already sends either a
headers object or `undefined`, so runtime behavior is unchanged.


[FE-4639](https://linear.app/supabase/issue/FE-4639/regenerate-production-api-types-and-fix-resulting-type-issues)

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-10-15 19:47:53 +02:00
supabase-vercel-tedd[bot] 78eb416b03 chore: remove marketing as KB codeowner (#51622)
## Problem

#51196 added `/apps/kb/` to CODEOWNERS with both `@supabase/docs` and
`@supabase/marketing`. Because of that, every knowledge base change also
asks marketing for review. Marketing should not be a required reviewer
for KB.

## Solution

Remove `@supabase/marketing` from the `/apps/kb/` line only.
`@supabase/docs` still owns KB. All other CODEOWNERS entries, including
marketing's `/apps/www/` ownership, are unchanged.

```diff
-/apps/kb/ @supabase/docs @supabase/marketing
+/apps/kb/ @supabase/docs
```

## Review instructions

1. Check that the diff is a single line in `.github/CODEOWNERS`.
2. Confirm `/apps/kb/` is still owned by `@supabase/docs`.
3. Optional: `gh api
repos/supabase/supabase/codeowners/errors?ref=tedd/remove-marketing-kb-codeowner`
returns no errors.

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

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-10-13 20:49:14 +00:00
supabase-vercel-tedd[bot]andAli Waseem d72211556b feat(studio): link overview Machine size card to Infrastructure settings (#51402)
## Problem

The project overview shows the project's compute size in a card labeled
"Compute", but the card is not clickable. Compute changes are managed on
Infrastructure settings, so users have to find that page on their own.
The adjacent cards (GitHub, Recent branch, Last migration, Last backup)
already link to where you manage them.

## Solution

- Rename the card label from "Compute" to "Machine size" and pass
`href={getInfrastructurePath(ref)}` to `SingleStat`. That renders the
same `Link` wrapper as the adjacent cards, so it gets the same link
semantics, keyboard focus and hover style. The value (compute badge or
"Unknown", plus the High Availability badge) is unchanged.
- Add `onClick={(e) => e.stopPropagation()}` to the
`HighAvailabilityBadge` hover card content. This is the same pattern
`ComputeBadgeWrapper` already uses. The hover card is portaled, but
React still bubbles its clicks to the new card link. Without this, the
link's `onClick` would intercept clicks inside the HA hover card.
Clicking "Read more" would then go to Infrastructure instead of opening
the docs in a new tab.

Out of scope: "Compute" labels elsewhere, the Infrastructure page and
compute provisioning behavior.

Notes:
- The compute badge's hover card trigger already calls `stopPropagation`
on click, because it also sits inside clickable project cards and table
rows. When you click the badge itself, the browser still follows the
native anchor to Infrastructure settings, but it does a full page load
instead of a client-side navigation. This PR leaves that shared
component unchanged.
- While the project is resizing, the overview is replaced by the
resizing state, so the card is not shown then. Settings routes stay
reachable while a project is building, so the link doesn't bounce users
back home.
- No new component test: rendering `ActivityStats` needs mocks for about
eight queries, including `ServiceStatus`. The change only sets an `href`
on an existing component, so a browser check is a better fit.

## Review instructions

1. Open a platform project's overview (`/project/<ref>`).
2. The card next to Status reads "Machine size" and still shows the
compute badge (and the HA badge on HA projects).
3. Click the card, or Tab to it and press Enter. You land on
`/project/<ref>/settings/infrastructure`.
4. Hover the compute badge: its hover card still opens, and "Upgrade
compute" still goes to Infrastructure.
5. On an HA project, hover the High Availability badge and click "Read
more". The docs open in a new tab and the page does not navigate.
6. GitHub, Recent branch, Last migration and Last backup keep their
labels and destinations.

Checks: `tsc --noEmit` for Studio (no new errors; one unrelated error in
`packages/ui-patterns/.../InstructionBlocks.tsx` was already there),
`eslint` on the touched files (no new warnings), Prettier check, `vitest
components/interfaces/ProjectHome` (34 passed).

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

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Ali Waseem <waseema393@gmail.com>
2026-10-07 14:37:52 -06:00