Commit Graph
40421 Commits
Author SHA1 Message Date
Miranda Limonczenko 4d24ca9754 docs: split Auth rate limits into a reference page and two how-to guides
The rate limits page becomes a reference page titled Auth rate limits.
Its Management API and IP address forwarding procedures move, unchanged,
to two new how-to guides: Change Auth rate limits and Forward end-user
IP addresses. Rate Limits becomes a navigation group for the three
pages. The ip-address-forwarding anchor that Studio links to stays.
2026-12-02 11:57:21 -08:00
Miranda Limonczenko fd1cdf254e docs: restructure five lookup pages onto the reference template
Analytics bucket limits, vector bucket limits, Realtime limits, Edge
Functions limits, and Edge Functions status codes now follow the
reference template: a description, an intro line, tables with header
rows and lead-ins, and H4 entries under H3 categories past six entries.
Facts are unchanged.
2026-12-02 11:46:41 -08:00
Miranda Limonczenko f61730873e docs: add the reference template to the style guide
Add templates/reference.md for lookup pages in the guides, such as
tables of limits and lists of error codes. The intro says what the page
lists and when to use it. A format table picks a table or a heading per
entry, and past six entries, entries become H4s under H3 categories so
they stay searchable and linkable without crowding the table of
contents. Related resources is required. Add its row to the template
router, a reference-page title rule, a Reference entry in the
write-the-docs content-type gate, and a lead-in sentence rule for every
list and table.
2026-12-02 11:46:41 -08:00
Duncan Lutz fcfcd2e30b Add Duncan Lutz to humans.txt (#54439)
## Problem

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

## Solution

Adds Duncan Lutz to the team list in apps/docs/public/humans.txt, in
alphabetical order.

## How to verify

Open
https://docs-git-duncanlutz-humans-txt-supabase.vercel.app/humans.txt
and confirm "Duncan Lutz" appears.

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
2026-12-01 21:31:00 +00:00
Alexis Aguilar c1330ca99f ci(docs): scan every docs guide for accessibility issues daily (#54339)
## Problem

Since #53899, Docs E2E skips the accessibility scan on every CI run,
because the scan is slow and only covers the pages a diff names. Nothing
checks docs accessibility automatically, and a change to a shared
component can break pages that no pull request lists.

## Solution

A new **Docs Accessibility Scan** workflow scans every MDX guide on
production once a day.

- `.github/workflows/docs-a11y-scan.yml` runs `pnpm e2e:docs:all --grep
@a11y` against `https://supabase.com` at 05:17 UTC, off the top of the
hour when GitHub can delay or drop scheduled runs, and on demand through
`workflow_dispatch`. Its concurrency group includes the ref, so a manual
run on a branch can't cancel the scheduled run on `master`. It uploads
the Playwright report when the scan fails.
- `docs-master-alert.yml` now watches the new workflow, so a failed run
posts to the docs alerts Slack channel the same way the Production Smoke
Tests do.
- The shared alert no longer names the latest `master` commit and its
author. That commit often didn't cause the failure: a scheduled or
manual run tests whatever is deployed, and a workflow that was already
failing keeps failing on later commits. The alert now names the
workflow, says whether a push, schedule, or manual run failed, and links
the run. This applies to every workflow the alert watches.
- The scope resolver skips guides that `static-redirects.json` sends
elsewhere, in both the pull request scope and the full run. A redirected
guide has no docs article to scan, so it could never pass. Today that's
only `getting-started/features`. Docs E2E's sparse checkout now includes
`apps/docs/lib/redirects` so the resolver can read the file. One helper
lists every guide with no docs article to test (nav-disabled and
redirected), and both resolvers use it.
- The README says where and when the scans run, which checks fail the
scan, and how to start one by hand. It also lists guides with no MDX
file, such as the CLI and self-hosting config pages, as a known
limitation: the full run only resolves MDX guides, so the scan skips
them.

The full run doesn't need sharding. A list over 20 pages already runs on
3 workers, and the whole site took 15.3 minutes against production,
inside the job's 45-minute timeout.

## Known failures

A full run against production on 2026-11-30 failed on 5 guides with real
accessibility issues: 4 `duplicate-id` and 1 `heading-order`. Until
[DOCS-1817](https://linear.app/supabase/issue/DOCS-1817/fix-the-accessibility-issues-the-daily-docs-scan-finds-on-5-guides)
fixes them, each daily run fails and posts an alert.

## Follow-ups

-
[DOCS-1831](https://linear.app/supabase/issue/DOCS-1831/trace-each-docs-accessibility-scan-failure-to-the-commit-that):
keep a list of open failures in every docs alert, each with the commit
that introduced it, or its possible commits marked unconfirmed.

## Review instructions

1. Run `pnpm -C e2e/docs test` and confirm all 15 tests pass, including
the two redirect tests.
2. Confirm a change to a redirected guide resolves to no pages:
   ```bash
printf 'apps/docs/content/guides/getting-started/features.mdx\n' | pnpm
-C e2e/docs resolve-docs-scope
   ```
   Expect `skip=true`.
3. Run the scan the way the workflow does, on one passing guide and one
guide from DOCS-1817:
   ```bash
cd e2e/docs && PLAYWRIGHT_BASE_URL=https://supabase.com
DOCS_E2E_PAGE_PATHS=/docs/guides/auth,/docs/guides/resources pnpm exec
playwright test --grep @a11y
   ```
Expect `/docs/guides/auth` to pass and `/docs/guides/resources` to fail
on `heading-order`.
4. Check the alert payload. Copy the `run` script from
`docs-master-alert.yml`, replace the `curl` call with `echo "$PAYLOAD"`,
and run it with `TRIGGER` set to `push`, then `schedule`. Expect no
commit or author in either, and the run type in the workflow line.
5. After merge, start the workflow with `gh workflow run
docs-a11y-scan.yml` and confirm it finishes in about 15 to 20 minutes.

Verified locally: unit tests, mutation probes on both redirect tests,
typecheck, actionlint on the changed workflows, the alert payload for
push, scheduled, and manual runs, the resolver on a sparse checkout like
the workflow's, and a full-site scan against production. A scheduled
workflow only runs from `master`, so the workflow itself hasn't run on
GitHub yet.

Resolves
[DOCS-1816](https://linear.app/supabase/issue/DOCS-1816/run-the-docs-e2e-accessibility-scan-on-a-schedule-across-the-whole)
Resolves
[DOCS-1826](https://linear.app/supabase/issue/DOCS-1826/word-docs-slack-alerts-for-scheduled-workflow-failures-without-blaming)

## Checklist

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
2026-12-01 14:24:35 -07:00
Ali Waseem a310db593b [FE-5262] ci: run UI Tests on PRs into release (#54440)
The `release` ruleset requires the `test (1)` check, but `ui-tests.yml`
only triggers on PRs into `master`, so every PR into `release` stays
blocked waiting for a check that never reports (e.g. #54438).

Adds `release` to the `pull_request` branch filter in `ui-tests.yml`.
Follow-up to #54416, which did the same for typecheck, format and Docs
E2E. This was the last required check missing on `release`.

Resolves FE-5262
2026-12-01 15:24:22 -06:00
anthony lio b610d677c5 feat(www): lw16 launch week rewrite (#54315)
## Problem

- supabase.com/launch-week shows the lw15 page, and the lw16 card app
runs as a separate vercel app
- a forward rule for all of `/launch-week/*` also covers the www pages
of past launch weeks, and www does not add its security headers to
forwarded paths

## Solution

- moves the lw15 page to `/launch-week/15`
- adds rewrites that forward `/launch-week` and its other paths to the
lw16 card app at `launch-week-16.vercel.app/launch-week/`
- changes the root rule to target `/launch-week/` directly because www
removes the trailing slash and the app adds it, a loop otherwise
- keeps `/launch-week/7`, `/8`, `/15`, `/ticket` and `/tickets/*` on www
with the www security headers
- adds the launch week paths to the security header tests
- adds `/launch-week` to the paths that the redirect checks leave to
other apps

## Preview links

| Site | Live | Preview | Search for |
| ---- | ---- | ------- | ---------- |
| WWW | [/launch-week](https://supabase.com/launch-week) |
[/launch-week](https://zone-www-dot-com-git-antlio-lw16-launch-week-rewrite-supabase.vercel.app/launch-week)
| Claim your card |
| WWW | [/launch-week/15](https://supabase.com/launch-week/15) |
[/launch-week/15](https://zone-www-dot-com-git-antlio-lw16-launch-week-rewrite-supabase.vercel.app/launch-week/15)
| Launch Week 15 |

## Review instructions

1. run `pnpm --filter www exec vitest run lib/security-headers.test.ts`
and make sure that all tests pass
2. open the preview
[/launch-week](https://zone-www-dot-com-git-antlio-lw16-launch-week-rewrite-supabase.vercel.app/launch-week)
and make sure that the lw16 card page loads with no redirect loop
3. open the preview
[/launch-week/](https://zone-www-dot-com-git-antlio-lw16-launch-week-rewrite-supabase.vercel.app/launch-week/)
and make sure that www redirects it to `/launch-week` once

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-12-01 14:45:55 -06:00
Matt Rossman ba86e23d63 fix: restore Studio Braintrust evals in CI (#54345)
## Problem

Our workflow sets `package_manager: pnpm`, which tells the Braintrust
action to run `pnpm dlx braintrust eval`. That command fetches the
latest `braintrust` package. Braintrust 4.0 dropped the bundled CLI, and
the [eval job now fails with
`ERR_PNPM_DLX_NO_BIN`](https://github.com/supabase/supabase/actions/runs/46545460526).

## Solution

```diff
- package_manager: pnpm
+ package_manager: npm
```

The new setting launches the CLI from Studio’s frozen pnpm install.
[Action
source](https://github.com/braintrustdata/eval-action/blob/c0dd75b29984a0cc63a827d6e8da2f23f2752be4/eval/src/braintrust.ts#L78-L116)

The action’s latest release, v2.1.0, still hardcodes `pnpm dlx
braintrust` in pnpm mode. The `npm` setting is a workaround to restore
CI now. We’ve asked Braintrust whether pnpm mode can use the project’s
installed CLI. [v2.1.0
source](https://github.com/braintrustdata/eval-action/blob/ed007eb24e933007a4079bd56643bc72d3cb016f/eval/src/braintrust.ts#L147-L154)

## Review instructions

The [PR
workflow](https://github.com/supabase/supabase/actions/runs/46563640999)
passed and posted the [Assistant eval
summary](https://github.com/supabase/supabase/pull/54345#issuecomment-7299032048).
Locally, `npx` also found the Assistant eval using Studio’s installed
CLI with npm offline.
2026-12-01 15:14:36 -05: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
Miranda Limonczenko 45b5235705 docs: pass Postgres Changes eval (#54332)
Closes DOCS-1815

## Problem

The Postgres Changes page is failing. 

The reason is this:
The Postgres Changes quick start sets up the `anon` role only. A reader
who secures the table for signed-in users gets no events and no error.
The publication step and replica identity sit in separate sections, so a
reader can miss either.

I have verified that this change fixes the issue in the Eval. 

This additionally breaks out many unused Eval lines into another topic.

## Solution

- **Prepare a table:** a new section that lists the three requirements,
how to set each, and what a reader sees without it.
- **Signed-in users:** a policy that sends each user only their own
rows.
- **Filters page:** the operator reference moves to its own page.
`#available-filters` still resolves.
- **Corrections:** the publication step names `todos`, and the old
record section says what `UPDATE` and `DELETE` carry.
- **Style and structure:** imperative headings, a description, and Next
steps.

| Site | Live | Preview | Search for |
| ---- | ---- | ------- | ---------- |
| Docs |
[/docs/guides/realtime/postgres-changes](https://supabase.com/docs/guides/realtime/postgres-changes)
|
[/docs/guides/realtime/postgres-changes](https://docs-git-docs-realtime-table-requirements-supabase.vercel.app/docs/guides/realtime/postgres-changes)
| Prepare a table |
| Docs | New page |
[/docs/guides/realtime/postgres-changes-filters](https://docs-git-docs-realtime-table-requirements-supabase.vercel.app/docs/guides/realtime/postgres-changes-filters)
| Combining filters with `AND` |

## Manual testing

1. Open the preview of `/docs/guides/realtime/postgres-changes` and go
to **Prepare a table**. The table lists three requirements.
2. Open `/docs/guides/realtime/postgres-changes#receiving-old-records`.
The page lands on **Receive old records**.
3. In the sidebar, click **Postgres Changes filters**. The page lists
all 13 operators.
2026-12-01 10:26:52 -08:00
Alexis Aguilar 6ac0f3f231 fix(docs): include request bodies in the Management API markdown reference (#54343)
## Problem

Agents can't find request body fields for Management API endpoints. In
an eval for the access control guide
([DOCS-1489](https://linear.app/supabase/issue/DOCS-1489)), an agent
read the [Create organization
invitations](https://supabase.com/docs/reference/api/v2-create-organization-invitations)
page and concluded the body accepts only an email. It refused to invite
someone scoped to one project, even though the API accepts `role` and
`projects`.

Reference pages have no `.md` version. Their markdown 404 points agents
to the markdown reference (`llms/api.txt`), which lists path and query
parameters but no request body for any endpoint.

Resolves part of
[DOCS-1823](https://linear.app/supabase/issue/DOCS-1823).

## Solution

Each endpoint with a request body gets a **Request body** section in the
markdown reference. It lists every field as a nested list with its type,
whether it's required, its description, accepted values, defaults, and
constraints. Unions list each option by name, and map-like objects show
the shape of their values.

This changes only the generated markdown. Reference pages render the
same as before.

Reference pages don't have their own `.md` versions yet. That's tracked
in [DOCS-1332](https://linear.app/supabase/issue/DOCS-1332). The new
renderer takes one endpoint's request body and returns markdown, so a
per-page generator can reuse it.

## Follow-ups

- **Reference page HTML (rest of DOCS-1823):** nested schema fields
still reach the HTML only after someone opens their control. Moving
these controls to native `<details>` also needs three fixes found in
review:
- A union option puts an `<li>` inside another `<li>`, which breaks the
list once the content is in the HTML.
- The **Items** control for an array of union items, such as the
notebook `cells` array, opens an empty panel.
- The new summary styles repeat the current trigger's styles. They
should share one base.
- **Parameters:** path and query parameters still use the older one-line
format, so their accepted values don't appear in the markdown reference.
For example, `continent` on the available regions endpoint lists no
values.
- **Shared schema helpers:** the renderer copies `asSchemaArray` from
`Reference.ui.tsx` and adds its own schema type. Sharing both through
`Reference.api.utils.ts` keeps the HTML and the markdown in step.

## Review category (docs PRs only)

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

## Review instructions

1. Open the [Management API markdown reference on the
preview](https://docs-git-alexisa-docs-1823-supabase.vercel.app/docs/markdown/reference/api.md).
On production, the same file is served at `/llms/api.txt`.
2. Under **Creates organization invitations**, see the **Request body**
section with `data`, `type`, `attributes`, `email`, `role`, `projects`,
and `require_sso`.
3. Under **Assign or change an organization member role**, see
`data.attributes.role` and `projects`.

## 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)
2026-12-01 11:15:33 -07:00
Miranda Limonczenko 58b468916c docs(auth): Solve eval for Anonymous sign-in page (#53489)
Closes DOCS-1676

## Problem

The drafted Eval for this guide has one failing check. This PR fixes
that check and also runs the `edit-the-docs` and `test-the-docs` skill
to improve the page as a whole.

The Anonymous Sign-Ins guide tells readers to check the `is_anonymous`
JWT claim in RLS policies. When a guest links an email, phone, or OAuth
identity, the user becomes permanent at once, but the token the client
holds keeps `is_anonymous: true` until it refreshes. A policy on the
claim refuses that new customer with `42501` until then.

## What changed

- **Access control:** a caution on the stale claim, and a policy that
reads `auth.users.is_anonymous` through a `security definer` function in
a non-exposed schema with `search_path = ''`.
- **Convert an anonymous user:** a "Refresh the session after linking"
step with `refreshSession()`.
- **Whole-page edit**, one commit per change type:
- Style: wording, word list, sentence-case and imperative headings, no
time-anchored text.
- Structure (moves only): Access control before Convert, identity
conflicts under Convert, the Next.js caution under Sign in.
- Technical: the `anon` key uses the `anon` role, not `anonymous`; the
opening caution no longer says to check the JWT claim; the
existing-account sample throws instead of a top-level `return`.

Renamed headings with no inbound links: Resolving identity conflicts,
Linking an anonymous user to an existing account, Automatic cleanup.
`#access-control` (Studio) and `#link-an-email--phone-identity` are
unchanged.

## Eval on the preview

`build-docs-016-auth-anonymous` with `REFERENCE` pointed at the preview,
3 runs ([workflow
run](https://github.com/supabase/evals/actions/runs/43983385855)).

| Run | Score | Guest who just made an account can post a review |
Failed check |
| --- | --- | --- | --- |
| Baseline (published page) | 9/10 in all 3 runs | Fail in all 3 | Guest
who just made an account can post a review |
| 1 | 10/10 | Pass | None |
| 2 | 9/10 | Pass | Agent read the guide |
| 3 | 9/10 | Pass | Agent read the guide |

All 3 runs fetched the preview and wrote the `security definer` policy.
The guide-read check only counts fetches from `supabase.com`, so it
can't pass on a preview. Run 1 passed it because that agent also opened
the published page.

## Manual testing

1. Open the [Anonymous sign-ins
preview](https://docs-git-docs-anonymous-claim-refresh-supabase.vercel.app/docs/guides/auth/auth-anonymous).
2. Check the new caution and function example under **Access control**,
and the new **Refresh the session after linking** section.
3. Click the anchor links between the two sections and to the RLS guide.
2026-12-01 10:13:18 -08:00
Miranda Limonczenko 7c57f91538 docs: Solve eval for Enable email OTP (#54327)
## Problem

The passwordless email guide says to add `{{ .Token }}` to the **Magic
link or OTP** template to send a code. When email confirmations are on,
a first-time sign-in sends the **Confirm sign up** email instead, so new
users still get a link. This is the failure the passwordless email guide
eval catches.

Closes DOCS-1814

## Solution

This PR solves the Eval checks.

**Enable email OTP** now covers both templates:

- It says which template each user gets.
- It has you add `{{ .Token }}` to both **Magic link or OTP** and
**Confirm sign up**.
- It notes that a link left in either template still works.

The rest of the PR is style, structure, and template changes. Existing
anchors still resolve.

## Manual testing

1. Open the [preview
page](https://docs-git-docs-email-otp-confirm-signup-supabase.vercel.app/docs/guides/auth/auth-email-passwordless#enabling-email-otp)
and check that it lands on **Enable email OTP**.
2. Click the **Magic link or OTP** and **Confirm sign up** template
links and check that each opens its template in the dashboard.
2026-12-01 10:13:12 -08:00
Miranda LimonczenkoandClaude 4d9726da1c feat(docs): add last-modified dates to the docs sitemap (#54329)
Closes DOCS-1753

## Problem

Guide pages already show a "Last updated" date
(supabase/supabase#52421), but `sitemap.xml` has no `<lastmod>`, so
crawlers get no recency signal.
## Solution

- Guide entries in `sitemap.xml` now include `<lastmod>`. The date comes
from the same `last_changed` table as the on-page date: the newest
`last_updated` across a page's sections, written as an ISO 8601
timestamp.
- The paginated `last_changed` read moved from `lib/last-changed.ts`
into `lib/last-changed.utils.ts`. The new module has no `server-only`
import, so the `tsx` sitemap script can share it. `getGuideLastUpdated`
behaves the same, including its timeout, cooldown, and Sentry reporting.
- When `NEXT_PUBLIC_SUPABASE_URL` or `SUPABASE_SECRET_KEY` is missing,
or the read fails, the script logs a warning and writes the sitemap
without `<lastmod>`. Local and preview builds still succeed.
- `build:sitemap` in `apps/docs/turbo.jsonc` is now uncached and passes
the two credentials through. The dates change nightly, outside the
task's inputs, so a cache hit could otherwise restore stale dates. The
task is cheap, and its dependencies stay cached.
- Reference pages don't get `<lastmod>` because `last_changed` only
tracks guides.
- `sitemap.md` (marked TBD in the issue) is out of scope.

## Review instructions

| Preview | Link |
| --- | --- |
| Docs sitemap |
https://docs-git-claude-compassionate-dirac-ns0vjr-supabase.vercel.app/docs/sitemap.xml
|
| Docs app |
https://docs-git-claude-compassionate-dirac-ns0vjr-supabase.vercel.app/docs
|

1. Check the `build:sitemap` step in the Vercel build log. It should
print `Total of N pages in sitemap (M with last-modified dates)`, where
M is greater than 0.
2. In the preview deploy, open `/docs/sitemap.xml` and confirm that
guide entries have `<lastmod>` values matching the "Last updated" date
on those pages.
3. Optional local check: run `pnpm -F docs build:sitemap` without
credentials. You should see the warning, and the sitemap should have no
`<lastmod>` entries.

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-01 10:03:01 -08:00
Guilherme Souza 51fa9b8e8d docs: mark C# and Kotlin SDKs as official (#54429)
## Problem

The C# and Kotlin client libraries are now official Supabase SDKs.
Several places in the docs and README still call them community
libraries.

## Solution

- **Client libraries page**: move Kotlin from "Community libraries" to
"Official libraries". C# was already listed as official.
- **Kotlin reference intros (v1, v2, v3)**: replace the "not an official
library" note with a note that supabase-kt is official. The thanks to
the original maintainer and contributors stays.
- **Docs nav**: drop the `community: true` flag on the Kotlin entry in
both nav configs.
- **Getting Started stepper**: remove the "Community SDK" badge and the
`isCommunity` field, which only Kotlin used.
- **README**: move the C# and Kotlin rows into the Official section.
- Point supabase-kt links in the changed spots at
`supabase/supabase-kt`.

Not changed:
- Links to repos still in the `supabase-community` org (for example
`postgrest-csharp` and `gotrue-csharp`) and old release-note issue
links.
- `guides/getting-started/features.mdx`. It redirects to `/features`, so
the docs app never serves it.
- The v4 Kotlin note that credits the community for creating
supabase-kt. It's a thank-you, not a claim that the SDK is unofficial.

## Review category (docs PRs only)

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

## Review instructions

1. Open `/docs/guides/api/rest/client-libs` and check that Kotlin is in
the official table.
2. Open `/docs/reference/kotlin/introduction` and check that the note no
longer says the library is unofficial.
3. Open the docs nav reference menu and check that Kotlin has no
community marker.
4. Open the Getting Started page, pick the Kotlin quickstart, and check
that no "Community SDK" badge shows.
5. Check the README client libraries table.

## 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)
2026-12-01 14:42:00 -03:00
Jeremias Menichelli 9447067a51 feat: Add Security topic (#54423)
## Problem

Security team needs a new topics/category to host their troubleshooting
content.

## Solution

Create a topic about Security.

<!--
## Preview links

If relevant, include links to changed pages for easy review access.

Copy the preview base URL from the Vercel bot comment on this PR. Use
the following table as an example template.

| Site | Live | Preview | Search for |
| -------------- |
-------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------
| ----------------------------- |
| WWW | [/blog/your-post](https://supabase.com/blog/your-post) |
[/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post)
| unique phrase from the change |
| Docs |
[/docs/guides/your-page](https://supabase.com/docs/guides/your-page) |
[/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page)
| unique phrase from the change |
| Studio | [/dashboard](https://supabase.com/dashboard) |
[/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard)
| unique phrase from the change |
| Design system | [/design-system](https://supabase.com/design-system) |
[/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system)
| unique phrase from the change |
| UI library | [/library](https://supabase.com/library) |
[/library](https://ui-library-git-branch-name-supabase.vercel.app/library)
| unique phrase from the change |
| Knowledge base |
[/kb/guides/your-page](https://supabase.com/kb/guides/your-page) |
[/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page)
| unique phrase from the change |
-->

<!-- ## Additional context

Optionally add any other context or screenshots.

-->

## Review category (docs PRs only)

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

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

## Review instructions
Nothing to test yet, since there's no content poured, project will
ignore empty topics.

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-12-01 18:29:08 +01:00
Charis fd01db4691 feat(www): send pageview and global crash metrics on preview (#54425)
## Problem

Studio sends pageview and global crash counters to the frontend metrics
endpoint on non-production deployments (#54331), and docs is getting the
same in #54424. The marketing site sends neither.

## Solution

Port the same implementation to `apps/www`:

- **Gate**: the existing `IS_PREVIEW` constant (`NEXT_PUBLIC_VERCEL_ENV
=== 'preview'`). Nothing is sent in production or local dev.
- **Sender**: `lib/frontend-metrics.ts`, the same fire-and-forget
`text/plain` POST as Studio, tagged `app: 'www'`.
- **Pageview**: `usePageviewMetric` sends one count on hydration and on
each pathname change, and skips while the pathname is not yet available.
It is mounted once per router: through a small client component in
`app/layout.tsx`, and directly in `pages/_app.tsx`. A page is served by
only one router, so it is never mounted twice.
- **Crash**: `app/global-error.tsx` sends one `global_crash` per error
object. `pages/_error.tsx` sends one when the status code is unset or
5xx, so 404s and other 4xx responses are not counted.

No CSP change is needed because www does not set a
Content-Security-Policy. No turbo change is needed because the www build
env already passes `NEXT_PUBLIC_*`.

## Additional context

`app/global-error.tsx`, `pages/_error.tsx`, and
`lib/frontend-metrics.ts` use relative imports because the
`sentry-browser` vitest project, which renders the two error files, has
no path-alias resolution.

## Review instructions

1. Open the www preview deployment for this PR with the network tab
open.
2. Load an app-router page and a pages-router page. Confirm each sends
one POST to the metrics endpoint with `metric_name: "pageview"` and
`app: "www"`.
3. Navigate client-side and confirm one more POST per pathname change.
4. In `apps/www`, run `pnpm exec vitest run lib/frontend-metrics.test.ts
hooks/usePageviewMetric.test.tsx` and `pnpm exec vitest run --project
sentry-browser`.
2026-12-01 12:15:58 -05:00
b24330e6bc docs(storage): fix create role statement in custom roles guide (#53724)
## Problem

The first step of the Storage "Custom Roles" guide uses `create role
'manager';`. Role names are identifiers, not string literals, so
Postgres rejects it with `syntax error at or near "'manager'"`. Every
later step in the guide depends on that role.

Closes #53723

## Solution

Remove the single quotes: `create role manager;`. The rest of the page
already uses the unquoted name (`grant manager to authenticator;`, `to
manager`).

## Review instructions

1. Open the [Custom Roles
guide](https://supabase.com/docs/guides/storage/schema/custom-roles) and
look at the first SQL block: `create role 'manager';` is a syntax error
in Postgres (reproduced with the Postgres parser, see #53723).
2. Open the preview of this PR. The block is now `create role manager;`,
which parses, and the following `grant` statements refer to the same
unquoted name.
3. Run `pnpm test:prettier`. It passes for this file with the repo's
`prettier.config.mjs`.

I also parsed every `sql` block under `guides/storage/schema` with the
Postgres parser (`libpg-query`). All 7 parse after this change.

## 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 run: this is a one-token correction to an existing SQL statement.)

Co-authored-by: Santhosh-x23 <185920429+Santhosh-x23@users.noreply.github.com>
Co-authored-by: Nik Richers <nrichers@gmail.com>
2026-12-01 10:10:03 -07:00
Charis 34e0361708 feat(docs): send pageview and global crash metrics on preview (#54424)
## Problem

Studio sends pageview and global crash counters to the frontend metrics
endpoint on non-production deployments (#54331). Docs sends neither, so
there is no equivalent signal for docs previews.

## Solution

Port the Studio implementation to `apps/docs`:

- **Gate**: new `IS_PREVIEW` constant, true only on Vercel preview
deployments of the hosted platform. It is false in production, local
dev, self-hosted, and the Nimbus flavor. Docs has no long-running
staging environment, so there is no staging branch in the gate.
- **Sender**: `lib/frontend-metrics.ts`, the same fire-and-forget
`text/plain` POST as Studio, tagged `app: 'docs'`.
- **Pageview**: `usePageviewMetric` sends one count on hydration and on
each pathname change. It is mounted from the root layout through a small
client component.
- **Crash**: `app/error.tsx` and `app/global-error.tsx` each send one
`global_crash`. A given error reaches only one of the two boundaries,
and a `WeakSet` counts each error object once, so effect re-runs do not
double count.
- **Nimbus**: docs had no client-readable Nimbus check, so the gate
reads `NEXT_PUBLIC_IS_NIMBUS` (same name and semantics as Studio) and
the variable is added to the docs build env in `turbo.jsonc`.

No CSP change is needed because docs does not set a
Content-Security-Policy.

## Additional context

`NEXT_PUBLIC_IS_NIMBUS` must be set on the Nimbus docs project for the
Nimbus exclusion to take effect. The metrics also require
`NEXT_PUBLIC_IS_PLATFORM=true` on preview deployments.

## Review instructions

1. Open the docs preview deployment for this PR with the network tab
open.
2. Load any page and confirm one POST to the metrics endpoint with
`metric_name: "pageview"` and `app: "docs"`.
3. Navigate to another page client-side and confirm one more POST.
Changing only the hash or search params should not send one.
4. Run `pnpm -F docs exec vitest run lib/frontend-metrics.test.ts
hooks/usePageviewMetric.test.tsx`.
2026-12-01 12:01:27 -05:00
b53403e1d7 docs(integrations): add Build a Supabase integration guide (#54088)
## Problem

The steps to build a Supabase integration are spread across five pages:
the Partner Catalog page, creating an OAuth app, OAuth scopes, the
partner install flow, and the Management API reference. A partner has no
single page that says where to start or what to do next. Linear:
DOCS-1720.

## Solution

Add one guide, **Build a Supabase integration**, as the first item under
**Build Your Own** in the integrations sidebar. It does not repeat the
detail on the other pages. It links to them.

- **The path at a glance:** two short paths. Partner Catalog: apply,
build a landing page, publish. Integration: apply, build the OAuth flow,
build the integration, publish.
- **Apply to the Partners program**, then **Choose: Partner Catalog or
Integration**, a comparison table with wireframe images (SVG, light and
dark).
- **Partner Catalog: Build your landing page** and **Integration**
(build the OAuth flow, build the integration), each with "Build it"
cards that link to the top of the existing page.
- **Publish:** ask the partner manager to list the partner on the
Partner Catalog or the Integrations page.
- Removes the redirect from
`/docs/guides/integrations/build-a-supabase-integration` to the OAuth
guide, so the new page is reachable at that URL. The old `/oauth-scopes`
redirect stays.
- The progression and card data is in
`apps/docs/data/content-listings/build-a-supabase-integration.data.ts`.

Not in this PR: edits to the existing pages. The cards link to page
tops, so nothing here depends on those edits.

## Please check

- The five progression icons are placeholders from the built-in set. New
icons are coming.
- The table images sit inside table cells with a fixed width. I checked
them in the dev server only.
- I rendered the page with `pnpm dev` and ran `oxfmt --check` on the
changed files. I did not run the docs tests or `build:guides-markdown`.
- Two details are unverified: how partners hand their public key to
Supabase for a signed redirect, and partner status callbacks. The guide
does not describe either.
- The Dashboard Integrations tab wireframe is a drawing, not a
screenshot.

## Preview links

| Site | Live | Preview | Search for |
| ---- | ---- | ------- | ---------- |
| Docs |
[/docs/guides/integrations/build-a-supabase-integration](https://supabase.com/docs/guides/integrations/build-a-supabase-integration)
(redirects to the OAuth guide until this merges) | Vercel bot comment |
`The path at a glance` |

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: John Stokvis <345546350+stokvis-at-supabase@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Nik Richers <nik@validmind.ai>
Co-authored-by: John Stokvis <johnstokvis@Johns-MacBook-Pro.local>
2026-12-01 09:53:58 -06:00
Ali Waseem d57ff4ea06 ci: run typecheck, format and Docs E2E on PRs into release (#54416)
The `release` ruleset requires `typecheck`, `format` and `Docs E2E`, but
those workflows only trigger on PRs into `master`, so every PR into
`release` sits blocked waiting for checks that never report (e.g.
#54413).

Adds `release` to the `pull_request` branch filter in `typecheck.yml`,
`prettier.yml` and `docs-e2e.yml`.
2026-12-01 09:48:56 -06:00
Alaister YoungandAlaister Young 07101b6894 [FE-3200] chore(studio): lift bundler workarounds and stabilize hooks (#54121)
Cleans up obsolete Rolldown/Vite bundler workarounds from the TanStack
Start migration and fixes unstable router selectors and inline default
array props that could cause unnecessary re-renders or render loops.

Addresses
[FE-3200](https://linear.app/supabase/issue/FE-3200/lift-bundler-workarounds-and-fix-latent-issues-next-was-masking).

**Removed:**

- Emptied `KNOWN_CHUNK_CYCLES` in `apps/studio/vite.config.ts` while
keeping the `assertNoChunkCycles` build guard enabled
- Removed obsolete `manualChunks` workarounds
(`class-variance-authority`, `ui-field`, `ui-drawer`, `ui-form`,
`ui-sidebar`, `ui-slider`, `ui-avatar`), keeping the React and
`lucide-react` vendor chunks so React stays a single leaf chunk and
Lucide does not fan out into per-icon modulepreload requests
- Removed the obsolete `sharedDefines` (`global: 'globalThis'`)
substitution from `apps/studio/vite.config.ts`

**Changed:**

- `StudioLink` (`StudioFrameworkProvider.tsx`): split `useRouterState`
into primitive `currentPathname` and `currentSearch` selectors instead
of returning a fresh object on every router state tick
- `useNuqsTanStackRouterAdapter` (`nuqs-tanstack-adapter.tsx`): select a
serialized query string key from `useLocation` so `useQueryState`
consumers do not re-render when unwatched search params change
- `FilterPopover`: replaced inline `[]` defaults for `options` and
`activeOptions` with shared `EMPTY_ARR` (`@/lib/void`), and guarded
`setSelectedOptions` with an element-wise equality check when closed
- `InputWithSuggestions`: replaced inline `[]` default for `suggestions`
with shared `EMPTY_ARR` (`@/lib/void`) so `useEffect` does not loop when
`suggestions` is omitted at runtime

**Added:**

- Regression tests covering router selector stability and default-prop
render loops in `StudioFrameworkProvider.test.tsx`,
`nuqs-tanstack-adapter.test.tsx`, `FilterPopover.test.tsx`, and
`InputWithSuggestions.test.tsx`

## To test

- Run `pnpm --filter studio run build` and verify the build passes with
`KNOWN_CHUNK_CYCLES` empty and `assertNoChunkCycles` enabled
- Run the new/updated unit tests in `apps/studio`
(`StudioFrameworkProvider.test.tsx`, `nuqs-tanstack-adapter.test.tsx`,
`FilterPopover.test.tsx`, `InputWithSuggestions.test.tsx`)
- Smoke-test Studio navigation, URL search-param filters (`nuqs`), Table
Editor column suggestions, `FilterPopover` interactions, and
`/auth/hooks` (confirming no `global` ReferenceError)

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-12-01 23:45:00 +08:00
hallidayo 0cf8b266ff fix(studio): tables not showing on mobile (#54412)
## Problem

On a mobile device the list of tables in the table editor are not
showing:

<img width="403" height="702" alt="Screenshot 2026-12-01 at 15 27 07"
src="https://github.com/user-attachments/assets/cfb23739-50c8-4997-9d7b-f86ef5375e7d"
/>


## Solution

Tables are now showing:

<img width="403" height="702" alt="Screenshot 2026-12-01 at 15 27 28"
src="https://github.com/user-attachments/assets/8bc8c909-b866-4351-83bd-4bee4631cdd8"
/>

Closes #54400
2026-12-01 15:35:27 +00:00
Gildas Garcia fd5c02f1a0 fix(studio): Scoped OAuth apps - improve text for projects with permission issues (#54409)
## Problem

When an authorization fails because of permission issues, we currently
display _Unavailable_ next to the problematic projects in the project
selector list. This is confusing as those projects are available, just
not selectable for this authorization

## Solution

Display _permission issues_ instead

<img width="417" height="601" alt="image"
src="https://github.com/user-attachments/assets/331073ac-71e0-45b0-a607-dcbd47268d91"
/>
2026-12-01 16:07:27 +01:00
Alaister YoungandAlaister Young 0252fd8cad [FE-5114] (part 7) – refactor(studio): remove Next API adapter (#54034)
## Problem

With all Studio API routes migrated to native TanStack Start handlers
(or removed when unused) in parts 1–6, the Next Pages Router API adapter
and legacy `NextApiRequest`/`NextApiResponse` wrappers are no longer
used. Part 7 of 7 for
[FE-5114](https://linear.app/supabase/issue/FE-5114/rewrite-api-routes-as-native-tanstack-start-handlers-and-remove-the)
tears them down.

## Solution

**Removed:**

- `compat/next/api.ts` and `compat/next/api.test.ts` (`toWebHandler`)
- Legacy `apiWrapper`, `apiAuthenticate`, and `fetchUserClaims`
(`NextApiRequest`/`NextApiResponse`) functions and their legacy tests in
`lib/api/apiWrapper.ts`, `lib/api/apiAuthenticate.ts`,
`lib/api/apiWrappers.test.ts`, and `lib/api/apiAuthenticate.test.ts`
- The now-unused `fromNodeHeaders` helper (and its `node:http` import)
and its tests in `lib/api/apiHelpers.ts` / `lib/api/apiHelpers.test.ts`

**Changed:**

- Updated comment in `lib/server/configcat.ts` from `apiAuthenticate` to
`authenticateRequest`

## Review instructions

1. Confirm `git grep -E
"NextApiRequest|NextApiResponse|compat/next/api|toWebHandler|fromNodeHeaders|from
'next'" apps/studio/` returns no matches.
2. Run `pnpm --filter studio run typecheck`, `pnpm knip --workspace
apps/studio`, and `pnpm --filter studio exec vitest run lib/api/
tests/routes/api/ scripts/__tests__/server-source-maps.test.ts`.

## 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: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-12-01 23:01:47 +08:00
Alaister YoungandAlaister Young ccd691423b [FE-5114] (part 6) – refactor(studio): migrate platform storage routes (#54033)
## Problem

Studio's `routes/api/platform/storage/**` routes still run legacy Next
Pages Router handlers through `compat/next/api.ts`, and
`buckets/$id/objects/download.ts` has no remaining callers. Part 6 of 7
for
[FE-5114](https://linear.app/supabase/issue/FE-5114/rewrite-api-routes-as-native-tanstack-start-handlers-and-remove-the)
migrates the 14 active storage routes to native TanStack Start handlers
and removes the unused download route.

## Solution

**Changed:**

- Migrated 14 `buckets/**` and `vector-buckets/**` routes to
`createApiHandlers` and `parseJsonBody`
- Replaced the `parseAsInt`/`parseAsString`/`parseAsStringEnum` helpers
in `buckets/index.ts` with a zod query schema that drops invalid values,
keeping the conditional spreads so unset keys aren't sent to storage-js
- Forwarded upstream `StorageError` status codes across all storage and
vector-bucket routes via `storageErrorResponse` /
`getStorageErrorStatus` (falling back to the route's default 400/500
when no valid HTTP status is present)
- Guarded missing/invalid `SUPABASE_PUBLIC_URL` with a `500` error
response in `objects/public-url`, `objects/sign`, and
`objects/sign-multi`
- Typed the `vector-buckets/$id/indexes` POST body from storage-js's
`createIndex` options
- Corrected stale `Allow` headers on `vector-buckets/$id` (`GET,
DELETE`) and `vector-buckets/$id/indexes/$indexName` (`DELETE`) via
`createApiHandlers`

**Added:**

- `lib/api/self-hosted/storage.ts` with `getStorageErrorStatus`,
`storageErrorResponse`, `getStoragePublicOrigin`,
`missingStoragePublicUrlResponse`, and `remapStoragePublicUrl`
- Unit tests for `buckets/index` query parsing,
`buckets/$id/objects/sign-multi` (`SUPABASE_PUBLIC_URL` guard, origin
remapping, and upstream error status), and `vector-buckets` POST
(exercising the real storage client through MSW)

**Removed:**

- Removed unused
`routes/api/platform/storage/$ref/buckets/$id/objects/download.ts` and
regenerated `routeTree.gen.ts`

**Behavior changes vs master:**

- `buckets` GET drops malformed `limit`/`offset`/sort values instead of
`parseInt`-truncating them (e.g. `offset=1.5` is ignored rather than
sent as `1`)
- `vector-buckets` POST validates the body with zod and returns `400`
when `bucketName` is missing or not a string
- Storage routes forward the upstream HTTP status code from
`StorageApiError` instead of hardcoding `400`/`500`
- `objects/public-url`, `objects/sign`, and `objects/sign-multi` return
a `500` JSON error when `SUPABASE_PUBLIC_URL` is unset or invalid
instead of throwing an uncaught `TypeError`
- Unused `buckets/$id/objects/download` route has been removed

## Review instructions

1. Run `pnpm --filter studio exec vitest run
tests/routes/api/platform/storage/`.
2. On self-hosted Studio, create/list/empty/delete a storage bucket,
upload/download/move/sign/delete an object, and check vector bucket
operations.

## 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: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-12-01 22:55:25 +08:00
Alaister YoungandAlaister Young 37414c5a61 [FE-5114] (part 5) – refactor(studio): migrate platform project routes (#54032)
## Problem

Studio's `routes/api/platform/projects/**` routes still run legacy Next
Pages Router handlers through `compat/next/api.ts`, and
`projects/$ref/config/index.ts` and `projects/$ref/billing/addons.ts`
are unused in self-hosted mode. Part 5 of 7 for
[FE-5114](https://linear.app/supabase/issue/FE-5114/rewrite-api-routes-as-native-tanstack-start-handlers-and-remove-the)
migrates the 19 active project routes to native TanStack Start handlers
and removes the 2 unused routes.

## Solution

**Changed:**

- Migrated 19 project routes — analytics (`endpoints/$name`,
`log-drains`, `log-drains/$uuid`), API proxies (`api/graphql`,
`api/rest`), content snippets & folders (`content/**`), and
config/settings/databases/lints/keys/monitoring routes — to
`createApiHandlers`
- Preserved FE-5124 fixes on `log-drains/$uuid` (empty-body `204` on
`DELETE`, `try`/`catch` + `!response.ok` → `500`); its `Allow: GET, PUT,
DELETE` and the previously stale `Allow` on `log-drains` (`GET, POST`)
now come from `createApiHandlers`
- Forwarded upstream error status and JSON body (falling back to `500` /
`{ error: { message } }`) in `api/graphql` and `api/rest`
- Parsed the JSON body once in `content/index.ts` `PUT` so the `not
found` create fallback does not attempt to re-read the request stream
- `content/index.ts` and `content/folders/index.ts` read query params
through `getSearchParamsRecord`, so repeated `ids` (and repeated GET
params on `content/index`) return `400` as they did with Next's query
parsing
- `run-lints` forwards headers via
`constructHeaders(Object.fromEntries(request.headers))`

**Added:**

- `getSearchParamsRecord` in `lib/api/apiHelpers.ts`: collects URL
search params into a record, mapping repeated keys to arrays so zod
string schemas reject them
- `folderQueryParamsSchema` and `listFolderContents(request, folderId?)`
in `lib/api/snippets.utils.ts`, shared by `content/folders/index` and
`content/folders/$id`
- `getLogflareConfig()` in `lib/api/self-hosted/logflare.ts`: reads the
Logflare env vars at call time (same `500` naming the missing vars) and
builds the request URLs and headers for `analytics/log-drains` and
`analytics/log-drains/$uuid`
- Unit tests for `getSearchParamsRecord`, `analytics/endpoints/$name`,
`analytics/log-drains/$uuid`, `content/index`, `content/folders`, and
`api/rest` (`HEAD` and upstream error forwarding)

**Removed:**

- Removed 2 unused routes
(`routes/api/platform/projects/$ref/config/index.ts` and
`routes/api/platform/projects/$ref/billing/addons.ts`) and regenerated
`routeTree.gen.ts`

**Behavior changes vs master:**

- `analytics/endpoints/$name` GET strips `name` and `ref` from the
forwarded query (parity with master, where they arrived as route params
in `req.query`)
- `content/folders` and `content/folders/$id` GET validate query params
and return `400` for invalid or repeated values
- `api/graphql` and `api/rest` forward upstream non-OK status codes and
error bodies instead of always returning `500`
- Unused `projects/$ref/config/index` and `projects/$ref/billing/addons`
routes have been removed

## Review instructions

1. Run `pnpm --filter studio exec vitest run lib/api/apiHelpers.test.ts
tests/routes/api/platform/projects/`.
2. On self-hosted Studio, create/update/delete a log drain,
create/save/delete a SQL snippet and folder, and verify REST/GraphQL API
docs load.

## 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: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-12-01 22:38:58 +08:00
Charis 975689dcfc feat(studio): send pageview and global crash metrics on staging and preview (#54331)
## Problem

We need simple counts of every pageview and every global crash for SLO
monitoring. These counts need to go to observability ingest, not to
Sentry, etc., so they can be part of our Grafana dashboards pipeline.

## Solution

- `usePageviewMetric` sends one `pageview` event on first load
(hydration) and on every client-side navigation that changes the
pathname. Changes to only the query string or hash do not count.
- A `global_crash` event is sent once when the global crash screen is
shown. That covers both the root `ErrorBoundary` and the root route
`errorComponent`. Chunk-load errors that are recovered by an automatic
reload are not counted, which matches what is reported to Sentry.
- Both are gated by a new `IS_STAGING_OR_PREVIEW` constant. It is false
on production, local development, self-hosted and Nimbus.
- The request is a fire-and-forget `fetch` with `keepalive: true` and
`credentials: 'omit'`. It uses a `text/plain` body, so there is no CORS
preflight. Errors are swallowed.
- The endpoint origin is added to `connect-src` for all platform
environments, because production will need it later. No other CSP
directive changes.

## Review instructions

1. Open the Studio preview deployment for this PR with the network panel
open.
2. Load any page. See one `POST /api/metrics` request that returns 204.
3. Navigate to another page. See one more request.
4. Change only a query parameter (for example a table filter). See no
new request.

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-12-01 15:35:05 +01:00
Alaister YoungandAlaister Young be32a941cd [FE-5114] (part 4) – refactor(studio): migrate platform auth and misc routes (#54031)
## Problem

Studio's `routes/api/platform/auth/**` and platform misc/stub routes
still run legacy Next Pages Router handlers through
`compat/next/api.ts`, and 4 legacy database/props routes have no callers
left. Part 4 of 7 for
[FE-5114](https://linear.app/supabase/issue/FE-5114/rewrite-api-routes-as-native-tanstack-start-handlers-and-remove-the)
migrates the 16 active routes to native TanStack Start handlers and
removes the 4 unused ones.

## Solution

**Changed:**

- Migrated `platform/auth/$ref/{invite,magiclink,otp,recover}` to
one-line `createAuthSenderHandlers` routes, and `users/index`,
`users/$id/index`, and `users/$id/factors` to `createApiHandlers`,
preserving the FE-5124 fixes (`Promise.all` MFA factor deletion, `code
?? 500` on auth senders, `Allow: PATCH, DELETE` on `users/$id`, now
derived by `createApiHandlers`)
- Migrated 9 platform misc/stub routes (`deployment-mode`,
`integrations/{$slug,github/*}`,
`organizations/{index,$slug/billing/subscription}`, `profile/index`, and
`telemetry/event`)
- Moved the `FETCH_TYPE_BYPASS_EXCEPTIONS` entries for the four sender
routes in `eslint.config.cjs` to `lib/api/self-hosted/auth-senders.ts`

**Added:**

- `createAuthSenderHandlers(endpoint, field)` in
`lib/api/self-hosted/auth-senders.ts`: shared POST handler for the
self-hosted GoTrue `invite`, `magiclink`, `otp`, and `recover` endpoints
(forwards only `email` or `phone`, uses `constructHeaders` with the
service role key, and passes upstream errors through with `code ?? 500`)
- Regression tests for `auth/$ref/users/$id/factors`,
`auth/$ref/users/$id`, and all four auth sender routes

**Removed:**

- Removed 4 unused routes (`platform/database/$ref/pooling`,
`platform/props/org/$slug`, `platform/props/project/$ref/index`, and
`platform/props/project/$ref/api`) and regenerated `routeTree.gen.ts`

## Review instructions

1. Run `pnpm --filter studio exec vitest run
tests/routes/api/platform/auth/`.
2. On self-hosted Studio, invite/ban/delete a user, remove MFA factors
for a user, and confirm `GET /api/platform/auth/default/users/<id>`
returns `405` with `Allow: PATCH, DELETE`.

## 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: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-12-01 22:30:19 +08:00
anthony lioandDion Zeneli 5fb027c28f feat(studio): launch week + builder day sign-ins redirect (#54317)
## Problem

- dashboard sign-in sends a user back with `router.push(returnTo)`, and
the path stays under `/dashboard`
- lw16 card app at `/launch-week` (#54315) signs in with
`returnTo=/launch-week?claim=1` and the user lands on a 404 at
`/dashboard/launch-week?claim=1`
- `validateReturnTo` rejects full urls, and the Builder Day site at
`/builderday` has the same problem

## Solution

- adds `/dashboard/launch-week` and `/dashboard/builderday` pages that
load the same path outside the dashboard + keep the query and the hash
- adds a test that a query with another address does not change the
destination

## Preview links

| Site | Live | Preview | Search for |
| ---- | ---- | ------- | ---------- |
| Studio |
[/dashboard/launch-week?claim=1](https://supabase.com/dashboard/launch-week?claim=1)
|
[/dashboard/launch-week?claim=1](https://studio-git-antlio-studio-launch-week-return-supabase.vercel.app/dashboard/launch-week?claim=1)
| the address bar |
| Studio |
[/dashboard/builderday](https://supabase.com/dashboard/builderday) |
[/dashboard/builderday](https://studio-git-antlio-studio-launch-week-return-supabase.vercel.app/dashboard/builderday)
| the address bar |

## Review instructions

1. open the preview
[/dashboard/launch-week?claim=1](https://studio-git-antlio-studio-launch-week-return-supabase.vercel.app/dashboard/launch-week?claim=1)
and make sure that the address changes to `/launch-week?claim=1` outside
`/dashboard`
2. open the preview
[/dashboard/builderday](https://studio-git-antlio-studio-launch-week-return-supabase.vercel.app/dashboard/builderday)
and make sure that the address changes to `/builderday`
3. sign out and open the preview
[/dashboard/sign-in?returnTo=%2Flaunch-week%3Fclaim%3D1](https://studio-git-antlio-studio-launch-week-return-supabase.vercel.app/dashboard/sign-in?returnTo=%2Flaunch-week%3Fclaim%3D1)
4. sign in and make sure that the browser ends at `/launch-week?claim=1`
5. sign out, open the preview
[/dashboard/sign-in?returnTo=%2Forganizations](https://studio-git-antlio-studio-launch-week-return-supabase.vercel.app/dashboard/sign-in?returnTo=%2Forganizations)
and make sure that the sign-in still returns to
`/dashboard/organizations`

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

---------

Co-authored-by: Dion Zeneli <101271736+Dionysos288@users.noreply.github.com>
2026-12-01 16:29:39 +02:00
Chloe Kavanagh 8aaf216d22 docs: add Chloe Kavanagh as per onboarding process (#54385)
### Purpose
As per onboarding doc- add my name to `humans.txt` file

### Solution
Added my name as per instructions 

### Review instructions
Check that "Chloe Kavanagh" is in the list on the expected position.

### Checklist
Check all before review:

I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
If I wrote a new docs topic or edited an existing topic, I used the
/write-the-docs or /edit-the-docs skill, which applies the docs [style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-12-01 14:16:58 +00:00
ajjsupabaseandClaude Sonnet 5.5 c8378a0a32 docs: add Aaron Johnson to humans.txt (#54405)
## Problem

My name is missing from the team list in `apps/docs/public/humans.txt`.

## Solution

Add "Aaron Johnson" to the list. The entry sits after "Aaron Byrne" to
keep the list in alphabetical order.

## Review category (docs PRs only)

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

## Review instructions

1. Open the diff for `apps/docs/public/humans.txt`.
2. Confirm that "Aaron Johnson" appears once, between "Aaron Byrne" and
"Adam Howard".

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

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-01 09:08:28 -05:00
K-Dog (Kevin) dc4f247e79 Revert "chore: update prod api types (#54394)" (#54404)
This reverts commit 37d4f444b4.

OpenFGA model needs updating first before updating the API types
2026-12-01 21:46:40 +08:00
Alaister YoungandAlaister Young 20a5212c42 [FE-5114] (part 3) – refactor(studio): migrate pg-meta and v1 routes (#54030)
## Problem

Studio's `routes/api/platform/pg-meta/**` and `routes/api/v1/**` routes
still run legacy Next Pages Router handlers through
`compat/next/api.ts`, and 10 legacy `pg-meta` GET proxy routes are no
longer called anywhere in the repo. Part 3 of 7 for
[FE-5114](https://linear.app/supabase/issue/FE-5114/rewrite-api-routes-as-native-tanstack-start-handlers-and-remove-the)
migrates the 9 active routes to native TanStack Start handlers and
deletes the 10 unused proxy routes.

## Solution

**Changed:**

- Migrated `platform/pg-meta/$ref/query/index.ts` and all 8 `v1` routes
(`api-keys`, `api-keys/$id`, `config/auth/signing-keys/{index,legacy}`,
`database/migrations`, `functions/{index,$slug/index}`,
`types/typescript`) to `createApiHandlers`; `query` and
`database/migrations` share `pgMetaErrorResponse`
- Enabled `{ withAuth: true }` on `api-keys`, `api-keys/$id`, and
`config/auth/signing-keys/{index,legacy}` for consistency with the other
`v1` routes
- Updated `api-keys` route tests to use `callRoute`

**Added:**

- `pgMetaErrorResponse(error)` in `lib/api/self-hosted/pg-meta.ts`
(keeps a `PgMetaDatabaseError`'s status and `{ message, formattedError
}` payload expected by `data/error-classification.ts`, otherwise `500`)
- Unit test for `pg-meta/$ref/query`
(`tests/routes/api/platform/pg-meta/$ref/query/index.test.ts`)

**Removed:**

- Removed all 10 unused `pg-meta` GET proxy routes (`column-privileges`,
`extensions`, `foreign-tables`, `materialized-views`, `policies`,
`publications`, `tables`, `triggers`, `types`, `views`), removed their
`FETCH_TYPE_BYPASS_EXCEPTIONS` entries from `eslint.config.cjs`, and
regenerated `routeTree.gen.ts`
- Removed `getPgMetaRedirectUrl` (`lib/api/apiHelpers.ts`) and
`parseRevealQuery` (`lib/api/self-hosted/api-keys.ts`)

**Behavior changes vs master:**

- Routes forward only `cookie` and `x-connection-encrypted` to pg-meta
via `constructHeaders(Object.fromEntries(request.headers))`, matching
what master's adapter forwarded
- `database/migrations` GET now forwards headers to
`listMigrationVersions` (master passed them as the wrong argument)
- `v1/projects/$ref/api-keys*` and `config/auth/signing-keys*` now pass
`{ withAuth: true }` (no-op in self-hosted mode; consistent with the
other `v1` routes)
- The 10 unused `pg-meta` GET proxy routes have been removed
(`pg-meta/$ref/query` and `v1/projects/$ref/types/typescript` remain)

## Review instructions

1. Run `pnpm --filter studio exec vitest run tests/routes/api/v1/
tests/routes/api/platform/pg-meta/`.
2. On self-hosted Studio, load tables/views/policies/extensions, run a
query in the SQL Editor, check API keys, and generate TypeScript types.

## 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: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-12-01 21:44:59 +08:00
Alaister YoungandAlaister Young c5fca0a0d7 [FE-5114] (part 2) – refactor(studio): migrate AI API routes (#54029)
## Problem

Studio's AI API routes under `routes/api/ai/**` still run legacy Next
Pages Router handlers through `compat/next/api.ts`. Part 2 of 7 for
[FE-5114](https://linear.app/supabase/issue/FE-5114/rewrite-api-routes-as-native-tanstack-start-handlers-and-remove-the)
migrates the active AI routes to native TanStack Start (`Request` →
`Response`) handlers and drops 3 unused AI endpoints.

## Solution

**Changed:**

- Migrated 8 active AI routes (`ai/code/complete`,
`ai/feedback/{classify,rate}`, and
`ai/sql/{check-api-key,cron-v2,filter-v1,generate-v4,title-v2}`) to
`createApiHandlers` and `parseJsonBody`
- Replaced Node `pipeUIMessageStreamToResponse` in
`ai/sql/generate-v4.ts` with native `createUIMessageStreamResponse`,
preserving the `x-braintrust-span-id` header
- Replaced `req.on`/`res.on` in `ai/sql/generate-v4.ts` with
`AbortSignal.any([request.signal, done.signal])` and a `TransformStream`
whose `flush`/`cancel` tear down the MCP connection opened in `getTools`
on stream completion, cancellation, or setup error
- Removed the custom malformed-JSON handling in `ai/code/complete.ts` in
favor of the wrapper's `400`
- Updated `lib/api/generate-v4.test.ts` to assert against the real
native SSE `Response` stream instead of mocking
`pipeUIMessageStreamToResponse`, with a shared `mockOpenStream()`
helper, a stream-cancellation abort test, and a Braintrust tracing test
asserting `x-braintrust-span-id` matches the exported root span
- Updated `lib/ai/README.md` to drop references to removed endpoints

**Removed:**

- Removed 3 unused AI routes (`routes/api/ai/onboarding/design.ts`,
`routes/api/ai/sql/parse-client-code.ts`, and
`routes/api/ai/sql/policy.ts`), dropped them from
`lib/hosted-api-allowlist.ts`, and regenerated `routeTree.gen.ts`
- Removed the now-unused `withoutApprovalTools` helper from
`lib/ai/tool-filter.ts` and its test from `lib/ai/tool-filter.test.ts`

**Behavior changes vs master:**

- `ai/code/complete` returns the wrapper's `400` JSON `{ error: {
message: 'Invalid JSON' } }` for malformed bodies
- Unused `ai/onboarding/design`, `ai/sql/parse-client-code`, and
`ai/sql/policy` endpoints have been removed

## Review instructions

1. Run `pnpm --filter studio exec vitest run lib/api/generate-v4.test.ts
lib/api/rate.test.ts lib/ai/tool-filter.test.ts`.
2. Send a prompt in the AI Assistant panel, verify streaming output, and
cancel mid-stream.
3. Trigger SQL title, cron, and filter generation as well as AI code
completion.

## 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: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-12-01 21:36:38 +08:00
Joaquim Moreno Prusi a27ef81d2e feat(studio): enable advanced V3 deployment for allowlisted organizations (#53158)
## Problem

Currently, in production, the Supabase UI doesn't allow for a set of
advanced deployment options, that we need to properly test new clusters
before getting those into production.

## Solution

Allow production dashboard requests to specify an AWS_K8S cluster when
the organization is included in the comma-separated
`orgsAllowedToUseV3AdvancedDeployment` setting.

Limited the exception to cluster placement fields. Preserve existing
permissions and cluster validation, require force for cordoned clusters,
and keep system requests supported. Default the allowlist to empty.

Updated the API descriptions and document ConfigCat setup.

## Review instructions
-

## Checklist

Check all before review:

- [X] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [X] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-12-01 14:18:26 +01:00
Jordi Enric 431a55435a fix(studio): keep the function overview range in logs FE-4973 (#53867)
## Problem

An Edge Function’s Overview can show an invocation from two hours ago.
Selecting **Open logs** or pressing **O** then **L** opens the
function’s Logs page with its default one-hour window, which hides that
invocation.

## Fix

Both actions now pass the start and end of the selected Overview window
to the function’s Logs page.

## How to test

1. Open an Edge Function with invocations in the last three hours and
select the three-hour interval on Overview.
2. Select **Open logs**. Check that Logs opens for the same function and
the date range spans exactly three hours. If an invocation is older than
one hour, confirm it appears in that range.
3. Return to Overview, select three hours again, and press **O** then
**L**. Check the same function and time range.

Related to [FE-4973](https://linear.app/supabase/issue/FE-4973).

## Verification

On the Studio staging preview, both **Open logs** and **O** then **L**
opened the same function with the exact Overview timestamps,
13:03:16.960 through 16:03:16.960 UTC. The results included a successful
invocation more than one hour before the window ended.

All 72 focused Overview and Logs navigation tests passed. Removing the
date range from either entry point independently failed its regression
assertion.
2026-12-01 13:03:23 +00:00
Alaister YoungandAlaister Young b6c391a058 [FE-5114] (part 1) – refactor(studio): add native API helpers & routes (#54028)
## Problem

Studio's `routes/api/**` server routes still run legacy Next Pages
Router handlers through the `toWebHandler` shim in `compat/next/api.ts`.
Part 1 of 7 for
[FE-5114](https://linear.app/supabase/issue/FE-5114/rewrite-api-routes-as-native-tanstack-start-handlers-and-remove-the)
adds native TanStack Start (`Request` → `Response`) helpers and migrates
the top-level utility routes so we can remove the adapter at the end of
the stack.

## Solution

**Added:**

- `createApiHandlers` in `lib/api/apiWrapper.ts`: wraps native TanStack
Start route handlers with optional platform JWT auth, JSON `400` (`{
error: { message: 'Invalid JSON' } }`) on `InvalidJsonError`, Sentry
capture + generic `500` on unexpected throws, and an `ANY` handler that
returns `405` with an `Allow` header derived from the registered
methods. Exports `ApiHandler` / `ApiHandlerContext` (`params` is
`Record<string, string>`)
- `authenticateRequest` in `lib/api/apiAuthenticate.ts` (Web `Request`
counterpart of `apiAuthenticate`, same error messages)
- `InvalidJsonError` and `parseJsonBody` in `lib/api/apiHelpers.ts`
- `callRoute(route, request, params)` test helper in
`tests/lib/server-route.ts`
- Unit tests for `createApiHandlers` (exercising real
`authenticateRequest` through MSW in
`lib/api/createApiHandlers.test.ts`), `authenticateRequest`,
`parseJsonBody`, `/api/generate-attachment-url`, and
`/api/integrations/stripe-sync`

**Changed:**

- Updated `getRouteHandler` in `tests/lib/server-route.ts` to mirror
TanStack Start's `HEAD` → `GET` → `ANY` dispatch order
- Migrated 11 top-level API routes (`check-cname`,
`cli-release-version`, `content/graphql`, `edge-functions/test`,
`enabled-features-overrides`, `generate-attachment-url`,
`get-deployment-commit`, `get-ip-address`, `get-s3-keys`,
`get-utc-time`, `integrations/stripe-sync`) to native handlers
- Added `withAuth: true` to `check-cname`, `content/graphql`, and
`integrations/stripe-sync`, and updated `check-cname-mutation.ts` and
`data/graphql/execute.ts` to attach `constructHeaders()`
- Reused `withAuth` `claims` in `generate-attachment-url` to avoid a
duplicate GoTrue lookup in platform mode
- Converted `tests/routes/api/get-deployment-commit.test.ts` to
`callRoute`

**Removed:**

- Removed 2 unused routes (`routes/api/connect/index.ts` and
`routes/api/parse-query.ts`), dropped `/parse-query` from
`lib/hosted-api-allowlist.ts`, removed Nitro's `traceDeps:
['libpg-query*']` in `vite.config.ts` (no server runtime route imports
`libpg-query` anymore), and regenerated `routeTree.gen.ts`

**Behavior changes vs master:**

- Methods a route doesn't register now get a JSON `405` with an `Allow`
header (previously they fell through to the SSR app). `HEAD` requests
that TanStack Start dispatches to a `GET` handler also get `405`,
matching master's method switches
- `InvalidJsonError` returns JSON `{ error: { message: 'Invalid JSON' }
}` (`400`) instead of plain text
- `check-cname`, `content/graphql`, and `integrations/stripe-sync` now
verify the platform JWT via `withAuth: true`
- Unexpected throws return a generic `500` with `{ error: { message:
'Internal Server Error' } }`
- Unused `/api/connect` and `/api/parse-query` routes have been removed

## Review instructions

1. Run `pnpm --filter studio exec vitest run
lib/api/apiAuthenticate.test.ts lib/api/apiHelpers.test.ts
lib/api/apiWrappers.test.ts lib/api/createApiHandlers.test.ts
tests/routes/api/ scripts/__tests__/server-source-maps.test.ts`.
2. Smoke-test `/api/get-deployment-commit`, `/api/check-cname`,
`/api/content/graphql`, `/api/generate-attachment-url`, and
`/api/edge-functions/test` in Studio and confirm unsupported HTTP
methods return `405` with an `Allow` header.

## 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: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-12-01 20:53:57 +08:00
cebd7a5eba docs(ref): add Kotlin v4 alpha reference (#54384)
## This PR

- Adds a v4 alpha reference for Kotlin at `/reference/kotlin/v4`, using
the prerelease flag from #53896.
- v3 stays the default at `/reference/kotlin`. v4 shows the alpha notice
and is listed under "Prereleases" in the version menu.
- `spec/supabase_kt_v4.yml` is the v3 spec with links updated to
`supabase/supabase-kt`. The API is the same in v4.
- New `introduction`, `installing` (with `io.supabase` coordinates) and
`upgrade-guide` pages under `docs/ref/kotlin/v4/`.

## Why

- supabase-kt `4.0.0-alpha-1` is on Maven Central. It's the first
official release of the Kotlin SDK and moves it to the `io.supabase`
Maven group and package. The current reference only shows the v3
coordinates.

## Note

- Guides, quickstarts and the existing v3 pages are unchanged. They
switch to `io.supabase` with the stable 4.0.0 release.
- Search doesn't index prerelease versions yet, same as Swift v3.
- I didn't run the docs build locally. Please check
`/docs/reference/kotlin/v4` and
`/docs/reference/kotlin/v4/upgrade-guide` on the preview.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Safa <4990386+safaorhan@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 15:04:28 +03:00
fadymak e58fa85e6c docs: correct py and kt deleteFactor claim that it signs the user out (#54361)
The Python and Kotlin `deleteFactor` reference notes said deleting a
verified factor logs the user out of all active sessions, but the server
only downgrades sessions that reached `aal2` with that factor to `aal1`.
This updates the notes to describe what actually happens, matching the
JS reference fix in supabase/supabase-js#2939.
2026-12-01 12:48:58 +01:00
K-Dog (Kevin) 37d4f444b4 chore: update prod api types (#54394)
Updated API types and addressed any type issues. Had to update
shared-types alongside.
2026-12-01 19:42:54 +08: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
Jan TennertandSafa Orhan 3e4ee05bfd docs(kotlin): add passkey, oauth server api, realtime filter docs (#49897)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Docs update

**Authentication and Authorization Enhancements:**

* Added documentation and examples for passkey-based authentication and
registration, including manual flows for starting and verifying
authentication and registration using the underlying API methods.
* Introduced detailed documentation for OAuth 2.1 server features,
including methods for retrieving authorization details,
approving/denying authorizations, listing grants, and revoking grants.

**Query and Data Filtering Improvements:**

* Added a new `dryRun()` (limit) function, allowing users to limit query
results by count, with support for specifying a referenced table.
* Updated `selectAsFlow` and `postgresListDataFlow` examples to
demonstrate the use of inline filter lambdas, making it easier to filter
results (e.g., by `id`).
* Enhanced `postgresChangeFlow` example to show how to apply optional
filters using a lambda.

**Realtime and System Events:**

* Added an example for listening to system updates via `systemFlow()` on
a channel, including configuration for broadcasting system messages
(e.g., replication readiness).

---------

Co-authored-by: Safa Orhan <safaorhan@users.noreply.github.com>
2026-12-01 13:37:57 +03: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
Alaister YoungandAlaister Young e395e057cf [FE-5108] (part 6) chore(studio): remove next/link shim and Vite alias (#54309)
Part 6 (final) of a 6-PR stack migrating all `next/link` imports in
`apps/studio` onto TanStack Router's `Link` (or plain `<a>` for known
external URLs) and removing `compat/next/link.tsx`.

| Part | PR | Scope |
| --- | --- | --- |
| 1 | #54304 | `data/prefetchers/PrefetchableLink.tsx` and
`components/ui/**` |
| 2 | #54305 | `components/layouts/**` and top-level shell components |
| 3 | #54306 | Database, TableGridEditor, Storage, SQLEditor,
BranchManagement, Branching, Functions, Realtime |
| 4 | #54307 | Integrations, Settings, Observability, LogDrains, Issues,
Linter, Reports, QueryPerformance, QuerySources, ConfigDrift,
DiskManagement, Compute |
| 5 | #54308 | Remaining `components/interfaces/**` (Org, Billing, Auth,
Support, Home, SignIn, ConnectSheet, etc.) |
| **6** | **#54309 ← this PR** | **Remove `compat/next/link.tsx` shim,
Vite alias, and update basePath tests/docs** |

Now that no files in `apps/studio` import `next/link`, deletes
`compat/next/link.tsx` and removes its Vite alias so any future
`next/link` import fails the build.

**Removed:**

- `apps/studio/compat/next/link.tsx`
- `'next/link'` entry from `nextShims` in `apps/studio/vite.config.ts`

**Changed:**

- Moved `apps/studio/compat/next/link-basepath-navigation.test.tsx` to
`apps/studio/lib/navigation-basepath.test.tsx` to keep basePath
navigation coverage for `DynamicLink` and `navigateToUrl`
- Updated `nextCompat()` error text in `apps/studio/vite.config.ts` and
routing docs in `apps/studio/AGENTS.md` to reflect that only
`next/script` remains shimmed
- Cleaned up stale `next/link` / `Link shim` comments in
`apps/studio/lib/internal-url.ts`,
`apps/studio/lib/router-url-shape.test.tsx`, and `knip.jsonc`

Addresses
[FE-5108](https://linear.app/supabase/issue/FE-5108/replace-the-nextlink-shim-with-tanstack-link)

## To test

- [ ] Confirm `git grep -E 'next/link|compat/next/link' apps/studio
knip.jsonc` returns zero matches
- [ ] Confirm Studio typecheck, ESLint ratchet, Knip, production Vite
build, and Vitest suite pass
- [ ] Spot-check `apps/studio/lib/navigation-basepath.test.tsx` and
`apps/studio/lib/router-url-shape.test.tsx`

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-12-01 17:51:56 +08:00
anthony lio 6bd006dc08 feat(docs): layout toggle (#53688)
## Problem

- docs layout v2 (variant `option-1` of the `docs-ia-mvp-v1` flag) is
about to roll out and a reader in the rollout has no way back to the
classic layout

## Solution

- adds a toggle button bottom of the guide right column so user in the
rollout can switch back
- adds a dialog that asks for an optional reason when a reader switches
back to classic, and stores the reason in `feedback_comments` with
`metadata.source = 'docs_layout_switch'` so we relying on existing
- adds the `docs_layout_updated` event and stops new experiment
exposures for readers who picked a layout

| toggle | survey |
| -------|------|
| <img width="654" height="312" alt="image"
src="https://github.com/user-attachments/assets/69bcd4b8-7dd2-4fd3-9045-e3246625ccf9"
/> | <img width="654" height="312" alt="image"
src="https://github.com/user-attachments/assets/4b18eb76-b9f1-4d96-be25-14a960b11475"
/> |

<!--
## Preview links

If relevant, include links to changed pages for easy review access.

Copy the preview base URL from the Vercel bot comment on this PR. Use
the following table as an example template.

| Site | Live | Preview | Search for |
| -------------- |
-------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------
| ----------------------------- |
| WWW | [/blog/your-post](https://supabase.com/blog/your-post) |
[/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post)
| unique phrase from the change |
| Docs |
[/docs/guides/your-page](https://supabase.com/docs/guides/your-page) |
[/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page)
| unique phrase from the change |
| Studio | [/dashboard](https://supabase.com/dashboard) |
[/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard)
| unique phrase from the change |
| Design system | [/design-system](https://supabase.com/design-system) |
[/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system)
| unique phrase from the change |
| UI library | [/library](https://supabase.com/library) |
[/library](https://ui-library-git-branch-name-supabase.vercel.app/library)
| unique phrase from the change |
| Knowledge base |
[/kb/guides/your-page](https://supabase.com/kb/guides/your-page) |
[/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page)
| unique phrase from the change |
-->

<!-- ## Additional context

Optionally add any other context or screenshots.

-->

## Review instructions

1. open
[/docs/guides/database/prisma?docs-ia-mvp-v1=option-1](https://docs-git-antlio-feat-docs-layout-switch-v2-supabase.vercel.app/docs/guides/database/prisma?docs-ia-mvp-v1=option-1)
2. click "Switch to classic layout" in the notice and make sure that a
dialog asks "What made you switch back?"

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-12-01 11:43:40 +02:00
Alaister YoungandAlaister Young 680633ee4f [FE-5108] (part 5) refactor(studio): migrate remaining interfaces off next/link (#54308)
Part 5 of a 6-PR stack migrating all `next/link` imports in
`apps/studio` onto TanStack Router's `Link` (or plain `<a>` for known
external URLs) and removing `compat/next/link.tsx`.

| Part | PR | Scope |
| --- | --- | --- |
| 1 | #54304 | `data/prefetchers/PrefetchableLink.tsx` and
`components/ui/**` |
| 2 | #54305 | `components/layouts/**` and top-level shell components |
| 3 | #54306 | Database, TableGridEditor, Storage, SQLEditor,
BranchManagement, Branching, Functions, Realtime |
| 4 | #54307 | Integrations, Settings, Observability, LogDrains, Issues,
Linter, Reports, QueryPerformance, QuerySources, ConfigDrift,
DiskManagement, Compute |
| **5** | **#54308 ← this PR** | **Remaining `components/interfaces/**`
(Org, Billing, Auth, Support, Home, SignIn, ConnectSheet, etc.)** |
| 6 | #54309 | Remove `compat/next/link.tsx` shim, Vite alias, and
update basePath tests/docs |

Migrates the remaining `components/interfaces/**` directories off
`next/link`, leaving zero `next/link` component imports in
`apps/studio`.

**Changed:**

- Replaced `next/link` across all 73 remaining interface files
(`Organization`, `OrganizationInvite`, `Billing`, `Auth`, `Support`,
`ProjectHome`, `Home`, `Project`, `ProjectCreation`, `ProjectAPIDocs`,
`ApiAuthorization`, `App`, `ConnectSheet`, `SignIn`, `APIKeys`,
`Account`, `CliLogin`, `Docs`, `JwtSecrets`, `Platform`)
- Converted the sole remaining `UrlObject` link (`<Link href={{
pathname: '/sign-in-sso', query }}>`) in `SignInSSOForm.tsx` to `<Link
to="/sign-in-sso" search={query}>`
- Migrated `SupportLink.tsx` onto `DynamicLink`
(`createSupportFormUrl(...)`)
- Standardized external `target="_blank"` anchors with `rel="noreferrer
noopener"`, switched `OverviewMetrics.tsx` observability link to typed
`<Link to="/project/$ref/observability/auth">`, and adopted `InlineLink`
/ `InlineLinkClassName` on inline paragraph links per review feedback

Addresses
[FE-5108](https://linear.app/supabase/issue/FE-5108/replace-the-nextlink-shim-with-tanstack-link)

## To test

- [ ] Check Organization (billing, usage, team, documents, AWS
Marketplace), Auth (providers, templates, rate limits, users, OAuth
apps), Support form/links, Project Home, Connect sheet, and Sign-In/SSO
links
- [ ] Verify `SignInWithSSOButton` preserves query params when
navigating to `/sign-in-sso`
- [ ] Verify `SupportLink` pre-populates support form query parameters
cleanly

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-12-01 17:33:03 +08:00
Gildas Garcia 7a6c6f7df8 fix(studio): fix Publish OAuth app button tooltips (#54359)
## Problem

Users who don't have the required permissions to publish an oauth app
may see two tooltips when hovering the _Publish OAuth app_ button.

<img width="620" height="208" alt="image"
src="https://github.com/user-attachments/assets/fedf7150-35e6-4429-b0c0-2fbc4cd2aa5e"
/>

## Solution

Hide the shortcut tooltip when users don't have the required permissions
to publish an oauth app
2026-12-01 10:15:50 +01:00
Alaister YoungandAlaister Young df798783e1 [FE-5108] (part 4) refactor(studio): migrate integrations, settings & observability off next/link (#54307)
Part 4 of a 6-PR stack migrating all `next/link` imports in
`apps/studio` onto TanStack Router's `Link` (or plain `<a>` for known
external URLs) and removing `compat/next/link.tsx`.

| Part | PR | Scope |
| --- | --- | --- |
| 1 | #54304 | `data/prefetchers/PrefetchableLink.tsx` and
`components/ui/**` |
| 2 | #54305 | `components/layouts/**` and top-level shell components |
| 3 | #54306 | Database, TableGridEditor, Storage, SQLEditor,
BranchManagement, Branching, Functions, Realtime |
| **4** | **#54307 ← this PR** | **Integrations, Settings,
Observability, LogDrains, Issues, Linter, Reports, QueryPerformance,
QuerySources, ConfigDrift, DiskManagement, Compute** |
| 5 | #54308 | Remaining `components/interfaces/**` (Org, Billing, Auth,
Support, Home, SignIn, ConnectSheet, etc.) |
| 6 | #54309 | Remove `compat/next/link.tsx` shim, Vite alias, and
update basePath tests/docs |

Migrates
`components/interfaces/{Integrations,Settings,Observability,LogDrains,Issues,Linter,Reports,QueryPerformance,QuerySources,ConfigDrift,DiskManagement,Compute}/`
off `next/link`.

**Changed:**

- Replaced `next/link` across all 72 files in Integrations, Settings,
Observability, LogDrains, Issues, Linter, Reports, QueryPerformance,
QuerySources, ConfigDrift, DiskManagement, and Compute interfaces
- Updated legacy permanent-redirect hrefs (`/settings/database` →
`/database/settings`, `/settings/vault/secrets` →
`/integrations/vault/secrets`, `/reports/database#database-size-report`
→ `/observability/database#database-size-report`) to canonical routes
- Flattened legacy nested `<Link><a>...</a></Link>` markup in
`DatabaseReadOnlyAlert.tsx` and dropped `passHref` in
`Integrations/Queues/QueueTab.tsx`
- Standardized external `target="_blank"` anchors with `rel="noreferrer
noopener"`, switched `ObservabilityOverviewFooter.tsx` to `InlineLink` +
`DOCS_URL`, and applied `InlineLinkClassName` to the typed billing links
in `DatabaseReadOnlyAlert.tsx` per review feedback
- Removed `vi.mock('next/link', ...)` from
`Settings/General/Project.test.tsx` and
`MobileIssuesNavigation.platform.test.tsx`

Addresses
[FE-5108](https://linear.app/supabase/issue/FE-5108/replace-the-nextlink-shim-with-tanstack-link)

## To test

- [ ] Navigate across Integrations (marketplace, cron, queues, wrappers,
Vercel/GitHub), Settings (database, infrastructure, read replicas,
logs), Observability, Issues, and Compute pages
- [ ] Verify Logs Preview → Logs Explorer links preserve multi-line SQL
queries in search params
- [ ] Verify billing and database-size links preserve query parameters
and hash fragments

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-12-01 17:02:11 +08:00
claude[bot] 5be070974d Add Data Processing Addendum v2 (effective December 1, 2026) (#54301) 2026-12-01 09:59:17 +01:00