Commit Graph
34984 Commits
Author SHA1 Message Date
85e623b469 docs(backups): physical backups are enabled by default (#43192)
## 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

## What is the current behavior?

Doc incorrectly states physical backups are not enabled by default. 

## What is the new behavior?

Backup doc page now correctly clarifies physical backups are enabled by
default,
assuming project is eligible. 

## Additional context

NA

---------

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-10 15:56:03 +01:00
68e6edd5e6 show/hide password logic fixed (#41694)
## 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?

This PR changes the logic for show/hide password icon in the sign up
form. Fix #39399 and #41459

## What is the current behavior?
For Password Field Eye Icon Label
<ul>
<li>When password is hidden: Button shows "Hide password" label
(incorrect).
<li>When password is visible: Button shows "Show password" label
(incorrect)
</ul>
For Edge Functions Secrets
<ul>
<li>All secret values are always visible in plain text
<li>No visibility toggle functionality exists
<li>No way to hide/show individual secret values
</ul>

## What is the new behavior?

Sign-up Form Password Field:
<ul>
<li>When password is hidden: Button correctly shows "Show password"
label
<li>When password is visible: Button correctly shows "Hide password"
label</ul>
Labels now accurately describe what clicking the button will do 
<p></p>
Edge Functions Secrets:
<ul>
<li>Secret values are hidden by default (security-first approach)
<li>Each secret has its own independent visibility toggle button
<li>Hidden secrets display as bullet points (•••••••••••••••••••••)
<li>Eye icon appears when secret is hidden - click to reveal
<li>EyeOff icon appears when secret is visible - click to hide
<li>Tooltip shows "Hidden" when value is masked, actual value when
visible</ul>

---------

Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com>
Co-authored-by: Alaister Young <a@alaisteryoung.com>
2026-03-10 22:51:17 +08:00
Gergely BatorandChris Chinchilla 64e800c0c1 docs: remove duplicate table assignment in Python generated types example (#42185)
Remove duplicate table assignment using undefined `supabase` variable

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

-

## What is the new behavior?

-

## Additional context

-


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

## Summary by CodeRabbit

* **Documentation**
* Simplified the Python API client examples in the generating Python
types guide by removing redundant code assignments, making the
documentation clearer and easier to follow.

<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: Chris Chinchilla <chris.ward@supabase.io>
2026-03-10 15:24:16 +01:00
John FitzgeraldandChris Chinchilla 02dd0b46b8 Added John Fitzgerald to humans.txt (#42253)
## 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, added my name

## What is the current behavior?

N/A

## What is the new behavior?

N/A

## Additional context

Onboarding task


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

## Summary by CodeRabbit

* **Chores**
  * Updated team roster documentation.

<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: Chris Chinchilla <chris.ward@supabase.io>
2026-03-10 14:21:05 +00:00
Alaister Young 3eb0022264 [FE-2158] (part 2) – feat(studio): Add exposed functions config to Postgrest settings (#43478)
**Changes:**
- Add function exposure controls to Data API settings
- Adds a per-function GRANT/REVOKE UI to the Data API settings page,
alongside the existing table selector.
- Empty state: shows "No tables/functions available" instead of "0 of 0
X exposed" when there's nothing to show
- Renamed update-exposed-tables-mutation →
update-exposed-entities-mutation to handle both tables and functions in
one save
**Decisions of note:**
- Functions are grouped by schema.name across overloads — toggling one
entry grants/revokes `EXECUTE` on all overloads
- Only normal and window functions are shown (`prokind in ('f', 'w')`) —
triggers and aggregates are excluded

---

**To test:**

- Table and schema selectors still works end-to-end
- Toggling a function and saving updates the count label and applies the
grant (check via SQL Editor: select * from
information_schema.role_routine_grants where routine_schema = 'public')
- Functions in unexposed schemas are dimmed and unclickable
- With no functions in the selected schemas, the selector label reads
"No functions available" and the dropdown shows the same
2026-03-10 22:11:59 +08:00
Gildas Garcia 87581e02cb fix: Prevent users from loosing changes when navigating away (#43577)
## Problem

When editing email templates or edge functions, users may navigate away
from the page without a warning indicating they may loose their changes.

This is because we only handle the `beforeunload` event when we should
also handle NextJS routing events.
This is actually done for the observability reports.

## Solution

Extract the logic from the observability reports into a reusable
component and use it where needed

## How to test

On staging, for each case:
- Authentication email templates
- Observability reports
- Edge functions creation
- Edge functions edition

Test:
- Modify the template/report/function
- Navigate away using either the sidebar link, the browser back button
or closing the tab
- Cancel navigation in the confirmation dialog
- Navigation should be prevented and you should not loose your changes

Test:
- Modify the template/report/function
- Navigate away using either the sidebar link, the browser back button
or closing the tab
- Confirm navigation in the confirmation dialog
- Navigation should not be prevented and you should have lost your
changes
2026-03-10 15:10:47 +01:00
JaafouraandChris Chinchilla 423ec30bec docs: Fix docs typo in "schedule-functions" (#42499)
Updated the secret creation command for Supabase Vault to use 'anon_key'
instead of 'publishable_key'.

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


https://supabase.com/docs/guides/functions/schedule-functions

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

## Summary by CodeRabbit

* **Documentation**
* Updated code examples in the schedule functions guide to reflect
correct Supabase key naming conventions.

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

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2026-03-10 13:53:16 +00:00
Etienne Stalmans 92bdbb2f57 chore: explicit permissions on actions (#43526)
enforces minimal set of permissions, the same as other actions in the
repo
2026-03-10 14:47:26 +01:00
Illia Basalaiev 7cadc12136 chore: add copy button to project reference custom domain flow, add n… (#43585)
…ote on subdomain

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

Feature 

## What is the current behavior?

<img width="697" height="305" alt="CleanShot 2026-03-10 at 09 59 59"
src="https://github.com/user-attachments/assets/7105c136-bffc-49e3-afaf-e6f49a2d4f12"
/>

## What is the new behavior?
- The endpoint value in the CNAME setup instructions can now be copied
with a single click.
- Also adds a note clarifying that some DNS providers expect only the
subdomain label while others accept the full hostname.



https://github.com/user-attachments/assets/8e80ad33-b100-4313-9375-7c43b43c6254
2026-03-10 07:47:11 -06:00
af47a2d010 experiment:pricing feedback iteration on calculator (#42451)
## 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?

Feature — A/B experiment for a new pricing calculator on the `/pricing`
page, gated behind a PostHog feature flag.

## What is the current behavior?

The pricing page shows a single compute pricing section
(`PricingComputeSection`) to all visitors with no experimentation
support.

## What is the new behavior?

- Introduces a **pricing calculator A/B experiment**
(`pricingCalculatorExperiment`) using PostHog feature flags evaluated
client-side.
- **Control variant**: Renders the existing `PricingComputeSection` (no
change).
- **Test variant**: Renders a new `NewPricingComputeSection` with:
  - A plan selector toggle (Pro / Team)
  - An interactive compute calculator with slider-based instance sizing
  - Ability to add/remove multiple project instances
  - Live monthly cost estimate breakdown (plan + compute - credits)
  - Expandable compute pricing table with detailed specs
- Adds `getFeatureFlag` and `onFeatureFlags` methods to the shared
`PostHogClient` for client-side flag evaluation on www pages (where
server-side evaluation lacks full person context).

## Additional context

- The experiment is scoped to the `/pricing` page only.
- New components (`NewPricingComputeSection`,
`NewComputePricingCalculator`) are created alongside the existing ones —
the control path is completely untouched.
- Feature flag evaluation happens client-side because www pages don't
have full person context on the server.
- Telemetry type `PricingCalculatorExperimentExposedEvent` is added to
`telemetry-constants.ts`.

---------

Co-authored-by: Sean Oliver <882952+seanoliver@users.noreply.github.com>
Co-authored-by: Mert YEREKAPAN <mertyerekapan@gmail.com>
Co-authored-by: Mert YEREKAPAN <33198490+myerekapan@users.noreply.github.com>
2026-03-10 13:57:52 +01:00
c734078800 docs: Overhaul reports page (#39195)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

---------

Co-authored-by: Brian <briantgbtheonly@gmail.com>
Co-authored-by: TheOtherBrian1 <91111415+TheOtherBrian1@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-10 12:26:41 +00:00
Chris Chinchilla 8cfdc8576e docs: Expo User Management auth changes (#43568)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES/
2026-03-10 12:10:35 +00:00
Pamela Chia 01c178e159 chore(studio): graduate homeNew experiment (#43437)
## Summary

The `homeNew` PostHog experiment has concluded. This PR graduates it by
making the new homepage (`ProjectHome`, formerly `HomeV2`) the permanent
default for all users, and removes all dead code from the old
experiment.

## Changes

- Remove `homeNew` PostHog feature flag checks and `home_new` experiment
exposure tracking from 3 files
- Rename `HomeNew/` → `ProjectHome/` directory and `HomeV2` →
`ProjectHome` export
- Delete old `Home/Home.tsx` component (shared components like
`ProjectList/` are kept — still used by org pages)
- Delete `pages/project/[ref]/building.tsx` and add a server-side
redirect from `/project/:ref/building` → `/project/:ref` to prevent 404s
during rollout (old cached JS bundles may still route to `/building`)
- Simplify `ContentWrapper` building-state logic in `ProjectLayout` —
always redirect building projects to home, always suppress building
interstitial on home page
- Always route to `/project/{ref}` after project creation (remove
`/building` path)
- Update all Observability imports from `HomeNew` → `ProjectHome`

## Self-hosted behavior change

Self-hosted Studio previously showed the old `Home` component (client
libraries + example projects) since PostHog flags don't load. This PR
changes self-hosted to show `ProjectHome` (TopSection with service
status + instance diagram, advisor, custom reports). All sections query
backend APIs that exist on self-hosted. E2E tests pass against the
self-hosted build.

## Testing

- [x] `pnpm turbo run build --filter=studio` passes
- [x] No remaining references to `homeNew`, `home_new`, or `HomeNew` in
codebase
- [x] No broken imports to deleted files
- [x] Self-hosted E2E tests pass (145 passed, 1 flaky, 4 skipped)
- [x] `/building` redirect added to both platform and self-hosted config
blocks

**Quick test:**
1. Navigate to any project homepage — should render the ProjectHome
component
2. Create a new project — should redirect to `/project/{ref}` (not
`/building`)
3. Visit a project in `COMING_UP` state on a non-home route — should
redirect to home
4. Visit `/project/{ref}/building` directly — should 302 redirect to
`/project/{ref}`

## Linear

- fixes GROWTH-671
2026-03-10 17:03:58 +09:00
Joshen Lim fc7fb50aa2 Organize pg meta queries for studio (#43562)
## Context

We reached to a consensus that we'll keep manually written queries
within the `pg-meta` package

I'll shift queries over in several PRs but wanted to double check if the
changes here is a good folder structure

## Changes involved

- Am organizing dashboard queries in `pg-meta` based on product
  - So folder structure will be `/sql/studio/[product]/*.ts`
- Every constant will be exported directly from `pg-meta`'s index
- So consumption in dashboard will just be `import { xxx } from
'@supabase/pg-meta`

cc @avallete and @soedirgo on this one - lemme know if this is alright,
or if there's a preferred way to do this
2026-03-10 09:34:11 +07:00
Sean Oliver 3570abad4d chore: update posthog-js to 1.357.0 (#43574)
PostHog flagged our SDK as outdated — we were on 1.257.2, latest is
1.357.0.

**Changes**
- Bumped `posthog-js` in `packages/common/package.json` from `^1.257.2`
to `^1.333.0` (resolved to 1.357.0)
- Updated lockfile

**Why is the lockfile diff so large?**
posthog-js added several new dependencies between 1.257.2 and 1.357.0: a
full `@opentelemetry/*` stack (for opt-in log exporting),
`@posthog/core` and `@posthog/types` (internal monorepo split),
`dompurify`, and `query-selector-shadow-dom`. None of these affect our
bundle unless explicitly enabled — they're opt-in features. The lockfile
entries are large because pnpm records each package with its full
resolution tree and checksums.

**Testing**
Spun up the full local stack and verified all three PostHog endpoints
return 200 with the new SDK version:
- `/e/` (event capture) — pageviews firing correctly
- `/flags/` (feature flag evaluation) — flags loading correctly
- `/i/v0/e/` (identify) — user identification working

No breaking changes in any of the 16 releases between our old and new
version (all Minor/Patch Changes). TypeScript compilation clean across
all apps.

GROWTH-589
2026-03-09 15:14:36 -07:00
Charis 8732fc3bd9 fix: add multi-object download signing for storage (#43576)
Bug fix

## What is the current behavior?

Read-only users cannot download files because the download feature
requires minting a temporary API key, which is properly blocked for
read-only users.

## What is the new behavior?

Instead of using temporary API keys, we now create signed URLs for the
files to be downloaded. We batch-create signed URLs for an entire
folder's worth of files, requiring only a single management API call,
then use those signed URLs to download the files. This allows read-only
users to download files without needing elevated permissions.

## Additional context

Resolves FE-2737
2026-03-09 16:49:59 -04:00
Ali Waseem f7d3d2d3c3 feat: filter by value for simple types on new filter experience (#43579)
## 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?

- Added filter by value for the new feature bar experience
- Will follow up with an E2E test later
2026-03-09 14:48:59 -06:00
Sean Oliver 8ebbad3a5b feat(growth): expand www middleware to /dashboard and /docs (Phase 1 - instrumentation only) (#43413)
## Problem

The `_sb_first_referrer` cookie isn't working. The www middleware
matcher explicitly excludes `/dashboard` and `/docs`, so the cookie
never gets stamped for Studio or Docs traffic. PostHog confirmed: only 1
event with `first_referrer_cookie_present=true` out of ~46.5M Studio
pageviews in the last 7 days.

## Background: what the matcher does

In Next.js, the `matcher` config controls which incoming requests the
middleware function even runs on. If a path doesn't match, the
middleware is skipped entirely — the request passes through untouched.
If it matches, the middleware runs and can mutate the response (set
cookies, headers, etc.).

This matters because Studio's SPA navigation works via silent
`/_next/data/` JSON fetches. If middleware runs on those requests and
returns `NextResponse.next()` with any mutations, it breaks those
fetches and causes full page reloads instead of client-side transitions.

## What we tried before

| PR | www runs on `/dashboard`? | Studio `proxy.ts` runs on all routes?
| Result |
|---|---|---|---|
| **#42768** (Attempt 1) | ✅ Yes — and also intercepts `_next/data` | ✅
Yes — `matcher` config removed, stamps cookie everywhere | Full page
reloads in Studio |
| **#43129** (Full revert) | ❌ No — www middleware deleted entirely | ❌
No — restored to `matcher: '/api/*'` only | Back to baseline, no cookie
stamping anywhere |
| **#43153** (Attempt 2) | ❌ No — `/dashboard` explicitly excluded | ✅
Yes — `matcher` config removed again, stamps cookie everywhere | Full
page reloads in Studio again |
| **#43189** (Attempt 3) | ❌ No — same as #43153 | ✅ Yes — `matcher`
config still removed, cookie stamping made conditional | Still broken |
| **#43190** (Ivan's fix) | ❌ No — `/dashboard` still excluded | ❌ No —
restored to `matcher: '/api/*'` only | Works — but cookie never stamps
for `/dashboard` traffic |
| **#43413** (this PR) | ✅ Yes — sets diagnostic cookie only, no
attribution stamping yet | ❌ No — unchanged, still `matcher: '/api/*'`
only | ❓ Untested in prod |

The common factor in every failure: Studio's `proxy.ts` ran on all
routes (including `_next/data` requests), which broke SPA navigation.
This PR is the first one that runs www middleware on `/dashboard` while
Studio's `proxy.ts` stays in its original narrow `/api/*` scope.

## What changed

This is Phase 1 of a two-phase rollout. We remove `dashboard|docs` from
the matcher's negative lookahead so www middleware runs on those paths —
but instead of stamping cookies, we set a short-lived (60s) diagnostic
cookie `_sb_mw_diag` on `/dashboard` and `/docs` requests.

The diagnostic cookie encodes
`hit=1&would_stamp={0|1}&has_cookie={0|1}`, which Studio telemetry reads
on the initial pageview and reports to PostHog as `mw_diag_hit`,
`mw_diag_would_stamp`, and `mw_diag_has_existing_cookie` properties.

A cookie rather than a header because response headers aren't readable
by JS. It also tests the actual Set-Cookie mutation path that Phase 2
will use (which is what Next.js issue #41885 is specifically about).

Phase 1 answers two key questions before we commit to Phase 2:
1. Does expanding the matcher break Studio SPA navigation?
2. What % of /dashboard arrivals would get a first-referrer cookie
stamped in Phase 2?

## Phase 2 readiness criteria

**Important caveat**: `mw_diag_*` data reflects consented users only and
may under-represent first-visit anonymous traffic. The Phase 2 decision
should account for this — the actual middleware execution rate is likely
higher than what PostHog reports.

### PostHog query spec

**Middleware execution rate**: Of all Studio initial pageviews on
`/dashboard` or `/docs` paths, what percentage have `mw_diag_hit =
true`? Expected: >= 90%. Below 70% warrants investigation (could
indicate edge caching bypassing middleware, or a matcher configuration
issue).

```
Filter: event = "$pageview" AND (current_url contains "/dashboard" OR current_url contains "/docs")
Breakdown: mw_diag_hit (true vs null/missing)
Metric:    count(mw_diag_hit = true) / count(all) * 100
```

**Would-stamp rate**: Of events with `mw_diag_hit = true`, what
percentage have `mw_diag_would_stamp = true`? This tells us what
percentage of Phase 2 traffic would actually get a cookie stamped. No
hard threshold — unexpected values (< 5% or > 95%) suggest a logic bug
worth investigating before Phase 2.

```
Filter: event = "$pageview" AND mw_diag_hit = true
Breakdown: mw_diag_would_stamp (true vs false)
Metric:    count(mw_diag_would_stamp = true) / count(all) * 100
```

**Existing cookie rate**: Of events with `mw_diag_hit = true`, what
percentage have `mw_diag_has_existing_cookie = true`? This tells us how
many users already have the cookie from a prior www visit.

```
Filter: event = "$pageview" AND mw_diag_hit = true
Breakdown: mw_diag_has_existing_cookie (true vs false)
Metric:    count(mw_diag_has_existing_cookie = true) / count(all) * 100
```

### Go / no-go threshold table

| Signal | Go | Investigate | No-Go |
|---|---|---|---|
| `mw_diag_hit` rate (% of /dashboard+/docs pageviews) | >= 90% | 70-90%
| < 70% |
| SPA navigation errors (Sentry / Vercel logs) | No increase | < 0.1%
increase | > 0.5% increase |
| Middleware p99 latency (Vercel function logs) | < 50ms added |
50-100ms | > 100ms |
| Sample volume in first 24h | > 1,000 events | 100-1,000 (extend
window) | < 100 (insufficient data) |

## Changes

- `apps/www/middleware.ts`: Removed `dashboard|docs` from matcher; added
`isDashboardOrDocs` guard that sets `_sb_mw_diag` diagnostic cookie
instead of stamping attribution
- `apps/www/middleware.test.ts`: 12 tests covering cookie stamping on
www paths, diagnostic cookie encoding for all scenarios (external
referrer, direct nav, internal referrer, existing cookie)
- `packages/common/first-referrer-cookie.ts`: Exported
`MW_DIAG_COOKIE_NAME`, `MwDiagData` type, and `parseMwDiagCookie()`
helper
- `packages/common/telemetry.tsx`: Reads `_sb_mw_diag` on initial Studio
pageview; reports `mw_diag_*` properties to PostHog

## Testing

Unit tests pass (13/13 www, 31/31 first-referrer-cookie). Production
validation needed:

- [ ] Studio SPA navigation works (tab changes, SQL editor, no full page
reloads)
- [ ] PostHog shows `mw_diag_hit = true` on Studio initial pageviews
- [ ] `mw_diag_would_stamp` distribution looks reasonable before
enabling Phase 2
- [ ] Monitor 24h before Phase 2

Ref: GROWTH-625 / GROWTH-668
2026-03-09 11:47:20 -07:00
Jordi Enric e854f3e9e7 FE-2736 chore: optimize world map json (#43550)
- reduce file size to 709K from 4.9MB 
- add antartica back
- everything else stays the same
2026-03-09 19:32:42 +01:00
kemal.earth 6695a9eeb0 feat(shared-data): add error codes to shared data (#43458)
## 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?

This is something we've discussed for a while. A shared place for error
codes and their mappings, descriptors etc. Available for all projects in
the monorepo.
2026-03-09 17:42:38 +00:00
kemal.earthandClaude Sonnet 4.6 9b028f6fd5 feat(studio): map error codes to docs (#43140)
## 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?

This introduces a small snippet preview of the error code coming via our
content API for the docs. This appears in a couple of places right now.

- **Auth Overview** - This page isn't fully released yet, but it appears
on the error codes table (as depicted below).
- **Logs** - When you delve into the logs panel, if there's an error
code available, they're also wrapped in this popover.

We are also working on a shared-data package (#43458) to potentially
replace this endpoint internally. Also introduces a multifaceted button
to debug/fix with either Assistant or LLM of choice.

| Auth Overview | Logs Panel |
|--------|--------|
| <img width="407" height="287" alt="Screenshot 2026-03-09 at 14 14 09"
src="https://github.com/user-attachments/assets/7450dddb-6828-4cd3-802d-37d47ba1b440"
/> | <img width="394" height="216" alt="Screenshot 2026-03-09 at 14 13
56"
src="https://github.com/user-attachments/assets/80c2a46e-dbe4-4e88-a0a7-68b977a71d6b"
/> |

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 17:33:14 +00:00
Matt Rossman 517171b246 feat(assistant): online evals support and CI workflows (#43194)
Lays groundwork for online evals on Assistant chat logs.

https://www.braintrust.dev/docs/observe/score-online

### Changes

- New workflows:
- `braintrust-scorers-deploy.yml` keeps prod scorers in sync on push to
`master`
- `braintrust-preview-scorers-deploy.yml` deploys preview scorers to the
staging project for PRs labeled `preview-scorers`, posting a comment
with scorer links
([example](https://github.com/supabase/supabase/pull/43194#issuecomment-4000097222))
- `braintrust-preview-scorers-cleanup.yml` deletes preview scorers when
the PR is closed
([example](https://github.com/supabase/supabase/pull/43194#issuecomment-4000749847))
- Adds `evals/scorer-online.ts` entry point invoked with `pnpm
scorers:deploy`, registering scorers for online evals in the Braintrust
"Assistant" project
- Refactors scorer code to separate online-compatible scorers
(`scorer-online.ts`) from WASM-dependent ones (`scorer-wasm.ts`)
- "URL Validity" scorer now only checks Supabase domains to prevent
requests to untrusted origins
- Span `input` is now shaped `{ prompt: string }` instead of plain
`string` for compatibility with offline eval scorers
- Env vars `BRAINTRUST_STAGING_PROJECT_ID` and `BRAINTRUST_PROJECT_ID`
configured in GitHub repo settings
- `generateAssistantResponse` now uses `startSpan` + `withCurrent`
instead of `traced()` to manually manage the root span lifecycle — this
ensures `onFinish` logs output to the span _before_ `span.end()` is
called, which is when Braintrust triggers scoring automations

### Online Scorers

We share scoring logic across offline and online evals, but some of our
scorers aren't transferrable to an "online" setting due to runtime
challenges or ground truth requirements.

**Supported**
- Goal Completion
- Conciseness
- Completeness
- Docs Faithfulness
- URL Validity

**Unsupported**
- Correctness (requires ground truth output)
- Tool Usage (requires ground truth requiredTools)
- SQL Syntax (uses libpg-query WASM)
- SQL Identifier Quoting (uses libpg-query WASM)
 
### How to use these scorers

Going forward if you want to add/edit online eval scorers, add the
`preview-scorers` label to a PR. This deploys scorers to the [Assistant
(Staging
Scorers)](https://www.braintrust.dev/app/supabase.io/p/Assistant%20(Staging%20Scorers)?v=Overview)
project in Braintrust with branch-specific slugs, and comments on the PR
([example](https://github.com/supabase/supabase/pull/43194#issuecomment-4000097222)).
From the Braintrust dashboard you can "Test" the scorer with traces from
any project.

<img width="1866" height="528" alt="CleanShot 2026-03-05 at 15 15 00@2x"
src="https://github.com/user-attachments/assets/4f15cebc-3f2d-4e8a-9ee2-fe8ef7bf4199"
/>

Once merged, scorers are deployed to the primary
[Assistant](https://www.braintrust.dev/app/supabase.io/p/Assistant)
project, and preview scorers are deleted from the staging project. Down
the road, scorers on the Assistant project will run automatically on a
sample of production traces.

Closes AI-437
2026-03-09 13:05:26 -04:00
Gildas Garcia 950c26dcb0 chore - make database e2e tests run in parallel and more stable (#43569)
## Problem

- database e2e tests run in serial mode, which is slower
- they also are a bit flaky

## Solution

- Ensure they can run in parallel
- Make them more stable by using UI checks when waiting
- Use assertions that automatically wait/retry in playwright
2026-03-09 16:45:16 +00:00
Gildas Garcia bab4e8db65 chore - allow cron jobs e2e tests to run in parallel and make them stable (#43566)
Follow up of #43547 and #43560

## Problem

The cron job tests run in serial mode and can be flaky.

## Solution

- Use simple query to install the `pg_cron` extension (way faster than
using UI)
- Make sure all tests can run in parallel
2026-03-09 17:29:24 +01:00
Sean Oliver 0aa23980bb remove tableCreateGeneratePolicies experiment (failed variant) (#43498)
## Problem

The `tableCreateGeneratePolicies` A/B experiment tested an AI-assisted
policy generator (`RLSManagement`) as a variation in the table creation
side panel. The variation didn't pass — control wins, so the standard
RLS checkbox should be the permanent behavior.

## Changes

- Deleted `useTableCreateGeneratePolicies` hook (PostHog flag + exposure
tracking)
- Deleted the entire `RLSManagement/` component directory (variation UI
— `RLSManagement`, `PolicyList`, `PolicyListEmptyState`,
`ToggleRLSButton`)
- Removed experiment flag checks from `TableEditor.tsx` — RLS checkbox
is now always rendered (was already the control)
- Removed experiment conversion tracking from `SidePanelEditor.tsx`

## Testing

Verified `pnpm typecheck` passes clean. Table creation side panel
renders the RLS checkbox unconditionally as it did in the control.

GROWTH-653
2026-03-09 09:23:50 -07:00
Sean Oliver 96f776fc63 graduate auto-RLS project creation experiment (test variant wins) (#43499)
## Problem

The `projectCreationEnableRlsEventTrigger` A/B experiment tested showing
an opt-in "Enable automatic RLS" checkbox in the project creation flow,
which sets up a Postgres event trigger to auto-enable RLS on every new
table in the public schema. The test variant passed with a +3.3pp lift.

## Changes

- `SecurityOptions.tsx` — removed PostHog flag check, checkbox is now
always rendered
- `pages/new/[slug].tsx` — removed experiment flag reads, exposure
tracking (`useTrackExperimentExposure`), and the conditional
`rlsOptionVariant` telemetry property

The underlying feature logic (`enableRlsEventTrigger` form field,
`AUTO_ENABLE_RLS_EVENT_TRIGGER_SQL`, submission handling) is unchanged —
we're just removing the scaffolding that was gating it.

## Testing

Verified `pnpm typecheck` passes clean. The "Enable automatic RLS"
checkbox now shows unconditionally in the Security Options section of
project creation.

GROWTH-653
2026-03-09 09:22:23 -07:00
Danny White 18bee64d98 www(chore): remove State of Startups flag (#43423)
## What kind of change does this PR introduce?

Remove feature flag.

## What is the current behavior?

The [State of Startups](https://supabase.com/state-of-startups) page
instantly redirects to the homepage rather than staying put.

## What is the new behavior?

The [State of Startups](https://supabase.com/state-of-startups) page
rightfully loads.

## Additional context

Some sort of race condition with the `useFlag`. Simpler to just remove
the flag logic entirely and keep the page permanently on.
2026-03-09 12:13:11 -04:00
Gildas Garcia d004d13e3f chore - stabilize and make e2e tests faster - part 2 (#43560)
## Problem

- Some tests don't always cleanup after themselves or don't do it
consistently which make it hard to work on them locally
- Some test suites don't allow parallel execution of their tests
- Some tests are flaky

This a follow up of #43547
2026-03-09 16:10:28 +01:00
Monica Khoury 7b8bec544e Fix spacing and schema prefix inconsistency in Table Editor (#43524)
Fixes this [Linear
issue](https://linear.app/supabase/issue/FE-2732/table-editor-header-spacing-and-schema-prefix-inconsistency.).

# Before

<img width="320" height="200" alt="image"
src="https://github.com/user-attachments/assets/45dc3a08-50df-4a03-b7ee-1b107c60059e"
/>
<img width="320" height="150" alt="image"
src="https://github.com/user-attachments/assets/c5cca6d5-a294-4137-8cf6-20e56678ebe6"
/>
<img width="320" height="150" alt="image"
src="https://github.com/user-attachments/assets/be54093b-8ff0-4c71-9934-574baac13039"
/>


# After

<img width="320" height="150" alt="CleanShot 2026-03-08 at 13 05 48@2x"
src="https://github.com/user-attachments/assets/4ed9817d-5ae7-45c2-9da7-6d1aec023975"
/>
<img width="320" height="150" alt="CleanShot 2026-03-08 at 13 06 06@2x"
src="https://github.com/user-attachments/assets/7ae0920e-0b5b-4eb3-993c-180d51ffd942"
/>
2026-03-09 08:40:55 -06:00
supabase-supabase-autofixer[bot]andgithub-actions[bot] 4d37a5f44d [bot] Decrease ESLint ratchet baselines (#43521)
Automated weekly decrease of ESLint ratchet baselines.

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-09 08:40:22 -06:00
Gildas Garcia 13bfc4502a chore: e2e general improvements (#43547)
## Problem

e2e tests are still flaky and not as fast as they could be

## Solution

- [x] Reset supabase instance: this makes the database visualiser tests
faster as there are less tables to screenshot
- [x] Improve the single file setup utilities so that they never block
local tests by cleaning them up before starting
- [x] Disable animations while running the tests (less time waiting for
animations to complete
- [x] Add utility functions that help reproducing flaky tests locally
2026-03-09 15:38:06 +01:00
Ivan Vasilov b4b4532065 fix: Update dev script port to 3004 for ui-library (#43555)
Revert the port for the `dev` command in `ui-library`.
2026-03-09 14:20:37 +00:00
supabase-supabase-autofixer[bot]andsupabase-releaser[bot] 5e3e6f3f47 feat: update @supabase/*-js libraries to v2.99.0 (#43552)
This PR updates @supabase/*-js libraries to version 2.99.0.

**Source**: supabase-js-stable-release

**Changes**:
- Updated @supabase/supabase-js to 2.99.0
- Updated @supabase/auth-js to 2.99.0
- Updated @supabase/realtime-js to 2.99.0
- Updated @supabase/postgest-js to 2.99.0
- Refreshed pnpm-lock.yaml

This PR was created automatically.

Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.com>
2026-03-09 16:01:09 +02:00
supabase-supabase-autofixer[bot]andsupabase-releaser[bot] 2a30411dc2 docs: update js sdk docs (2.99.0) (#43553)
Updates JS sdk documentation following stable release. 
Ran `make` in apps/docs/spec to regenerate tsdoc files.

**Details:**
- **Version:** `2.99.0`
- **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-09 16:01:02 +02:00
Ivan Vasilov 98c0cea1c3 feat: Add TDB block (#43490) 2026-03-09 14:32:44 +01:00
Jeremias Menichelli ac41f6bd6f chore: Remove unused ShowUntil (#43546) 2026-03-09 13:30:19 +01:00
TheOtherBrian1 3885265c0c docs: Update realtimeErrorCodes.toml | fixed typo (#43493)
## 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

## What is the current behavior?

Error description states that realtime breaks when a message is JSON
parsable. Should state when it is "not" JSON parsable

## What is the new behavior?

Added not key word to description:

```
Payload sent in NOTIFY operation was "NOT" JSON parsable.
```
2026-03-09 10:30:49 +01:00
Raminder Singh 5aafe30cd1 docs: fix a typo (#43509) 2026-03-09 10:29:52 +01:00
Kamil Ogórek 10b4fb2a3d fix(api): Use correct explainer for x-ratelimit-reset header (#43527)
ref: https://github.com/supabase/platform/pull/30380
2026-03-09 10:29:17 +01:00
Chris Chinchilla c20cfe832a docs: Update getSession usage in Angluar ionic tutorial (#43489)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES
2026-03-09 10:26:54 +01:00
Chris Chinchilla 579357089b docs: Update auth-helpers usage from examples (#43345)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES
2026-03-09 10:26:16 +01:00
Danny White 96ac1c2652 feat(studio): page titles (core) (#43538)
## What kind of change does this PR introduce?

- Resolves FE-1960
- Resolves FE-1983
- Resolves DEPR-207

## What is the current behavior?

Page titles between surfaces are inconsistent and vague. Sometimes they
say the product name:

```
My Project | My Org | Supabase
```

...even when on a specific surface like Database > Tables.

Other times they show the entity name but skip over the project or org
name :

```
Edge Functions | Supabase
```

## What is the new behavior?

Page titles *mostly* (see below) follow the same format:
```
users | Table Editor | My Project | My Org | Supabase
hello-world | Logs | Edge Functions | My Project | My Org | Supabase
Backups | Database | My Project | My Org | Supabase
Authentication | My Project | My Org | Supabase
```

That format is:

entity, section, surface, project, org, brand

## Additional context

This is stacked PR 1/5 for page title improvements. Includes the core
title utility and ProjectLayout integration/tests. Follow-up stacked PRs
are based on this branch:

- https://github.com/supabase/supabase/pull/43534
- https://github.com/supabase/supabase/pull/43535
- https://github.com/supabase/supabase/pull/43536
- https://github.com/supabase/supabase/pull/43537

This one should be merged first. The others (listed right above) can
_then_ be merged in any order.
2026-03-09 15:25:05 +07:00
Akash MandJoshen Lim 8a4d2e17fc fix: trim leading/trailing whitespaces from SMTP settings input fields (#43530)
## 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?

Bug fix

## What is the current behavior?

Currently, the SMTP Host input field in the Project Dashboard
(Authentication > Email > SMTP Settings) does not sanitize whitespace.
If a user accidentally pastes a hostname with leading or trailing spaces
(e.g., " smtp.resend.com "), the DNS lookup fails during the OTP
delivery process.

This results in the following error in the Auth logs:

```"dial tcp: lookup smtp.resend.com on 127.0.0.53:53: server misbehaving"```

Noticed, the other input fields of Sender details and Host, Username and Password under SMTP Provider settings take leading and trailing whitespaces as well.

## What is the new behavior?

Input sanitization has been applied across the SMTP configuration schema. The following fields now utilize .trim() to ensure data integrity:

- SMTP_HOST
- SMTP_ADMIN_EMAIL & SMTP_SENDER_NAME
- SMTP_USER
- SMTP_PASS

## Screenshots:

Before Fix:

<img width="604" height="198" alt="Screenshot 2026-03-09 at 2 04 49 AM" src="https://github.com/user-attachments/assets/76ae23a6-3ad8-4f82-8f0f-ab12f4168e81" />

After Fix:

<img width="594" height="194" alt="Screenshot 2026-03-09 at 1 58 48 AM" src="https://github.com/user-attachments/assets/03f64294-0bfe-4fca-a82b-12ee07a6d218" />



This fixes the issue #43529

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-03-09 15:24:49 +07:00
Danny White ff8fb72ce6 fix(studio): wrap project actions (#43532)
## What kind of change does this PR introduce?

- UI fix

## What is the current behavior?

- The _New project_ button overflows to the right on smaller
(phone-sized) breakpoints
- Due to addition of _Sort by_ dropdown last week

## What is the new behavior?

- All actions now wrap on smaller breakpoint

| Before | After |
| --- | --- |
| <img width="393" height="852"
alt="Supabase-383C523F-0BF1-48CD-8052-F6D68301DA4E"
src="https://github.com/user-attachments/assets/3983a815-16ff-48cd-857f-b84b82bfc923"
/> | <img width="393" height="852"
alt="Supabase-ED7AD923-E837-4D48-B7D1-6DA3C6E45BFA"
src="https://github.com/user-attachments/assets/fe19f9cc-f832-4c5d-b412-0aa1a0c16d5b"
/> |
2026-03-09 15:02:44 +07:00
Joshen Lim 9b0dc8d9b9 Chore/fix storage explorer when switching buckets (#43541)
## Context

Taking a slightly different approach to [this
PR](https://github.com/supabase/supabase/pull/43370)

Original problem was that if you opened some folders while in a bucket
and then switched to a different bucket, the folder UI will persists
(folders from Bucket A will render when landing on Bucket B)

## Changes involved
- Shift `StorageExplorerStateContextProvider` into `[bucketId].tsx]`
instead of `ProjectContext`
- The valtio store here only applies for the storage explorer so having
it so high in the project's context was unnecessary
- This also just implies that the valtio store will automatically reset
whenever the bucket changes
- Simplify storage explorer valtio store by initializing the store with
the bucket
- We'll initialize the selected bucket with the store now (Same as
previous PR)
- Removes unnecessary `setSelectedBucket` method which required a
separate `useEffect` in `StorageExplorer.tsx`

## To test
- [ ] Verify that the original is resolved
- [ ] General smoke test of the storage explorer - i've also re-added
the e2e test that Gildas wrote up in his PR
2026-03-09 14:32:34 +07:00
Joshen Lim 4a173eea60 Revert "fix: storage view is not reset when switching buckets" (#43539)
Reverts supabase/supabase#43370
2026-03-09 11:17:43 +07:00
Danny White ed46a5ab3f chore(studio): refocus editor after Run button tap (#43476)
## What kind of change does this PR introduce?

Resolves FDBK-40065

## What is the current behavior?

Using the _Run_ button on either inline or “full” SQL Editor removes
focus from the Monaco editor.

## What is the new behavior?

The text caret remains in the Monaco editor even after button press.

## To test

Try running a few queries both with keyboard (⌘ enter) and mouse click
on the _Run_ button:

```sql
-- 1) Create a mock table + seed data
drop table if exists public.test;

create table public.test (
  id bigserial primary key,
  name text not null,
  created_at timestamptz not null default now()
);

insert into public.test (name)
values
  ('alpha'),
  ('beta'),
  ('gamma'),
  ('delta');

select * from public.test order by id;
```

```sql
-- 2) Deletion query that should trigger the warning modal (destructive op)
delete from public.test where id <= 2;

-- Verify remaining rows
select * from public.test order by id;
```

## Additional context

- [ ] This was FDBK-40065 that we should reply to
2026-03-09 10:27:31 +11:00
Danny White ed8ac5bb90 chore(design-system): preserve icon fill or stroke (#43417)
## What kind of change does this PR introduce?

Bug fix: custom icons now respect their source SVG’s stroke/fill and
stroke-width instead of always getting a global stroke.

## What is the current behavior?

Every custom icon gets `stroke="currentColor"` and `strokeWidth={2}`
from `createSupabaseIcon`, so fill-only logos get an extra stroke and
icons designed at `stroke-width="1"` (e.g. postgres, auth) render too
thick. Call sites and the design-system grid needed workarounds
(`strokeWidth={0}`, `FILL_ONLY_ICONS`, `STROKE_WIDTH_FROM_SOURCE`).

## What is the new behavior?

The icon build reads root SVG attributes (`fill`, `stroke`,
`stroke-width`, etc.) and passes them as per-icon defaults. Fill-only
icons (chatgpt, claude, axiom, last9) have `stroke="none"` in source and
render with no stroke; stroke icons keep their source stroke-width (e.g.
postgres at 1). No `strokeWidth={0}` or allowlists needed at call sites
or in the icon grid.

| Before | After |
| --- | --- |
| <img width="1826" height="552" alt="CleanShot 2026-03-05 at 10 53
31@2x-3D63CEF0-1132-44F5-A382-730346432F1E"
src="https://github.com/user-attachments/assets/9caf73fa-351b-4ea2-a420-b3339f934742"
/> | <img width="1814" height="552" alt="CleanShot 2026-03-05 at 10 53
40@2x-514FC8BD-D30F-4D23-B209-0ECD6D13A184"
src="https://github.com/user-attachments/assets/936ea5a5-dae0-413f-8545-b90a502cea69"
/> |

## Additional context

- Added `stroke="none"` to the four fill-only source SVGs;
sentry/grafana/otlp/datadog already had `stroke-width="0"`.
- `createSupabaseIcon` only applies `color`/`strokeWidth` when the
consumer passes them, so `svgDefaults` from the build are used
otherwise.
- Removed workarounds from `icons.tsx` and GuidesSidebar; updated
icons.mdx (defaults + fill-only guidance).
2026-03-09 10:26:59 +11:00
Ali Waseem 819a9c0fc8 fix: added not found as errors when filter is active (#43497)
## 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?

fix: small issue when a filter was active and does not found error
popped up, we didn't allow users to reset the value. This handles the
edge cases where a filter is applied and the column is deleted
2026-03-08 13:43:28 -04:00
Charis 14b2af415f fix: accept inconsistent casing in incident regions (#43492)
Bug fix

## What is the current behavior?

The `affected_regions` generated by the AI sometimes have inconsistent
casing, causing validation to fail.

## What is the new behavior?

The system now accepts `affected_regions` that match case-insensitively,
allowing for variations in casing.
2026-03-06 19:02:06 +00:00