Commit Graph
35148 Commits
Author SHA1 Message Date
5c7bf76e6c Correct Lithuanian text in README.lt.md (#43240)
Fixed a few grammatical mistakes in the README.lt.md

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

Just a few grammatical fixes in the readme, really nothing big

## What is the current behavior?

Difficult to read, clearly AI generated sentences

## What is the new behavior?

Not AI generated sentences, slightly easier to read (changed a few
sentences only though)

---------

Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>
Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2026-03-17 15:19:40 +00:00
TheOtherBrian1 9819fb7b20 docs: updated bundle size limits (#43836)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Docs update

## What is the current behavior?

[Edge function docs
state:](https://supabase.com/docs/guides/functions/limits#:~:text=Maximum%20Function%20Size%3A%2020MB%20(After%20bundling%20using%20CLI))>
Maximum Function Size: 20MB (After bundling using CLI)

However, the bundle size troubleshooting guide argues: 
> Edge Functions have a 10MB source code limit. If your function exceeds
this limit, deployment will fail.

## What is the new behavior?

Updated the 10MB limit to 20MB in the troubleshooting docs
2026-03-17 16:01:27 +01:00
Ali Waseem 609b6db112 fix: remove oauth apps from self hosted (#43865)
## 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?

self hosted fix: remove oauth apps and add tests so this never happens
again
2026-03-17 14:10:23 +00:00
Jordi EnricandClaude 3b010f146f fix(studio): hide observability from sidebar for self-hosted (#43862)
Ensure the observability link in the sidebar and command menu are
properly guarded by IS_PLATFORM to prevent them from showing in
self-hosted or CLI environments.

The logic is functionally the same (IS_PLATFORM && reportsEnabled), but
restructured with IS_PLATFORM as the outer check for clarity, and added
comments explaining the platform-only restriction.

https://claude.ai/code/session_01PG2TEGaSxaXZfXkbSBU3kQ

## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES/NO

## What kind of change does this PR introduce?

Bug fix, feature, docs update, ...

## What is the current behavior?

Please link any relevant issues here.

## What is the new behavior?

Feel free to include screenshots if it includes visual changes.

## Additional context

Add any other context or screenshots.

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-17 15:06:46 +01:00
Tiago AntunesandIvan Vasilov 9bf981f371 feat(ui-library): add Realtime Monaco ui component (#41766)
## 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?

Adds a new Realtime Monaco component to the UI Library, enabling
collaborative code editing with Supabase Realtime synchronization using
Monaco Editor and Yjs.

## Additional context

This is WIP and used for discuss further changes to the y-supabase
provider.

## Demo

https://github.com/user-attachments/assets/84a761e5-73bb-478e-979a-682121ffee89



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

## Summary by CodeRabbit

## Release Notes

* **New Features**
* Added a new Realtime Monaco collaborative code editor component with
real-time synchronization support across multiple frameworks (Next.js,
React, React Router, Tanstack).

* **Documentation**
* Added comprehensive documentation and usage guides for the Realtime
Monaco component across all supported frameworks.

* **Dependencies**
* Added Monaco editor, Yjs, y-monaco, and Supabase collaboration
packages.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

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

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-03-17 13:55:03 +01:00
Andrey A. 4f65e09ff5 chore(self-hosted): update changelog 2026-03-16 (#43827) 2026-03-17 12:36:24 +00:00
Andrey A. d8947c1194 chore(self-hosted): update image versions 2026-03-16 (#43826) 2026-03-17 13:27:01 +01:00
Chris ChinchillaandCopilot Autofix powered by AI bb1ced5e10 docs: Update ionic vue example with more appropriate auth methods, code sample component, and language changes (#43817)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-17 13:07:43 +01:00
Gildas Garcia 9dd19f1da5 fix: prevent unnecessary dialog after saving a new edge function (#43854)
## Problem

After deploying a new edge function where you actually modified the code
from the initial template, a dialog appears about unsaved changes.

## Solution

We must check that even though the files have changed from the initial
ones, we actually saved them by deploying the function.

However, because we trigger the navigation in the mutation `onSuccess`
side effect, it happens before react can update the state that would
prevent the dialog from appearing.
2026-03-17 12:27:44 +01:00
Andrey A. 6ea650f999 fix: revise and update proxy how-to (#43853) 2026-03-17 11:32:42 +01:00
Andrey A. d6f10cae9f fix: adjust proxy configs for new api keys and auth (#43837) 2026-03-17 11:17:59 +01:00
Ivan VasilovandJoshen Lim 9fa96977be chore: Minor prettier fixes (#43849)
This PR fixes some prettier issues:
- Bump and unify all prettier versions to 3.7.3 across teh whole repo
- Bump the SQL prettier plugin
- When running `test:prettier`, check `mdx` files also
- Run the new prettier format on all files

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-03-17 11:17:42 +01:00
Pedro RodriguesandClaude Opus 4.6 62426253c3 fix: pass exposedSchemas to getLints in MCP advisor operations (#43790)
## Summary

- MCP `getSecurityAdvisors` and `getPerformanceAdvisors` now pass
`exposedSchemas` to `getLints`, fixing empty advisor results in
local/self-hosted environments
- Extracts `DEFAULT_EXPOSED_SCHEMAS` constant shared between the MCP
handler and the `run-lints` API route (cc @joshenlim related
https://github.com/supabase/supabase/pull/40043)
- Adds unit tests for `enrichLintsQuery` and the MCP advisor operations

## The bug

The MCP advisor tools (`get_advisors`) return empty arrays (`[]`) for
**all** scenarios when running locally via `supabase start`. No security
or performance advisors are surfaced, even when the database has clear
issues (e.g., tables with no RLS).

### Root cause

In `lib/api/self-hosted/mcp.ts`, both `getSecurityAdvisors` and
`getPerformanceAdvisors` call `getLints({ headers })` **without passing
`exposedSchemas`**:

```typescript
// Before (mcp.ts:131)
const { data, error } = await getLints({ headers })
```

When `exposedSchemas` is `undefined`, `enrichLintsQuery` in `lints.ts`
skips the `SET LOCAL pgrst.db_schemas = '...'` SQL statement:

```typescript
// lints.ts:23
${!!exposedSchemas ? `set local pgrst.db_schemas = '${exposedSchemas}';` : ''}
```

Without this GUC being set, the splinter SQL queries filter results
using `current_setting('pgrst.db_schemas', 't')` — which returns an
empty string in local environments. Every schema-filtered lint matches
no schemas and returns zero rows.

### Why this only affects local/self-hosted environments

In **hosted Supabase**, PostgREST sets the `pgrst.db_schemas` GUC on its
own database connections based on the project's API configuration. The
Studio MCP server in production reads the same project configuration, so
the GUC is already available.

**Locally**, PostgREST runs in a separate Docker container and only sets
this GUC on _its own_ connections. Studio connects directly to
PostgreSQL (bypassing PostgREST), so
`current_setting('pgrst.db_schemas', 't')` returns `''`.

The HTTP API endpoint (`/api/platform/.../run-lints`) already worked
because `run-lints.ts` passes `exposedSchemas: 'public, storage'` — this
parameter was simply never added to the MCP code path.

## How we verified the fix

### 1. Tests written to fail against the previous code

We wrote two test files that target the exact bug:

**`tests/unit/lints/enrichLintsQuery.test.ts`** — validates the SQL
generation:
- Confirms `SET LOCAL pgrst.db_schemas` is included when
`exposedSchemas` is provided
- Confirms it's omitted when `undefined` or empty (documenting current
behavior)

**`tests/unit/lints/mcp-advisors.test.ts`** — validates the MCP
operations:
- Asserts `getSecurityAdvisors` passes `exposedSchemas` to `getLints`
- Asserts `getPerformanceAdvisors` passes `exposedSchemas` to `getLints`
- Asserts the value matches `DEFAULT_EXPOSED_SCHEMAS`
- Verifies SECURITY/PERFORMANCE category filtering still works

Before the fix, the two `exposedSchemas` assertions failed:

```
FAIL  getSecurityAdvisors should pass exposedSchemas to getLints
  → expected { Object (headers) } to have property "exposedSchemas"

FAIL  getPerformanceAdvisors should pass exposedSchemas to getLints
  → expected { Object (headers) } to have property "exposedSchemas"
```

### 2. Fix applied, all tests pass

After adding `exposedSchemas: DEFAULT_EXPOSED_SCHEMAS` to both MCP
operations, all 14 tests pass (9 new + 5 existing MCP tests).

## Test plan

run `supabase start`, create a table without RLS, call `get_advisors`
via MCP — should return `rls_disabled_in_public` lint

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 09:48:34 +00:00
Danny White 89895a7286 chore(studio): file explorer rows (#43845)
## What kind of change does this PR introduce?

UI touch-up

## What is the current behavior?

Explorer rows in file storage is a bit rough around the edges.

## What is the new behavior?

- Consistent loaders
- Consistent icons

Also includes:

- Fix to `stroke-width` on files-bucket.svg as documented in icons.mdx

| Before | After |
| --- | --- |
| <img width="1024" height="563" alt="Buckets Storage AWS Healthy
Toolshed Supabase"
src="https://github.com/user-attachments/assets/055518b2-6d93-4c9d-879b-6e7dd51e0620"
/> | <img width="1024" height="563" alt="Buckets Storage AWS Healthy
Toolshed Supabase"
src="https://github.com/user-attachments/assets/fae05446-95d9-4ca1-b441-7cd39d1c6036"
/> |
2026-03-17 15:47:25 +08:00
Stephen Morgan d49da89517 feat: update to DPA Q1 2026 (#43843)
Only one change to this DPA in the addition of Braintrust as a
sub-processor

Fixes SEC-757
2026-03-17 07:34:40 +01:00
Joshen LimandCharis Lam 7d1b38f804 Float up error code from status page into incident-status endpoint (#43737)
## Context

Just a nit change to float the status code from status page API into
incident-status endpoint so its clearer what the error is from the
network tab

---------

Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2026-03-17 09:55:39 +08:00
Danny White e8b5b565a9 chore(design-system): centralise MCP client assets (#43730)
## What kind of change does this PR introduce?

Chore

## What is the current behavior?

- We use the MCP client connect dialog in two places: Studio and Docs
- We duplicate image assets for each client in each of those two places

## What is the new behavior?

- Centralised assets
- Consolidation and simplification as a result of it all being a single
source-of-truth now

## To test

- [ ] Everything works as it did before across both Studio and
[Docs](https://supabase.com/docs/guides/getting-started/mcp)
- [ ] All MCP client images load as expected
2026-03-17 11:19:49 +11:00
AnaandAna Mogul dc04437fde fix(www): correct feature statuses, MCP Server copy, and self-hosted flags (#43223)
## 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 content/data fix: correcting stale feature metadata on the marketing
features page and docs feature status table.

## What is the current behavior?

Several features in features.tsx (supabase.com/features) have incorrect
stage or self-hosted availability values that are out of sync with docs.

## What is the new behavior?

branching
- stage updated to Beta

vault
- stage updated to Public Alpha

jwt-signing-keys
- availableOnSelfHosted set to true

persistent-storage
- docs URL corrected to /guides/functions/ephemeral-storage
- env var names corrected to S3FS_ACCESS_KEY_ID, S3FS_SECRET_ACCESS_KEY,
S3FS_REGION, S3FS_ENDPOINT_URL

features.mdx
- PrivateLink row added to the Platform section (beta, N/A for
self-hosted)

mcp-server
- removed "upcoming" from OAuth benefit (OAuth is now live), updated PAT
FAQ (OAuth is now default, PAT only needed for CI/CD), updated
self-hosted FAQ (self-hosted is supported via
/guides/self-hosting/enable-mcp)

## Additional context

N/A

---------

Co-authored-by: Ana Mogul <ana1337x@users.noreply.github.com>
2026-03-16 18:47:30 -04:00
Ignacio Dobronich 07a40185b1 chore: change tax id banner copy (#43835)
`should` -> `must` in the Tax ID banner
2026-03-16 18:26:58 -03:00
Gildas Garcia db14762aa6 feat: Add table and column menus in schema visualiser (#43693)
## Problem

- The schema visualiser lacks editing capabilities which leads to a lot
of navigation (ediing tables, columns)
- ReactFlow prevents users from selecting table and column names (to
copy them). Diasbling drag and pan on those texts would make moving
items cumbersome
- Long table and column names are hidden and even hide other elements

## Solution

- Add menus for both tables and columns
- Truncate long names with ellipsis and add a tooltip
- Hide menus when exporting to png/svg

[Screen Recording 2026-03-12 at
10.10.08.webm](https://github.com/user-attachments/assets/b2780266-e874-41d1-ac82-7c2c4ba5abf2)
2026-03-16 22:14:44 +01:00
Ali Waseem bc23782d0b fix: update project unpause to not show undefined (#43820)
## 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?

When un-pausing the dashboard, the project home page on platform shows
undefined rather than the default state of "URL not available"

## Ways to test

You can pause and then unpause a project to see if this works correctly
2026-03-16 14:39:56 -06:00
Raúl Barroso 2ba93c5632 refactor: to projects (#43825)
Use settled project name
2026-03-16 20:47:32 +01:00
25120657db feat(sso): improve SSO management UX (safe deletion + invitation type selection) (#43615)
## feat(sso): improve SSO management UX (safe deletion + invitation type
selection)

This PR improves the SSO management experience by introducing a safer
deletion flow for SSO providers and allowing explicit control over
invitation authentication type.

## SSO Provider Deletion Improvements

The SSO provider deletion flow has been redesigned to better communicate
the impact of the action and prevent accidental destructive operations.

### UX Improvements

* Replace `ConfirmationModal` with `TextConfirmModal` in `SSOConfig`
* Require typing the SSO domain to confirm deletion
* Display the number of organization members authenticating via SSO who
will be removed
* Add destructive visual styling and clear warnings about irreversible
consequences
* Update confirmation button label to emphasize impact:

  * `I understand, delete SSO provider and members`

### Warning Content

The modal now clearly communicates:

* The domain being deleted
* That SSO authentication will be disabled
* That SSO-authenticated members will be permanently removed
* That those members must be re-invited to regain access

If SSO members exist, a highlighted destructive warning box shows:

```
X organization member(s) who authenticate via SSO will be permanently removed
```

### Implementation Details

* Add `useOrganizationMembersQuery` to fetch organization members
* Calculate SSO members by filtering `is_sso_user === true`
* Only display the member warning when the count > 0
* Modal uses `variant="destructive"` and `size="small"`

This pattern follows the existing **Delete organization** confirmation
flow.

### Initial Delete Support

This PR also introduces the underlying deletion functionality:

* Add `useSSOConfigDeleteMutation`
* Add delete button (trash icon, danger styling) in the SSO config
footer
* Layout mirrors `CustomDomainDelete` pattern:

  * delete button on the left
  * save/cancel actions on the right
* Success toast shown after deletion
* Form resets to explicit default values after deletion

## Invitation Type Selection

Organizations with SSO configured can now explicitly choose the
authentication method when inviting new members.

Previously, invitations always inherited the inviter's authentication
method. This made it difficult to support mixed authentication
organizations.

### New Invitation Options

When SSO is enabled, the invite dialog now shows an **Invitation type**
dropdown:

* **Automatic (based on your account)**
  Default behavior; inherits authentication method from the inviter.

* **Require SSO authentication**
  Sends an SSO invitation.

* **Email/password authentication**
  Sends a non-SSO invitation.

### Implementation Details

* Add `useOrgSSOConfigQuery` to detect if SSO is configured
* Add `requireSso` field to the form schema with enum:

  * `auto`
  * `sso`
  * `non-sso`
* Only display the dropdown when the organization has an SSO provider
* Transform form values before sending to the backend:

```
sso -> { requireSso: true }
non-sso -> { requireSso: false }
auto -> {} (omit parameter)
```

* Update `OrganizationCreateInvitationVariables` to include optional
`requireSso`
* Preserve backward compatibility by only sending the field when
explicitly set

## Bug Fixes

* Attribute mapping preset buttons (Azure, GSuite, Okta) now properly
mark the form as dirty so the save button becomes enabled
* Form reset after deletion now uses explicit default values instead of
the last saved state

## Problems Solved

This PR addresses several UX issues:

1. Deleting an SSO provider previously used a simple confirmation with
no explanation of impact
2. Users could not see how many members would be affected by deletion
3. The destructive and irreversible nature of the action was not
visually emphasized
4. Invitations always inherited the inviter's auth method
5. Organizations could not intentionally mix SSO and non-SSO users

## Types

TypeScript types in `api-types` were updated to support the new
`require_sso` parameter.

---------

Co-authored-by: Chris Stockton <chris.stockton@supabase.io>
Co-authored-by: Ali Waseem <waseema393@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-03-16 09:56:06 -07:00
Prashant Sridharan 5528817602 Figma webinar pages (#43779) 2026-03-16 16:15:01 +00:00
b69a145403 feat: custom oauth providers (#43094)
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Ali Waseem <waseema393@gmail.com>
2026-03-16 17:13:08 +01:00
Chris StavitskyandAli Waseem e217f747bd feat(studio) instrument sentry on table creation flow (#43673)
(working with @charislam @awaseem on this one)

## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

Per
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md):
- ✅ `pnpm --filter studio build`
- ✅ `pnpm test:prettier`
- ✅ `pnpm format`

## What kind of change does this PR introduce?

Instruments `studio` app's table creation flow with Sentry.

## What is the current behavior?

The table creation flow isn't instrumented in detail, which means we
have less visibility into understanding performance problems or errors
within this specific flow.

## What is the new behavior?

The table creation flow is instrumented in detail. This instrumentation
allows for Sentry dashboards like this one (created based on locally
generated Supabase data), to help monitor anything going wrong with this
critical flow:

<img width="1915" height="1131" alt="image"
src="https://github.com/user-attachments/assets/e2c5380e-7b00-41c1-9109-3ee4e47ff63b"
/>

---------

Co-authored-by: Ali Waseem <waseema393@gmail.com>
2026-03-16 09:57:43 -06:00
Atharv Gaur edf51dfd98 fix(self-hosted): add hybrid JWT verification for edge functions docker template 2026-03-16 16:56:29 +01:00
Ali Waseem 4d967740f7 fix permissions for docker image publish (#43823)
## 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?

GitHub action permissions have changed, so because of that We need to
apply permissions on the parent
2026-03-16 15:51:55 +00:00
Francesco Sansalvadore 8fd868bc6e restore org selector loaders (#43782) 2026-03-16 15:18:18 +00:00
Gildas Garcia 43e793f5ad chore: fix e2e flakyness (#43739)
## Problem

Since the upgrade to NextJS 16.1.6, many e2e tests run fails with
timeout, probably when building or starting the studio

## Solution

- [x] Add dedicated steps for supabase setup and NextJS build to ease
debugging
- [x] Fix flakyness
2026-03-16 15:51:20 +01:00
Taryn KingandChris Chinchilla cfbb73c60f docs: improve clarity of auth rate limits (#43618)
## 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?

Doc update to improve clarity of auth rate limits.

---------

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2026-03-16 14:37:50 +00:00
supabase-supabase-autofixer[bot]andgithub-actions[bot] 68ef4097a7 [bot] Decrease ESLint ratchet baselines (#43788)
Automated weekly decrease of ESLint ratchet baselines.

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-16 08:31:25 -06:00
kemal.earth 6ba572a160 feat(studio): move error code popover to shared data (#43811)
## 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?

As we now have the internal error code mapping in `shared-data`, thought
it better to move away from the GraphQL endpoint and leave that for
external use. The error code popovers in studio now rely on shared-data,
meaning instant loads and no rate limiting.
2026-03-16 14:08:48 +00:00
supabase-cli-releaser[bot] 2510f4e7c7 chore: update cli reference doc (#43756)
Co-authored-by: supabase-cli-releaser[bot] <246109035+supabase-cli-releaser[bot]@users.noreply.github.com>
2026-03-16 15:04:12 +01:00
supabase-supabase-autofixer[bot]andsupabase-releaser[bot] 7b5b09a143 docs: update js sdk docs (2.99.2) (#43814)
Updates JS sdk documentation following stable release.
Ran `make` in apps/docs/spec to regenerate tsdoc files.

**Details:**
- **Version:** `2.99.2`
- **Source:** `supabase-js-stable-release`
- **Changes:** Regenerated tsdoc files from latest spec files

🤖 Auto-generated from @supabase/supabase-js stable release.

Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.com>
2026-03-16 14:18:17 +01:00
Andrey A. 34321a0811 fix(self-hosted): improve s3 backend tests 2026-03-16 14:15:04 +01:00
Andrey A. ac01c8139e fix(self-hosted): use named volumes for s3 and reduce redundancy 2026-03-16 14:14:41 +01:00
Pamela Chia 4a4fe253ce feat(www,studio): privacy policy amendments — advertising, cookie disclosure, banner (#43681) 2026-03-16 21:49:02 +09:00
Jordi Enric 92057653aa Jordi/fix log drains redacted headers patch (#43810)
temporarily hide option to update log drains
2026-03-16 11:20:21 +00:00
Johan Bergström 1f53b2d6e9 chore(docker-compose): introduce rustfs as an option to minio 2026-03-16 12:14:25 +01:00
Andrey A. 65d874291d add a new how-to describing new api keys 2026-03-16 12:00:43 +01:00
Andrey A. 949f98b73a add various tests for self-hosted 2026-03-16 12:00:25 +01:00
Andrey A. 6190518640 add new opaque api keys and new auth to self-hosted 2026-03-16 12:00:10 +01:00
Jordi Enric ec26943390 feat: improve db overload debugging UX (#43564)
When the dashboard hits a DB connection timeout, users currently see a
raw error message with no
path forward. This PR adds an inline troubleshooting system that detects
known error types and
surfaces contextual next steps — restart the DB, read the docs, or debug
with AI.

##  Changes

- New ErrorDisplay component (packages/ui-patterns) — styled error card
with a title, monospace error
block, optional troubleshooting slot, and a "Contact support" link that
always renders. Accepts
  typed supportFormParams to pre-fill the support form.

- Error classification in handleError (data/fetchers.ts) — on every API
error, the message is tested
against ERROR_PATTERNS. If matched, handleError throws a typed subclass
(ConnectionTimeoutError
extends ResponseError) instead of a plain ResponseError. Stack traces
now show the exact error
  class. All existing instanceof ResponseError checks continue to work.

- ErrorMatcher component — reads errorType from the thrown class
instance, does an O(1) lookup into
ERROR_MAPPINGS, and renders the matching troubleshooting accordion as
children of ErrorDisplay.
  Falls back to plain ErrorDisplay for unclassified errors.

- Connection timeout mapping — first error type wired up, with three
troubleshooting steps: restart
the database, link to the docs, and "Debug with AI" (opens the AI
assistant sidebar with a
  pre-filled prompt).

- Telemetry — three new typed events track when the troubleshooter is
shown, when accordion steps are
   toggled, and which CTAs are clicked.

##  Adding a new error type

  1. Add a class to types/api-errors.ts
  2. Add { pattern, ErrorClass } to data/error-patterns.ts
  3. Create a troubleshooting component in errorMappings/
  4. Add an entry to error-mappings.tsx
2026-03-16 11:22:30 +01:00
Chris ChinchillaandJeremias Menichelli 81dd47a421 docs: Rework vue3 example and use codesample component (#43703)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

---------

Co-authored-by: Jeremias Menichelli <jmenichelli@gmail.com>
2026-03-16 11:16:32 +01:00
Kalleby Santos 935155cd18 fix(example): wrong folder link at custom-jwt-validation readme (#40474)
* fix(example): wrong folder link at custom-jwt-validation readme

* fix: jwt template download url

* stamp: use curl instead of wget
2026-03-16 09:52:26 +00:00
Joshen Lim 241f7bb721 Chore/shift manual queries into pg meta (#43692)
## Context

Related to FE-2557

Part of shifting manually written dashboard queries into
packages/pg-meta where
- pg-meta can be code owners of
- we can write tests for the queries 

This PR just shifts all the `.sql.ts` files that we previously created
into packages/pg-meta

There's still other areas where we need to shift over as well which I'll
address in subsequent PRs

## Notable changes

- `getTableRowsCountSql` -> Opted to shift `formatFilterValue` logic out
before calling this method (ref `table-rows-count-query`)
- `getDeleteOldCronJobRunDetailsByCtidSql` -> Opted to shift
`validatePageNumber` logic out before calling this method (ref
`CronJobsTab.useCleanupActions`)
2026-03-16 16:14:48 +07:00
Danny White 7f61d9143b fix(studio): reflect active storage tab in page titles (#43803)
## What kind of change does this PR introduce?

Bug fix.

## What is the current behavior?

The file storage routes under `/project/[ref]/storage/files` all use
`Storage | Project | Org | Supabase` as the browser title, even when the
user is on a more specific tab.

## What is the new behavior?

The browser title now reflects the active file-storage tab:

- `/storage/files` -> `Files | Storage | Project | Org | Supabase`
- `/storage/files/settings` -> `Settings | Storage | Project | Org |
Supabase`
- `/storage/files/policies` -> `Policies | Storage | Project | Org |
Supabase`

Ditto for `analytics` and `vector`
2026-03-16 19:08:30 +11:00
Danny WhiteandJoshen Lim 7d6995bbfe refactor(studio): clean up ProjectLayout title API (#43742)
## What kind of change does this PR introduce?

Refactor, cleanup, and docs update.

## What is the current behavior?

After the page-title rollout, `ProjectLayout` is still in a transitional
state:

- it accepts a deprecated `title` prop
- it still supports a separate `browserTitle.surface`
- wrapper layouts are split between passing `title` directly and passing
`browserTitle.section`

That makes the API harder to reason about than it needs to be, even
though the rendered titles are already correct.

## What is the new behavior?

This cleanup finishes the API simplification that came out of the
stacked PR review:

- wrapper layouts stay `title`-first for DX
- `ProjectLayout` no longer accepts `title`
- `product` is now the single source of truth for the project-surface
title segment
- `browserTitle` is now only used for extra browser-title metadata
(`entity`, `section`, `override`)
- the remaining project-scoped callers now pass `browserTitle.section`
when they need a section label
- docs now reflect the final pattern instead of the transitional one

Rendered page titles stay the same.

## Additional context

Checks run:

- `pnpm --filter studio exec vitest --run lib/page-title.test.ts
components/layouts/ProjectLayout/index.test.tsx`
- `pnpm --filter studio typecheck`
- `pnpm exec prettier --check ...` on touched files

This is intended as the post-rollout cleanup PR based on Joshen's review
feedback across the stacked title changes.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-03-16 18:03:10 +11:00
Joshen Lim be7f8ca524 Change URL param string for destination panel type as it conflicts with Connect Modal (#43734)
## Context

Small one - while on the database replication page, if you open the
Connect Dialog and change the "type" field, the destination panel opens
up. Happening cause the string for `useQueryState` conflicts here - both
are using `type`

Fix is just to update the string for `useQueryState` for the
DestinationPanel component, changed it to `destinationType`
2026-03-16 10:26:06 +07:00