Commit Graph
40502 Commits
Author SHA1 Message Date
K-Dog (Kevin) 258004ea4d chore: improve pricing info on project creation (#54110)
Customers often misunderstand compute pricing. In an effort to make this
a little more obvious without a huge revamp of the project creation,
this PR:

- Adds the compute billing animation that we use on plan upgrades to
project creation
- Expands the footer on project creation to be a bit more prominent
2026-11-26 16:33:15 +08:00
Alaister YoungandAlaister Young 730010e450 [FE-5112] refactor(studio): remove next/head shim and usages (#54015)
Removes the last four `next/head` usages in Studio along with the
`compat/next/head.tsx` shim and its Vite alias. The shim was already a
fragment passthrough relying on React 19's native `<title>` and `<meta>`
hoisting, so the remaining callers can render those elements directly
just like the rest of Studio's routes.

**Changed:**

- `ApiAuthorization.Valid`, `AccountLayout`, `OrganizationLayout`, and
`ProjectLayout` – dropped `next/head` and `<Head>` wrappers in favor of
inline `<title>` and `<meta>` elements
- `AccountLayout.selfhosted.test.tsx` and `ProjectLayout/index.test.tsx`
– removed `next/head` mocks so they assert against React 19's native
title hoisting
- `OrganizationLayout.test.tsx` and `tests/routes/authorize.test.tsx` –
added `document.title` coverage for `OrganizationLayout` and the legacy
`/authorize` screen

**Removed:**

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

Addresses
[FE-5112](https://linear.app/supabase/issue/FE-5112/replace-the-nexthead-shim-with-tanstack-route-head).

## To test

- Navigate across a project page (e.g. Table Editor), an organization
page, and `/account/me` – browser tab title updates for each view
- Open `/authorize?auth_id=...` with the legacy OAuth flow – tab title
updates to `Authorize <app name> | Supabase` once the request loads

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-11-26 08:32:46 +00:00
Alaister YoungandAlaister Young 87b9d0562e [FE-5111] refactor(studio): replace next/image shims with plain img (#54011)
Replaces all remaining `next/image` and `next/legacy/image` imports in
`apps/studio` with plain `<img>` elements and deletes both compat shims
and their Vite aliases (following #53906, which removed the last
`next/image` import from `packages/ui-patterns`).

**Changed:**

- Replaced 26 `next/image` and 3 `next/legacy/image` call sites across
`apps/studio` with plain `<img>` elements (every local `src` already
prepends `BASE_PATH` / `router.basePath`, and none used `loader`,
`priority`, `placeholder`, `quality`, or `onLoadingComplete`)
- Converted `fill` / `layout="fill"` usages in `IntegrationCard`,
`MarketplaceFeaturedHeroGrid`, `Integrations.constants`,
`useAvailableIntegrations`, and `IntegrationPanels` to Tailwind sizing
classes, and dropped no-op `layout="fixed"` props in `FormContents` and
`HookList`
- Replaced invalid `layout="fill" objectFit="cover"` props passed to
`next/image` in `HelpPanel` with `absolute inset-0 h-full w-full
object-cover`
- Cleaned up image accessibility across the touched call sites (accurate
alt text on feature preview screenshots and `HookList`, `alt=""` +
`aria-hidden="true"` on decorative icons/illustrations next to visible
labels)

**Removed:**

- `apps/studio/compat/next/image.tsx`
- `apps/studio/compat/next/legacy/image.tsx`
- `'next/image'` and `'next/legacy/image'` aliases from
`apps/studio/vite.config.ts`

## To test

- Confirm `git grep -E "next/(legacy/)?image" apps/studio/` has no
remaining imports
- Check images render as expected across the updated surfaces:
- **Integrations marketplace** (`/project/_/integrations`): featured
hero covers (`MarketplaceFeaturedHeroGrid`), integration icons in cards,
sidebar, and wrapper rows (`Integrations.constants`,
`useAvailableIntegrations`)
  - **Help panel**: Discord card background illustration
- **Account & settings**: Account Connections GitHub icon, Add-ons cards
(IPv4 / PITR / Custom Domain), Spend Cap card & side panel, user profile
avatars (`ProfileImage`), and Feature Previews modal images
- **Database Webhooks** (`FormContents`, `HookList`) and Third-Party
Auth provider dropdown/cards

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-11-26 16:23:41 +08:00
K-Dog (Kevin) 0246fb34b5 fix: clear free project limit cache on project operations (#54108)
When pausing/creating/restoring/cloning a project, we are not clearing
the react-query cache for the free project limit check and therefore
still displaying potentially wrong states to the user.

PR addresses this by clearing the free project limit react query cache
on relevant project operations.
2026-11-26 16:16:45 +08:00
K-Dog (Kevin) 5d897958ec feat: project resume costs (#54107)
Currently, when resuming a project, the cost is not clear and we just
have a generic inline "Once resumed, usage will be billed by compute
size and hours active." copy. This commonly leads to people missing that
resuming causing extra compute costs.
2026-11-26 16:03:20 +08:00
K-Dog (Kevin) 574cd4ba46 chore: remove old plan change UI (#54105)
Revamped plan change UI is fully rolled out for everyone. Removing the
now obsolete components.
2026-11-26 16:01:29 +08:00
Joshen Lim 52a7fddc95 Joshenlim/fe 5198 clean up to be cleaned folder (#54106)
## Context

Another housekeeping - just deprecates the `to-be-cleaned` folder
- Removes `ListIcon -> Only `vercelIcon` was being used which I've
replaced to use the existing static SVG instead
- Removes `ProductEmptyState` -> replaced with
`EmptyStatePresentational`
2026-11-26 10:59:43 +07:00
3089aa3f67 docs(skills): add /kb to the write-the-docs content types and checklist (#53990)
## I have read the CONTRIBUTING.md file.

YES

## What kind of change does this PR introduce?

**Skill update.** The `write-the-docs` and `edit-the-docs` skills and
the `pm-the-docs` checklist now say when content belongs in `/kb`
instead of `/docs`. The docs skills also get a consistency pass.

Closes DOCS-1559.

## What is the current behavior?

The skills and the checklist do not mention `/kb`. Writers get no prompt
to put comparisons or migration guides there. The skills also still
place troubleshooting in `apps/docs`, disagree about which skill owns
the Shape stage, and link to skills that are not in this repo.

## What is the new behavior?

| File | Change |
|---|---|
| `.agents/skills/write-the-docs/reference/content-type-gate.md` | Adds
a `/kb` row and a short "What goes in `/docs` and what goes in `/kb`"
section. Troubleshooting now points to `/kb`. |
| `.agents/skills/write-the-docs/SKILL.md` | Adds `/kb` to the content
types. `/kb` guides use the template gate, and `/kb` FAQs are exempt.
Phase 2 sends `/kb` content to `apps/kb/AGENTS.md`. Removes duplicate
steps and links to skills outside this repo. |
| `.agents/skills/write-the-docs/reference/drafting-mechanics.md` | Says
oxfmt instead of Prettier |
| `.agents/skills/edit-the-docs/SKILL.md` | Adds a content-type gate
check before additions |
| `.agents/skills/pm-the-docs/reference/write-the-docs-checklist.md` |
Adds a stage 2 (Shape) item to decide if content belongs in `/kb`. Shape
now points to `/pm-the-docs` for placement decisions. |
| `.agents/skills/pm-the-docs/SKILL.md`,
`.agents/skills/ask-the-docs/SKILL.md` | Agree that `pm-the-docs` owns
Frame and Shape, and `ask-the-docs` owns docs-app mechanics. Removes
links to skills outside this repo. |
| `.agents/skills/ask-the-docs/reference/*.md` | Says oxfmt instead of
Prettier, updates the troubleshooting known issue, and removes links to
skills outside this repo |

## Additional context

Skill docs only. No preview needed. Troubleshooting now lives in `/kb`
and takes no direct contributions. The skills now say so.

### Test plan

- [ ] Read the diffs. The `/docs` and `/kb` rule matches the
content-type gate.
- [ ] `grep -rn docs-agent-skills
.agents/skills/{write,ask,pm}-the-docs` returns nothing.

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

---------

Co-authored-by: Nik Richers <nik@validmind.ai>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com>
2026-11-25 23:11:12 +00:00
Etienne Cournoyer 7c6366d979 Added myself to humans.txt (#54094)
## Problem

An onboarding task is suggesting to add my name in humans.txt.

## Solution

Added my name in the list.

<!--
## 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. Ensure name is correct.
2. Ensure name has been inserted at the correct location.

## 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-11-25 15:26:12 -07:00
Alexis Aguilar 6490f63e9b chore(codeowners): request a self-hosted review on self-hosted docs (DOCS-1805) (#54080)
## Problem

The self-hosted docs have an owner on the self-hosted team, but
`.github/CODEOWNERS` gives all of `/apps/docs/` to `@supabase/docs`
alone. A change to a self-hosted page doesn't request a review from the
people who own that content.
[#53996](https://github.com/supabase/supabase/pull/53996) merged that
way, and [#54013](https://github.com/supabase/supabase/pull/54013)
followed up on it.

Closes
[DOCS-1805](https://linear.app/supabase/issue/DOCS-1805/request-a-self-hosted-review-on-each-self-hosted-docs-pr)

## Solution

The self-hosted docs pages are owned by `@supabase/docs` and
`@supabase/self-hosted`, the team that already owns `/docker/`. Two
patterns cover them:

- `apps/docs/content/guides/self-hosting*`: the `self-hosting/` folder
and `self-hosting.mdx`
- `apps/docs/content/guides/**/*self-hosted*`: any guide whose file name
contains `self-hosted`, such as `grafana-self-hosted.mdx` and
`expose-self-hosted-queues.mdx`, in `.mdx` or `.md`

The last matching line in CODEOWNERS wins, so the new lines sit after
`/apps/docs/` and keep `@supabase/docs` as an owner. A PR that changes
one of these pages requests a review from both teams.

## Review instructions

1. Check that GitHub reports no CODEOWNERS errors: `gh api
"repos/supabase/supabase/codeowners/errors?ref=alexisa/DOCS-1805"`
returns `"errors": []`.
2. Check which files the two patterns match. They follow `.gitignore`
rules, so `git check-ignore` can list the matches:

   ```bash
printf
'/apps/docs/content/guides/self-hosting*\n/apps/docs/content/guides/**/*self-hosted*\n'
> /tmp/co.ign
git ls-files apps/docs | git -c core.excludesFile=/tmp/co.ign
check-ignore --no-index --stdin
   ```

The list has 25 files: the `self-hosting/` pages, `self-hosting.mdx`,
and the guides with `self-hosted` in the name.
3. After merge, open a PR that changes a self-hosted page, and check
that GitHub requests a review from `@supabase/self-hosted`.

## 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).
Doesn't apply: this PR changes only CODEOWNERS.
2026-11-25 14:32:23 -07:00
Tyler Hillery 79da6ab86f docs(storage): add object versioning and lifecycle policies guides (#51566)
## What

Adds docs for the Storage object versioning private alpha and bucket
lifecycle policies for noncurrent versions.

- New: `storage/buckets/object-versioning.mdx`,
`storage/buckets/lifecycle-policies.mdx`, plus nav entries
- Updated: copy/move, delete objects (versioned buckets and `aws s3
sync`), S3 compatibility (lifecycle rows, versioning note), schema
diagram (versioning columns), storage size (noncurrent versions count
toward storage size; current vs noncurrent query)
2026-11-25 13:53:55 -06:00
Alaister YoungandAlaister Young 8f75187422 fix(studio): stop dev No queryFn error from grantedQueryOptions (#54004)
Fixes TanStack Query spamming `No queryFn was passed as an option` in
dev whenever a grant-gated query renders without a grant or required
variable (such as `branchesQueryOptions` when `projectRef` is
`undefined`).

**Changed:**

- Replaced `queryFn: undefined` in `grantedQueryOptions` with a stable
`fallbackQueryFn` while keeping `enabled: false`. This satisfies
`useBaseQuery`'s dev-mode check and still delegates to a subscribed
granted observer on invalidation (avoiding the `skipToken` shared-cache
regression from #53088).
- Updated `granted-query-options.test.ts` and `api-keys-query.test.tsx`
to verify no `console.error` is logged when rendering without a grant or
`projectRef` and that invalidation still refetches via the granted
observer.
- Updated the `studio-queries` skill note to match.

## To test

- Run `pnpm dev:studio` and open a non-branch project's home page.
Confirm the browser console and dev terminal no longer spam
`[["projects",null,"branches"]]: No queryFn was passed as an option`.
- Open Project Settings -> API Keys, create or delete a key, and confirm
the list still refreshes cleanly.
- Run `pnpm --filter studio test data/granted-query-options.test.ts
data/api-keys/api-keys-query.test.tsx`.

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-11-26 01:01:33 +08:00
Guilherme Souza 0d9e021060 docs(ref): add Swift v3 alpha reference (#53896)
## Problem

supabase-swift v3 is in alpha (`3.0.0-alpha.2`). The docs have no
reference for it. v3 renames many public APIs, so the v2 reference does
not help people who try the alpha.

## Solution

Add a v3 reference at `/reference/swift/v3`. v2 stays the default at
`/reference/swift`.

- **Prerelease flag.** A version in `REFERENCES` can now set
`prerelease: 'alpha'` (or another stage). Swift versions are `['v2',
'v3', 'v1']`. `versions[0]` is still the latest stable version, so the
existing URL and "latest" logic does not change. Other SDKs can use the
same flag.
- **Alpha notice.** A prerelease page shows "This version is in alpha"
with a link to the stable version. It does not show the "Version out of
date" warning.
- **Version menu.** Prerelease versions show in a separate "Prereleases"
group with a stage badge.
- **Spec.** `spec/supabase_swift_v3.yml` ports the v2 spec to the v3
API. The examples were checked against the v3 source at the
`v3.0.0-alpha.2` tag. It adds the new v3 APIs: MFA recovery codes,
`AuthAdminClient`, admin custom providers, `functions.stream`, and the
Realtime streams API.
- **Pages.** New introduction, installing (Xcode 26, Swift 6.2), and
upgrade guide pages under `docs/ref/swift/v3/`.
- **Navigation.** Nav entries for v3. v3 is excluded from the
"TypeScript support" section.

Not in this PR:

- Search indexing for v3. Search still covers v2 only.
- In the v2 spec, 7 filter ids use camelCase (for example `containedBy`
and `textSearch`). They match no section, so they do not render in the
v2 docs today. The v3 spec uses the matching kebab-case ids. The v2 fix
can be a separate PR.

## Review instructions

1. Open `/docs/reference/swift/v3` on the preview. See the alpha notice
and the v3 sections.
2. Open the version menu. See "Stable releases" (v2.0 with a "Latest"
badge, v1.0) and "Prereleases" (v3.0 with an "Alpha" badge).
3. Open `/docs/reference/swift`. See that it still shows v2 with no
notice.
4. Read the upgrade guide at `/docs/reference/swift/v3/upgrade-guide`.

Typecheck, Prettier, and ESLint pass locally. I did not run the docs
unit tests. The Swift examples were not compiled.

<img width="318" height="236" alt="Screenshot 2026-11-25 at 10 36 01"
src="https://github.com/user-attachments/assets/0f0caf18-7a4a-4835-8f6a-b76df9c66fa9"
/>
<img width="685" height="417" alt="Screenshot 2026-11-25 at 10 36 10"
src="https://github.com/user-attachments/assets/1c55bc44-1fc1-4390-8d8c-48bc55822bd3"
/>

## 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-11-25 13:54:58 -03:00
Diogo Biazus 08e5819707 docs: add Diogo Biazus as per onboarding process (#53061)
Same as #52956 but now from the proper repo

## Problem

My onboarding instructions asked me to add myself to humans.txt.
While doing so I noticed there was an inconsistency in the alphabetical
order near my name.

## Solution

I added my name to the list and reordered a few surrounding names.

## Review instructions

Check that "Diogo Biazus" is in the list on the expected position.

## 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-11-25 11:53:46 -05:00
Riccardo Busetti ce80792683 feat(docs): Improve Pipelines docs (#54045) 2026-11-25 09:48:12 -06:00
Firdaws Farukh af75c3f8d9 Change deprecation notice in docs to mention early 2027 (#54052)
A notice was added in the Project's Settings -> API Keys page via [pull
request 52250](https://github.com/supabase/supabase/pull/52250) that
mentions `Legacy API keys will be retired in early 2027` but the notice
in the docs still mentions `Supabase is deprecating the anon and
service_role keys by the end of 2026`. This pull request updates the
docs to be consistent with the Dashboard UI to avoid confusion.
2026-11-25 18:27:32 +03:00
Gildas Garcia 107b7dbad2 feat(studio): already approved request preselect org and projects (#54036)
## Problem

When users navigate back to the consent screen after a redirect error,
they have to reselect the org and projects despite the request having
been approved already

## Solution

When present, `approved_organization_slug` should set the organization
picker and override `organization_slug` from query parameters. Likewise,
`approved_project_refs` should take precedence over project refs from
query parameters or an existing grant in the preflight check.
2026-11-25 16:23:14 +01:00
Drew McLellanandPamela Chia 6a305cd311 docs(skills): treat user-defined names as sensitive in telemetry-standards (#53963)
## Problem

The `telemetry-standards` skill only says not to track PII. It doesn't
cover other identifiers from a user's project, such as schema or table
names. Those are customer data and outside our privacy policy, but
nothing told contributors or reviewers to avoid them. The skill also
pointed at existing `schema_name` and `table_name` properties as
conventions to match, which invites copying them. This came up in
#53955, where schema names were masked because they weren't needed.

## Solution

Updates `.agents/skills/telemetry-standards/SKILL.md`:

- New Privacy section requiring that schema, table, column, function,
bucket, policy, project and branch names be masked or omitted, along
with other user-defined names, SQL and free text, and extra IDs. It
notes that `useTrack` already attaches the project ref and org slug.
- Recommends counts, enums, booleans or action categories instead of raw
names, and typing new properties as string-literal unions rather than
plain `string`.
- Short masked vs unmasked example.
- Reviewers now flag this as a required change (new rule 6), and the
verification checklist has matching items.
- The Property Standards note now says to match casing only and not copy
existing `schema_name` or `table_name` properties.
- The event definition template uses a literal union instead of
`string`, so it no longer contradicts the rule.

## How to verify

Read the diff of `.agents/skills/telemetry-standards/SKILL.md`. Each
identifier listed in FE-5207 appears in the Privacy section and in
review rule 6. No code changes.

Fixes FE-5207

---------

Co-authored-by: Pamela Chia <pamelachiamayyee@gmail.com>
2026-11-25 14:31:32 +00:00
JerryandNik Richers 7960616cf9 fix(docs): use the sub claim in the storage copy/move policy examples (#53953)
Fixes #53952

## What changed

The Copy and Move Objects guide has three RLS policy examples that
compare `storage.objects.owner_id` (`text`) and the output of
`storage.foldername()` (`text[]`) with `auth.uid()` (`uuid`). Postgres
has no implicit cast between `text` and `uuid`, so any query governed by
these policies fails with `operator does not exist: text = uuid`.

This PR changes the comparisons to use `auth.jwt()->>'sub'`, matching
the pattern already used in the storage access control and delete
objects guides.

## Verification

- Reproduced the original error against a local Postgres instance.
- Confirmed the corrected expressions run without errors.
- No links or anchors changed.

I used AI to help debug and verify this against a local Postgres
instance, and I personally reviewed the final change.

---------

Co-authored-by: Nik Richers <nrichers@gmail.com>
2026-11-25 07:15:06 -07:00
anthony lio 3643bc656d fix(docs): keyboard shortcut hydration (#53959)
## Problem

- on macOS, a docs page reload shows "Ctrl K" in the search box before
"⌘ K"
- a signed-in user sees the "Sign up" button on reload until auth loads

## Solution

- changes `KeyboardShortcut` to resolve the ⌘ and ⌥ keys after hydration
+ hides them until then
- adds a test that fails when the server html shows a platform key
- removes the separate mac check from the kb hero search

<!--
## 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. on a mac, open
[/docs](https://docs-git-fix-keyboard-shortcut-hydration-supabase.vercel.app/docs)
and reload the page
2. make sure that the search box shows "⌘ K" with no "Ctrl K" before it

## 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-11-25 16:13:27 +02:00
Pamela Chia 71f7780d1e fix(common): clear first-referrer cookie on consent revoke (#54043)
Withdrawing consent expired the analytics and ads cookies but left
`_sb_first_referrer` (referrer, landing URL, UTMs and click ids, 365
days) in the browser. I added it to the list `revokeTrackingConsent`
expires, so it is removed on the host and on `.supabase.com` together
with the others. The cookie is only read after consent, so no
attribution data is lost.

## To test

Previews and staging auto-accept consent, so the withdrawal path only
runs on production after deploy.

- [x] Arrive on supabase.com from an external link and accept cookies.
In the console, `document.cookie.includes('_sb_first_referrer')` returns
`true`. Open Privacy Settings, turn Analytics and Marketing off and
save: after the reload the same expression returns `false`.
- [x] In a fresh private window, arrive from an external link and click
Opt out on the consent toast:
`document.cookie.includes('_sb_first_referrer')` returns `false`.

## Linear
- fixes GROWTH-1574
2026-11-25 22:07:35 +08:00
Lyric HartleyandIvan Vasilov b3076f07b2 Add Lyric Hartley to humans.txt (#53081)
## Problem

My name was not in the file.

## Solution

Added my name

## Review instructions

See that my name is there

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-11-25 13:54:55 +00:00
anthony lio 041c363873 fix(docs): layout v2 fixtures (#53761)
## Problem

- keyboard users hit focus problems in the option-1 docs layout because
the on this page rail clips focus rings and Firefox adds an unlabeled
tab stop on the sidebar scroll area
- skip link to the content does not render
- reference sits in a dropdown next to the logo which doesn't feel
optimal
- header breadcrumbs repeat the sidebar section with group crumbs that
never link

## Solution

- fixes the focus rings and tab stops in the sidebar, the rails and the
footers so each ring is inset and is not clipped
- changes the header breadcrumbs to show the parent and the page + links
a group crumb to its overview page when it has one
- moves reference into the sidebar section list with a back button +
removes the sections dropdown and points the logo to the docs home
- moves the knowledge base to the top of the sidebar footer and removes
the changelog link
- removes the hover backgrounds and color transitions from the sidebar
and rail rows + fades the sidebar list under the back button on scroll
- aligns the home agent prompt with the second framework column and
changes the footer separator to a square

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

-->

1. visit
[/docs/guides/database/replication/pipelines?docs-ia-mvp-v1=option-1](https://docs-git-antlio-fix-docs-layout-v2-nits-supabase.vercel.app/docs/guides/database/replication/pipelines?docs-ia-mvp-v1=option-1)
2. reload the page and press Tab once to make sure that the first stop
is the skip link to the content
3. press Tab through the sidebar, the on this page rail and the page
footer to make sure that each ring is inset and round and is not clipped
4. click the back button in the sidebar until the section list shows,
then click `Reference` to make sure that it opens the reference list
with a back button

## 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-11-25 15:45:44 +02:00
supabase-vercel-tedd[bot] a36d21848c feat(studio): note that edge function secrets can't be retrieved once saved (#54037)
## Problem

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

## Solution

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

## How to verify

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

## Checks

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

## Checklist

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

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[FE-5223](https://linear.app/supabase/issue/FE-5223/add-mention-that-edge-function-secrets-cannot-be-retrieved-after).
Tedd doesn't read comments on this PR.

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-25 06:55:15 -06:00
Alaister YoungandAlaister Young 7c368aadfd refactor(ui-patterns): use FrameworkProvider for routing and drop next (#53907)
Migrates the remaining router consumers in `packages/ui-patterns`
(`MobileSheetNav`, `CommandProvider`, `useCrossCompatRouter`) to
`useFramework()` from `common`, removing the final `next` imports and
`next` peerDependency from `packages/ui-patterns`.

**Changed:**

- `MobileSheetNav`: read `asPath` from `useFramework()` instead of
`next/router`, and close as soon as a link inside it is tapped (Studio
only updates `asPath` once the destination route has loaded)
- `CommandProvider`: close the menu when `asPath` changes (ignoring
hash-only changes), in every framework
- `useCrossCompatRouter`: call `useFramework().push` and close/reset the
menu once it settles. No `startTransition` around the push – awaiting a
Pages Router push inside a transition deadlocks, since Next renders the
route change in a transition of its own. This drops the `useTransition`
/ `onPendingEnd` plumbing
- Updated `MobileSheetNav` and `CommandMenu` tests to wrap with
`FrameworkProvider` instead of mocking `next/*`, plus regression tests
for a Pages Router-style push, same-URL pushes, pushes that throw,
children staying mounted, hash-only changes, and sheet link taps

**Removed:**

- `next` from `packages/ui-patterns/package.json` `peerDependencies`
- `next-router-mock` from `packages/ui-patterns/package.json`
`devDependencies` and `packages/ui-patterns/vitest.setup.ts`
- `useCrossCompatRouter` from the `CommandMenu` barrel (no consumers
outside `ui-patterns`)

## To test

- Run `packages/ui-patterns` tests and typecheck
- Open the command menu (`Cmd+K`) in Studio and WWW (both an App Router
page and a Pages Router page), navigate to a route, and confirm it
navigates and closes cleanly
- Search docs from the command menu on a WWW Pages Router page and open
a result
- Open a mobile sheet nav in Studio, navigate routes/queries, and verify
close-on-route-change and `shouldCloseOnQueryChange` behavior

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-11-25 20:32:07 +08:00
Alaister YoungandAlaister Young 576171b9b7 refactor(ui-patterns): use FrameworkLink and FrameworkImage (#53906)
Replaces `next/link` and `next/image` imports in `packages/ui-patterns`
components with `FrameworkLink` and `FrameworkImage` from `common` so
each host app supplies its own implementation (`next/link` +
`next/image` in Next apps, TanStack Link + `<img>` in Studio).

**Changed:**

- Links (`FrameworkLink`): `AuthenticatedDropdownMenu`, `Chart`,
`InnerSideMenu`, `MetricCard`, `TextLink`
- Images (`FrameworkImage`): `AuthenticatedDropdownMenu`,
`ExpandableVideo`, `GlassPanel`, `Image`, `TweetCard`
- `Image`: `caption`, `captionAlign`, and `containerClassName` no longer
leak onto the `<img>`, and the unused static image type re-exports are
dropped
- `TweetCard`: avatar is decorative (`alt=""`) since the handle is right
next to it

## To test

- Run `packages/ui-patterns` tests and typecheck, plus typecheck across
Studio, WWW, Docs, and Design System
- Click `InnerSideMenu`, `Chart`, and `MetricCard` links in Studio and
verify client-side TanStack navigation
- Spot-check `ui-patterns/Image` (including captions),
`ExpandableVideo`, `GlassPanel`, `TextLink`, `TweetCard`, and
`AuthenticatedDropdownMenu` in WWW and Docs to verify Next.js links and
image optimization work as before

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-11-25 20:25:16 +08:00
Alaister YoungandAlaister Young d6e4089b1a feat(common): add FrameworkProvider and remove next imports (#53905)
Introduces a lightweight `FrameworkProvider` React context in
`packages/common` (`Link`, `Image`, `pathname`, `asPath`, `isReady`,
`params`, `push`), wires it up in the consuming apps, and removes the
`next` dependency from `packages/common`.

**Added:**

- `FrameworkProvider`, `useFramework`, `FrameworkLink`, and
`FrameworkImage` in `packages/common/framework.tsx`, with plain HTML
defaults (`DefaultFrameworkLink` / `DefaultFrameworkImage`).
`useFramework().push` always exists and falls back to
`window.location.assign`
- App-level framework providers wiring `next/link`, `next/image`, and
router state in `www` (App + Pages routers), `docs`, `design-system`,
`learn`, and `ui-library`, and native TanStack Router bindings in
`studio` (`StudioFrameworkProvider`)
- `StudioFrameworkProvider` reuses the common defaults (its image only
applies the basePath) and reports `isReady` once the first route load
commits, so the first page view carries the final route after any
redirect
- Unit tests for `StudioFrameworkProvider` (`useParams`,
`FrameworkLink`, `FrameworkImage`, query/hash-only navigation,
`isReady`) and for `PageTelemetry` route-change sends and the
`TelemetryTagManager` consent gate

**Changed:**

- `common/hooks/useParams.ts`: read params from `useFramework()` instead
of `next/compat/router`
- `common/telemetry.tsx`: replace `next/script` in `TelemetryTagManager`
with `useEffect` script injection, and read route state from
`useFramework()` in `PageTelemetry`
- `common/MetaFavicons/app-router.ts`: drop type-only `Metadata` import
from `next`
- Moved `MetaFaviconsPagesRouter` to
`apps/www/components/MetaFaviconsPagesRouter.tsx` (its sole consumer)
- Studio: `toRoutePattern` and `applyBasePath` now live once in
`lib/internal-url.ts`, shared by the provider and the `compat/next`
shims
- `PageTelemetry` throws outside production when no `FrameworkProvider`
is mounted, since it would otherwise send only the landing pageview.
`useFramework()` itself still falls back to the defaults
- `ui-library`: renamed its code-sample framework context to
`FrameworkPreferenceProvider` / `useFrameworkPreference` so
`FrameworkProvider` only means the `common` one

**Removed:**

- `learn`'s unused copy of that context (`useCourse` had no callers)

- `next` from `packages/common/package.json` peerDependencies

App Router adapters set `asPath` to the pathname only, same as the
`usePathname`-based telemetry on master (reading search params at the
root would opt static pages out of static rendering).

## To test

- Run `packages/common` tests and typecheck, and `apps/studio`
`StudioFrameworkProvider` / `route-render` / `telemetry` tests
- Navigate between routes in Studio, Docs, and WWW and confirm page
telemetry fires once per navigation (and does not duplicate on hash-only
changes)
- Load Studio at `/` (which redirects) and confirm the first page event
has the final route
- Verify URL params (`useParams`) continue resolving route and search
params in Studio

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-11-25 20:13:22 +08:00
supabase-vercel-tedd[bot] e508c3c3f0 feat(studio): track schema visualizer usage (#53955)
## Problem

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

## Solution

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

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

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

## How to verify

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

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

## Checks

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

## Checklist

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

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[FE-5031](https://linear.app/supabase/issue/FE-5031/track-usage-on-the-schema-visualizer).
Tedd doesn't read comments on this PR.

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-25 11:35:03 +00:00
K-Dog (Kevin) 653f914ca1 feat: post plan upgrade screen (#54003)
Right now, when customers upgrade from free → paid or even pro → team,
we simply redirect to the org billing page with a quick banner that
vanishes after 3 seconds confirming the plan was changed. it’s quite
unsatisfying and feels like a missed opportunity to display what the
customer now unlocked and next steps. I want to especially highlight
projects that are now upgradeable from nano → micro, but we can later
expand and make the “next steps” smarter and do it context-based.
2026-11-25 11:30:19 +00:00
Drew McLellan 4fa8afe918 feat(studio): support grouped OR filters in unified logs (#53943) 2026-11-25 10:42:36 +00:00
Colum Ferry a1616e0076 docs(cli): supabase init creates config.jsonc for new projects (#53857)
## Problem

Since CLI 3.4.0 (released 2026-11-24), `supabase init` creates
`supabase/config.jsonc` for new projects instead of
`supabase/config.toml`. The file starts with a `$schema` key, so editors
get validation and autocomplete straight away. Projects that already
have a `config.toml` aren't touched, and the CLI keeps reading it the
same way.

A handful of guides still say `init` creates `config.toml`.

## Solution

- `cli/config-formats.mdx`: the file table marks `config.jsonc` as the
one `init` creates in CLI 3.4.0 and later, and the "Minimum CLI version"
section says earlier versions create `config.toml`. Under the table
there's a short line saying a `config.toml` project keeps working, and
pointing at `supabase config convert --to toml` for anyone who wants
TOML. The schema section says `init` writes the `$schema` key into
`config.jsonc`, rather than the TOML `#:schema` line.
- `cli/getting-started.mdx`: the setup admonition and the `supabase
init` step name `config.jsonc`, and the step mentions `config convert
--to toml` with a link to Config file formats.
- `managing-config.mdx`, `cli-workflows.mdx` (step 1 and the key
commands table) and `running-multiple-local-projects.mdx` (the
`SUPABASE_EXPERIMENTAL_STACK=1 supabase init` bit) had the same "init
creates `config.toml`" statement, so I've updated those too.

I've left the many "edit `supabase/config.toml`" references across the
other guides alone - they're about where a setting lives rather than
what `init` creates, and the per-format config examples cover them.

## Review instructions

1. Open Config file formats, CLI getting started, Managing config and
Local development workflow on the preview.
2. Check they say `supabase init` creates `config.jsonc` (CLI 3.4.0 and
later), and that `config.toml` projects are described as still working.
3. Check the `--to toml` links land on the "Convert back to TOML"
section.

## 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-11-25 10:38:11 +00:00
kemal.earthandGildas Garcia 8597e7dc5a feat(studio): oauth apps form update (#53893)
## Problem

The Authorization section of the OAuth app publish form was two toggles,
each with its own inline warning box and its own "I understand this is
permanent" checkbox, plus a static info box describing what users would
see. Two problems with that:

- The settings are a one-way door, so the permanence warning appeared
twice and was easy to click past.
- Nothing showed what the two settings combine into, or what the person
connecting the app actually ends up seeing.

## Solution

UI only — the saved fields (`grant_kind`, `project_scoping_mode`) and
the save logic are unchanged, and `allow_partial_grants` is untouched.

- **Two radio groups** in place of the toggles: "Who approves access?"
(an owner, once for the org / each member, for themselves) and "Which
projects can it reach?" (all projects / let them choose). Built on
`RadioGroupStacked`, grouped with `fieldset`/`legend`.
- **One-way door made visible**: the saved option carries a `Current`
badge, the stricter options carry `Permanent`, and once a stricter value
is saved the looser option is disabled and badged `Can't switch back`.
- **Live preview** replaces the info box: a dimmed, cropped view of the
real consent screen, reusing `ScopeGroupCard` and the interstitial's
width, so it reflects the app's actual scopes and updates as the radios
change. A footer row states the resulting grant, and what it is today
when there are unsaved changes.
- **One confirmation, at save time**: both inline warnings and their
checkboxes are gone. Saving a stricter value opens a `ConfirmationModal`
listing only what changed, with a single acknowledgement checkbox gating
"Save permanently".

Unit tests cover the badge/locking states and the preview; the dialog's
bullets and acknowledgement gate have their own tests.

## Review instructions

1. Enable the `enableScopedOAuthPublish` flag and open **Organization
settings → OAuth Apps**.
2. Publish a new app. Both questions should default to the looser option
with no `Current` badges, and the stricter options should show
`Permanent`.
3. Change each radio and watch the preview and the "Resulting grant"
line update — switching "Which projects can it reach?" should swap the
fixed projects row for the picker.
4. Save with a stricter value selected. Confirm the dialog lists only
the changes you made, and that "Save permanently" stays disabled until
the checkbox is ticked.
5. Reopen the app. The saved values should show `Current`, and the
looser options should be disabled and badged `Can't switch back`.
6. Edit an app without touching authorization and save — no dialog
should appear.

---------

Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com>
2026-11-25 10:24:54 +00:00
supabase-vercel-tedd[bot] 3272305eb6 chore(deps): bump postcss-selector-parser to 7.2.1 (#54012)
## Problem

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

## Solution

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

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

## How to verify

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

## Checks

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

## Checklist

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

## Feedback for Tedd

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

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-25 11:20:23 +01:00
K-Dog (Kevin) 0fa521d64a chore: small nano compute docs improvements (#54005)
Make it a bit clearer that Nano instances are for Free Plan and not free
in itself
2026-11-25 16:25:37 +08:00
Alaister YoungandAlaister Young b2cd26e054 chore(ui-patterns): remove trivial and unused next imports (#53903)
Removes unused and straightforward `next` imports in
`packages/ui-patterns` (and a dead `next/navigation` test mock in
`packages/ui`) that do not require a framework adapter.

**Removed:**

- Unused `LW15Banner`, `AnnouncementBanner`, `Announcement`, and
`PromoToast` components and their `package.json` exports
- Unused `HIDE_PROMO_TOAST` local storage key (only `PromoToast` read
it)
- Unused `next/navigation` mock from `packages/ui/vitest.setup.ts`

**Changed:**

- `PrivacySettings`: replace external `next/link` anchors with plain
`<a>` tags
- `Markdown/components` & `SqlToRest`: replace `next/dynamic` with
`React.lazy` + `Suspense` (plus a client-mount guard in `SqlToRest` to
preserve `{ ssr: false }`)
- `McpUrlBuilder` (`McpConfigurationDisplay` & `InstructionBlocks`):
replace `next/image` with plain `<img>` for static bundled
icons/screenshots. Both now share `normalizeAssetUrl` from
`mcpIconAssets.ts`, and the screenshot is lazy-loaded
- `types/assets.d.ts`: type `*.png` / `*.svg` imports as `string | {
src: string }` instead of `import('next/image').StaticImageData` (Vite
returns a string, Next returns an object, and consumers only read `src`)

## To test

- Run `packages/ui-patterns` and `packages/ui` unit tests and typecheck
- Open the MCP connect panel in Studio / Docs and confirm client icons
and setup screenshots render
- Open Privacy Settings modal in WWW / Docs and verify links open
properly
- Check SQL-to-REST translator page in Docs renders client-side

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-11-25 13:14:44 +08:00
supabase-vercel-tedd[bot] 36e370aa5c docs(ai): explain how hnsw.ef_search caps HNSW results and how to set it (#53997)
## Problem

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

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

## Solution

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

## How to verify

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

## Checks

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

## Checklist

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

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[DOCS-1800](https://linear.app/supabase/issue/DOCS-1800/explain-that-hnswef-search-caps-hnsw-results-and-how-to-set-it).
Tedd doesn't read comments on this PR.

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-24 20:02:50 -07:00
supabase-vercel-tedd[bot] 528e2d0a98 docs(self-hosting): explain how Edge Functions workers are reused across requests (#53996)
## Problem

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

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

## Solution

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

## How to verify

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

## Checks

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

## Checklist

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

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[DOCS-1799](https://linear.app/supabase/issue/DOCS-1799/explain-how-self-hosted-edge-functions-reuse-workers-across-requests).
Tedd doesn't read comments on this PR.

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-24 20:02:44 -07:00
supabase-vercel-tedd[bot] 74cb5aa97a docs(rls): warn that an auth.uid() is null branch exposes every row (#53995)
## Problem

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

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

## Solution

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

## How to verify

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

## Checks

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

## Checklist

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

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[DOCS-1798](https://linear.app/supabase/issue/DOCS-1798/warn-that-an-authuid-is-null-or-policy-condition-exposes-every-row).
Tedd doesn't read comments on this PR.

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-24 20:02:38 -07:00
supabase-vercel-tedd[bot] 13d1f13107 docs(platform): explain what a custom domain is for and that it must be a subdomain (#53993)
## Problem

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

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

## Solution

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

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

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

## Checks

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

## Checklist

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[DOCS-1797](https://linear.app/supabase/issue/DOCS-1797/explain-that-a-custom-domain-replaces-the-project-api-url-and-must-be).
Tedd doesn't read comments on this PR.

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-24 20:02:32 -07:00
supabase-vercel-tedd[bot] caf7baaf08 docs(auth): show RLS policies that match the Firebase user ID (#53992)
## Problem

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

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

## Solution

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

## How to verify

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

## Checks

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

## Checklist

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

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[DOCS-1796](https://linear.app/supabase/issue/DOCS-1796/show-how-to-write-rls-policies-that-match-the-firebase-user-id).
Tedd doesn't read comments on this PR.

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-24 20:02:27 -07:00
supabase-vercel-tedd[bot] c9a093fa81 docs(auth): show the hashed nonce in the Google pre-built HTML example (#53991)
## Problem

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

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

## Solution

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

## How to verify

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

## Checks

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

## Checklist

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

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[DOCS-1795](https://linear.app/supabase/issue/DOCS-1795/show-where-the-hashed-nonce-goes-in-the-google-pre-built-html-example).
Tedd doesn't read comments on this PR.

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-24 20:02:21 -07:00
Zsolt PazmandyandAlexis Aguilar b7c1555d94 chore: fix order of names in humans.txt (#53982)
- fix order of names in humans.txt

Co-authored-by: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com>
2026-11-25 02:02:04 +00:00
Pamela Chia f1905195a6 fix(ui-patterns): stop sending command menu search telemetry with an empty query (#53937) 2026-11-25 09:32:19 +08:00
JerryandNik Richers 24727bd0bf fix(docs): cast the SSO provider claim to uuid in the RLS policy (#53846)
## Problem

Fixes #53845.

The SAML SSO guide's `organization_settings` RLS example has several
problems.

- It compares `sso_provider_id` (`uuid`) to
`auth.jwt()#>>'{amr,0,provider}'` (`text`), so creating the policy fails
with `operator does not exist: uuid = text`.
- It reads `amr[0]`. After an MFA step, `amr[0]` can be the MFA entry,
which has no `provider`, so the expression returns null and the policy
rejects the matching row.
- It never enables RLS and shows only a restrictive policy, which does
not grant access on its own.

## Solution

Make the example self-contained:

- Enable RLS on the table.
- Add a permissive `SELECT` policy for authenticated users.
- Keep a restrictive policy that finds the `sso/saml` entry in `amr`,
reads its `provider`, and casts it to `uuid`.
- Update the `auth.jwt()` provider reference in the same section to
point to this lookup.

This keeps the comparison as `uuid = uuid` and does not assume the SSO
entry is first. This changes one example and the related `auth.jwt()`
reference in one `.mdx` file.

## Verification

Tested against `supabase/postgres:17.6.1.143` with the real `auth.jwt()`
definition.

Before, creating the policy fails:

```
using ( sso_provider_id = (select auth.jwt()#>>'{amr,0,provider}') );
ERROR:  operator does not exist: uuid = text
```

After, the policy creates. With the MFA entry first (`amr` has `totp`,
then `sso/saml`), the MFA-first SSO user sees only their organization's
row. With the SSO entry first, the same user sees the same row. A user
without an SSO entry sees no rows. Prettier passes on the file.

## Review instructions

1. Open
`apps/docs/content/guides/auth/enterprise-sso/auth-sso-saml.mdx`.
2. Confirm the table enables RLS, the example has a permissive `SELECT`
policy and a restrictive provider policy, the provider lookup finds the
`sso/saml` entry and casts it to `uuid`, and the `auth.jwt()` reference
points to that lookup.
3. Run the example against a project or local database, including a user
with an MFA entry before the SSO entry. The user should see only their
organization's row.

## Checklist

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)

I used AI to help debug and verify this, but I reviewed the change and
am submitting the PR myself.

---------

Co-authored-by: Nik Richers <nrichers@gmail.com>
2026-11-24 17:54:16 -07:00
Shardul Borhadeandhallidayo 1006f3590c docs(billing): document the $300 minimum for credit top-ups (#53260)
## Problem

The [Credits](https://supabase.com/docs/guides/platform/credits) page
lists only the $2,000 maximum per credit top-up.

The Dashboard also enforces a $300 minimum ("Amount must be between $300
- $2000"), which isn't documented, and customers have asked about it in
support tickets.

## Solution

Add the $300 minimum to the first sentence of the "Credit top-ups"
section, using the same `<Price>` component as the existing maximum and
No other content changes.

<img width="1004" height="238" alt="Topup-dialog"
src="https://github.com/user-attachments/assets/de3f84db-4a35-43d2-923b-0957b75dfa9d"
/>


## Preview links

| Site | Live | Preview | Search for |
| ---- | ---- | ------- | ---------- |
| Docs |
[/docs/guides/platform/credits](https://supabase.com/docs/guides/platform/credits)
|
[/docs/guides/platform/credits](https://docs-git-docs-credit-top-up-minimum-supabase.vercel.app/docs/guides/platform/credits)
| with a minimum of |


## Review instructions

1. Open the live and preview links side by side.
2. In "Credit top-ups", check that the first sentence now gives both the
$300 minimum and the $2,000 maximum, and that both amounts render
correctly.
3. Optionally, open Organization → Billing → Credit Balance → Top Up in
the Dashboard and enter an amount below $300 to see the validation
message.

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)

Co-authored-by: hallidayo <22655069+Hallidayo@users.noreply.github.com>
2026-11-24 17:53:14 -07:00
Danny Kulchinsky 4ea006e7a1 add Danny Kulchinsky to humans.txt (#53984)
adding myself to humans.txt
2026-11-24 19:29:42 -05:00
Danny White f6dede6c37 feat(studio): make OAuth permission changes easier to scan (#53700)
## Problem

When a returning app changes its permissions, the consent screen mixes
old and new access levels in a list of parenthetical labels.

## Solution

Show added, removed and unchanged permissions in their access groups. A
level change appears in both the old and new groups. Green comes from
the success token so it stays green across accent settings.

| Before | After |
| --- | --- |
| <img width="868" height="2164" alt="CleanShot 2026-11-20 at 12 40
23@2x"
src="https://github.com/user-attachments/assets/74e8462c-60eb-44c5-be25-7e683083be8d"
/> | <img width="866" height="1986" alt="CleanShot 2026-11-20 at 12 38
47@2x"
src="https://github.com/user-attachments/assets/a739e619-8fc7-4a91-9a28-4b3c176b882b"
/> |

## Review instructions

1. **Before:** Open the [Scoped OAuth
tester](https://api.supabase.green/v1/oauth/authorize?response_type=code&client_id=a3999bfe-cfc7-4584-9c5a-ab6828d35aa3&redirect_uri=http%3A%2F%2Flocalhost%3A8765%2Foauth%2Fcallback)
and leave consent open.
2. **After:** Open the [deploy preview consent
screen](https://studio-staging-git-dnywh-oauth-permission-diff-supabase.vercel.app/dashboard/authorize?auth_id=606dbb8e-60ea-4155-bb36-70a7d31378dd).

**What to check**

1. Open Chrome DevTools → **Network** → **Fetch/XHR**, filter by the
`auth_id` in the consent URL, and reload. Right-click each of these two
**GET** requests and select **Override content**. Choose a local
Overrides folder if Chrome prompts you.
- `/api/platform/oauth/authorizations/<auth_id>` is the new request. Set
its top-level `scopes` to
`["database:read","database:write","projects:read","storage:read"]`.
-
`/api/platform/organizations/<org-slug>/oauth/authorizations/<auth_id>/preflight`
is the existing grant check. In that response, replace
`"existing_grant": null` with this field and leave the rest of the
response intact.

     ```json
     "existing_grant": {
       "grant_id": "00000000-0000-4000-8000-000000000001",
"approved_scopes": ["database:read", "projects:read", "secrets:read"],
       "project_refs": null,
       "approved_at": "2026-11-19T00:00:00.000Z"
     },
     ```

2. Keep the other fields as returned. Save both overrides and reload
with DevTools open.
3. Check that Database management is removed from **Read only** and
added to **Read and write**, Projects is unchanged, Storage is added,
and Secrets is struck through. Clear the overrides when done.
2026-11-25 10:55:08 +11:00
Miranda Limonczenko e44837c256 feat(docs): point every docs page at llms.txt in HTML and markdown (#53965)
Closes DOCS-1756

## Problem

No docs page tells an agent that `llms.txt` exists or that a markdown
version is available. Agents that send `Accept: text/markdown` already
get markdown, but agents that fetch HTML have no signal to try the
markdown path.


## Solution

- **HTML:** add a visually hidden directive as the first child of
`<body>` in the root layout, so it comes before the navigation on every
guide and reference page. It links to
`https://supabase.com/docs/llms.txt` and says guide pages have a
markdown version at the same path with `.md` appended, before any query
string or fragment. It's `sr-only` and `aria-hidden`, and the link has
`tabindex="-1"`.
- **Crawler HTML:** bot requests for SDK reference pages are rewritten
to `/api/crawlers`, which skips the root layout. The same directive goes
before its `<nav>`.
- **Markdown:** add a sentence linking `llms.txt` to the "Note for AI
agents" blockquote in the guides markdown route. The agent feedback page
skips the feedback text to avoid linking to itself, but it keeps the
`llms.txt` line.
- Add `LLMS_TXT_URL` and `LLMS_TXT_DIRECTIVE_HTML` to
`common/markdown-affordance`, and reuse `LLMS_TXT_URL` in `proxy.ts`.

The directive limits the `.md` claim to guides, because reference `.md`
requests 404. It doesn't say `llms.txt` lists every page.

The link targets `/docs/llms.txt`, the docs index that AFDocs scores for
the `/docs` base URL. #53968 makes it a real file. Until that merges,
`/docs/llms.txt` 308-redirects to the site-wide `/llms.txt`, so the link
works in either merge order.

## Manual testing

1. Open a Vercel preview guide page and view source. Confirm the
`llms.txt` directive comes before the navigation markup.
2. Open a reference page and confirm the same.
3. Confirm the directive isn't visible and isn't tabbable.
4. Request a reference section page with a bot user agent, such as `curl
-A Googlebot`, and confirm the directive comes before `<nav>`.
5. Request a guide with `.md` appended and confirm the opening
blockquote links `llms.txt`.
6. Request `/docs/guides/ai-tools/agent-feedback.md` and confirm the
opening blockquote links `llms.txt`.
7. Run AFDocs against the preview and confirm `llms-txt-directive-html`
and `llms-txt-directive-md` pass.
2026-11-24 15:02:23 -08:00
soreavisandNik Richers 8f76606683 docs(kotlin): fix outdated API names and ack wording in guides (#53282)
## Problem

Some Kotlin snippets in the guides use names supabase-kt renamed in 2.0,
so they don't compile with current supabase-kt (3.9.0). The Apple
sign-in page also asks for `gotrue-kt`, which has no 3.x release (3.0.0
replaced it with `auth-kt`). And the Kotlin tab of "Acknowledge
messages" in the Broadcast guide says `acknowledgeBroadcasts` sends
messages back to the sender, which is what `receiveOwnBroadcasts` does.

Closes #53281

## Solution

- `passwords.mdx`: `supabase.gotrue.sendRecoveryEmail` →
`supabase.auth.resetPasswordForEmail` in the PKCE flow, the same rename
#33564 made in the Implicit flow copy.
- `auth-apple.mdx`: `gotrue.signInWith(Apple)` →
`auth.signInWith(Apple)`, `install(GoTrue)` → `install(Auth)`,
`gotrue-kt` → `auth-kt`.
- `postgres-changes.mdx`: `realtime.createChannel` → `channel`, and
`connect()` + `join()` → `subscribe()`, which connects on its own. That
matches the other Kotlin snippets on the page. `connect()` still exists,
it just isn't needed here.
- `broadcast.mdx`: the Kotlin ack tab now says the servers acknowledge
each message, and that on a subscribed channel `broadcast()` doesn't
wait for or return the acknowledgment. `acknowledgeBroadcasts`
serializes to `ack` in `RealtimeJoinPayload.kt`, while `broadcast()`
returns `Unit` and the server's reply is only logged.

The renames come from supabase-kt's MIGRATION.md, and I checked each new
name against the 3.9.0 source and the Kotlin reference. `/test-the-docs`
doesn't run `kotlin` fences, so nothing was executed.

The compose-auth snippet on the Apple page has three more compile errors
that aren't renames: `result.error` (`NetworkError` only has `message`),
`scope`, which is never declared, and `fullName` on `SignInResultData`,
which only exposes `credential` on Apple targets. I left those out and
can send them separately.

## Review instructions

1. Open the Kotlin tab of each changed snippet on the preview: passwords
(PKCE flow, step 3), Apple sign-in, Postgres Changes `neq` filter,
Broadcast "Acknowledge messages".
2. Compare the names with the 2.0 and 3.0 sections of supabase-kt's
MIGRATION.md and with the Kotlin reference for `resetPasswordForEmail`,
`subscribe` and installing.

## 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: Nik Richers <nrichers@gmail.com>
2026-11-24 22:24:01 +00:00
JerryandNik Richers 3389756a4c fix(docs): correct the JWT team policy example (#53777)
## Problem

Fixes #53776

We hit this while adding team-scoped RLS to a project from the guide.
Creating the policy fails with:

```text
ERROR:  operator does not exist: uuid = jsonb
```

The example uses `team_id in (select auth.jwt() -> 'app_metadata' ->
'teams')`. `->` returns a single `jsonb` value, so `in (select ...)`
compares `team_id` to that jsonb value.

## Solution

Expand the claim with `jsonb_array_elements_text`, cast each team ID to
`uuid`, and compare it with `= any (array(...))`:

```sql
using (
  team_id = any (
    array(
      select (jsonb_array_elements_text((select auth.jwt()) -> 'app_metadata' -> 'teams'))::uuid
    )
  )
);
```

`app_metadata.teams` must be an array of UUID strings, for example
`{"app_metadata": {"teams": ["22222222-2222-2222-2222-222222222222"]}}`.
Objects such as `[{"id": "..."}]` fail the cast.

Comparing UUID to UUID means uppercase values in the claim still match
and Postgres can use an index on `team_id`. The guide and the AI prompt
in `examples/prompts/database-rls-policies.md` both document the
expected claim shape and that `team_id` is a `uuid`; for other ID types,
cast the array element to that type instead.

## Review instructions

1. Open the `auth.jwt()` section of the [RLS
guide](https://supabase.com/docs/guides/database/postgres/row-level-security#auth-jwt).
2. Run the updated `create policy` statement against Postgres. It should
create without error.
3. Check that a user whose `app_metadata.teams` is an array of UUID
strings containing the row's `team_id` sees the row, including when the
claim uses an uppercase UUID, and that a user without it does not.

I checked these steps on Postgres 14.

## Checklist

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)

I used AI to help debug this. The fix and this pull request are mine; I
reviewed the change before opening it.

---------

Co-authored-by: Nik Richers <nrichers@gmail.com>
2026-11-24 22:20:38 +00:00