Commit Graph
3294 Commits
Author SHA1 Message Date
Drew McLellan 6019742b8c chore(studio): remove local-only header events (#54535)
## Problem

Part of FE-5266 (remove or sample noisy Studio events).
`header_local_dropdown_opened` and `header_local_version_popover_opened`
only render in local Studio, which never sends telemetry, so they can
never fire. Their owner signed off on removing them.

## Solution

- Remove the `track()` calls from `LocalDropdown` and
`LocalVersionPopover`, along with the `useTrack` imports and the empty
`onOpenChange` wrappers they left behind.
- Remove the two event types and their `TelemetryEvent` union entries.

There is no runtime change. This is a standalone PR so it can be
reverted on its own. The catalog deletion sits next to the one in
#54533, so whichever merges second may need a trivial rebase.
2026-12-03 14:37:55 +00:00
Drew McLellan 663f077b47 chore(studio): remove header dropdown opened events (#54533)
## Problem

Part of FE-5266 (remove or sample noisy Studio events). The
`header_{organization,project,branch,user}_dropdown_opened` events are
among the highest-volume events and don't answer a product question: the
next pageview already shows what was selected. Their owner signed off on
removing them.

## Solution

- Remove the `track()` calls from the organization, project, branch and
user dropdowns. Each now passes its state setter straight to
`onOpenChange`.
- Drop the `useTrack` import from `BranchDropdown` and
`ProjectDropdown`, which no longer track anything.
- Remove the four event types and their `TelemetryEvent` union entries.

`header_feedback_dropdown_opened` is kept. `upgrade_cta_clicked` in the
user and organization dropdowns is untouched. This is a standalone PR so
it can be reverted on its own.
2026-12-03 14:18:55 +00:00
Drew McLellan 0bbbdf5c91 chore(common): remove unused integration install/uninstall completed events (#54532)
## Problem

Part of FE-5266 (remove or sample noisy Studio events).
`integration_install_completed` and `integration_uninstall_completed`
are defined in the telemetry catalog, but nothing in the repo fires
them. Their owner signed off on removing them.

## Solution

Remove both event types and their `TelemetryEvent` union entries from
`telemetry-constants.ts`. There are no call sites, so there is no
runtime change. The related `integration_install_submitted` and failure
events are untouched.
2026-12-03 14:18:31 +00:00
Drew McLellan 0a3a53298b chore(studio): remove home_connect_section_exposed event (#54531)
## Problem

Part of FE-5266 (remove or sample noisy Studio events).
`home_connect_section_exposed` fires on every project home load and is
no longer needed. Its owner signed off on removing it.

## Solution

- Remove the exposure effect from `ConnectSection` and the imports it
left unused.
- Remove the `HomeConnectSectionExposedEvent` type and its
`TelemetryEvent` union entry.

`home_connect_action_clicked` is untouched. This is a standalone PR so
it can be reverted on its own.
2026-12-03 14:18:02 +00:00
supabase-vercel-tedd[bot] 2922cc2190 feat(studio): track inline cell edits in the Table Editor grid (#54477) 2026-12-03 18:35:00 +08:00
Wen Bo XieandDanny White 28c2c2dd53 feat(www): add Launch Week 16 banner (#54511)
Add a dismissible bar above the www nav that promotes Launch Week 16
(December 7-11) and links to /launch-week. Hide the bar on /launch-week
pages. Hide it on /state-of-startups too because the fixed nav on that
page would cover it.

## Banner polish

Adds shared animated dot artwork, a link CTA, and responsive spacing and
alignment. Reduced-motion preferences keep the dots static. Studio uses
this artwork in the dependent #54512.

| After |
| --- |
| <img width="500" height="584" alt="31035"
src="https://github.com/user-attachments/assets/7ebad641-158e-47ea-a8be-3097ecc5c0ae"
/> |
| <img width="500" height="584" alt="18287"
src="https://github.com/user-attachments/assets/02c87481-1dbe-4576-afc0-bdc9f22fc893"
/> |
| <img width="995" height="584" alt="89244"
src="https://github.com/user-attachments/assets/aad4b608-71f1-484f-bbf4-54c725800f52"
/> |
| <img width="995" height="584" alt="99848"
src="https://github.com/user-attachments/assets/a8b50942-1ecd-4c63-91b3-a6b4847d8830"
/> |

## Review instructions

1. Open the www homepage on the preview in light and dark mode. Check
the centred desktop message, link hover, and close button.
2. At a phone width, check the left-aligned copy and artwork on the
right. Open the mobile menu and close it; the banner should return.
3. Dismiss the banner and reload. It should stay dismissed.

Validation: scoped ESLint, formatting, and ui-patterns typecheck pass.

---------

Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
2026-12-03 10:48:20 +07:00
kemal.earth ff9ff456cd feat(design-system): updated trace ui components (#54389)
## Problem

The `Trace` primitives in `ui-patterns` only supported panning and
zooming through the minimap, and had no way to show summary facts about
a trace. Using them for a real trace view in Unified Logs needs direct
manipulation on the waterfall itself, a resizable span column for long
span names, and a place to put trace-level stats.

Part 1 of 3. This PR is design-system only — nothing in Studio consumes
it yet.

## Solution

**Direct manipulation on the waterfall**

- Drag across the timeline to pan, wheel to zoom around the pointer.
Panning only starts past a small threshold, so a drag never selects the
row it ends on.
- `Trace.Scrubber` follows the pointer with the offset from the trace
start.
- The span column is resizable by a focusable separator: drag it, nudge
with the arrow keys, or jump to its bounds with Home and End. The
timeline is kept above a minimum width so the tree can't be dragged over
it.

**Minimap**

- Dragging outside the brush now selects a new window. Dragging the
brush still pans and dragging an edge still resizes; a plain click
outside still recentres.

**New parts**

- `Trace.Summary` / `Trace.SummaryItem`, with `Trace.TotalDuration`,
`Trace.SpanCount` and `Trace.Depth` as values.

**Visual**

- Leaf rows get an elbow connecting them to their parent's guide, so the
tree reads as a tree rather than floating dots.
- Minor ruler ticks between the labelled ones, and a shorter ruler,
which also shortens the span header.

**One breaking change:** `Trace.Minimap` is now passed to
`Trace.Waterfall`'s `minimap` prop instead of being a child, so it sits
outside the area that handles pointer gestures. Both demos and the docs
page are updated to match; these are the only consumers in the repo.

## Review instructions

1. Open the design-system preview and go to **UI Patterns → Tracing**.
2. On the first demo, drag left and right across the timeline to pan,
and scroll to zoom — the zoom should stay anchored under the pointer.
3. Drag a span bar and release on it. It should pan, not select the row.
4. Drag the divider between the span column and the timeline. Then tab
to it and use the arrow keys, Home and End — the handle should move from
where it appears, and End should reach the far edge.
5. Move the pointer across the timeline and confirm the scrubber line
tracks it with a readable offset.
6. Check the summary strip above the waterfall shows Duration, Depth and
Total Spans.
7. On the minimap: drag the brush to pan, drag an edge to resize, drag
outside the brush to select a new window, and click outside it to
recentre. Zoom all the way in and confirm the brush stays wide enough to
grab.
8. Scroll the docs page and confirm the code sample matches what the
demos actually do.
2026-12-02 14:24:52 +00:00
kemal.earth 6d8af8e950 chore(api-types): regenerate types from production specs (#54472)
## Problem

`packages/api-types` has drifted from the production OpenAPI specs.
#54394 regenerated them but was reverted in #54404, because the API had
rolled out ahead of its OpenFGA model. That has since been fixed on the
backend, so the regen can land.

...plus I need the new spec for #54391 and didn't want to blow up my
branch.

## Solution

Regenerated with `pnpm --filter=api-types codegen:prod` (production
specs, not the localhost `codegen`), plus the type fixes the new specs
require:

- `platform-webhooks-fetchers.ts` — `page` is now a deep object in the
spec, so the query params move from `page[limit]` keys to a nested
`page` object with a `deepObject` serializer.
- `InvoicesSettings.test.tsx` — four newly-required invoice fields in
the mock.
- `packages/shared-data` — `@supabase/shared-types` 0.1.98 → 0.1.102,
matching `apps/studio`.

Notable additions: the `environment_*` FGA scopes and `GET
/v2/projects/{ref}/analytics/traces/{trace_id}`.

## Review instructions

1. `pnpm --filter=api-types run verify-production-types` — passes.
2. `pnpm typecheck` and `pnpm --filter=studio test` — pass.
3. Only the three non-generated files need reading; the rest is
generated output.

Note: `verify-production-api-types` was removed from the required checks
during the #54394 incident and hasn't been restored. Worth putting back
after this merges.
2026-12-02 13:51:52 +00:00
Drew McLellan d4ef834d4d feat(studio): track usage on the org projects list (FE-5025) (#54417)
## Problem

We don't have visibility into how people use the org projects list
(`/org/[slug]`) or the organizations list (`/organizations`): whether
they search, filter, sort or switch views, and which project card
actions they use. Resolves FE-5025.

## Solution

Adds four events, defined in `packages/common/telemetry-constants.ts`
with org-level groups (no project group):

- `org_projects_filter_applied` with `filterType: 'search' | 'status' |
'sort'`. Search sends only the result count, status sends the saved
statuses (`active`/`paused`), and sort sends the sort value.
- `org_projects_view_mode_updated` with `viewMode`.
- `org_project_card_action_clicked` with `action: 'copy_id' |
'settings'` and `viewMode`, from the grid card menu and the table row
menu and inline ref button.
- `org_list_search_submitted` with `orgCount`.

Notes for review:

- Every event fires from its handler, not an effect, so restoring
filters from local storage doesn't fire anything.
- Search events use the same 500ms debounce as the query, skip empty
input, and never include the search text. The project search count is
read from the list query's cache entry via `fetchInfiniteQuery` on the
same key, which reuses the in-flight request.
- Status, sort and view events don't fire when the value didn't change.
- `HomePageActions` and `ProjectList` also render on the `/project`
picker, so `@page` lists both routes.
- I didn't add the `data-attr` attributes from the ticket: autocapture
is off, so they would send nothing, and the telemetry standards ask for
explicit `track()` calls.

## How to test

- `pnpm --filter studio exec vitest run
components/interfaces/HomePageActions.test.tsx` covers view mode, status
filter, search and clearing before the debounce settles.
- In the browser network tab on `/org/[slug]`, each action sends one
`telemetry/event` request with the properties above. Checking the events
in PostHog staging is still to do.
2026-12-02 11:47:18 +00:00
anthony lio e7d7345bd6 fix(telemetry): add /new/* to the pages of three account recovery events (#54469)
## Problem

- the account recovery interstitial can open on `/new/<org>` because
`canInterruptRecoveryRoute` allows it
- `@page` of three of its four events lists `/new` but not `/new/*`
- `AccountRecoveryReminderExposedEvent` lists `/new/*`, so the four
events disagree on the pages they fire on

## Solution

- adds `/new/*` to `@page` of `AccountRecoveryActionClickedEvent`,
`AccountRecoveryTaskCompletedEvent` and
`AccountRecoveryReminderClosedEvent`

## Review category (docs PRs only)

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

## Review instructions

1. open `apps/studio/lib/account-recovery/recovery-reminder.ts` and make
sure that `canInterruptRecoveryRoute` allows `/new/<slug>`
2. make sure that the 4 `AccountRecovery*Event` interfaces in
`packages/common/telemetry-constants.ts` list the same pages
3. make sure that the diff changes only JSDoc comments

## Checklist

Check all before review:

- [ ] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-12-02 19:13:50 +08:00
Alaister YoungandAlaister Young 217b9ca3f3 [FE-5024] feat(studio): track Table Editor sidebar and side panels (#53960)
Adds PostHog telemetry events across the Table Editor sidebar, new-tab
page, and column/table/row/cell side panels so we can measure schema
usage, entity-list search/filtering, entity menu actions, and panel
saves without logging schema, table, column, or search names.

**Added:**

- Event definitions in `packages/common/telemetry-constants.ts` (added
to `TelemetryEvent`):
- `table_editor_schema_selector_updated` (`schemaType: 'public' |
'protected' | 'custom'`) when switching schemas in `TableEditorMenu`. It
uses the same `schemaType` property and derivation as the existing
`database_schema_selector_updated` (now shared through
`getDatabaseSchemaType`), so the two selectors can be compared in one
insight
- `table_editor_new_item_clicked` (`itemType: 'schema'` or `itemType:
'table'` with `trigger: 'sidebar' | 'new_tab_card'`) from the sidebar
and `NewTab` card
- `table_editor_table_search_submitted` (debounced 500ms, cancelled on
clear, schema switch via selector or URL/tab change, and unmount)
- `table_editor_entity_filter_updated` (`visibleTypeCount`) on
entity-type checkbox toggle, "Select only", and filter reset
- `table_editor_entity_action_clicked` (`action`, `entityType`) across
dropdown and context menus in `useEntityActionHandlers` (excluding the
`View policies` link, which is covered by pageviews)
- `table_column_created` / `table_column_updated` (`hasForeignKey`,
`isArray`) on column side-panel saves via `SidePanelEditor.utils.tsx`,
with `hasForeignKey` scoped to the saved column and no-op saves skipped
- `table_updated` (`columnCountChanged`) on existing table edits in
`SidePanelEditor.tsx` once table, column, primary key, foreign key,
Realtime, and Data API updates succeed and at least one change was
persisted; no-op saves and saves where any step fails are skipped
- `table_editor_row_updated` (`editMethod: 'side_panel'`) when an
existing row edit from the row side panel is persisted. Saves from the
expanded cell editors and the foreign row selector don't count, and
neither do edits queued with queue operations enabled. The grid ticket
(FE-5023) can add more `editMethod` values when it tracks inline edits
- `table_editor_cell_editor_opened` (`editorType: 'json' | 'text'`) when
expanding JSON or text cell editors from the grid cell editors
(`JsonEditor` / `TextEditor`) or `RowEditor`
- Column, table and row save events are attributed to the project the
save ran against (third `track()` argument), and fire only after the
save succeeds
- Focused MSW-backed tests for non-obvious telemetry edge cases (search
debounce + cancellation on clear and selector/external schema switches,
schema switch single-fire + PII checks, column-scoped FK/array
derivation and no-op gating in `createColumn`/`updateColumn`,
change/error reporting in `updateTable` without double-firing column
events)

## To test

Watch `POST /platform/telemetry/event` in DevTools (and confirm arrival
in staging PostHog):

- Switch schemas (`public` -> `auth` -> custom schema -> `public`):
fires `table_editor_schema_selector_updated` with `schemaType`
`protected` -> `custom` -> `public` and no schema name; re-selecting the
active schema fires nothing
- On the Database > Schemas visualizer, switching schemas still fires
`database_schema_selector_updated` with the same `schemaType` values as
before
- Click **Create a new schema** and **New table** in the sidebar, plus
**Create a table** on `/project/[ref]/editor/new`: fires
`table_editor_new_item_clicked` with the expected `itemType` and
`trigger`
- Type in **Search tables...** and pause >500ms: fires one
`table_editor_table_search_submitted` with no query text; clearing or
switching schemas (via the selector or clicking a tab in another schema)
before 500ms fires nothing
- Toggle entity-type checkboxes, click **Select only**, or reset
filters: fires `table_editor_entity_filter_updated` with the new
`visibleTypeCount`
- Trigger actions from a table/view menu (both ⋮ and right-click): fires
`table_editor_entity_action_clicked` with `action` and `entityType`
(**View policies** does not fire it)
- Create and edit a column via the column panel: fires
`table_column_created` / `table_column_updated` with `hasForeignKey`
(scoped to that column) and `isArray`; clicking **Save** with no changes
fires nothing
- Edit an existing table (with and without adding/removing a column, or
toggling Realtime alone): fires `table_updated` with
`columnCountChanged`, without firing `table_column_*`; clicking **Save**
with no changes fires nothing
- Edit an existing row in the row side panel: fires
`table_editor_row_updated` with `editMethod: 'side_panel'`. Inserting a
new row, saving from an expanded JSON/text cell editor, picking a
foreign row, or saving with queue operations enabled does not fire it
- Edit an existing table so that adding a column (or updating
Realtime/Data API) fails: `table_updated` does not fire
- Expand JSON and text cell editors from both the grid and inside the
row panel: fires `table_editor_cell_editor_opened` with `editorType:
'json' | 'text'`

Notes for review:

- No `data-attr`s were added. Autocapture is off, so each tracked
interaction gets an explicit `track()` call instead.
- `table_editor_cell_editor_opened` counts the expand buttons in both
the grid cell editors and the row side panel fields. It's the same click
on both surfaces.
- `table_editor_row_updated` only has `editMethod: 'side_panel'` for
now. The grid toolbar ticket (FE-5023) can add values when it tracks
inline edits.

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-12-02 18:54:08 +08:00
Alaister YoungandAlaister Young 0c97b9789b [FE-3107] chore(studio): remove remaining Next.js references (#54426)
Removes the remaining Next.js dependencies, compatibility shims, test
mocks, ESLint/TypeScript presets, and webpack/Next workarounds from
Studio following the TanStack Start migration.

Addresses FE-3107.

**Removed:**

- `next` and `next-router-mock` from `apps/studio/package.json` (and
updated `pnpm-lock.yaml`)
- Orphaned `apps/studio/compat/next/script.tsx` shim, `script.test.tsx`,
`compat/**` knip entry, and `nextCompat()` / `ssr.noExternal` `/^next/`
plumbing from `apps/studio/vite.config.ts`
- `apps/studio/tests/lib/route-mock.ts` and all `next-router-mock`
setup/imports across `tests/vitestSetup.ts`,
`tests/lib/custom-render.tsx`, and 12 test files
- `apps/studio/tests/pages/` directory (moved the 3 remaining tests to
`components/interfaces/Organization/Organization.utils.test.ts` and
`apps/studio/tests/routes/`)
- Unused `'use client'` directives across 23 Studio files
- Next.js/webpack workarounds: `graphiqlViteWorkers()` in
`vite.config.ts`, webpack `import.meta.glob` `try/catch` fallback in
`ConnectStepsSection.tsx`, shell `NODE_ENV=test` override in
`vite.config.ts` / root `package.json` / `studio-e2e-test.yml`, Next
`getPathMatch` and `_next` passthrough in `redirects.shared.*`,
`window.next?.router` check in `monaco-graphiql-coexistence.spec.ts`,
and unused `ANALYZE` env var in `apps/studio/turbo.jsonc`
- Next-only Sentry/chunk-load filters (`NEXT_NOT_FOUND`,
`NEXT_REDIRECT`, Next `/org/[slug]/` regex, `/app:\/\//`, dead
`includeThirdPartyErrorFilter` plumbing, webpack chunk error regex) and
stale Next/Pages Router comments, docs, and `#__next` CSS selector

**Changed:**

- `apps/studio/eslint.config.cjs`: switched from
`eslint-config-supabase/next` to the new `eslint-config-supabase/react`
preset (dropping `@next/next/no-img-element: off`, keeping `.next` /
`next-env.d.ts` ignored for local checkouts with stale pre-migration
build artifacts)
- `apps/studio/tsconfig.json`: extends `tsconfig/base.json` directly
instead of `tsconfig/nextjs.json` (identical resolved compiler options)
- `apps/studio/.github/eslint-rule-baselines.json`: pruned 33 stale
`pages/...` and `types/next.ts` entries without changing any rule
thresholds
- `apps/studio/tests/lib/custom-render.tsx`: backed
`TestFrameworkProvider` with TanStack Router instead of
`next-router-mock`
-
`apps/studio/components/interfaces/Integrations/GraphQL/GraphiQLTab.tsx`:
imports `graphiql/setup-workers/vite` directly
- `apps/studio/styles/globals.css`: replaced `@source
'../pages/**/*.{js,ts,jsx,tsx}'` with `@source
'../routes/**/*.{js,ts,jsx,tsx}'`
- `apps/studio/turbo.jsonc`: declared `"NEXT_PUBLIC_*"` in
`tasks.build.env` now that Turborepo infers `nitro` instead of `nextjs`
-
`apps/studio/components/interfaces/Organization/Organization.utils.ts`:
narrowed `buildOrgUrl`'s `slug` parameter to `string[] | undefined`

**Added:**

- `packages/eslint-config-supabase/shared.js` and
`packages/eslint-config-supabase/react.js` (plus `presets.test.ts`),
decoupling non-Next React apps from `eslint-config-next` with verified
zero non-`@next/*` rule drift while keeping
`eslint-config-supabase/next` unchanged for the Next.js apps

## To test

- Run `pnpm --filter eslint-config-supabase run test` and confirm preset
parity tests pass
- Run `pnpm --filter studio run lint`, `pnpm --filter studio run
lint:ratchet`, `pnpm --filter studio run typecheck`, `pnpm knip
--workspace apps/studio`, and `pnpm --filter studio run test`
- Run `pnpm --filter studio run build` and verify the production build,
prerendered routes, chunk-cycle check, and GraphiQL web workers succeed
- Smoke-test Studio locally (`pnpm dev:studio`): verify GraphiQL loads
cleanly, ConnectSheet framework steps render, and Tailwind styles on
route pages are intact

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-12-02 17:01:50 +08:00
Jeremias Menichelli 9447067a51 feat: Add Security topic (#54423)
## Problem

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

## Solution

Create a topic about Security.

<!--
## Preview links

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

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

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

<!-- ## Additional context

Optionally add any other context or screenshots.

-->

## Review category (docs PRs only)

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

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

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

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-12-01 18:29:08 +01:00
K-Dog (Kevin) dc4f247e79 Revert "chore: update prod api types (#54394)" (#54404)
This reverts commit 37d4f444b4.

OpenFGA model needs updating first before updating the API types
2026-12-01 21:46:40 +08:00
K-Dog (Kevin) 37d4f444b4 chore: update prod api types (#54394)
Updated API types and addressed any type issues. Had to update
shared-types alongside.
2026-12-01 19:42:54 +08:00
supabase-vercel-tedd[bot]andIvan Vasilov 31f68587f6 feat(studio): track remaining usage on project home (#54143)
## Problem

Project home tracked most interactions, but not which credential people
copy from the "Copy" popover, or how often they use the custom report
and notebooks beyond adding blocks. Opening the Connect sheet from the
popover's "Get Connected" button also reported a stale
`connect_sheet_opened` source, because the popover never set one.

## Solution

Project home gets three new events: `home_project_credential_copied`
(with a `credentialType` enum), `home_custom_report_refresh_clicked`,
and `home_notebook_action_clicked` (`action: 'create' | 'analyze'`).
"Get Connected" in the popover now sets a new `home_popover` Connect
sheet source. The compute and GitHub stats now send
`home_activity_stat_clicked` as well, with two new `stat_type` values.
Every event fires from its click handler with a typed `track()` call,
and none sends the copied value or any user-defined name. This follows
the telemetry standards, so no `data-attr` attributes are added.

## How to verify

1. On a project's home page, open the "Copy" popover and copy each item.
Each copy sends one `home_project_credential_copied` event, with
`credentialType` set to `project_url`, `publishable_key`,
`direct_connection_string`, or `cli_setup`. No event contains the copied
value.
2. In the same popover, click "Get Connected". The Connect sheet opens
and sends `connect_sheet_opened` with `source: 'home_popover'`. Opening
it from the header button afterwards still sends `source:
'header_button'`.
3. Click the "Compute size" stat. It sends `home_activity_stat_clicked`
with `stat_type: 'compute'` and no `stat_value`.
4. Click the "GitHub" stat. It sends `home_activity_stat_clicked` with
`stat_type: 'github'`, and `stat_value` is 1 when a repository is
connected and 0 when none is.
5. With the custom report section shown, click "Refresh report". It
sends one `home_custom_report_refresh_clicked` event.
6. With the Notebooks section shown, click "New notebook" (or "Create
your first notebook" when there are none). It sends
`home_notebook_action_clicked` with `action: 'create'`. Click "Analyze"
on a notebook with cells: it sends `action: 'analyze'`.

## Checks

Ran `tsc --noEmit` in `apps/studio` and `packages/common`, `eslint` and
the type-aware `eslint.type-checks.config.cjs` lint on the changed
Studio files, `oxfmt --check` on every changed file, and `vitest run`
for `ProjectConnectionPopover.platform.test.tsx` and
`ActivityStats.test.tsx`.

## Checklist

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

## Feedback for Tedd

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

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-12-01 11:54:29 +01:00
anthony lio 6bd006dc08 feat(docs): layout toggle (#53688)
## Problem

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

## Solution

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

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

<!--
## Preview links

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

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

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

<!-- ## Additional context

Optionally add any other context or screenshots.

-->

## Review instructions

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

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-12-01 11:43:40 +02:00
supabase-vercel-tedd[bot]andJoshen Lim bd4912cbdc feat(studio): track SQL editor sidebar, snippet and editor tab usage (#54170)
## Context
Adds seven PostHog events through `useTrack` for the SQL Editor to
better identify usage patterns there, each fired from its click or
submit handler:
- `sql_editor_new_item_clicked` (`itemType`) for the "+" menu.
<img width="229" height="150" alt="image"
src="https://github.com/user-attachments/assets/f6281bdb-d70e-4e7c-adf3-edce0ec2116c"
/>
- `sql_editor_snippet_search_submitted`: once per search session, on the
first keystroke into an empty search box.
<img width="285" height="214" alt="image"
src="https://github.com/user-attachments/assets/4c482385-cab1-49d3-9aaa-e2be1aafb1af"
/>
- `sql_editor_snippet_sort_updated` (`sortBy`) when the sort order
changes.
<img width="226" height="121" alt="image"
src="https://github.com/user-attachments/assets/0e7268ee-bf4a-46d4-ba8d-f07a6e9b0675"
/>
- `sql_editor_snippet_action_clicked` (`action`, `isBulk`) for snippet
and folder context-menu actions.
<img width="254" height="275" alt="image"
src="https://github.com/user-attachments/assets/7338df06-47df-47be-b44d-6fc2dd49c586"
/>
- `sql_editor_snippet_share_submitted` when the share modal is
confirmed.
<img width="531" height="309" alt="image"
src="https://github.com/user-attachments/assets/997e7567-9fdb-400e-af1a-147a5dcbb7a7"
/>
- `sql_editor_snippet_moved` (`snippetCount`, `toNewFolder`) after a
move succeeds.
<img width="539" height="247" alt="image"
src="https://github.com/user-attachments/assets/f0da9544-d29e-402f-a0d3-9b7f5e3fa3c6"
/>
- `editor_tab_closed` (`closeType`, `editor`) in the tab bar that the
SQL, Table and Explorer editors share. It fires when the tabs actually
close, after any unsaved-changes confirmation.
<img width="147" height="64" alt="image"
src="https://github.com/user-attachments/assets/96073c69-acf1-4829-8532-beb283b7f373"
/>

No property carries names, SQL or search text, and every event is sent
with an explicit `track()` call.

## How to verify

On the PR's Studio preview, with analytics consent accepted, watch the
network requests to the telemetry endpoint:

1. In the SQL editor, open the "+" menu and pick a new snippet, a new
folder and (when available) a new logs query. Each one sends
`sql_editor_new_item_clicked` with the matching `itemType`.
2. Type into the snippet search box. One
`sql_editor_snippet_search_submitted` goes out on the first character,
and none on later ones. Clear the box and type again: one more goes out.
3. Change the sort to Alphabetical, then to Created At. Each change
sends `sql_editor_snippet_sort_updated` with `sortBy` `name` or
`inserted_at`. Picking the current sort again sends nothing.
4. Right-click a snippet and pick each action (open in new tab, rename,
move, share, unshare, duplicate, add to or remove from favorites,
export, delete). Each sends `sql_editor_snippet_action_clicked` with
that `action` and `isBulk: false`. Shift-click several snippets and pick
move or delete: `isBulk: true`.
5. Right-click a folder and pick create snippet, rename or delete:
`action` is `folder_create_snippet`, `folder_rename` or `folder_delete`.
6. Confirm the share modal: `sql_editor_snippet_share_submitted` goes
out. Move a snippet into a new folder: after it succeeds,
`sql_editor_snippet_moved` goes out with `snippetCount: 1, toNewFolder:
true`.
7. In the SQL editor and the Table editor tab bars, use Close, Close
Others, Close to the Right and Close All, and the tab's X button. Each
sends `editor_tab_closed` with the matching `closeType` and `editor`. If
you cancel an unsaved-changes prompt, nothing is sent.

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-12-01 13:29:53 +07:00
anthony lioandalexisintech 25ceafcb3f fix(kb): guide tabs (#54046)
## Problem

- on kb topic pages the guide row text is misaligned vs tab title
- community guide row shows the favicon and the author before the title
leading to inconsistence when among other list items
- kb guide list and the docs code tabs each keep a copy of the folder
tab indicator

## Solution

- extracts the folder tab indicator to `ui` + the curve variables to the
shared tailwind config
- changes the tab corner to follow the active tab because chrome does
not update a `:has()` rule on the tabs root
- fixes the square corner + the background flash on the active kb tab
before hydration
- changes the kb guide rows to align with the tab labels + adds padding
to the tabs and the row hover
- moves the community favicon and author after the title

| before | after |
| -------|------|
| <img width="2304" height="1533" alt="image"
src="https://github.com/user-attachments/assets/585a1b1c-0314-4708-818c-69b324028d18"
/> | <img width="2304" height="1517" alt="image"
src="https://github.com/user-attachments/assets/5eb9614f-1873-42ed-86f4-1f7c8fa5e4f6"
/> |

<!--
## Preview links

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

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

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

<!-- ## Additional context

Optionally add any other context or screenshots.

-->

## Review instructions

1. open the live and preview
[/kb/topics/database](https://kb-git-antlio-kb-guide-tabs-supabase.vercel.app/kb/topics/database)
2. make sure that the row titles start at the same position as the "All"
tab label

## 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: alexisintech <98043211+alexisintech@users.noreply.github.com>
2026-11-30 22:09:49 +02:00
supabase-vercel-tedd[bot]andIvan Vasilov e3684c034c feat(studio): track usage on Project Settings: General (#54081)
## Problem

Project Settings → General has almost no usage tracking. We can't tell
how often users restart, pause, resume, or transfer projects from here.
We also can't tell how often they copy the project ID or region, use the
custom domain flow, or toggle high compliance mode.

## Solution

Adds six PostHog events to `packages/common/telemetry-constants.ts`:
`project_name_updated`, `project_settings_value_copied`,
`project_lifecycle_action_submitted`, `project_compliance_mode_updated`,
`custom_domain_step_submitted`, and `custom_domain_dns_record_copied`.
Each event fires from the user's submit, confirm, copy, or toggle
handler, never on render. Properties are only enums and booleans. No
project names, domains, DNS record contents, or other typed values are
sent.

`ResumeProjectButton` is shared between settings and the paused-project
home state, so it now takes a required `source` prop. The two call sites
pass `settings_general` and `project_home`. Restart fires from the
confirmation modal, with `restart_project` or `restart_database`
depending on the chosen restart type. `DNSRecord` now types its `type`
prop as `'CNAME' | 'TXT'`, so the copy event sends the record type as an
enum. No `data-attr` attributes are added, because PostHog autocapture
is off and they would not be collected.

## How to verify

1. On Project Settings → General, save a new project name. One
`project_name_updated` event fires.
2. Copy the project ID, then the region. Each copy fires one
`project_settings_value_copied` event, with `field` set to `projectRef`
and then `region`.
3. Open the restart modal, then cancel it. No event fires. Confirm a
restart (project or fast database reboot). One
`project_lifecycle_action_submitted` fires with `action:
restart_project` or `restart_database` and `source: settings_general`.
4. Confirm a pause, a resume, and a transfer. Each fires
`project_lifecycle_action_submitted` with the matching `action`. A
resume from settings sends `source: settings_general`; a resume from the
paused project home page sends `source: project_home`.
5. Toggle high compliance mode. One `project_compliance_mode_updated`
fires, with `isSensitive` set to the new value.
6. In the custom domain flow, Add, Verify, confirm Activate, and confirm
Delete each fire `custom_domain_step_submitted` with `step` set to
`configure`, `verify`, `activate`, and `remove`.
7. In the custom domain verification step, copy a DNS record's name,
then its value. Each copy fires one `custom_domain_dns_record_copied`
event, with `recordType` set to `CNAME` or `TXT` and `field` set to
`name` and then `value`.

## Checks

Ran `tsc --noEmit` in `apps/studio` and `packages/common`. Ran `eslint`
(default config and `eslint.type-checks.config.cjs`) on the changed
Studio files: no errors, only warnings that were already there. Ran
`oxfmt --check` on all changed files. Ran `vitest run` on
`General.test.tsx`, `Project.test.tsx`, `PauseProjectButton.test.tsx`,
and `RestartServerButton.test.tsx`: all pass.

## Checklist

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

## Feedback for Tedd

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

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-11-30 20:38:20 +01:00
anthony lio 11943b34fe chore(studio): test setup polyfills (#54039)
## Problem

- `apps/studio/tests/setup/radix.js` holds the jsdom stubs for
`ResizeObserver` and `scrollIntoView` but nothing in it is specific to
radix
- studio already keeps its jsdom stubs in `tests/setup/polyfills.ts`

## Solution

- moves the `ResizeObserver` and `scrollIntoView` stubs into
`tests/setup/polyfills.ts` + removes `radix.js` from the vitest setup
files
- changes the studio-testing skill to name the one dom setup file that
remains

<!--
## Preview links

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

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

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

<!-- ## Additional context

Optionally add any other context or screenshots.

-->

## Review instructions

1. run `pnpm test:studio` and make sure that the run reports no
unhandled errors
2. make sure that the failures are the same as on `master`

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-11-30 20:40:38 +02:00
Francesco Sansalvadore a098c3be32 chore(studio): improve versioning onboarding comms (#54059)
## Problem

We're going to release versioning in Public Alpha instead of Private, so
we need to be more clear and loud about the new feature being
introduced.

## Solution

This PR makes a few changes mostly around communications and messaging:
- Update `Private Alpha` badges to `Public Alpha`
- Add admonitions in the feature preview modal
- Prompt confirmation before enabling versioning on a bucket
- Dedicated announcement banner in Storage layout
- shown only to users with `storage.capabilities.object_versioning`
enabled
- Popover card when hovering over the Public Alpha badge

See
[update](https://linear.app/supabase/project/storage-object-versioning-and-lifecycle-policies-b5e5809a718e/activity#project-update-e9a50e15)
for more context.

## Review instructions

Functionality changes are minor so mostly check the above mentioned
messaging and ui changes.
2026-11-30 18:18:41 +01:00
Pamela Chia f0a0a4f2fe docs(telemetry): add attempt and render-site rules (#54310)
I reviewed #54081 and found two tracking mistakes that the telemetry
skill had no concrete rule for. I added both rules, and pointed the
header of `telemetry-constants.ts` at the skill.

**Changed:**
- **Attempts named as results**: an event fired in a submit or confirm
handler before the request resolves also counts failed attempts. I added
a rule to name it `submitted`, or to move the call to where the request
has succeeded when a result verb such as `updated` is wanted.
- **Page-named values on shared components**: a value like `source:
'project_home'` is wrong on every other page the component renders on. I
added a rule to find every render site before hardcoding a page name,
and to pass the value as a prop or name it after the component when
there are several.
- **Conflicting verb guidance**: the header of
`packages/common/telemetry-constants.ts` told authors to reuse verbs
already in that file, while the skill names its own list as the
authority. I replaced the header's naming text with a pointer to the
skill.

**Note:** both files are also changed in #54081 (the skill's `data-attr`
paragraph and new events in the constants file), on different lines from
mine.

## Linear
- fixes GROWTH-1596
2026-11-30 23:05:47 +08:00
39b359a70e chore: keep db partner roles out of picker (#54019)
## Problem

Newly added trusted partner roles appear as user selectable /
manageable. Resolves DEPR-735.

## Solution

Trusted partner roles should not be selectable in temporary access. And
should not appear as modifiable in the database roles tab.

| Before | After |
| --- | --- |
| <img width="553" height="398" alt="CleanShot 2026-11-27 at 12 24 43"
src="https://github.com/user-attachments/assets/14affc16-2f00-496f-a124-d918acd93bf0"
/> | <img width="553" height="363" alt="CleanShot 2026-11-27 at 12 25
00"
src="https://github.com/user-attachments/assets/de06002f-d063-453e-a9da-00eee8e0616d"
/> |
| _This partner role `this_is_a_test` shouldn’t be here._ | _Partner
role `this_is_a_test` is no longer in the list of options._ |
| <img width="940" height="305" alt="CleanShot 2026-11-30 at 10 34 52"
src="https://github.com/user-attachments/assets/bdface9f-b3f4-4620-b567-cba8d829205e"
/> | <img width="935" height="299" alt="CleanShot 2026-11-30 at 10 37
40"
src="https://github.com/user-attachments/assets/da1abaa3-5a98-4837-9e8f-35be84b6be4c"
/> |
| _Previous definition._ | _Broadened definition to better encompass
roles we generally manage
([context](https://github.com/supabase/supabase/pull/54019#discussion_r4716757425))._
|

## How to test

1. Open the [Studio staging
preview](https://studio-staging-git-chore-depr-735-supabase.vercel.app)
and select a staging test project. If **Temporary access** is off in
**Feature previews**, enable it there. Then go to **Database → Settings
→ Temporary access** and make sure it is enabled for the test project.
2. Go to **Database → Roles**. Open Chrome DevTools, select **Network**,
and reload. Filter for `key=database-roles`. Right-click the matching
request and select **Override content**.
3. Append this test role to the roles array. Save the override and
reload.

```json
{
  "id": 99999,
  "name": "this_is_a_test",
  "isSuperuser": false,
  "canCreateDb": false,
  "canCreateRole": false,
  "inheritRole": true,
  "canLogin": true,
  "isReplicationRole": false,
  "canBypassRls": false,
  "activeConnections": 0,
  "connectionLimit": 90,
  "validUntil": null,
  "comment": "{\"_supabase\":{\"oauth_app_id\":\"app\"}}",
  "config": {}
}
```

4. In **Database → Roles**, make sure that `this_is_a_test` appears
under **Supabase managed roles** without edit or delete controls.
5. Go to **Database → Settings → Temporary access**, select **Add
rule**, and open the role picker. The test role should be absent.
6. Set the test role's `comment` to `null` in the override and reload.
Open **Add rule** again and make sure that the role is now selectable.
Close the form without saving and remove the override.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
2026-11-30 15:35:30 +01:00
K-Dog (Kevin) 27c4433a3e feat: revised project add-ons page (#54186)
The current add-ons page only lists a subset of available add-ons, which
often causes confusion with things like Advanced MFA Auth (customers
cant find where to configure it).

The revised add-on page covers all potentially configured project
add-ons including replicas and advanced disk. This should help the
customer locate configured add-ons and at the same time discover
potentially interesting add-ons. This can be enhanced further in the
future with "smart" suggestions based on usage.
2026-11-30 21:54:44 +08:00
supabase-vercel-tedd[bot] d86bc8fb9d fix(studio): keep the new MFA factor when clicking outside the verify dialog (#54223)
## Problem

On the account Security page, when you set up an authenticator app, a
click outside the "Verify authenticator app" dialog counts as a cancel
and unenrolls the factor that was just created. The dialog stays open
while that request runs, so you can still type a code and click Confirm,
and verification then fails with an unexpected server error. A page
element that stays clickable above the dialog, such as a consent banner,
triggers this easily.

## Solution

`ConfirmationModal` gets an optional `dismissOnInteractOutside` prop
(default `true`, so no other dialog changes). The authenticator verify
step turns it off. Only Cancel, the close button, or Escape cancel setup
and remove the unverified factor. The verify step also stays in its
loading state while an unenroll is in flight, so Confirm can't run
against a factor that is being deleted.

## How to verify

1. Open Account → Security and click Set up MFA. Enter a name and click
Generate QR code.
2. Click anywhere outside the "Verify authenticator app" dialog. The
dialog stays open, and the QR code and secret do not change.
3. Enter a valid code from the authenticator app and click Confirm. The
method is added ("MFA method added").
4. Repeat steps 1–2, enter a wrong code, and click Confirm. The toast
reports an invalid TOTP code, not an unexpected failure.
5. Repeat step 1, then click Cancel. The dialog closes and no unverified
authenticator remains in the list.
6. Open any other confirmation dialog in Studio and click outside it. It
still closes as before.

## Checks

Ran `pnpm turbo run typecheck --filter=studio --filter=ui-patterns`,
`eslint` (default and type-checks configs) on the changed Studio files,
`oxfmt --check` on the changed files, and `vitest run
components/interfaces/Account/TOTPFactors/AddNewFactorModal.test.tsx`.
The new test checks that an outside pointer or focus event does not
unenroll the factor and that Confirm then verifies it. It fails without
the fix.

## Checklist

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

## Feedback for Tedd

To ask Tedd for a change to this PR, reply in Tedd's session on
[FE-5246](https://linear.app/supabase/issue/FE-5246/clicking-outside-the-mfa-setup-dialog-deletes-the-new-factor-so).
Tedd doesn't read comments on this PR.

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-30 13:39:16 +00:00
Danny White daef6f6e8d fix(studio): align scoped token permission controls (#54164)
## Problem

The scoped token editor uses different access labels from OAuth. Its
permission descriptions are smaller, and the accordion headers can cut
across the rounded corners.

## Solution

Use **No access**, **Read only**, and **Read and write** in the scoped
token editor. Each permission keeps its existing access levels. Make
descriptions easier to read, keep space around badges, and align
selectors in a column on wider screens. Use the same colour for borders
and dividers, and round the outside edges of the permission list and
capability cards.

Use sentence case for permission names in the picker and matching
documentation.

| Before | After |
| --- | --- |
| <img width="767" height="536" alt="CleanShot 2026-11-27 at 11 53 58"
src="https://github.com/user-attachments/assets/f2c36703-9383-49cb-89f0-86f3da0de10c"
/> | <img width="765" height="549" alt="CleanShot 2026-11-27 at 11 53
18"
src="https://github.com/user-attachments/assets/c5abe728-47c9-4594-9787-aff2bc54efec"
/> |

## Review instructions

1. With scoped tokens enabled, open **Account → Access Tokens** and
click **Generate new token**.
2. Choose a resource and expand a permission group. Check the available
access levels, the spacing around badges, and the selector alignment at
desktop and narrow widths.
3. Expand and collapse the first and last permission groups. Open a
scoped token’s details and check the capability card corners.
2026-11-30 16:18:31 +11:00
anthony lio f05fe34966 feat(ui): scroll area (#54023)
## Problem

- on `/kb/guides/migrate-from-auth0` in safari 27 on macos, the mouse
wheel does not scroll the page and a trackpad does
- radix scroll area bar in the table of contents adds a non-passive
`wheel` listener on `document`
- webkit stops mouse-wheel page scroll when that listener meets
`overscroll-behavior-y: none` on `html`, which kb sets

## Solution

- replaces radix with base ui in the `ui` scroll area parts because base
ui binds its wheel listener to the scrollbar element
- replaces the radix `display: table` workarounds in the studio token
sheets and the connect sheet with a reset of the base ui content
`min-width`
- changes the docs ask ai scroll area to use the `ui` scroll area
- adds an inset focus ring to the scroll area viewport because base ui
makes an overflowing viewport focusable
- adds a `getAnimations` stub to the jsdom test setups because the base
ui viewport calls it
- adds `@base-ui/react` to the pnpm catalog + points the design system
scroll area page at the base ui docs

<!--
## Preview links

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

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

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

<!-- ## Additional context

Optionally add any other context or screenshots.

-->

## Review instructions

1. open the preview
[/kb/guides/migrate-from-auth0](https://kb-git-antlio-ui-scroll-area-supabase.vercel.app/kb/guides/migrate-from-auth0)
in safari on macos with a mouse
2. turn the mouse wheel and make sure that the page scrolls and the
table of contents marks the active heading
3. open the preview
[/design-system/docs/components/scroll-area](https://design-system-git-antlio-ui-scroll-area-supabase.vercel.app/design-system/docs/components/scroll-area)
and make sure that each demo shows its bar on hover and scrolls with the
wheel
4. make sure that the horizontal demo scrolls sideways
5. press `tab` until a demo takes focus and make sure that it shows an
inset focus ring
6. open a project in the [studio
preview](https://studio-staging-git-antlio-ui-scroll-area-supabase.vercel.app/dashboard),
click `Connect` and make sure that a long code line scrolls inside its
code block and the sheet body does not scroll sideways
7. open the [docs
preview](https://docs-git-antlio-ui-scroll-area-supabase.vercel.app/docs),
press `cmd+k`, search for `auth` and make sure that the results list
scrolls

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-11-28 13:25:55 +02:00
Ali Waseem c78476711e fix(ui-patterns): use FrameworkImage in ExpandableVideo dialog (#54224)
Fixes the docs build on master, which fails type checking with `TS2607`
in `ExpandableVideo/index.tsx`.

#53906 replaced the `next/image` import with `FrameworkImage`, and
#53981 (merged after it) added a new `<Image>` that still relied on the
old import. With no import, `Image` resolves to the browser's global
`Image` constructor. This swaps it for `FrameworkImage`, which the file
already uses with the same props.
2026-11-27 21:54:58 +02:00
anthony lio 5b31e21ddb feat(docs): guide video preview (#53981)
## Problem

* video card in the docs guide sidebar blurs the thumbnail making it
hard to preview
* users cannot see which video the card opens before they click it

## Solution

* adds a `GlassLens` filter wrapper to `ui-patterns` with lens curvature
and color fringe settings
* replaces the video card in both docs sidebars with a sharp thumbnail
* changes the video dialog in docs and www to fade the backdrop + skip
the zoom when reduced motion is on
* fixes the white iframe in dark mode + a one-frame backdrop flash at
the end of the close animation
* adds autoplay on open + the card thumbnail behind the iframe while the
video loads
* adds a hidden dialog title for screen readers

<!-- linear:table-colwidths:801 -->
<table>
<thead>
<tr>
<th>preview</th>
</tr>
</thead>
<tbody>
<tr>
<td>


https://github.com/user-attachments/assets/b41b3b8a-4d3e-47b3-92ea-3b2cd7629494

</td>
</tr>
</tbody>
</table>

## Review instructions

1. open
[/docs/guides/database/overview](<https://docs-git-antlio-docs-video-preview-supabase.vercel.app/docs/guides/database/overview>)
in dark mode
2. make sure that the video card shows a thumbnail
3. make sure it feels better :)

## Checklist

Check all before review:

- [X] I have read
[CONTRIBUTING.md](<https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md>)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](<https://github.com/supabase/supabase/tree/master/apps/docs/style-guide>)
2026-11-27 21:44:17 +02:00
Wendie CheungandClaude Sonnet 5.5 0a44bbe8c2 fix(www): list "Supports AWS PrivateLink" once on Team and on Enterprise (#54206)
## What kind of change does this PR introduce?

Content fix on /pricing.

## What is the current behavior?

- The Team plan card lists "Supports AWS PrivateLink" twice (after "SSO
for Supabase Dashboard" and after "Priority email support & SLAs").
- The Enterprise plan card doesn't list it, even though the comparison
table shows PrivateLink on both Team and Enterprise.

## What is the new behavior?

- Team card lists "Supports AWS PrivateLink" once, after "SSO for
Supabase Dashboard".
- Enterprise card lists "Supports AWS PrivateLink" once, after "Private
Slack channel".

## Additional context

Data-only change in `packages/shared-data/plans.ts`. The duplicate
showed up on `master` after #53689 and #53670 both touched this file.

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

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-27 15:04:18 +00:00
Jordi Enric 832d238af3 fix(logs): apply pathname exclusions when leaving the value FE-5233 (#54127) 2026-11-27 11:02:53 +00:00
Pamela Chia 01c6966c9b chore(telemetry): add skill rules and rename three events (#54188)
The telemetry skill had no rules for mistakes I keep flagging in
telemetry PR reviews, two of its sections repeated the rest of the file,
and its approved verb list held verbs that no event uses or that another
verb already covers. I added the rules, collapsed the repetition, cut
four verbs, and renamed the three events whose verb is outside the list.

**Changed:**
- **New tracking rules**: I added rules for dismiss and abandonment
events (a property must be able to differ at the call site), values
captured at submit time, `track()` on conditionally rendered elements,
debounced sends, events sent just before leaving the page, experiment
exposure, and org-level events. I also added a rule for actions that
change nothing: a bulk or menu action that changed nothing sends no
result event, and a count property reports only the items that changed.
The verify step now checks that case too.
- **Shorter skill**: I changed "Review Rules" and "Implementing New
Tracking" to link to the section that states each rule. I removed the
verification checklist because each item duplicated a rule stated above
it.
- **Approved verbs**: I removed `intended` and `converted` (no event
uses them) and `sent` and `moved` (one event each, both covered by
another verb), and defined `created` against `added`. The skill now says
the list is the authority. It used to say the list was derived from
`telemetry-constants.ts`, which still holds older events with other
verbs. I also stated when each verb fires: `clicked` and `submitted` in
the handler, the rest once the result has happened. I updated the verb
list in `.coderabbit.yaml` to match.
- **Event renames**: `www_subprocessor_updates_subscribed` is now
`www_subprocessor_updates_form_completed` (still sent after the
successful response, so it keeps counting completed subscriptions),
`realtime_inspector_broadcast_sent` is now
`realtime_inspector_broadcast_submitted`, and `home_section_rows_moved`
is now `home_section_rows_updated`. Nothing else in this repo references
the old names.

**Note:** after each app deploys, the renamed event is a new series, so
a chart that spans the change needs both names.

## To test

Tested on the PR preview:
- [ ] On www, open `/legal/customer-resources/subprocessor-list`, submit
the updates form with a test email, expect one `telemetry/event` request
whose `action` is `www_subprocessor_updates_form_completed`, and no
event after a failed submit.
- [x] In Studio, open a project's Realtime Inspector, join a channel,
send a broadcast message, expect one `telemetry/event` request whose
`action` is `realtime_inspector_broadcast_submitted`. Observed: one
request with that action and a 201 response, and no event after
canceling the modal.
- [x] In Studio, on the project home page, drag a section to a new
position, expect one `telemetry/event` request whose `action` is
`home_section_rows_updated` with `section_moved`, `old_position` and
`new_position`. Observed: one request per drag, with `section_moved:
"usage"`, `old_position: 1`, `new_position: 2`.

I checked the staging analytics project: both new Studio event names
showed up with matching counts, and neither old name did.

## Linear
- fixes GROWTH-1584
2026-11-27 17:43:25 +08:00
Pamela Chia d336555617 fix(telemetry): redact url params and page titles (#54044)
The frontend apps send the current URL and page title with every
analytics event. The redaction added in #53500 and extended in #53955
only covers the `keywords` and `schema` params, so Table Editor filters,
search text, invite tokens, OAuth codes and the auth redirect hash still
go out in URL properties, and Studio's title carries the table, project
and org names.

**Changed:**
- **Query values are redacted by default**: every `name=value` in a URL
property now goes out as `name=redacted`, unless the name is one that
attribution reads downstream (`utm_*`, the click ids the first-referrer
cookie already collects, `dub_id`, `campaign_id`, `cid`, `promo_code`).
Param names and the `?` stay, so reports that match on a param being
present keep working. Fixed-vocabulary params such as `tab` are not on
the list: nothing reads them today, and several of those names carry
customer data on other pages.
- **A change to a redacted value no longer sends a pageview**: picking a
new filter value on the same page used to send a pageview, which would
now be identical to the previous one. The dedupe check compares the
redacted URL, so it is skipped. This lowers Studio pageview counts: on
current traffic, at most about 9% of dashboard pageviews repeat the
previous path with a query string.
- **Events from both transports are covered, and the hash is dropped**:
`identify` and `group` let the SDK stamp its own `$current_url` with the
hash, and `$set_once` pinned that on the person. `before_send` now
strips it, and the SDK no longer captures hashes itself. Custom events
skip `before_send`, so the same redaction also runs on their `pathname`
field, where www was appending the raw query string. The SDK's copy of a
search-engine referrer's query (`ph_keyword`) is dropped too.
- **Studio sends a route-level title**: `Tables | Database | Supabase`
in place of `users | Tables | Database | <project> | <org> | Supabase`.
The tab title users see is unchanged, and so are titles in the other
apps, which are public content.
- **Dead clicks, heatmaps and web vitals are pinned off**: each one puts
page text or the page URL in a nested payload the redaction does not
walk, and each can be switched on from project settings without a
deploy. All three are off today.

**Note:** One path is only partly covered. Feature-flag requests carry
the first URL and referrer the SDK stored for the browser, and they
never pass through `before_send`. The hash is now gone from them; query
values in that first URL (for example an invite link opened in a fresh
browser) still go out on those requests.

## To test

Signed in on the Studio preview, with analytics consent accepted. Check
events in the staging analytics project, filtered to the preview host.

Tested on the PR preview:
- [x] Open the Table Editor, add a filter with the value
`leaktest@example.com` and a sort, type `leaktest` in the Tables search
and in a logs search, then click through a few pages. Expect no event
containing `leaktest`, and `filter=redacted`, `sort=redacted`,
`search=redacted` and `s=redacted` in `$current_url`. Observed: zero
events from the preview host contained `leaktest`; custom events,
`$pageview`, `$pageleave` and `$set` all carried the `=redacted` forms.
The filter and sort were applied by loading the Table Editor URL with
them, which is how the app restores them
- [x] Same session: expect `page_title` and `title` on every event to
hold only page names (for example `Tables | Database | Supabase`), with
no project, org or table name. Observed: `Table Editor | Supabase`,
`Tables | Database | Supabase`, `Postgres Logs | Logs | Supabase`, `Team
| Supabase` and similar; no event carried the project, org or table
name. `explorer_*` events keep their existing fixed title `Explorer`
- [x] Load
`/dashboard/project/<ref>?token=leaktest1&projectName=leaktest2#access_token=leaktest3`,
then open `/join?token=leaktest4&slug=x`. Expect zero events containing
`leaktest`, including `$set`, `$identify` and `$groupidentify`.
Observed: zero, with `token=redacted&projectName=redacted` and no hash
on any stored URL. `$set` and `$groupidentify` fired and were clean; no
`$identify` fired in this session (the user was already identified), so
that event was not observed
- [x] Load any page with `?utm_source=readable5` appended. Expect
`utm_source=readable5` readable in `$current_url`. Observed on Database
> Tables with `?utm_source=readable5&gclid=readable6&tab=readable7`:
both attribution params readable, `tab=redacted`. The Table Editor route
rewrites its own query string and drops unknown params before any event
fires, so use another page
- [x] Open a table in the Table Editor. Expect the browser tab title to
still lead with the table name and include the project and org names.
Observed: `<table> | Table Editor | <project> | <org> | Supabase`
- [x] On the Table Editor with a filter applied, change the filter value
twice, then add a sort. Expect no new `$pageview` for the two value
changes and one for the added sort (a new param name). Observed, all
through the UI with no reload: adding the filter sent one pageview, the
two value changes sent none, adding the sort sent one, and a sidebar
navigation sent one; the staging analytics project shows the same four
pageviews

## Linear
- fixes GROWTH-1572
2026-11-27 03:41:51 +00:00
Drew McLellan f8cd1ee63e feat(studio): track docs button clicks (#54119)
## Problem

We don't track clicks on the shared `DocsButton`, so we can't tell which
pages send people to the docs most or where the UI needs more
explanation. Closes FE-5020.

## Solution

Add a `docs_button_clicked` event, fired once per click from the click
handler in the shared `DocsButton`. One call covers every page that
renders it.

- Properties: optional `topic` (a fixed label passed by the caller,
omitted when unset). `pathname` is already attached to every event by
`useTrack`.
- Groups are `Partial<TelemetryGroups>` because the button renders on
project, organization, and account pages.
- Click still stops propagation, as before.

## Review instructions

1. Run `pnpm dev:studio` and open a page with a docs button (e.g. a
project's Auth or Database page).
2. Click it and check the `docs_button_clicked` event is sent once, with
`topic` when the button has one.
3. Run `pnpm --filter studio exec vitest run
components/ui/DocsButton.test.tsx`.

Still to do after merge: verify the event in PostHog on staging.
2026-11-26 16:28:37 +00:00
Drew McLellan 433d95afd0 feat(studio): track usage on the API keys pages (#54070)
## Problem

Nothing is tracked on the API keys pages (new and legacy), so we can't
tell which keys people copy, how often they create or delete keys, or
how quickly projects disable legacy keys. Closes FE-5030.

## Solution

Adds five events, defined in `packages/common/telemetry-constants.ts`
and fired through `useTrack()`:

| Event | When | Properties |
| --- | --- | --- |
| `api_key_copied` | User copies a publishable, secret, or legacy
anon/service_role key with its Copy button. Keyboard copies aren't
counted. Not fired when blocked by permissions or when the copy fails. |
`keyType` |
| `api_key_reveal_clicked` | User reveals a secret or legacy
service_role key (not on hide) | `keyType` |
| `api_key_created` | Key created from the dialog, or by the first-time
setup (fires once per key) | `keyType`, `source` |
| `api_key_removed` | Key deleted after confirming in the modal |
`keyType` |
| `legacy_api_keys_updated` | Legacy keys disabled or re-enabled |
`enabled` |

- Create, delete, and legacy toggle fire in the mutation hook's
`onSuccess`, so failed attempts aren't counted and the event still fires
if the component unmounts mid-request. They're attributed to the
mutation's own project. Copy and reveal fire in the click handler.
- Delete is tracked in `SecretAPIKeys` / `PublishableAPIKeys`, where the
confirm modal and mutation live, not in the dropdown item.
- No key names or values in properties.
- `data-attr` added to the copy, reveal, create, delete, and docs
controls (static strings; Studio's PostHog autocapture is currently off,
so these send nothing today). `DocsButton` gets an optional `data-attr`
prop.
- `ui-patterns` `Input` gets optional `onReveal` and `onCopied`
callbacks. `onCopied` fires only for the Copy button, so legacy and new
keys count copies the same way.
- The empty-state sample keys are `inert`, so their buttons don't copy
or track.
- New `getLegacyApiKeyType` helper maps the legacy `anon` /
`service_role` tags to the event's `keyType`.

Tests cover copy, reveal, the no-event-on-hide and denied-grant cases,
the legacy toggle, and the key-type helper. Success paths for the create
dialogs and delete aren't covered.

## How to test

- [ ] Open `/project/[ref]/settings/api-keys`, copy a publishable and a
secret key, reveal a secret key, and check `api_key_copied` and
`api_key_reveal_clicked` in PostHog (staging) with the expected
`keyType`
- [ ] Create and delete a publishable and a secret key and check
`api_key_created` / `api_key_removed`
- [ ] On the legacy page, copy anon and service_role, reveal
service_role, then disable and re-enable the keys and check
`legacy_api_keys_updated`
2026-11-26 11:24:05 +00:00
Mert YEREKAPANandPamela Chia cbae30a467 feat(studio): link plan badge to upgrade flow (GROWTH-775) (#47447)
## What

Makes the **Free** plan badge next to the organization name (in the org
dropdown) a clickable entry point into the upgrade funnel.

Resolves [GROWTH-775](https://linear.app/supabase/issue/GROWTH-775).
Feedback verbatim: _"if i hit the 'free' button next to my account name
it should take you to the upgrade to paid account funnel."_

The badge links to
`/org/{slug}/billing?panel=subscriptionPlan&source=org_plan_badge`.
Clicking it fires `upgrade_cta_clicked` with `placement:
'org_plan_badge'`.

## Changes

| File | Change |
|---|---|
| `apps/studio/components/layouts/AppLayout/OrganizationDropdown.tsx` |
Eligibility check and the linked badge. |
| `apps/studio/components/layouts/AppLayout/AppLayoutDropdown.tsx` | New
optional `trailingContent` slot, rendered as a sibling of the nav
`<Link>`. Needed because a clickable badge can't be a `<Link>` nested
inside the org `<Link>` (invalid HTML). Non-breaking — `BranchDropdown`
is unaffected. |
| `packages/common/telemetry-constants.ts` | Adds the `org_plan_badge`
placement to `upgrade_cta_clicked`. |
|
`apps/studio/components/layouts/AppLayout/OrganizationDropdown.test.tsx`
| Free org gets the link; partner-managed, billing-partner, and paid
orgs keep the plain badge. |

## Who sees the link

Orgs on the Free plan, managed by Supabase, with no `billing_partner`.
Everyone else keeps the plain, non-clickable badge. The badge also stays
plain when billing is disabled (`billing:all`) or plan changes are
paused (`disableProjectCreationAndUpdate`), the same two checks
`UpgradePlanButton` applies.

Partner-managed orgs are excluded because they change plans at the
partner (Vercel / AWS Marketplace / Stripe Projects).
`PlanUpdateSidePanel` shows a `PartnerManagedResource` notice and
disables every paid tier for them, so the badge would land them on a
panel with no enabled action. `billing_partner` is checked separately
because `getManagedByFromOrganizationPartner` doesn't map every partner
— `fly` falls through to `supabase`.

Free-plan members without `BILLING_WRITE` still get the link:
`PlanUpdateSidePanel` renders `RequestUpgradeToBillingOwners` per plan
card for them, so the landing is a real next action, not a dead end.

## Testing

`OrganizationDropdown.test.tsx` covers the linked badge for a Free
Supabase-managed org and the plain badge for partner-managed,
billing-partner, and Pro orgs, plus the billing-disabled and
plan-changes-paused cases. Existing partner-icon tests still pass. `tsc
--noEmit` and Prettier are clean for the touched files.

The Studio lint ratchet passes locally.

---------

Co-authored-by: Pamela Chia <pamelachiamayyee@gmail.com>
2026-11-26 09:47:03 +00:00
K-Dog (Kevin) 574cd4ba46 chore: remove old plan change UI (#54105)
Revamped plan change UI is fully rolled out for everyone. Removing the
now obsolete components.
2026-11-26 16:01:29 +08:00
anthony lio 3643bc656d fix(docs): keyboard shortcut hydration (#53959)
## Problem

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

## Solution

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

<!--
## Preview links

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

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

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

<!-- ## Additional context

Optionally add any other context or screenshots.

-->

## Review instructions

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

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-11-25 16:13:27 +02:00
Pamela Chia 71f7780d1e fix(common): clear first-referrer cookie on consent revoke (#54043)
Withdrawing consent expired the analytics and ads cookies but left
`_sb_first_referrer` (referrer, landing URL, UTMs and click ids, 365
days) in the browser. I added it to the list `revokeTrackingConsent`
expires, so it is removed on the host and on `.supabase.com` together
with the others. The cookie is only read after consent, so no
attribution data is lost.

## To test

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

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

## Linear
- fixes GROWTH-1574
2026-11-25 22:07:35 +08:00
anthony lio 041c363873 fix(docs): layout v2 fixtures (#53761)
## Problem

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

## Solution

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

<!--
## Preview links

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

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

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

<!-- ## Additional context

Optionally add any other context or screenshots.

-->

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

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-11-25 15:45:44 +02:00
Alaister YoungandAlaister Young 7c368aadfd refactor(ui-patterns): use FrameworkProvider for routing and drop next (#53907)
Migrates the remaining router consumers in `packages/ui-patterns`
(`MobileSheetNav`, `CommandProvider`, `useCrossCompatRouter`) to
`useFramework()` from `common`, removing the final `next` imports and
`next` peerDependency from `packages/ui-patterns`.

**Changed:**

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

**Removed:**

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

## To test

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

---------

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

**Changed:**

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

## To test

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

---------

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

**Added:**

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

**Changed:**

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

**Removed:**

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

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

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

## To test

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

---------

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

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

## Solution

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

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

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

## How to verify

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

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

## Checks

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

## Checklist

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

## Feedback for Tedd

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

---------

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-11-25 11:35:03 +00:00
K-Dog (Kevin) 653f914ca1 feat: post plan upgrade screen (#54003)
Right now, when customers upgrade from free → paid or even pro → team,
we simply redirect to the org billing page with a quick banner that
vanishes after 3 seconds confirming the plan was changed. it’s quite
unsatisfying and feels like a missed opportunity to display what the
customer now unlocked and next steps. I want to especially highlight
projects that are now upgradeable from nano → micro, but we can later
expand and make the “next steps” smarter and do it context-based.
2026-11-25 11:30:19 +00:00
Drew McLellan 4fa8afe918 feat(studio): support grouped OR filters in unified logs (#53943) 2026-11-25 10:42:36 +00:00
K-Dog (Kevin) 0fa521d64a chore: small nano compute docs improvements (#54005)
Make it a bit clearer that Nano instances are for Free Plan and not free
in itself
2026-11-25 16:25:37 +08:00
Alaister YoungandAlaister Young b2cd26e054 chore(ui-patterns): remove trivial and unused next imports (#53903)
Removes unused and straightforward `next` imports in
`packages/ui-patterns` (and a dead `next/navigation` test mock in
`packages/ui`) that do not require a framework adapter.

**Removed:**

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

**Changed:**

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

## To test

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

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-11-25 13:14:44 +08:00
Pamela Chia f1905195a6 fix(ui-patterns): stop sending command menu search telemetry with an empty query (#53937) 2026-11-25 09:32:19 +08:00