Commit Graph
22209 Commits
Author SHA1 Message Date
Charis 7ce15123ab feat(studio): grant infra for production and development branch variants (#52372)
Part 1 of 7 in a stack that splits #52331 into reviewable pieces.
Resolves part of
[FE-4693](https://linear.app/supabase/issue/FE-4693/pilot-migrate-branches-to-grants-8-endpoints-createbranchmodal).
There are no functional changes beyond #52331, and the top of the stack
is identical to it. See #52331 for the full rationale.

## Stack
1. 👉 #52372 Grant infra for branch variants
2. #52373 Branches list query
3. #52374 Page gates on the list grant
4. #52375 Branch creation
5. #52376 Branch read, delete, reset, and restore
6. #52377 Branch update and push
7. #52378 Branch diff and merge

## Changes
Adds `lib/fga-refinements.ts` entries: `production`/`development`
variants for the 8 single-branch endpoints, with a new `variantRequired`
flag. The fetch wrapper and `assertGrant` reject a grant without a
variant. Also adds the `production` variant for `POST
/v1/projects/{ref}/branches` when the body sets `is_default` or
`with_data`. Adds `GrantForVariants`, the `useBranchGrant` hook, and
shared fixtures in `tests/lib/branch-test-utils.ts`. Behavior-neutral:
existing branch calls still use `unguarded.migrating`, which skips these
checks.

## Testing
`guarded-fetch.test.ts` and `useBranchGrant.test.ts`.
2026-10-27 10:48:24 -04:00
Kody JacksonandClaude Haiku 5.5 e646c430d7 refactor(docs) - tidy Mgmt API heading props (#52392)
## What changed

Follow-up to #52340, addressing the review comments left after it
merged:

- Removed the redundant `headingTag="h2"` on the Management API intro
section. `h2` is the default, and the intro header is hidden on pages
with `hideTitle`.
- Exported a `HeadingTag` type from `Reference.ui.tsx` and used it in
the section prop types.
- Renamed the `headingTag` prop to `tag` to match the `tag` prop on the
shared `Heading` component.

Manually poked around at pages like the following and behavior seems to
be the same:
-
https://docs-git-kody-docs-mgmt-api-heading-cleanup-supabase.vercel.app/docs/reference/cli/global-flags
-
https://docs-git-kody-docs-mgmt-api-heading-cleanup-supabase.vercel.app/docs/reference/javascript/typescript-support

https://docs-git-kody-docs-mgmt-api-heading-cleanup-supabase.vercel.app/docs/reference/api/v1-get-security-advisors

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-27 09:12:02 -05:00
Mert YEREKAPANandkodster28 266372acbe feat(kb): add guides on connecting to Supabase Postgres (#51345)
## Summary

Adds 6 question-and-answer guides to the knowledge base about connecting
to Supabase Postgres: serverless functions, connection limits, database
tools, ORMs, network access, and AI agents. Each guide answers one
question: the description is the short answer, and the body adds the
details and links into the docs.

Ref: GROWTH-1191

## Guides

- How do I connect to Postgres from serverless and edge functions?
- How many connections can a Supabase Postgres database handle?
- How do I connect a database GUI or BI tool to Supabase Postgres?
- How do I restrict who can connect to my Supabase Postgres database?
- Can I use Supabase with Drizzle or Prisma without supabase-js?
- How can an AI coding agent create and manage a Postgres database?

## Notes

- Links to the docs and the dashboard use absolute
`https://supabase.com/...` URLs, so they also work on previews.
- Some guides link to guides added in #51346, #51343. Those links
resolve once those PRs are merged.
- Related guides proposed in #50472, in case you'd rather merge or drop
any of these: `too-many-connections-for-database-postgres`,
`how-to-change-max-database-connections-_BQ8P5`, `supavisor-faq-YyP5tI`,
`troubleshooting-connect_timeout-or-hanging-queries-in-vercel-serverless-functions-775f92`.

---------

Co-authored-by: kodster28 <kody.jackson@supabase.io>
2026-10-27 09:03:30 -05:00
Anthony Lio a9f56b3c4a feat(ui): mobile nav drawer (#52177)
## Problem

on mobile docs pages with a sidebar have two menu buttons: the burger
opens the global menu, and a second bar opens the sidebar while kb has
its own full-screen accordion menu making two apps sharing no mobile nav
code

## Solution

- adds `MobileNavDrawer`, `MobileNavTabs` and `MobileNavThemeButton` to
`packages/ui-patterns/src/MobileNav`
- makes docs and kb use the same three parts
- adds a full-width drawer in `MobileNavDrawer` under `--header-height`.
It sets `inert` while it is closed
- adds a tab row in `MobileNavTabs`, with a dropdown below `@xl` to
avoid multiple tab lines
- adds a theme button in `MobileNavThemeButton`. Each tap moves to the
next theme in `singleThemes`
- shows the group tabs, the theme button and the links of the selected
group above the sidebar

| before | after |
| -------|------|
| <img width="619" height="802" alt="image"
src="https://github.com/user-attachments/assets/09d441c6-b4f3-4768-bb29-1e1d4f23fad1"
/> | <img width="619" height="802" alt="image"
src="https://github.com/user-attachments/assets/53043083-f05f-45aa-b30e-3db6fccdd443"
/> |

<!--
## Preview links

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

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

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

<!-- ## Additional context

Optionally add any other context or screenshots.

-->

## Review instructions

Provide a clear numbered procedure that the PR reviewer can walk
through.

1. For example, `Open the live and preview links side-by-side.`
2. For example, `See the issue is fixed.`

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-10-27 15:57:29 +02:00
Jeremias Menichelli 94e0e1e7d2 chore: Move ingest to new table while pointing the search_v2 fn to the experiment one (#52370)
## Problem

Currently we experience a lot of empty results responses from our new
search_v2 experiment.

We are improving our search logic on our frontend plus our search
functions in the backend ot fix this.

## Solution

Improve our search setup to follow this path:
1. Same as before, strict full text search.
1. If that returns zero results, we do prefixes via wild cards, ie:
"edge fun" becomes "edge fun|*" so people don't have to type the full
term.
1. If that returns zero results, then we run the terms under OR, which
will give partial results for individual terms.
1. If that returns zero results then we are most probably under a
typo/misspelling scenario, then we use `pg_trgm` extension with a `0.4`
tier to return the closest bit, which is good cause it covers missing
first letters like "dge functions" too.

We will do this migration in three steps to not disrupt current users
under the experiments, I will be posting the PRs here:

1. First, we will create a new search_v2 table on `supabase.com [LIVE]`
project where production parts of our monorepo go + already implement
the improvements I just mentioned.
1. Re-route the ingest script to populate once per day the database
table in this new project. At this point we will have the data and the
search function ready. 👈 **this PR is here**
1. Update the API search_v2 function to query from this new project, so
users will experience no down time.

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

_Make sure ingest runs correctly after merge._

## 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-10-27 14:56:35 +01:00
5d52b00f70 feat(studio): combine function invocations and logs (#50957)
With the unified logs preview on, an edge function's Logs tab renders
the unified logs view scoped to that function (#50954), with its
invocations and runtime output in one list. That replaces the separate
Invocations and Logs tabs.

- `UnifiedLogs` takes a `scope` plus view props: `hasFilterSideBar`,
`offeredFilters` and `columnPreferencesKey`. The function Logs tab turns
the sidebar off, which also drops the filters-toggle shortcut, and saves
its columns and panel layout separately from the Logs page.
- `getEdgeFunctionLogsScope` and `EDGE_FUNCTION_LOGS_VIEW` are the edge
function preset: the scope's fixed filters, the filters the tab offers
and its saved-columns key. It offers date, log type, level and message,
so no user filter, since no function row has a user.
- The Invocations tab and its shortcut are hidden. Old Invocations links
redirect to Logs, converting `its`/`ite`/`log` to `date`/`id`.
- `getEdgeFunctionLogsUrl` builds links into the scoped tab with the
shared params serializer from #50953, and clicking a bar on the
invocations chart uses it.

With the preview off, both tabs work as on master.

### How to test

1. Turn on the unified logs preview and open an edge function's Logs
tab. You should see only that function's invocations and runtime logs,
with the filter bar limited to date, log type, level and message.
2. Filter to Edge Function runtime, then to errors, and check counts and
the chart follow.
3. Open an old `/functions/<slug>/invocations?its=…&ite=…&log=…` link.
It lands on Logs with the same range and log selected.
4. Click a bar on the Overview invocations chart. The Logs tab opens on
that bucket.

### Validation

- URL helper, offered filter and preset tests, plus the scoped query
tests from #50954.
- Studio typecheck, lint ratchet, Prettier and knip pass on this layer.

### Stack

Merge in order:

1. #50953 — reusable logs table building blocks
2. #50954 — function-scoped unified logs queries
3. #50955 — slimmer function detail layout, header on Overview
4. #50957 — Invocations merged into a function-scoped Logs tab
5. #50958 — Overview errors in the shared logs table
6. #52281 — remove the legacy Overview

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Jordi Enric <jordi.err@gmail.com>
2026-10-27 14:54:56 +01:00
Lukas BernertandClaude Fable 5 de32f3130b fix(studio): show compute size labels on infrastructure surfaces (#52170)
## Problem

We don't want to mention raw AWS instance type names. Instead only
display the actual instance size name (e.g. "Small", "Medium", ...).

Fixes PROD-673

## Solution

Add a `getComputeSizeLabel` helper (`apps/studio/lib/compute-labels.ts`)
that maps `infra_compute_size` to its display label (`medium` →
"Medium", `2xlarge` → "2XL", …) and returns `undefined` for unknown
values so callers render nothing instead of a raw value.

Studio elements changed:

- Read replica details: "Compute Size" field
(`/project/<project_id>/settings/infrastructure/replica/<replica_id>`)
- Infrastructure diagram: primary and replica node cards
(`generateNodes` now receives the label; replicas always match the
primary's compute size) (`/project/_/settings/infrastructure`)
- Map view: "AWS • {size}" line in the region popup
(`/project/<project_id>`)
- HA pooler node cards (`useHaPoolerCard`)

Also removes the `size` field from the create-replica request (API
ignores it).

Unit tests cover the new helper, including the unknown-value case. The
existing `project_homepage:show_instance_size` feature flag keeps gating
the label as before.

## Review instructions

1. Open a project's Infrastructure settings page
(`/project/_/settings/infrastructure`).
2. Check the diagram node cards and (for projects with replicas) the map
view popup: compute shows as "Small"/"Medium"-style labels matching the
project's compute badge.
3. Open a read replica's details page: the "Compute Size" field shows
the same label.
4. Open the add-replica dialog and submit: the request body contains
only `read_replica_region`.

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-10-27 14:47:27 +01:00
Mert YEREKAPANandkodster28 78eb845aa2 feat(kb): add guides on database-only use, pausing, pricing, and scaling (#51343)
## Summary

Adds 6 question-and-answer guides to the knowledge base about using
Supabase as a standalone Postgres database, Free plan pausing, pricing,
scaling, and self-hosting. Each guide answers one question: the
description is the short answer, and the body adds the details and links
into the docs.

Ref: GROWTH-1191

## Guides

- Can I use Supabase as just a Postgres database?
- Do Supabase projects pause when they're inactive?
- How much does a single database-only Supabase project cost?
- Is there a free hosted Postgres database I can use for a side project?
- How do I scale a Supabase Postgres database?
- Can I self-host Supabase?

## Notes

- Links to the docs and the dashboard use absolute
`https://supabase.com/...` URLs, so they also work on previews.
- Some guides link to guides added in #51345, #51346. Those links
resolve once those PRs are merged.
- Related guides proposed in #50472, in case you'd rather merge or drop
any of these: `pausing-pro-projects-vNL-2a`,
`restore-project-after-90-days-pause`,
`are-all-features-available-in-self-hosted-supabase-THPcqw`.

---------

Co-authored-by: kodster28 <kody.jackson@supabase.io>
2026-10-27 08:40:15 -05:00
Mert YEREKAPANandkodster28 6478d6d858 feat(kb): add guides on connecting frameworks and apps to Postgres (#51347)
## Summary

Adds 8 question-and-answer guides to the knowledge base about connecting
apps to Postgres by framework and app type: Next.js, SvelteKit and
similar frameworks, Python, Rails, Laravel, Spring Boot, single-page
apps, and mobile apps. Each guide answers one question: the description
is the short answer, and the body adds the details and links into the
docs.

Ref: GROWTH-1191

## Guides

- Which Postgres database works for a Next.js app on Vercel?
- How do I connect SvelteKit, Nuxt, Astro, or TanStack Start to
Postgres?
- How do I connect a Python app to hosted Postgres?
- How do I connect a Ruby on Rails app to hosted Postgres?
- How do I connect a Laravel app to hosted Postgres?
- How do I connect a Spring Boot app to hosted Postgres?
- How do I query Postgres from a frontend app without a backend?
- Which database should I use for a mobile app?

## Notes

- Links to the docs and the dashboard use absolute
`https://supabase.com/...` URLs, so they also work on previews.
- Some guides link to guides added in #51345, #51346, #51348. Those
links resolve once those PRs are merged.

---------

Co-authored-by: kodster28 <kody.jackson@supabase.io>
2026-10-27 08:39:57 -05:00
Kody JacksonandClaude Haiku 5.5 2f59892ac6 fix(docs) - Mgmt API functions as h1 instead of h2 (#52340)
## Problem

Current Mgmt API docs have no h1's, which is bad for AEO/SEO.

## Solution

Updates the headingTag component to accept optional h1 input value +
removed dupe header from top-level mgmt api page.

## Preview links

### Current

https://supabase.com/docs/reference/api/v1-get-performance-advisors
<img width="1778" height="947" alt="Screenshot 2026-10-26 at 3 43 02 PM"
src="https://github.com/user-attachments/assets/871aad3c-049d-468c-9672-8bcb58ebe3bc"
/>

### Proposed

[mgmt api
landing](https://docs-git-kody-devrel-769-supabase.vercel.app/docs/reference/api/introduction)
(removed dupe header of `Introduction`)


https://docs-git-kody-devrel-769-supabase.vercel.app/docs/reference/api/v1-get-performance-advisors
<img width="1328" height="795" alt="image"
src="https://github.com/user-attachments/assets/02bedc9e-f131-4e59-b495-ed9c54b98be8"
/>

---------

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-27 08:33:59 -05:00
Alaister YoungandAlaister Young c81d8eab49 fix(studio): build oauth app grant mocks without iterator helpers (#52379)
`data/oauth-apps/mocks.ts` built a mock list with
`Array(50).keys().map(...)`, which needs `Iterator.prototype.map`
(Safari 18.4+, Chrome 122+, Firefox 131+). The array is built when the
module loads, not only when mocks are enabled, and `AccountLayout`
imports `USE_MOCKS` from this module. On older browsers every
`/account/*` page (plus the org OAuth apps page, `/account/apps` and
`/authorize`) crashes into the global error boundary with
`Array(50).keys().map is not a function`.

**Changed:**
- Build the 50 mock grants with `Array.from({ length: 50 }, …)`. Same
data, works everywhere.

This was the only chained iterator-helper call in `apps/` and
`packages/`.

## To test

- On the preview, open `/dashboard/account/me` in Safari 18.3 or earlier
(or any browser without iterator helpers): the page renders instead of
the error screen
- In a current browser, `/dashboard/account/me` and the org OAuth apps
page still render as before

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-10-27 21:33:33 +08:00
Kody Jackson 08504ae26a fix(www) - remove duplicate h1 entries (#52341)
## Problem

Dupe H1 entries across several pages

## Solution

For blogs, remove the `#` or move to `##`.

For others, adjust the templating logic to avoid rendering multiple.

## Preview links

### Design system

[previous](https://supabase.com/design-system/docs)

<img width="1328" height="832" alt="image"
src="https://github.com/user-attachments/assets/95abab7f-acba-4935-83f7-4f980a7379ce"
/>


[new](https://design-system-git-kody-devrel-770-dupe-h1s-supabase.vercel.app/design-system)
<img width="1328" height="795" alt="image"
src="https://github.com/user-attachments/assets/98c3f377-ee47-48bc-b3de-f7677824f1df"
/>

### www


| Area | Page | Before (production) | After (preview) | h1 count before
→ expected after |
|---|---|---|---|---|
| CTA form (Solutions) | AI Builders |
https://supabase.com/solutions/ai-builders |
https://zone-www-dot-com-git-kody-devrel-770-dupe-h1s-supabase.vercel.app/solutions/ai-builders
| 2 → 1 |
| CTA form (Solutions) | Agencies |
https://supabase.com/solutions/agencies |
https://zone-www-dot-com-git-kody-devrel-770-dupe-h1s-supabase.vercel.app/solutions/agencies
| 2 → 1 |
| CTA form (Enterprise) | Enterprise |
https://supabase.com/solutions/enterprise |
https://zone-www-dot-com-git-kody-devrel-770-dupe-h1s-supabase.vercel.app/solutions/enterprise
| 2 → 1 |
| Changelog | Declarative Schema Management (pg-delta) |
https://supabase.com/changelog/44938-public-alpha-declarative-schema-management-with-pg-delta
|
https://zone-www-dot-com-git-kody-devrel-770-dupe-h1s-supabase.vercel.app/changelog/44938-public-alpha-declarative-schema-management-with-pg-delta
| 2 → 1 |
| Changelog | Queue table operations |
https://supabase.com/changelog/42460-queue-table-inserts-edits-and-deletes-on-the-table-editor
|
https://zone-www-dot-com-git-kody-devrel-770-dupe-h1s-supabase.vercel.app/changelog/42460-queue-table-inserts-edits-and-deletes-on-the-table-editor
| 2 → 1 |
| Changelog | Auth asymmetric keys |
https://supabase.com/changelog/29289-supabase-auth-asymmetric-keys-support-in-2025
|
https://zone-www-dot-com-git-kody-devrel-770-dupe-h1s-supabase.vercel.app/changelog/29289-supabase-auth-asymmetric-keys-support-in-2025
| 5 → 1 |
| Company | Company | https://supabase.com/company |
https://zone-www-dot-com-git-kody-devrel-770-dupe-h1s-supabase.vercel.app/company
| 40 → 1 |
2026-10-27 08:32:33 -05:00
Charis 74045a0d61 feat(studio): load v2 permissions alongside v1 in ProfileProvider (#52387)
## What

`ProfileProvider` now loads `/platform/profile/permissions/v2` alongside
the v1 permissions, and includes it in the provider's `isLoading` state.

## Why

Many grant-gated queries can't fire until the v2 permissions resolve.
Previously the v2 request only started once a consumer
(`useAsyncCheckPermissionsV2`, `useGrant`, `ensureGrant`) mounted,
adding a serial round-trip in front of those queries. `ProfileProvider`
sits near the root in both the Next.js (`pages/_app.tsx`) and TanStack
Start (`routes/__root.tsx`) runtimes, so the request now starts in
parallel with the profile and v1 permissions fetches on every page load.

## Notes

- Consumers of `useProfile().isLoading` now also wait for v2
permissions.
- The existing `permissionKeys.list()` invalidation in the
profile-create 409 path prefix-matches the v2 key, so v2 is refetched
there too.

## Testing

- `lib/profile.test.tsx` passes.
2026-10-27 09:30:23 -04:00
Kody Jackson c62f591343 content(kb) - add next.js pointers (#52313)
## Problem

Similar to #52187, but adding in a few FAQs specifically related to
Next.js use cases.

## Preview links

- [Add auth to a next.js
app](https://kb-git-kody-devrel-758-nextjs-pointers-supabase.vercel.app/kb/faqs/nextjs/authentication-nextjs)
- [best auth option for
next.js](https://kb-git-kody-devrel-758-nextjs-pointers-supabase.vercel.app/kb/faqs/nextjs/best-authentication-option-nextjs)
- [tech stack for nextjs
app](https://kb-git-kody-devrel-758-nextjs-pointers-supabase.vercel.app/kb/faqs/nextjs/tech-stack-nextjs)
2026-10-27 08:16:19 -05:00
Alaister YoungandAlaister Young f9e0376951 fix(studio): reload once on chunk load failures (#52380)
When a lazy-loaded JS/CSS chunk fails to load (flaky or mobile
networks), users land on the global error screen and stay there until
they refresh by hand. This reloads the page once instead, in both
runtimes.

A reload is the only reliable recovery: WebKit (Safari and every iOS
browser) caches a failed module fetch in the document's module map, so
every later `import()` of that URL fails instantly until the page is
replaced. TanStack's `lazyRouteComponent` already reloads once for route
chunks, but it keys its guard on the error message, and Safari's message
("Importing a module script failed.") is the same for every chunk and
survives reloads, so after the first time in a tab it never reloads
again. Non-route lazy imports (`next/dynamic`, `React.lazy`, Monaco) had
no recovery at all.

**Added:**
- `lib/chunk-load-error.ts`: `isChunkLoadError` (Chrome, Firefox,
WebKit, webpack `ChunkLoadError` and Vite's CSS preload wording) and a
reload guard
- The guard is time-based (`sessionStorage`, 30s window), not
message-based: a second failure within 30s of a reload shows the normal
error screen instead of looping. It's also capped at 3 automatic reloads
per tab, and the guard is read back after writing it. If storage is
unavailable, or silently drops the write, it never reloads
- Unit tests for every message form, the guard window, the per-tab cap,
and broken, missing or write-dropping storage

**Changed:**
- The global error boundary in `pages/_app.tsx` and `routes/__root.tsx`,
plus TanStack's root `errorComponent`, reload once for chunk-load errors
and render nothing while the reload is in flight. Fallbacks only peek at
the guard during render; the reload is claimed after commit
(`useChunkLoadReload`), so a discarded render can't use up the guard
- Chunk-load errors that a reload recovers from are no longer reported
to Sentry. One that recurs within the guard window (the user actually
saw the error screen) is reported, tagged `chunkLoadError: true`

No `vite:preloadError` listener: it also fires for hover/intent route
preloads, so reloading on it would refresh the page under someone who
only hovered a link.

## To test

- On the preview, open DevTools → Network, block one route chunk URL
(e.g. the SQL editor's), then navigate to it: the page reloads once and
recovers (unblock after the reload), with no error screen flash
- Keep the chunk blocked: after the one reload you get the normal error
screen, not a reload loop
- Repeat after 30s+ in the same tab: it reloads again
- Sentry: the recovered reload sends no event; the persistent failure
sends one tagged `chunkLoadError`
- Normal navigation and genuine non-chunk errors behave as before

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-10-27 20:50:25 +08:00
080b888e6b feat(studio): slim edge function detail layout and move header to Overview (#50955)
The edge function detail layout is now breadcrumbs plus tabs
(`PageNav`), without the page header, so tabs like Logs and Code get the
full height below the tabs. The function name, invoke URL and last
deploy details move into a header on the Overview tab, which also holds
the chart period selector. Both the new and legacy Overview render it,
and both now default to a 1 hour period instead of 15 minutes.

The Overview sections (invocations, errors, performance and usage) now
sit in one default-width `PageContainer` instead of each nesting a
full-width one, and the invocations chart moves into a chart card.
Invocations has no section heading, since it's the headline metric right
below the page header.

Both overview versions use the same chart periods. Sparse chart data is
filled only between returned API buckets, avoiding synthetic zeros
outside the reported range. Chart navigation uses the full rolling
period, including a full day for the 1 day option.

The selector shows a checkmark for the selected period, and the header
announces loaded details. Self-hosted Studio retains a Copy URL action
in the detail toolbar because it has no Overview tab.

This layer doesn't depend on the logs changes below it.

**Heads-up:** the header now only appears on Overview. Code, Details,
Invocations and Logs show breadcrumbs and tabs only. This change isn't
behind a flag.

### How to test

1. Open an edge function's Overview. The header shows the name, URL
(with copy) and last deploy hover card, and the period selector sits in
the header with 1 hour selected.
2. Switch through the other tabs. Breadcrumbs and tabs stay sticky, and
there's no header.
3. With the `edgeFunctionsOverview` flag off, the legacy Overview
renders with the same header.

### Validation

- 104 focused tests pass with retries disabled and shuffled order (seed
50968). New tests cover both overview versions, period changes, empty
results, header loading and copying, and self-hosted URL copying. Test
names describe observable behavior.
- 12 targeted regression mutations were detected and restored; the
selected-indicator mutation was repeated after the visual alignment fix.
- Browser QA on the staging preview for `3d055c0dc4` covers the header
and deploy details, copied URL, period changes, all detail tabs, sticky
navigation, the legacy overview, and empty results. Temporary local flag
overrides were removed. The final test-only commit `5af6a2896b` has
identical production code; its matching preview also passed header,
URL-copy, period-switching, and Settings smoke checks.
- Independent code review and changed-file formatting checks pass. All
40 executed CI checks pass on `5af6a2896b`, including TypeScript/lint,
unit tests, Next.js and TanStack E2E tests, and builds. All six review
threads are resolved.

### Stack

Merge in order:

1. #50953 — reusable logs table building blocks
2. #50954 — function-scoped unified logs queries
3. #50955 — slimmer function detail layout, header on Overview
4. #50957 — Invocations merged into a function-scoped Logs tab
5. #50958 — Overview errors in the shared logs table
6. #52281 — remove the legacy Overview

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Jordi Enric <jordi.err@gmail.com>
2026-10-27 09:29:10 +01:00
Charis 5d8499b6f1 chore(eslint): allowlist grant and connectionString in query exhaustive-deps (#52334)
## Problem

`@tanstack/query/exhaustive-deps` flags every variable used in a
`queryFn` that isn't in the `queryKey`. Some variables are intentionally
left out because they don't change the returned data, and keeping them
out of the key avoids splitting the cache:

* **`connectionString`** in queries that run SQL against the user's
database. These currently need `eslint-disable` comments or count
against the ratchet.
* **`grant`**, the FGA grants that Studio data hooks now take (see
#52331). Every migrated query would otherwise need a disable comment.

The installed plugin (5.91.2) has no way to configure this.

## Solution

* Upgrade `@tanstack/eslint-plugin-query` from `^5.0.0` (resolving
5.91.2) to `^5.104.5`. The rule's `allowlist` option arrived in 5.95.0.
5.105.0 is newer than our pnpm minimum release age allows.
* Allowlist `grant` and `connectionString` for `exhaustive-deps` in
`eslint-config-supabase/next.js`.
* Remove the 11 disable comments in Studio that only suppressed
`connectionString`.
* Six disable comments stay, because they suppress other dependencies:
  * `ReportBlock.tsx`
  * `UserJourneys.queries.ts`
  * `github-config-query.ts`
  * `bucket-objects-infinite-query.ts`
  * `table-rows-query.ts`
  * `useSingleLog.tsx`
* Lower Studio's `@tanstack/query/exhaustive-deps` baseline from 87 to
28.

The upgraded rule is stricter than 5.91.2: without the allowlist it adds
about 18 warnings. With the allowlist, the total drops well below the
old baseline, because many existing warnings were unsuppressed
`connectionString` omissions.

The lockfile changes are the plugin and its `@typescript-eslint`
dependencies. The graphiql entries are re-keyed by pnpm's peer
resolution; their versions are unchanged.

## Testing

* `pnpm --filter studio run lint:ratchet` passes.
* ESLint is clean on each file where a disable comment was removed.
* Other apps' ratchets only track `shadcn/*` rules, so they're
unaffected.
2026-10-27 09:27:44 +01:00
fd058409ac feat(www): add PG Down Under 2026 contest go page (#52361)
## What

Adds the raffle landing page and thank-you page for PG Down Under 2026,
modeled on the PGConf.dev 2026 contest page.

- `/go/pg-down-under-2026/contest`
- `/go/pg-down-under-2026/contest/thank-you`

Differences from the PGConf.dev page: AirPods Pro 3 prize with a hero
image, no talk/speaker section, and an onsite draw at the booth. Both
pages are registered in `apps/www/_go/index.tsx` and marked for removal
after November 30, 2026.

## Notes

- HubSpot form is wired in. The field map uses the standard contact
properties (`firstname`, `lastname`, `email`, `company`).
- The hero image is a transparent PNG added under
`apps/www/public/images/landing-pages/pg-down-under-2026/`.

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

---------

Co-authored-by: Wendie Cheung <wendie.cheung@supabase.io>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 05:25:41 +00:00
Santos Flores de Leon 49aab4b835 Add Santos Flores de Leon to humans.txt (#52343)
Adding myself to humans.txt per the onboarding process.

## Problem

N/A 

## Solution

N/A

## Review instructions

1. Go to humans.txt
2. Confirm `Santos Flores de Leon` is in the right row. Alphabetical
sort.

## 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-10-26 19:50:35 -07:00
Danny White fdab2cc751 feat(studio): interrupt serious account recovery gaps (#51643)
## Problem

Users with serious recovery gaps may never visit Account Security, so a
manually accessible reminder is easy to miss.

## Solution

Show the existing reminder as a full-screen layout takeover after
required MFA verification and successful account reads. Keep the
original URL, query and fragment intact. The dashboard stays mounted but
inert, preserving unsaved work; dismissal reveals it. Wait for existing
dialogs to close. Keep rollout gating, eligibility and snooze unchanged.
A successfully resolved background check dismisses an untouched
takeover; started tasks and completed rows remain until Continue.


Both of these recovery flags are enabled via ConfigCat for local and
staging:
- `enableAccountRecoveryInterstitial`: this work
- `enableAuthRecoveryCodes`: the work it depends on

We’ll only flip these to `true` for production once all of this is
merged and heavily tested.

| Interruption Example |
| --- |
| <img width="654" height="800" alt="16563"
src="https://github.com/user-attachments/assets/eec71acf-78ab-473d-a9d3-9c6cdc3aff07"
/> |

The dashboard remains usable while eligibility loads. An open takeover
stays in place through background refreshes. Signing out clears
in-memory reminder state so clearing browser snooze permits retesting.

## Review instructions

1. Open [this PR’s staging
preview](https://studio-staging-git-dnywh-account-recovery-interstitial-supabase.vercel.app/dashboard/organizations)
with a non-SSO test account and complete required MFA verification.
Check `enableAccountRecoveryInterstitial` and `enableAuthRecoveryCodes`
are both true in the staging dev toolbar. Close the toolbar and other
dialogs.
2. **Exhausted codes:** use an account with existing codes and exactly
one verified authenticator. Override GET `/factors/recovery-codes` in
DevTools Network: retain JSON fields, set `remaining` to `0` and save.
Clear `account-recovery-reminder:<userId>` from Local Storage for this
preview origin, then reload. Make sure you are **not** on
`dashboard/account/security` as that won’t show the interstitial.
Confirm the request uses the override and the takeover opens without
changing the URL.
3. **Missing codes, separate scenario:** disable overrides and use an
MFA test account with no generated codes. Clear snooze and reload. A
zero remaining count simulates exhausted codes, not missing codes. A
second verified authenticator prevents the exhausted-code trigger, but
not the missing-code trigger.
4. Skip, reload and switch projects or organisations. Confirm snooze
persists. A different account must have separate reminder state. For
warning-to-critical escalation, generate codes on the missing-code
account, then override its remaining count to zero and reload without
clearing the warning snooze.
5. Disable overrides before live actions. Save codes or add an
authenticator, then Continue. Confirm the page and URL remain intact.
Tab and Command/Ctrl+K must not reach dashboard controls; nested dialogs
must still work. Editor draft and browser-history preservation are also
covered by component tests.
6. With snooze cleared, open a project URL containing a query and
fragment; opening and dismissing the takeover must leave that full URL
unchanged. Check account settings, sign-in, MFA verification and
consent/connection flows remain uninterrupted. A healthy account, failed
reads or a disabled rollout flag must not trigger a takeover.
7. Throttle the status request: the dashboard stays usable while
eligibility loads. If another dialog is already open, the takeover waits
until it closes. There is no standalone recovery route or runtime mock
parameter.
2026-10-27 12:42:05 +11:00
Danny White e2ec13d9a6 feat(studio): snooze recovery reminders per browser (#52124)
## Problem

Skipped recovery reminders need a consistent reminder interval for each
signed-in person in the browser.

## Solution

Snooze missing codes for thirty days and exhausted codes for seven days.
Escalation breaks snooze; sign-out preserves it. Completing codes, or
adding a backup factor for exhausted codes, resolves the applicable gap.
Track task actions, completion and dismissal.

## Review instructions

**This PR’s own deploy preview cannot show the takeover.** Review its
diff here, but test the assembled stack on [#51643’s staging
preview](https://studio-staging-git-dnywh-account-recovery-interstitial-supabase.vercel.app/dashboard/organizations).
The controller only mounts in #51643.

Before each scenario: use a non-SSO staging test account with MFA
verified; check `enableAccountRecoveryInterstitial` and
`enableAuthRecoveryCodes` are both true in the staging dev toolbar, then
close the toolbar and other dialogs. Clear
`account-recovery-reminder:<userId>` from DevTools Application → Local
Storage **for that preview origin**, then reload the dashboard.

1. Use an account with existing codes and exactly one verified
authenticator. Override GET `/factors/recovery-codes` in DevTools
Network: retain JSON fields, set `remaining` to `0`, save and reload.
Confirm the overridden request succeeds and the takeover opens.
2. Skip. Confirm the URL stays unchanged and the local-storage record
has critical severity with expiry seven days ahead. In a separate
scenario, genuinely missing codes should record warning severity with
expiry thirty days ahead.
3. Reload, switch projects or organisations, then sign out and back in.
The reminder stays hidden. Clear the record and reload to retest.
4. Disable overrides before live actions. Save codes and Continue; the
record clears. Adding a second authenticator resolves exhausted codes
but must not resolve missing codes. Use separate test accounts for these
cases.
2026-10-27 12:42:05 +11:00
Danny White eec2d0f947 feat(studio): offer a backup authenticator in the recovery reminder (#52123)
## Problem

A recovery reminder should let users save codes and add a backup
authenticator independently, with clear loading and completed states.

## Solution

Add an optional authenticator task for accounts with one verified
factor. Keep completed rows visible, use text shimmers while loading,
and dismiss an untouched takeover when a successful refresh confirms the
gap is resolved. Continue and Skip dismiss through the same callback
used by the layout takeover.

| State | Screenshot |
| --- | --- |
| Loading | <img width="654" height="800" alt="40913"
src="https://github.com/user-attachments/assets/d75585f0-5d00-46db-9ec7-1305da0f7464"
/> |
| Multiple issues | <img width="654" height="800" alt="Supabase"
src="https://github.com/user-attachments/assets/8342667c-ecce-4271-a418-41295ebba223"
/> |
| One issue fixed | <img width="654" height="800" alt="15927"
src="https://github.com/user-attachments/assets/693c37fe-e955-4c9d-b866-1c60743a31b8"
/> |
| Both issues fixed | <img width="654" height="800" alt="59618"
src="https://github.com/user-attachments/assets/46140e95-b686-41ab-a5ea-94016f7eda29"
/> |

## Review instructions

**This PR’s own deploy preview cannot show the takeover.** Review its
diff here, but test the assembled stack on [#51643’s staging
preview](https://studio-staging-git-dnywh-account-recovery-interstitial-supabase.vercel.app/dashboard/organizations).
The controller only mounts in #51643.

Before each scenario: use a non-SSO staging test account with MFA
verified; check `enableAccountRecoveryInterstitial` and
`enableAuthRecoveryCodes` are both true in the staging dev toolbar, then
close the toolbar and other dialogs. Clear
`account-recovery-reminder:<userId>` from DevTools Application → Local
Storage **for that preview origin**, then reload the dashboard.

1. Use a test account with missing codes and exactly one verified
authenticator. Cancel Add authenticator, then reopen and enrol a test
authenticator. Confirm only that row completes and Skip for now becomes
Continue. Generate and acknowledge codes; both completed rows stay
visible. These actions change the test account.
2. **Separate exhausted-code scenario:** use an account that still has
exactly one verified authenticator. Override GET
`/factors/recovery-codes` in DevTools Network: retain JSON fields, set
`remaining` to `0`, clear snooze and reload. An account with two
verified authenticators will not trigger for exhausted codes. Disable
overrides before live actions.
3. For the codes-only layout, use an account with two verified
authenticators and genuinely missing codes. Repeat at a narrow viewport.
Loading, unavailable and externally resolved states have component-test
coverage; healthy or failed reads must not trigger a takeover.
2026-10-27 12:29:11 +11:00
Danny White 749386567d feat(studio): fix recovery codes inside an interstitial (#52122)
## Problem

Users need to fix missing or exhausted recovery codes without leaving
the recovery reminder.

## Solution

Add a reusable recovery reminder and full-screen modal shell using the
existing recovery-code dialogs. Dismissal is a callback. The automatic
layout gate in #51643 mounts the UI; there is no standalone preview
route.

| State | Screenshot |
| --- | --- |
| Blocked request | <img width="654" height="800" alt="39307"
src="https://github.com/user-attachments/assets/2ba80ea7-24ad-4d29-ab50-730890501014"
/> |
| Recovery codes used up | <img width="654" height="800" alt="Supabase"
src="https://github.com/user-attachments/assets/5dd63735-1254-4855-bbd8-04c2e4c699fa"
/> |
| No recovery codes | <img width="654" height="800" alt="Supabase"
src="https://github.com/user-attachments/assets/58ff5b91-7da6-4c39-ad99-cea7cce8cf73"
/> |
| Recovery codes saved (just completed above _Generate codes_ step) |
<img width="654" height="800" alt="63500"
src="https://github.com/user-attachments/assets/1fc7ca56-a7cb-4edd-a3cd-4d8cf5c09659"
/> |


## Review instructions

**This PR’s own deploy preview cannot show the takeover.** Review its
diff here, but test the assembled stack on [#51643’s staging
preview](https://studio-staging-git-dnywh-account-recovery-interstitial-supabase.vercel.app/dashboard/organizations).
The controller only mounts in #51643.

Before each scenario: use a non-SSO staging test account with MFA
verified; check `enableAccountRecoveryInterstitial` and
`enableAuthRecoveryCodes` are both true in the staging dev toolbar, then
close the toolbar and other dialogs. Clear
`account-recovery-reminder:<userId>` from DevTools Application → Local
Storage **for that preview origin**, then reload the dashboard.

1. **Exhausted codes:** use an account with existing codes and exactly
one verified authenticator. In DevTools Network, right-click GET
`/factors/recovery-codes` → **Override content**. Keep the JSON fields,
set `remaining` to `0`, save and reload. Confirm the request shows the
overridden response and the takeover opens.
2. **Missing codes, separate scenario:** disable overrides and use an
MFA test account with no generated codes. Clear snooze and reload.
Setting `remaining` to `0` simulates exhausted codes, not missing codes.
3. Disable overrides before live actions. Cancel regeneration to check
existing codes remain intact, then generate or regenerate codes and
acknowledge storage. These actions change the test account. Continue or
Skip should reveal the unchanged URL and page.
2026-10-27 12:29:10 +11:00
Danny WhiteandJoshen Lim df8aca1fb2 refactor(studio): share recovery setup dialogs (#52121)
## Problem

The same recovery setup needs to work from Account Security and the new
recovery interstitial without duplicating dialog behaviour.

## Solution

Share the generation and regeneration flow, and report completion only
after codes are acknowledged or an authenticator is verified. Keep the
existing Account Security entry points. This PR provides the dialog
foundation; #52122 and #52123 consume its callbacks, and #51643 mounts
the takeover.

## Review instructions

1. Open [Account
Security](https://studio-staging-git-dnywh-recovery-shared-dialogs-supabase.vercel.app/dashboard/account/security)
in staging, or `/account/security` locally, using a disposable test
account.
2. Generate recovery codes. Confirm Done stays disabled until the save
acknowledgement is checked, then closes the dialog.
3. Regenerate codes. Cancel the confirmation first and confirm nothing
changes; repeat and confirm the replacement codes appear.
4. Open Add authenticator and cancel. Then complete enrolment with a
test authenticator; confirm it appears only after verification.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-10-27 12:29:10 +11:00
Danny White 04ea14c103 fix(studio): isolate account recovery checks by user (#52120)
## Problem

Account checks need consistent query gating and recovery-gap evaluation.
Sign-in and sign-out already reset the query cache; user-scoped keys add
defence in depth.

## Solution

Tie account query caches to the signed-in person, honour query gating,
and centralise recovery-gap evaluation. No layout changes.

## Review instructions

1. Open [Account
Security](https://studio-staging-git-dnywh-recovery-account-queries-supabase.vercel.app/dashboard/account/security)
in staging, or `/account/security` locally. Sign in with a test account
that has MFA enabled; confirm its authenticators and recovery-code
status load normally.
2. Sign out and sign in as a different test account with a different MFA
setup. Confirm the page shows that account’s setup, without the previous
account’s authenticators or code status.
3. Reload with MFA enabled and complete the sign-in challenge. Account
Security should load normally after verification.
2026-10-27 12:29:10 +11:00
5bdb7399e8 docs: add "The Supabase way to build" getting started guide (#50283)
## 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?

A getting-started page that sits between the architecture overview (what
the pieces are) and the existing guides (how to build one). Explains
which product features to add, and when, as you are building.

## What is the current behavior?

- Architecture lists the services. Quickstarts show one setup. Nothing
says which block to add next.

## What is the new behavior?

The page tells you which Supabase piece to add next. The links open the
guide that shows you how.

A short table at the top maps a need to a piece: store data, know who is
calling, keep rows private, handle files, run server logic, show live
updates, go to production.

Under that are the same seven pieces, in the order most apps grow. Stop
at the last one your app needs.

Every section has the same four parts:

- The situation that means you need this piece
- The idea to remember
- The mistake to avoid
- A few links to the existing guide

One warning sits in the database section. The Next.js quickstart leaves
its sample table public so the page can load. Come back here before that
table holds private data.

## Additional context

- Page: `the-supabase-way-to-build.mdx`. Tiles:
`the-supabase-way-to-build.data.ts`. Nav: second item under Build with
AI tools.
- Explainer only. It links out for the how.
- Needs an SME read. Placement is interim.

### [The Supabase way to build
(Preview)](https://docs-git-nikrichers-docs-1389-experimental-the-9beaf4-supabase.vercel.app/docs/guides/getting-started/the-supabase-way-to-build)

<img width="2222" height="15924" alt="Image2026-10-26_01-54-16_PM"
src="https://github.com/user-attachments/assets/caf02275-6c7e-4b35-be7f-659953e86bd6"
/>

### Test plan

- [ ] Preview renders, and the sidebar entry is second under Build with
AI tools.
- [ ] Each section has a Build it group of links.
- [ ] Database stage points at API keys and says the quickstart's public
read is temporary.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Added the “The Supabase Way to Build” guide, covering Database, Auth,
RLS, Realtime, Storage, Edge Functions, and production hardening.
- Added curated “Build it” links for each section to help readers find
relevant guides.
- Included guidance on securing data, files, credentials, and
browser-accessible resources.

- **Documentation**
  - Updated the Getting Started navigation to link to the new guide.
- Clarified Storage policies, RLS behavior, public buckets, and secure
secret management.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Nik Richers <nik@validmind.ai>
Co-authored-by: Miranda Limonczenko <miranda.limonczenko@supabase.io>
2026-10-26 21:17:51 +00:00
Kody Jackson c6bd1a5394 chore(www) - add bing verification meta tag to homepage (#52335)
## Problem

Missing `bing` verification for webmaster tools. 

## Solution

Can be added a couple ways, but this was the fastest

```
Copy and paste the <meta> tag into your site's home page. It should go in the <head> section, before the first <body> section.
HTML Meta Tag

<meta name="msvalidate.01" content="92FBA8A0D370D71480454DBEAB37D0AE" />
* To stay verified, don't remove the meta tag even after verification succeeds.
```

## Preview links


https://zone-www-dot-com-git-kody-devrel-740-bing-verification-supabase.vercel.app/

<img width="1128" height="734" alt="image"
src="https://github.com/user-attachments/assets/d36ae51c-1355-46fe-b263-47b59909f542"
/>
2026-10-26 15:05:54 -05:00
Kody Jackson b0aeee4b29 fix(www) - add blog alt link to rss feed (#52336)
## Problem

Missing alt tag for the blog changelog feed, similar to part of #52292

## Solution

Adds it

## Preview links

[blog
homepage](https://zone-www-dot-com-git-kody-devrel-731-alternate-bef917-supabase.vercel.app/blog)
<img width="1128" height="734" alt="image"
src="https://github.com/user-attachments/assets/afc152d6-7041-4a27-9b08-3df9e8a85bcb"
/>
2026-10-26 15:05:32 -05:00
0cc65f7421 feat(www): add Personal Access Tokens feature page (#52290)
## Problem

Scoped Personal Access Tokens launch with Select Rewind on 2026-10-26.
No feature page covers personal access tokens today.

## Solution

Adds a `Personal Access Tokens` entry to `apps/www/data/features.tsx`,
after the Management API entry, served at
`/features/personal-access-tokens`. Also adds the `KeyRound` lucide icon
to the existing import list.

- Stage: General Availability. Self-hosted: no.
- Copy source: https://app.notion.com/p/4025004b775f810792b4fa9bc1b1b296

Open items before this is ready:

- Hero images: `/images/features/personal-access-tokens.png` and
`/images/features/personal-access-tokens-light.png` are placeholder
paths. The files don't exist yet, so the page shows a broken image until
design supplies them.
- Stage and self-hosted values are not yet confirmed by engineering.
- `blogUrl` is left out until the blog post is live.

## Preview links

| Site | Live | Preview | Search for |
| ---- | ---- | ------- | ---------- |
| WWW |
[/features/personal-access-tokens](https://supabase.com/features/personal-access-tokens)
| Add from the Vercel bot comment | Personal Access Tokens |

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

---------

Co-authored-by: Wendie Cheung <wendie.cheung@supabase.io>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 06:56:38 +11:00
b329508c4f blog(www): add Scope your Personal Access Tokens blog post (#52289)
## Problem

Scoped Personal Access Tokens need a launch blog post for Select Rewind,
publishing 2026-10-26.

## Solution

Adds "Scope your Personal Access Tokens," based on the engineer-authored
draft with light edits.

- Post:
`apps/www/_blog/2026-10-26-scope-your-personal-access-tokens.mdx`
- Images: OG, thumbnail, and six Dashboard screenshots in
`apps/www/public/images/blog/scope-your-personal-access-tokens/`
- Draft source:
https://app.notion.com/p/4025004b775f81ce8cffdaba9941ce56

Needs a marketing +1.

## Preview links

| Site | Live | Preview | Search for |
| ---- | ---- | ------- | ---------- |
| WWW |
[/blog/scope-your-personal-access-tokens](https://supabase.com/blog/scope-your-personal-access-tokens)
| Add from the Vercel bot comment | Scope your Personal Access Tokens |

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

---------

Co-authored-by: Wendie Cheung <wendie.cheung@supabase.io>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 06:56:17 +11:00
Pamela Chia 092b8ff518 fix: repair 404s from legacy dashboard routes, docs links, and the changelog feed (#52292)
Several supabase.com URLs still return a 404 to real browsers every day:
an old Database Hooks route, card icons for brands we never shipped an
image for, two dashboard links to docs pages that miss the `/guides`
prefix, and a few URLs that search engines and feed readers keep
requesting.

**Changed:**
- **Old Database Hooks links land on Webhooks**: #29671 renamed
`/project/:ref/database/hooks` without a redirect, so bookmarks and
older guides hit a 404. I added a redirect to the Integrations Webhooks
page, the same target as the existing `database/webhooks` redirect.
- **Card brands without an icon show a generic card**: payment method
rows built the image URL straight from the card brand name, so UnionPay
and other brands without a PNG rendered a broken image. I added a
`CardBrandIcon` in `CreditCard.tsx`, used by both views, that only
requests the brand images we ship, labels each with its brand name, and
shows a generic card icon for every other brand.
- **Branching "Learn more" links open the right docs**: #51393 linked
the branching empty state to `/docs/deployment/branching/...` without
`/guides`. I fixed both links and added a redirect for the GitHub
integration URL, which search engines already indexed (the dashboard one
already had a redirect).
- **Indexed docs and feed URLs redirect**: I added redirects for
`/docs/guides/mcp`, the old hashed architecture diagram path that other
sites still embed, and `/changelog/rss.xml`. I also added an RSS
`alternate` link to `/changelog` so feed readers find
`/changelog-rss.xml` instead of guessing.

**Note:** Studio and www changes are independent, so either app can
deploy first.

## To test

Tested on the PR preview:
- [x] Open `/dashboard/project/<ref>/database/hooks`, expect a redirect
to `/dashboard/project/<ref>/integrations/webhooks/overview`
(`database/hooks-nope` still 404s)
- [x] Open org billing with a Visa or Mastercard on file, expect the
brand logo as before
- [x] With a card whose brand has no image (e.g. UnionPay), expect a
generic card icon instead of a broken image in the payment methods list
(checked with a mocked UnionPay row: generic icon, no `unionpay.png`
request, Visa rows unchanged)
- [ ] Same check in the plan change payment method select (not
exercised: reaching it starts the plan change flow)
- [x] On a project without branching, open Branches and click both
"Learn more" buttons, expect the dashboard and GitHub integration
branching guides to load
- [x] On the www preview, open `/changelog/rss.xml`, `/docs/guides/mcp`
and `/docs/deployment/branching/github-integration`, expect 308s to
`/changelog-rss.xml`, `/docs/guides/ai-tools/mcp` and
`/docs/guides/deployment/branching/github-integration`
- [x] View source on `/changelog`, expect a `rel="alternate"` RSS link
to `/changelog-rss.xml`

## Linear
- fixes GROWTH-1364
2026-10-26 17:32:06 +00:00
Alaister Young c127901b64 test(studio): speed up flaky replication tests (#52326) 2026-10-27 01:21:54 +08:00
Pamela Chia 2e63060c59 fix(docs): serve markdown 404s for guessed .md urls (#52293)
Coding agents guess docs URLs that don't exist: markdown variants of
pages that have no markdown (`/docs/reference/<sdk>/<fn>.md`,
`/docs/guides/<slug>.md`) and `/docs/llms.txt`. Reference guesses get an
empty-body 404 from the crawler renderer for bot user agents and the
full HTML reference for browsers, and the rest get the HTML 404 page, so
the agent never learns where the content lives. Reference `.md` guesses
are about half of coding-agent docs 4xx, and guide `.md` guesses about a
tenth.

**Changed:**
- **Reference `.md` guesses**: the docs proxy answers every
`/docs/reference/**.md` request itself, for any user agent and before
the crawler rewrite, with a markdown 404 (`no-store`) linking the HTML
page and the SDK's full markdown reference (`/llms/js.txt`,
`/llms/dart.txt`, and so on), or `/llms.txt` for references without one.
- **Unknown guide `.md` guesses**: guide `.md` requests whose slug has
no markdown variant get the same markdown 404 instead of the HTML 404.
The body says there is no markdown version of the page, because a few
real guide pages (CLI config, self-hosting config, troubleshooting
indexes) are TSX-only. Known guides and Accept-negotiated requests
without `.md` are unchanged.
- **`/docs/llms.txt`**: I added a permanent www redirect to `/llms.txt`,
next to the existing `/docs/reference/llms.md` redirect.

**Note:** the `.md` check in `proxy.ts` catches every reference `.md`
URL, so it has to be narrowed when per-function reference markdown
ships, or it will 404 those files.

## To test

Tested on the PR previews (docs deployment for the 404s, www deployment
for the redirect):
- [x] `curl -sD - -A 'curl/8.7.1'
<docs-preview>/docs/reference/javascript/select.md`: expect 404,
`content-type: text/markdown`, `cache-control: no-store`, and a body
linking `https://supabase.com/docs/reference/javascript/select` and
`https://supabase.com/llms/js.txt`
- [x] Repeat for `dart/select.md`, `python/select.md`,
`cli/supabase-init.md` and `api/v1-list-all-projects.md`: expect the
matching `/llms/<sdk>.txt`
- [x] Repeat `javascript/select.md` with a browser user agent: expect
the same markdown 404
- [x] `curl -sD - <docs-preview>/docs/guides/doesnotexist.md`: expect
404 markdown with `no-store`, linking `https://supabase.com/llms.txt`
- [x] `curl -s
<docs-preview>/docs/guides/local-development/cli/config.md`: expect 404
markdown linking
`https://supabase.com/docs/guides/local-development/cli/config`
- [x] `curl -sD - <docs-preview>/docs/guides/database/overview.md`:
expect 200 markdown, unchanged
- [x] Open `<docs-preview>/docs/guides/doesnotexist` in a browser:
expect the branded HTML 404, unchanged
- [x] `curl -sIL -o /dev/null -w '%{num_redirects} %{http_code}\n'
<www-preview>/docs/llms.txt`, once with a browser user agent and once
with `Googlebot/2.1`: expect `1 200`

## Linear
- fixes GROWTH-1325
2026-10-27 01:21:01 +08:00
9084e8181b docs(ai): add Fireworks AI integration guide (#52193)
## I have read the CONTRIBUTING.md file.

YES

## What kind of change does this PR introduce?

**New docs page: Fireworks AI integration guide.** This adds
`guides/ai/integrations/fireworks-ai` and covers two tasks. The first
calls a Fireworks chat model from an Edge Function. The second stores
Fireworks embeddings in a pgvector table and searches them from an Edge
Function. Fireworks exposes an OpenAI-compatible API, so the page uses
the OpenAI SDK with a Fireworks base URL. That matches the existing
pattern in `guides/functions/ai-models`.

Base for this stacked PR:
https://github.com/supabase/supabase/pull/52246

## What is the current behavior?

- The docs have no Fireworks content. `git grep -i fireworks` across the
repo returns no docs, examples, or templates.

## What is the new behavior?

| File | Change |
| --- | --- |
| `apps/docs/content/guides/ai/integrations/fireworks-ai.mdx` | New
guide covering API key secrets, **Generate text**, and **Search with
embeddings** (table, RLS policy, HNSW index, `match_documents`, plus
embed and search functions) |
|
`apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts`
| Adds **Fireworks AI** under AI > Third-Party Tools, after Amazon
Bedrock |
| `apps/docs/content/guides/ai.mdx` | Adds a Fireworks AI card to the
Integrations grid |

## Additional context

- Worktree:
`~/GitHub/supabase/supabase-worktrees/docs/fireworks-ai-integration`
- Style: written against `apps/docs/style-guide/`, with a clean-context
critic pass. Placement and page shape follow
`guides/ai/integrations/amazon-bedrock.mdx`.
- Fireworks facts (base URL, `FIREWORKS_API_KEY`,
`accounts/fireworks/models/glm-5p3-flash`,
`fireworks/qwen3-embedding-8b`, the `dimensions` parameter, unnormalized
Qwen3 vectors) were checked against `docs.fireworks.ai` on 2026-10-22.

| Check | Result |
| --- | --- |
| Page SQL on `pgvector/pgvector:pg17` (extension, table, RLS policy,
HNSW index, `match_documents`) | Pass |
| `match_documents` called as `authenticated` with RLS on | Pass,
returns rows ranked by similarity |
| Prettier on all 3 files | Pass |
| Internal link targets exist | Pass (6 of 6) |
| Edge Functions against the live Fireworks API | **Not run**, no
Fireworks API key available |

### Needs review

- **Edge Function code is untested end to end.** It follows the
`withSupabase` and `jsr:@openai/openai@^6` patterns from
`guides/functions/auth` and `guides/functions/ai-models`, but nobody has
deployed it or called Fireworks with it yet.
- **Model choices are inferred.** `glm-5p3-flash` is the model in the
Fireworks quickstart. `qwen3-embedding-8b` is the serverless embedding
default their docs recommend. The 1,024 dimension is my pick: it stays
under the pgvector HNSW limit of 2,000 and is a supported Qwen3 output
size.
- **One page, two tasks.** The critic flagged
`03-page-structure.md#one-unit-per-page`. I kept a single page to match
the other integration pages in this folder. Splitting it is a reasonable
alternative.
- **Product owner sign-off.** No product spec exists for this page.
Scope (inference plus embeddings) is limited to features that have
already shipped.

### Proof: the guide renders on the preview and appears in the AI nav

**Verified:** `Vercel – docs` check (pass) · preview page returns 200 ·
Fireworks AI card links from `/docs/guides/ai` (pass)

[Fireworks AI guide (PR
preview)](https://docs-git-nikrichers-fireworks-ai-integration-supabase.vercel.app/docs/guides/ai/integrations/fireworks-ai)


![fireworks-ai-guide-after](https://moijyfpvgnmgoxvwcikq.supabase.co/storage/v1/object/public/pr-proof/supabase/supabase/pr52193/fireworks-ai-guide-after-b7b67965.png)

### Test plan

- [ ] Deploy `fireworks-chat`, `fireworks-embed`, and `fireworks-search`
with a real `FIREWORKS_API_KEY` and confirm each returns the documented
response
- [x] Confirm the page renders and appears under AI > Third-Party Tools
in the preview
- [x] Confirm the Fireworks AI card renders on `/docs/guides/ai`

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

---------

Co-authored-by: Nik Richers <nik@validmind.ai>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Jordan Lee <jordan.lee@supabase.io>
2026-10-26 10:10:11 -07:00
Drew McLellanandFrancesco Sansalvadore d98c277790 feat(studio): rotate Storage URL signing keys FE-4433 (#52165)
## Problem

Rotating a project's Storage URL signing key currently needs a support
ticket, so customers can't rotate on their own timeline or keep a
standby key until their signed URLs have migrated.

Linear:
[FE-4433](https://linear.app/supabase/issue/FE-4433/allow-users-to-rotate-storage-url-signing-keys-via-ui)

## Solution

Adds a URL signing keys page at `/project/{ref}/storage/signing-keys`,
linked from the Storage menu. It builds on the design prototype from
`feat/storage-rotate-signing-keys` and follows the current JWT Keys page
styling.

- Active key, standby key, and revoked keys are shown in separate
tables, so there is only ever one active key. The UI allows one standby
key at a time.
- Create a standby key (ES256 by default, HS512 optional), rotate the
standby key to active, revoke a standby key, or move a revoked key back
to standby.
- The key list reports JWK types (`EC`, `oct`), which are mapped to
ES256 and HS512 labels. Unrecognized types fall back to the raw value.
- Telemetry: `storage_url_signing_key_created` and
`storage_url_signing_key_updated` (with a `change` property), fired when
the action succeeds.
- A "Created at" column is not included yet because the keys endpoint
doesn't return it. It will follow in a later PR.

<img width="1272" height="846" alt="Screenshot 2026-10-23 at 11 43 45"
src="https://github.com/user-attachments/assets/980742ed-6c4e-43d1-b170-847e550fde4c"
/>


## Review instructions

1. Open the preview and go to Storage > URL signing keys on a project.
2. Create a standby key, then rotate it to active. The previous active
key should move to standby.
3. Revoke the standby key (type its ID to confirm), then move it back to
standby from the revoked table.
4. Compare the table styling with Project Settings > JWT Keys.
5. Check that creating a standby key and moving a revoked key to standby
are disabled while a standby key exists.

## 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: Francesco Sansalvadore <f.sansalvadore@gmail.com>
2026-10-26 16:39:39 +00:00
Meg Corren 59eb42594a Add Meg Corren to humans.txt (#52203)
Meg Corren is a new Product Manager covering branching!

## Problem

The problem is Meg didn't used to work here, and therefore wasn't on
`humans.txt`.

## Solution

The solution was bringing Meg onto the team and therefore, adding her to
`humans.txt`

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

n/a 😄 

## 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-10-26 09:26:47 -07:00
Alexis Aguilar fe599e8c0e docs(auth): add guide for testing auth flows without email and SMS limits (#52118)
Found during my dogfooding project :)

## Problem

Testing magic-link sign-in on a hosted project can hit the built-in
email limit after two sign-ins. A quick workaround is to turn off
**Confirm email**, which is risky if it stays off at launch. The docs
that would help are spread out: Mailpit appears only in the Passwords
guide and the CLI pages, and test phone numbers appear only in the
self-hosted phone MFA guide.

Resolves
[DOCS-1460](https://linear.app/supabase/issue/DOCS-1460/document-how-to-test-auth-flows-without-hitting-email-rate-limits)
and
[FDBKIN-16338](https://linear.app/supabase/issue/FDBKIN-16338/clarify-built-in-email-rate-limits-and-custom-smtp-requirement-for).
The second is feedback from a user who hit the built-in email limit
during sign-up testing and didn't know custom SMTP was needed.

## Solution

A new guide, **Test auth flows**, explains how to test each sign-in
method without real email or SMS limits. It opens with a link to the
Supabase CLI setup that the local steps need:

- **Test email flows locally:** Mailpit captures every email from local
Auth, so the hosted email limit and address restriction don't apply. The
steps have the reader copy the Project URL, publishable key, and Mailpit
URL from `supabase status`, then swap the app's environment variables
from the hosted project to the local stack. The guide also covers
turning on email confirmation locally to test that flow.
- **Test email flows on a hosted project:** the built-in email service's
limits and the error it returns, how custom SMTP or the Send Email hook
raises them, and a caution that turning off **Confirm email** also
removes the hourly email limit, so it needs to be back on before launch.
- **Test phone sign-in with test numbers:** fixed one-time passwords for
chosen phone numbers, set in the Dashboard, `config.toml`, or the
Management API. The local steps include the SMS provider settings that
test numbers need, with placeholder credentials. The guide covers what
test numbers skip, what still applies, and the risk of leaving them in
production.

The page sits under **Auth > Configuration** in the navigation. The
magic link, passwords, email templates, phone sign-in, and rate limits
guides link to it. The Production checklist gains an item to remove test
phone numbers. The Passwords guide's Mailpit section becomes a link to
the new page and keeps its heading, so existing links to it still work.

## Verification

Local behavior was tested against a local stack with Supabase CLI
2.114.0:

- 10 magic links to 10 addresses all arrived in Mailpit. A second
request for the same address within one second returned `429
over_email_send_rate_limit`.
- A test number signed in with its fixed code, and the code worked again
without a new request. A second request within the wait returned `429
over_sms_send_rate_limit`.
- With the project SMS limit set to 1, four requests for a test number
all succeeded.
- Test numbers failed with `phone_provider_disabled` until an SMS
provider was enabled. With a provider enabled, Auth sent nothing to test
numbers.
- A key without the country code didn't match a number sent with `+1`,
and the request went to the SMS provider.
- A phone MFA challenge for a test number went to the SMS provider.

Hosted behavior was tested on a Free plan project through the Dashboard,
and the project's settings were restored afterward:

- The Phone provider form doesn't save test numbers until the SMS
provider's required fields and **Test OTPs Valid Until** are filled in.
- With test number `14155552671=123456` saved, the number signed in with
its fixed code and no SMS was sent. The same code worked a second time.
- A second request for the test number right after the first returned
`429 over_sms_send_rate_limit` with "after 4 seconds", so the hosted
wait between codes is 5 seconds.
- With the Phone provider turned off again, the test number returned
`phone_provider_disabled`.

Hosted projects require email confirmation by default. A `supabase
config push` diff against a new project showed `enable_confirmations =
true` on the remote, and the platform source sets `MAILER_AUTOCONFIRM`
to `false` by default.

On a second Free plan project, `supabase config push` with one
`[auth.sms.test_otp]` entry stored the number as `14155552671=123456`,
with **Test OTPs Valid Until** set 10 years ahead. The Management API
spec defines `sms_test_otp` and `sms_test_otp_valid_until` on `PATCH
/v1/projects/{ref}/config/auth`, with `sms_test_otp` limited to
`<digits>=<digits>` pairs.

Three magic links to a team member's address all sent within two
minutes, with no `429`. The test project had **Confirm email** turned
off. In the Auth source, `sendEmail` in `internal/api/mail.go` checks
the hourly email limit only when `Mailer.Autoconfirm` is false, that is,
when **Confirm email** is on. A comment there marks this behavior for
deprecation. With **Confirm email** on, the built-in service returns
`429` with `over_email_send_rate_limit` after two emails, which matches
the original dogfooding report. The page states the limit applies while
**Confirm email** is on, and the caution says turning it off removes the
limit.

The guide's `config.toml` snippet was run as written on a local stack,
with `placeholder` Twilio credentials. The test number got `test-otp`,
signed in with its code, and could request again after 5 seconds.

The page renders on the local docs server, the navigation entry appears,
and the section anchors that other guides link to resolve. `pnpm
build:guides-markdown` generates the page with its admonitions and tabs.

### Self-review

A `review-the-docs` pass covered the new guide and the six linked pages
against the style guide and word list.

While testing, the `config.toml` template's test OTP example turned out
to be missing a country code. That's tracked for the CLI team in
[CLI-2820](https://linear.app/supabase/issue/CLI-2820/fix-the-authsmstest-otp-example-in-configtoml-to-include-the-country).

## Follow-up

The [Phone sign-in
guide](https://supabase.com/docs/guides/auth/phone-login) says a user
can request an OTP once every 60 seconds. The hosted test showed a
5-second wait for SMS codes. This PR leaves that sentence as is.
2026-10-26 09:26:38 -07:00
Avinash Sajjanshetty ca34c49cf5 chore(docs): add Avinash Sajjanshetty to humans.txt (#52300)
## Summary

- Adds Avinash Sajjanshetty (i.e. me @avinassh) to
`apps/docs/public/humans.txt`
2026-10-26 09:22:39 -07:00
Monica Khoury c31c7afb1b fix(studio): add latest-version hint to Postgres version field (#52143)
## Problem

On the General settings page, the Service versions card shows the
versions as disabled inputs. When a project is already up to date,
nothing explains that Postgres updates would show up in this section, or
where to learn more.

Resolves FE-4604:
https://linear.app/supabase/issue/FE-4604/add-hint-regarding-database-versioning

## Solution

Adds a subtle description under the Postgres version field, using the
existing `description` prop on `FormItemLayout`:

> This project is already on the latest version of Postgres that
Supabase supports. Updates will appear here when available. Learn more

"Learn more" links to the upgrading guide. It is tertiary information,
so it is a field description and not an admonition (changed after design
feedback).

It only shows when the project is on the latest version, database
upgrades are enabled, and the project is not on a K8s cloud provider.
The condition is one named boolean, `canShowLatestVersionHint`.
Component tests cover the visible case and the hidden cases.

## How to test

1. Run Studio and open a project's General settings page.
2. On a project already on the latest Postgres version, check that the
description appears under the Postgres version field, next to the
"Latest" badge.
3. Click "Learn more" and check that the upgrading guide opens in a new
tab.
4. On a project with an upgrade available, check that only the upgrade
alert shows and the description does not.
2026-10-26 18:20:05 +02:00
Julian Domke 90ba1183de fix(stripe-atlas): change message for simple link (#52323) 2026-10-26 17:13:16 +01:00
973dfa1b97 feat(studio): scope unified logs queries to one edge function (#50954)
Adds an optional `scope` to the unified logs search: fixed filters every
query applies on top of the user's, which the user can't remove. Nothing
sets a scope in this PR, so the Logs page is unchanged. #50957 uses one
to narrow the function Logs tab to one edge function.

A scope uses the same columns and operators as the `filter` URL param,
so any view can narrow logs to one resource without new query code.
Columns the query builder doesn't know match a `log_attributes` key, so
one edge function's logs are:

```ts
{
  filters: [
    { column: 'log_type', operator: '=', value: 'edge function' },
    { column: 'log_type', operator: '=', value: 'edge function runtime' },
    { column: 'function_id', operator: '=', value: functionId },
  ],
}
```

- New `edge function runtime` log type, read from the `function_logs`
source. Its level comes from the console level (`error`/`fatal` count as
errors, `warn`/`warning` as warnings), and its details stay in metadata.
- **Every scan**: the scope's filters apply to rows, counts, the chart
and single-facet queries. Facet scans never drop them, unlike the user's
own filter on the facet's column. Filters on the same column and
operator combine like the URL's (`=` values match any), every group must
match, and a scope replaces the default postgres + edge log types.
- **Fails closed**: a scope condition that can't be built matches no
rows, instead of being dropped like a bad user filter.
- **ClickHouse only**: scoped searches always run on ClickHouse,
whatever `otelUnifiedLogs` says, including downloads and the log detail
panel. The BigQuery queries are unchanged from master and throw on a
scope rather than return rows from outside it.
- `getLogTypeVisibility` offers only the log types a scope fixes.
Otherwise it keeps the new log type out of the filters, since the
project-wide Logs page already shows runtime logs inside each
invocation's detail panel.
- `toQuerySearchParams` and `createUnifiedLogsSearch` attach the scope.
- `UnifiedLogs` works out which log types its queries may use once,
instead of in each of its queries, filters and facets.

### How to test

1. Open the project Logs page with the unified logs preview on. The log
type filter shouldn't offer "Edge Function runtime", and default results
should match master.
2. The scoped behavior is easiest to try on #50957.

### Validation

- Query builder tests: the scope on every count scan, the chart and
facet queries, requests for out-of-scope log types, different operators
on one column, the fail-closed case, BigQuery refusing a scope, and
unscoped queries staying the same.
- Studio typecheck, lint ratchet, Prettier and knip pass on this layer.

### Stack

Merge in order:

1. #50953 — reusable logs table building blocks
2. #50954 — function-scoped unified logs queries
3. #50955 — slimmer function detail layout, header on Overview
4. #50957 — Invocations merged into a function-scoped Logs tab
5. #50958 — Overview errors in the shared logs table
6. #52281 — remove the legacy Overview

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Jordi Enric <jordi.err@gmail.com>
2026-10-26 16:52:15 +01:00
Charis 3e57a9d5fb feat(studio): add FGA grant lint rules and unguarded.migrating ratchet (#52315)
## Problem

Resolves FE-4691.

Builds on #52238, which added `unguarded.migrating` at every call site
that hits an FGA-annotated endpoint. Nothing stops new call sites from
adding to that backlog, nothing checks that `unguarded.byDesign` carries
a real reason, and type suppressions or the untyped
`fetchGet`/`fetchPost` helpers can skip the grant check entirely.

## Solution

Adds a local `fga` ESLint plugin
(`apps/studio/scripts/eslint-rules/fga.cjs`):

- **`fga/no-unguarded-migrating`** (warn, ratcheted): flags each
`unguarded.migrating`. Added to `scripts/ratchet-rules.json` with its
baseline in `.github/eslint-rule-baselines.json`, so the count can only
go down.
- **`fga/unguarded-by-design-reason`** (error):
`unguarded.byDesign(...)` must take a single non-empty string literal.
- **`fga/no-fetch-type-bypass`** (error):
- flags `@ts-ignore` / `@ts-expect-error` / `@ts-nocheck` that would
suppress a grant error on a `get`/`post`/`put`/`patch`/`del` call from
`data/fetchers`: directives targeting the call's first line, an
argument's first line, or the `grant` property;
  - flags imports of the untyped `fetchGet` / `fetchPost`.

Directives on `params` lines inside the init (used today to work around
spec mismatches) aren't flagged, since they can't hide a missing grant.

Existing bypasses are listed in `FETCH_TYPE_BYPASS_EXCEPTIONS` in
`eslint.config.cjs`: the 3 `@ts-ignore` fetch calls and the 15 files
using `fetchGet`/`fetchPost`. Test files are exempt, since they assert
type errors on purpose.

## Testing

- RuleTester suite in `scripts/__tests__/fga-eslint-rules.test.ts`
- `pnpm --filter studio run lint:ratchet` passes; `eslint --quiet` is
clean
2026-10-26 11:36:45 -04:00
Monica Khoury 9ddf227359 fix(studio): clarify free Micro upgrade messaging on Pro upgrade (#51938)
## What
Replaces the "First project included..." admonition in the Pro upgrade
dialog with clearer copy that explicitly calls out the free Nano to
Micro upgrade, and shows it for any org upgrading from Free to Pro
(previously only showed when the org had exactly 1 project).

## Why
Users on the Free plan aren't aware that, after upgrading to Pro, their
first project's compute is already billed at Micro price and can be
switched from Nano to Micro at no extra cost. The old copy didn't make
that clear, and was hidden entirely for multi-project orgs.

Linear: FE-4667

## Testing
1. In Studio, go to an organization on the Free plan.
2. Open Billing Settings -> Subscription -> change plan -> select Pro.
3. Confirm the "Micro Compute included for one project" admonition
shows, with working links to Infrastructure settings and the compute
docs.
4. Repeat with an org that has 2+ projects -> confirm the admonition
still shows (previously it was hidden for multi-project orgs).
2026-10-26 17:24:42 +02:00
Gildas Garcia 8ea3ce7747 Fix: stabilize some long flaky units tests (#52297)
## Problem

Some of our units fail randomly because they can take a bit more than 5
seconds to complete

## Solution

Set their timeout to 10 seconds.
2026-10-26 16:22:58 +01:00
Charis 9391f60ec9 test(studio): add shared permissions mocks and testGrant helper (#52312)
## Problem

Components and fetchers are moving to endpoint-bound FGA grants, so more
tests need to mock `/platform/profile/permissions/v2` and mint grants.
Each test file currently defines its own permissions response type and
mock, and `testGrant` lives inside `guarded-fetch.test.ts`.

Resolves
[FE-4692](https://linear.app/supabase/issue/FE-4692/test-infra-global-msw-handler-for-v2-permissions-and-testgrant).

## Solution

* `tests/lib/permissions-fixtures.ts`: shared `PermissionsV2Response`
type, `ALL_FGA_PERMISSIONS`, `allPermissionsFor(slugs)` (grants
everything at the org level), and `NO_PERMISSIONS`.
* `tests/lib/msw-permissions.ts`: `mockPermissions(response)` and
`mockPermissionsError({ status, message })` on top of `addAPIMock`.
* `tests/lib/test-grant.ts`: `testGrant(endpoint, { variant,
organizationSlug, projectRef, permissionsProjectRef })` for unit tests
of fetchers and query options, moved out of `guarded-fetch.test.ts`.
* Existing tests that mocked the v2 endpoint now use the shared helpers.
`IndirectTaxDeclarationModal.test.tsx` keeps its own `addAPIMock`
because a test asserts the request was served.
* Documented in `apps/studio/tests/README.md` and the
`studio-mock-api-tests` skill.
2026-10-26 10:51:20 -04:00
Charis cb4da25dcd feat(studio): readable type errors for missing or mismatched grants (#52308)
## What

Grant errors from the guarded fetch wrappers (`get`, `post`, …) are now
short and say what went wrong.

Studio sets `noErrorTruncation: true`, so when a grant was missing, or
the init was passed as a variable with the wrong grant, TypeScript
printed the full structural type of the init (several times over). With
a real request body this ran to roughly 11–12k characters per error.

## How

- `CheckedUrl` checks the grant on the `url` argument. TypeScript
reports the first failing argument, so the error now prints the short
path literal plus a `GrantError<"…">` message:
- `This endpoint requires a grant or 'unguarded'. The grant is missing
or may be undefined.`
  - `The grant is for a different endpoint or method.`
  - `This endpoint has no FGA annotation. Remove the grant.`
- `GrantProblem` mirrors `GrantOption`, so the `url` check is never
stricter than the existing init check. The init check (`CheckedInit`) is
unchanged and still enforced.
- `Init`'s constraint includes `grant?: unknown`, so an init like `{
grant }` on an endpoint with all-optional options no longer fails the
weak-type check and falls back to the constraint (which hid the real
grant).
- Init optionality is based on `Init` rather than the checked type, so
calling an annotated endpoint with no init reports the grant message
instead of "Expected 2 arguments".

Every case is now under ~430 characters on both TypeScript 6.0.2 and
7.0.2.

## Testing

- Full Studio typecheck passes on TS 7 and TS 6, so every existing
`@ts-expect-error` in `guarded-fetch.test.ts` still fires and accepted
calls still compile.
- `guarded-fetch.test.ts` passes, including the return-type equality
checks against the raw client.

Resolves FE-4722
2026-10-26 10:51:08 -04:00
Alaister YoungandAlaister Young b0b443c4b3 fix(studio): don't redirect static assets in maintenance mode (#52307)
With `MAINTENANCE_MODE=true`, the catch-all redirect only exempted
`/maintenance` and `/img`. Under a base path on the TanStack build, that
also redirected the SPA's own JS/CSS (`/_vercel/immutable`, `/assets`),
favicons and fonts, so the maintenance page couldn't load. The Next prod
build was unaffected because its assets come from the CDN, but
self-hosted Next was redirecting its `public/` files too.

**Changed:**
- `getMaintenanceRedirects` builds its exclusion from a shared
`MAINTENANCE_PASSTHROUGH_SEGMENTS` list: the maintenance page, build
output dirs (`_next`, `_vercel`, `assets`) and every top-level `public/`
entry
- Matches whole path segments, so `/maintenance-foo` or `/images/...`
now redirect as expected
- `matchRedirect` (the runtime check in `routes/__root.tsx`) uses the
same list, so both runtimes stay in sync
- `/api` and `/_serverFn` still redirect: maintenance takes the backend
offline too, and the maintenance page doesn't need them

**Added:**
- Tests compiling the rule through Next's path matcher and
`@vercel/routing-utils`, with and without `/dashboard`
- A guard test that fails if a new top-level `public/` entry isn't added
to the list

## To test

The `studio-staging` preview for this branch has `MAINTENANCE_MODE=true`
and `STUDIO_FRAMEWORK=tanstack` set, so it runs the TanStack build in
maintenance mode.

- Load any page, e.g. `/dashboard/project/<ref>` or `/dashboard/org`: it
should 307 to `/dashboard/maintenance`
- The maintenance page should render fully, with the logo, styles and
favicon. In the Network tab, everything under
`/dashboard/_vercel/immutable/...`, `/dashboard/favicon/...` and
`/dashboard/img/...` is a 200 with no redirects
- `/dashboard/api/...` requests should still redirect to the maintenance
page
- Optional: with only `MAINTENANCE_MODE=true` (Next build), pages still
redirect and the maintenance page renders

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-10-26 22:20:05 +08:00
Alaister YoungandAlaister Young e6373d2940 fix(studio): serve SPA shell for dotted deep links under base path (#52306)
Under a base path, the TanStack Vercel build rewrote any
`/dashboard/...` URL ending in `.<ext>` to the root to serve static
files. That also caught page deep links whose last segment has a dot, so
hard-loading e.g.
`/dashboard/project/<ref>/storage/files/buckets/my.bucket` returned a
404 instead of the SPA shell (reproducible on supabase.green today).

**Changed:**
- `vercel-spa-routes` now limits the prefix rewrite to the actual
top-level entries of the static output (`_vercel`, `img`, `favicon`,
`fonts`, …), read from Nitro's public dir at build time
- Directories only match with a trailing path, so a page sharing a
directory's name still gets the shell
- Prefixed requests for missing hashed chunks still 404 rather than
returning HTML

## To test

- On the preview, hard-load a storage bucket URL with a dot in the name
(`/dashboard/project/<ref>/storage/files/buckets/my.bucket`) and confirm
the page renders
- Hard-load a few normal deep links, then check the Network tab: JS/CSS
under `/dashboard/_vercel/immutable/...`, favicons and
`/dashboard/img/...` all 200
- `curl -I` a made-up
`/dashboard/_vercel/immutable/<salt>/nitro/missing.js` and confirm a
404, not HTML

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-10-26 22:19:10 +08:00
Kody Jackson 9524afe63c chore(www) - add FAQs entry to www footer (#52310)
## Problem

Missing entry to new FAQs section in the www footer.

## Preview links

TBD
2026-10-26 09:13:56 -05:00
Robert Vojta ffe3f35a42 Add Robert Vojta to humans.txt (#52303)
Onboarding task.
2026-10-26 13:44:16 +00:00