Commit Graph
1201 Commits
Author SHA1 Message Date
barcofourie 7e56800992 fix(assistant): update support assistant messaging for clarity and consistency (#54112)
## Problem

The AI Assistant follow-up on support requests (behind the
`supportAssistantFollowUp` flag) told users with service restrictions to
ask Support for an exception. In almost every restriction ticket we
reviewed during the production test, the Assistant suggested this, and
Support then declined.

## Solution

Rather than a rule for each ticket type, this adds one general rule to
the server-side support-mode context and removes the "a human will
reply" framing.

`escalate_to_human` is unchanged, so users who ask for a person can
still be escalated.

## Review instructions

Read the diff to `assistant-context.ts` and `SupportAssistant.utils.ts`,
and check that the rule is general and doesn't name a particular ticket
type.


## 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-03 06:23:54 +02:00
Danny White 52614926a3 feat(studio): promote Launch Week 16 in the Banner Stack (#54512)
## Problem

Launch Week 16 is promoted on www but needs the same promotion in hosted
Studio.

## Solution

Add a low-priority card to the existing bottom-right Banner Stack across
project, organisation, and account pages. It uses the shared dot artwork
from #54511, links to the Launch Week site, saves dismissal, and expires
after December 11 in San Francisco. Signed-out and self-hosted Studio do
not show it.

| After |
| --- |
| <img width="995" height="584" alt="1211"
src="https://github.com/user-attachments/assets/ff1a60a3-6a4e-4b32-a3df-7fdfe74f4afb"
/> |
| <img width="995" height="584" alt="68318"
src="https://github.com/user-attachments/assets/3a41c56a-fe59-4800-ae14-82ec42c6f260"
/> |

## Review instructions

1. Open a hosted project, organisation, or account page on the Studio
preview. If another notice is in front, expand the Banner Stack to find
**Launch Week 16**.
2. Check the artwork, copy, and **Claim your ticket** button in light
and dark mode. The button opens the Launch Week site in a new tab and
dismisses the card.
3. Close the card and reload. It should stay dismissed.
2026-12-03 10:56:14 +07: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
Alaister YoungandAlaister Young 07101b6894 [FE-3200] chore(studio): lift bundler workarounds and stabilize hooks (#54121)
Cleans up obsolete Rolldown/Vite bundler workarounds from the TanStack
Start migration and fixes unstable router selectors and inline default
array props that could cause unnecessary re-renders or render loops.

Addresses
[FE-3200](https://linear.app/supabase/issue/FE-3200/lift-bundler-workarounds-and-fix-latent-issues-next-was-masking).

**Removed:**

- Emptied `KNOWN_CHUNK_CYCLES` in `apps/studio/vite.config.ts` while
keeping the `assertNoChunkCycles` build guard enabled
- Removed obsolete `manualChunks` workarounds
(`class-variance-authority`, `ui-field`, `ui-drawer`, `ui-form`,
`ui-sidebar`, `ui-slider`, `ui-avatar`), keeping the React and
`lucide-react` vendor chunks so React stays a single leaf chunk and
Lucide does not fan out into per-icon modulepreload requests
- Removed the obsolete `sharedDefines` (`global: 'globalThis'`)
substitution from `apps/studio/vite.config.ts`

**Changed:**

- `StudioLink` (`StudioFrameworkProvider.tsx`): split `useRouterState`
into primitive `currentPathname` and `currentSearch` selectors instead
of returning a fresh object on every router state tick
- `useNuqsTanStackRouterAdapter` (`nuqs-tanstack-adapter.tsx`): select a
serialized query string key from `useLocation` so `useQueryState`
consumers do not re-render when unwatched search params change
- `FilterPopover`: replaced inline `[]` defaults for `options` and
`activeOptions` with shared `EMPTY_ARR` (`@/lib/void`), and guarded
`setSelectedOptions` with an element-wise equality check when closed
- `InputWithSuggestions`: replaced inline `[]` default for `suggestions`
with shared `EMPTY_ARR` (`@/lib/void`) so `useEffect` does not loop when
`suggestions` is omitted at runtime

**Added:**

- Regression tests covering router selector stability and default-prop
render loops in `StudioFrameworkProvider.test.tsx`,
`nuqs-tanstack-adapter.test.tsx`, `FilterPopover.test.tsx`, and
`InputWithSuggestions.test.tsx`

## To test

- Run `pnpm --filter studio run build` and verify the build passes with
`KNOWN_CHUNK_CYCLES` empty and `assertNoChunkCycles` enabled
- Run the new/updated unit tests in `apps/studio`
(`StudioFrameworkProvider.test.tsx`, `nuqs-tanstack-adapter.test.tsx`,
`FilterPopover.test.tsx`, `InputWithSuggestions.test.tsx`)
- Smoke-test Studio navigation, URL search-param filters (`nuqs`), Table
Editor column suggestions, `FilterPopover` interactions, and
`/auth/hooks` (confirming no `global` ReferenceError)

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-12-01 23:45:00 +08:00
Charis 975689dcfc feat(studio): send pageview and global crash metrics on staging and preview (#54331)
## Problem

We need simple counts of every pageview and every global crash for SLO
monitoring. These counts need to go to observability ingest, not to
Sentry, etc., so they can be part of our Grafana dashboards pipeline.

## Solution

- `usePageviewMetric` sends one `pageview` event on first load
(hydration) and on every client-side navigation that changes the
pathname. Changes to only the query string or hash do not count.
- A `global_crash` event is sent once when the global crash screen is
shown. That covers both the root `ErrorBoundary` and the root route
`errorComponent`. Chunk-load errors that are recovered by an automatic
reload are not counted, which matches what is reported to Sentry.
- Both are gated by a new `IS_STAGING_OR_PREVIEW` constant. It is false
on production, local development, self-hosted and Nimbus.
- The request is a fire-and-forget `fetch` with `keepalive: true` and
`credentials: 'omit'`. It uses a `text/plain` body, so there is no CORS
preflight. Errors are swallowed.
- The endpoint origin is added to `connect-src` for all platform
environments, because production will need it later. No other CSP
directive changes.

## Review instructions

1. Open the Studio preview deployment for this PR with the network panel
open.
2. Load any page. See one `POST /api/metrics` request that returns 204.
3. Navigate to another page. See one more request.
4. Change only a query parameter (for example a table filter). See no
new request.

## 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 15:35:05 +01: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
Alaister YoungandAlaister Young 0a4cec0464 [FE-5108] (part 1) refactor(studio): migrate core UI & prefetchers off next/link (#54304)
Part 1 of a 6-PR stack migrating all `next/link` imports in
`apps/studio` onto TanStack Router's `Link` (or plain `<a>` for known
external URLs) and removing `compat/next/link.tsx`.

| Part | PR | Scope |
| --- | --- | --- |
| **1** | **#54304 ← this PR** |
**`data/prefetchers/PrefetchableLink.tsx` and `components/ui/**`** |
| 2 | #54305 | `components/layouts/**` and top-level shell components |
| 3 | #54306 | Database, TableGridEditor, Storage, SQLEditor,
BranchManagement, Branching, Functions, Realtime |
| 4 | #54307 | Integrations, Settings, Observability, LogDrains, Issues,
Linter, Reports, QueryPerformance, QuerySources, ConfigDrift,
DiskManagement, Compute |
| 5 | #54308 | Remaining `components/interfaces/**` (Org, Billing, Auth,
Support, Home, SignIn, ConnectSheet, etc.) |
| 6 | #54309 | Remove `compat/next/link.tsx` shim, Vite alias, and
update basePath tests/docs |

Migrates `data/prefetchers/PrefetchableLink.tsx` and all shared
`components/ui/**` components off `next/link`.

**Added:**

- `apps/studio/components/ui/DynamicLink.tsx` (with unit tests) — shared
`forwardRef` link wrapper for dynamic URL strings that runs
`splitInternalUrl` and renders a plain `<a>` for external URLs (or
same-origin URLs outside the app's `basePath`) vs TanStack `<Link>` for
internal paths

**Changed:**

- Replaced `next/link` in
`apps/studio/data/prefetchers/PrefetchableLink.tsx` and all 30 importing
components under `apps/studio/components/ui/**` (`InlineLink`,
`CardButton`, `CommandItemLink`, `ObservabilityLink`, `ProductMenuItem`,
`ResourceItem`, `UpgradePlanButton`, `ToggleSpendCapButton`, banners, AI
assistant panel links, etc.)
- Used typed `<Link to="..." params={...} search={...} hash="..." />`
for known internal routes, `<DynamicLink href={...} />` for
dynamic/untyped URL strings (whether internal with query/hash or
external), and plain `<a>` for known external links
- Updated `apps/studio/routes/index.tsx` `validateSearch` return type to
`{ next?: string }` so `<Link to="/">` compiles without requiring
`search={{ next: undefined }}`
- Updated
`hooks/misc/__tests__/useTableEditorFiltersSort.navigation.test.tsx`,
`PolicyTableRow.utils.test.ts`, `SupportAssistantSuccessCard.test.tsx`,
and `useOrganizationRestrictions.test.tsx` to render inside a TanStack
Router context (`customRender` / `RouterContextProvider`)

Addresses
[FE-5108](https://linear.app/supabase/issue/FE-5108/replace-the-nextlink-shim-with-tanstack-link)

## To test

- [ ] Click internal and external `InlineLink`, `CardButton`,
`ProductMenuItem`, and `PrefetchableLink` targets and verify client-side
navigation vs external anchors
- [ ] Verify banner links (upgrade, resource exhaustion, queue
operations) preserve query params and hashes
- [ ] Confirm Studio typecheck, lint, and unit tests pass

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-12-01 16:23:48 +08:00
K-Dog (Kevin) c76cbaaeed chore: micro upgrade copy (#54348)
We are trying to move away from the "Free" copy - it is free as in no
additional costs, but not FREE
2026-12-01 13:55:46 +08: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
Jordi Enric c2edb29076 fix(studio): explain Supavisor session pool limits DEBUG-43 (#53930)
## Problem

When Supavisor rejects a session because its connection pool is full,
Studio shows the error without explaining how to recover.

## Fix

Show a troubleshooting step for the session-mode limit that explains how
pool size limits concurrent clients and links to the configuration
guide.

## Screenshot

The Table Editor’s troubleshooting step, rendered locally with a sample
session-pool error.

<img width="660" alt="Expanded Supavisor session pool limit guidance in
the Table Editor"
src="https://github.com/user-attachments/assets/6072eec4-e243-4d53-a40f-30fb14d21d05"
/>

## How to test

- Display a classified MaxClientsInSessionMode error in Studio and
expand its troubleshooting step. The link should open the pool size
section of the database connection management guide.
- Display a generic transaction-mode connection limit error. It should
keep its usual fallback.
- The pattern, classification and ErrorMatcher suites exercise these
paths (144 tests passed locally).

Fixes [DEBUG-43](https://linear.app/supabase/issue/DEBUG-43).
2026-11-30 16:49:05 +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
Alaister YoungandAlaister Young c59821fde6 [FE-5109] (part 2) refactor(studio): migrate shared UI components off next/router (#54054)
Part 2 of a 6-PR stack migrating all `next/router` and
`next/compat/router` imports in `apps/studio` onto TanStack Router hooks
and removing the router shims.

| Part | PR | Scope |
| --- | --- | --- |
| 1 | #54053 | Core navigation helpers, `hooks/**`, `lib/**`,
`data/prefetchers/**` |
| **2** | **#54054 ← this PR** | **`components/ui/**`** |
| 3 | #54055 | `components/layouts/**` and `state/tabs.tsx` |
| 4 | #54056 | Database, Branching, Compute, Edge Functions, Explorer,
SQL Editor, Storage, Table Editor |
| 5 | #54057 | Remaining `components/interfaces/**` and
`QueryInsightsTable` router events |
| 6 | #54058 | Remove `next/router` & `next/compat/router` shims,
`_router-events.ts`, Vite aliases, and test mocks |

Migrates all 15 `apps/studio/components/ui/**` files off `next/router`.

**Changed:**

- Replaced `useRouter` across `AIAssistantPanel` (`AIAssistant`,
`ModelSelector`), `Charts/ComposedChartHandler`, `EditorPanel`,
`ErrorBoundary` (`ClientSideExceptionHandler`,
`GlobalErrorBoundaryState`, `InsertBeforeRemoveChildErrorHandler`),
`GlobalShortcuts/ShortcutsReferenceSheet`, `HelpPanel`
(`HelpOptionsList`, `HelpPanel`), `ProductMenu/ProductMenuShortcuts`,
`QueryBlock/EditQueryButton`, and `ResourceExhaustionWarningBanner` with
TanStack's `useNavigate`, `useLocation`, `useRoutePattern`, and
`useParams` from `common`
- Updated `AIAssistant.test.tsx`, `HelpOptionsList.test.tsx`, and
`ProductMenuShortcuts.test.tsx` to use TanStack Router instead of
`next/router` mocks

**Simplified:**

- `EditQueryButton` and `ShortcutsReferenceSheet` match against
`useRoutePattern()` instead of the real pathname, as `router.pathname`
did before. A ref or slug containing `sql` or `advisors` no longer
misfires.
- Removed the unused `restrictToRoutes` field from
`ResourceExhaustionWarningBanner` (no warning sets it)
- `AIAssistant` clears the handoff param with `navigate({ to: '.' })`,
dropping a pathname subscription and an `AnyRouter` cast
- `ProductMenuShortcuts` inlines its handler (`useShortcut` always calls
the latest callback)
- Moved the `AdvisorsNavigationShortcuts.test.tsx` fix into this PR so
it passes on its own
- Tests use the shared `createTestRouter` and `customRender` router

Addresses
[FE-5109](https://linear.app/supabase/issue/FE-5109/replace-the-nextrouter-shims-with-tanstack-router-hooks)

## To test

- [ ] AI Assistant panel links, model selector navigation, and "Edit in
SQL Editor" (`EditQueryButton`) navigate cleanly
- [ ] Keyboard shortcuts in `ProductMenuShortcuts` and the shortcuts
reference sheet (`?`) match the active section and navigate as expected
- [ ] Error boundary recovery ("Reload page" / navigation actions) and
Help panel links still work
- [ ] Resource exhaustion warning banner matches project routes as
before

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-11-30 14:49:15 +08:00
Maksym Ionutsa 028d329417 Fix/studio observability timezone labels (#54198)
## Problem

Observability date labels ignore the timezone set in the profile. They
always show the browser timezone or UTC. The header range label (for
example "Nov 27, 12:40pm → 12:50pm") uses bare `dayjs()`. The Data API
charts (Total Requests, Error Counts, Response Speed, Network Traffic)
pass `displayDateInUtc`, so the first and last timestamps under each
chart always show UTC.

## Solution

- Format the header range label with `useFormatDateTime()` on the
Database, Auth, Storage, Realtime, PostgREST and Edge Functions
observability pages.
- Remove `displayDateInUtc` from the four Data API charts in
`ApiRenderers.tsx`.
- Use `text-xs` for the date labels in `BarChart`, so they match
`ComposedChart` and `StackedBarChart`. This is a separate commit.

## Review instructions

1. Open Observability, Database, and set a timezone in your profile that
differs from your browser.
2. Check that the range label next to the date picker and the tooltip
show the same timezone.
3. Open Observability, Data API. Check that the labels under each chart
follow the profile timezone and use the same font size as the Database
charts.

<details>
<summary>Screenshots</summary>

<img width="1124" height="844" alt="CleanShot 2026-11-27 at 13 37 14@2x"
src="https://github.com/user-attachments/assets/e3d29c77-317a-4489-aa4c-1fbf4783cb57"
/>


font in Data API
<img width="318" height="72" alt="CleanShot 2026-11-27 at 13 40 19@2x"
src="https://github.com/user-attachments/assets/06e4d12f-245f-4d4e-9dc9-b7f2f7879e52"
/>
font in Database
<img width="342" height="66" alt="CleanShot 2026-11-27 at 13 41 08@2x"
src="https://github.com/user-attachments/assets/de200eb2-4351-471d-a220-bacea142b0d9"
/>


</details>


## Checklist

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill (not applicable, no docs
changes)
2026-11-27 16:39:47 +01: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
Alaister YoungandAlaister Young 953e508a3e [FE-5110] refactor(studio): replace next/navigation with TanStack (#54041)
Moves the remaining `next/navigation` imports in Studio onto TanStack
Router hooks (and `useParams` from `common`), finishes migrating the
remaining `next/link` and `next/router` usages in the touched
components, and removes the `compat/next/navigation.ts` shim and its
Vite alias. Shared packages (`packages/**`) no longer import
`next/navigation`, so the alias can be dropped now.

**Removed:**

- `apps/studio/compat/next/navigation.ts` and the `'next/navigation'`
entry in `apps/studio/vite.config.ts`
- Global `next/navigation` mock in `apps/studio/tests/vitestSetup.ts`
and the obsolete `apps/studio/tests/lib/route-mock.test.tsx`

**Changed:**

- Replaced `usePathname` (12 files) and `useSearchParams` (3 files) with
`useLocation({ select })` from `@tanstack/react-router`
- Replaced `useRouter` in Storage bucket tables, SQL Editor commands,
and `SignInMfaForm` with `useNavigate` from `@tanstack/react-router`,
and updated `createNavigationHandler` in `lib/navigation.ts` to accept
either `NextRouter` or TanStack's `useNavigate`
- Replaced remaining `next/link` imports in touched components
(`SignInMfaForm`, `Restriction`, `DownloadLogsButton`,
`DownloadResultsButton`, `AuthEmailsLayout`, `AuthProvidersLayout`,
`JWTKeysLayout`, `StorageBucketsLayout`) with TanStack Router's `Link`
- Replaced `useParams` in `CreatePublishableAPIKeyDialog` with
`useParams` from `common` (matching `CreateSecretAPIKeyDialog`)
- Wrapped `CustomWrapper` (`tests/lib/custom-render.tsx`) in a default
TanStack `RouterContextProvider` (with optional `router` / `initialUrl`
overrides) and updated affected component tests to drop their
`next/navigation` mocks

Addresses
[FE-5110](https://linear.app/supabase/issue/FE-5110/replace-the-nextnavigation-shim-with-tanstack-router-hooks)

## To test

1. Check active tab highlighting and navigation across Auth Emails, Auth
Providers, JWT Keys, Storage Buckets, and Editor layouts
2. Verify clicking, Cmd/Ctrl-clicking, middle-clicking, and pressing
Enter on Storage bucket rows (Files, Analytics, Vector) navigates as
before
3. Run "Query a table..." and open SQL snippets from the Command Menu
and confirm `/project/$ref/sql/$id` opens with multi-line SQL preserved
in `?content=`
4. In the MFA sign-in flow, verify the recovery code link and
`forgot-password` completion preserve query params (`returnTo`,
`context=forgot-password`), and Cancel signs out and replaces history
with `/sign-in`
5. Confirm Table Editor sort/filter URL sync persists filters per table
without leaking across table switches

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-11-26 17:18:49 +08:00
Alaister YoungandAlaister Young 01d4d4d430 [FE-5113] refactor(studio): replace next/dynamic shim with React.lazy (#54022)
## Problem

Now that Studio runs on TanStack Start, `apps/studio` still routes 13
`next/dynamic` imports through a local compatibility shim
(`apps/studio/compat/next/dynamic.tsx` aliased in
`apps/studio/vite.config.ts`). Keeping the shim adds unnecessary
indirection during the Next.js teardown (FE-5113).

## Solution

Replaces every `next/dynamic` import in `apps/studio` with `React.lazy`
+ `Suspense` (or static imports where already inside a lazy chunk), then
deletes `compat/next/dynamic.tsx` and its Vite alias.

None of the previously `ssr: false` call sites need `ClientOnly`: Studio
runs TanStack Start with `spa: { enabled: true }` and only prerenders
the signed-out auth routes (`/sign-in`, `/sign-up`, `/sign-in-sso`,
`/forgot-password`), `__root.tsx` gates `<Outlet />` behind
`canRenderPage`, and `StudioCommandMenu` is already gated by
`useCommandMenuInitiated()` (which starts `false` per render).

**Removed:**

- `apps/studio/compat/next/dynamic.tsx` and the `'next/dynamic'` entry
in `nextShims` in `apps/studio/vite.config.ts`

**Changed:**

- Migrated all `next/dynamic` call sites to `React.lazy` + `Suspense`:
- `StudioCommandMenu`, `ContextSearchResults`,
`Marketplace/OverviewTab`, `QueryDetail` (`SqlMonacoBlock`),
`SQLEditorEditorPanel` (`MonacoEditor`, `DiffEditor`),
`SupportAssistantSuccessCard`, `LayoutSidebarProvider`,
`MessageMarkdown` (`Streamdown`), and
`SupportAssistantSuccessCardContent` (`Streamdown`)
- `ConnectStepsSection`: hoisted the lazy component cache out of
`useMemo` to module scope (also clears its
`react/no-unstable-nested-components` warning)
- `Integrations.constants.tsx` and `useAvailableIntegrations.tsx`:
hoisted all lazy integration tab/page definitions (including
`GraphiQLTab`) to module scope so `navigate()` returns stable component
references, added `Suspense` boundaries with `<Loading />` at both
render points (`MarketplaceDetail` and the integration child route), and
keyed integration tab/creation sheet instances (`integration.id` in
`MarketplaceDetail` and `wrapperMeta.name` in `WrappersTab`) so state
cannot leak when switching between wrappers or OAuth integrations;
preserves `umdAmdShortCircuit`, `ssrStubGraphiql`, and
`graphiqlViteWorkers` in `vite.config.ts`
- Replaced `dynamic()` calls for `AiIconAnimation`, `Badge`, and 4
`icons` in `CreateCommands.tsx` with static imports (already inside the
lazy `CommandMenu` chunk)
- Removed the stale `next/dynamic` mention from the
`lib/chunk-load-error.ts` doc comment (`React.lazy` chunk failures
continue bubbling to the root `ErrorBoundary` reload handler)

**Added:**

- Reference-stability tests for `INTEGRATIONS.navigate` in
`Integrations.constants.test.ts` (running in Vitest's Node environment)

## Review instructions

1. Open the SQL Editor and Query Performance query detail panel, and
confirm the Monaco editor and diff view load cleanly.
2. Open the GraphQL integration's GraphiQL tab, and confirm the loading
skeleton displays while the chunk loads and GraphiQL mounts with working
autocomplete/workers.
3. Open a Wrapper integration's Wrappers tab, open the create sheet,
then navigate via history to a different wrapper's create sheet and
confirm the form resets to the new wrapper's defaults.
4. Open the Command Menu (`Cmd+K`), navigate to context search (for
example, Search Database Tables) and Create commands, and confirm icons,
badges, and search results load without flicker.
5. Open the Connect sheet and switch between frameworks/steps,
confirming step content loads with the skeleton fallback.
6. Toggle sidebars (AI Assistant, Inline SQL Editor, Advisor, Help) and
verify markdown streaming in AI Assistant.
7. Confirm CI passes `pnpm --filter studio run build` (including
prerendering and chunk-cycle checks), typecheck, lint ratchet, and
Studio tests.

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-11-26 08:46:55 +00:00
K-Dog (Kevin) 258004ea4d chore: improve pricing info on project creation (#54110)
Customers often misunderstand compute pricing. In an effort to make this
a little more obvious without a huge revamp of the project creation,
this PR:

- Adds the compute billing animation that we use on plan upgrades to
project creation
- Expands the footer on project creation to be a bit more prominent
2026-11-26 16:33:15 +08:00
Alaister YoungandAlaister Young 87b9d0562e [FE-5111] refactor(studio): replace next/image shims with plain img (#54011)
Replaces all remaining `next/image` and `next/legacy/image` imports in
`apps/studio` with plain `<img>` elements and deletes both compat shims
and their Vite aliases (following #53906, which removed the last
`next/image` import from `packages/ui-patterns`).

**Changed:**

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

**Removed:**

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

## To test

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

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-11-26 16:23:41 +08:00
anthony lio 1a37362821 chore(billing): plan selection styling (#53841)
## Problem

- plan cards on the studio upgrade screen do not match recent plan cards
updates to the pricing page
- add-on illustrations on the pricing page sometimes show the light
image in dark mode
- spend cap bars on the pricing page flash when a user toggles the spend
cap


## Solution

- changes the upgrade screen plan cards to the pricing page design +
shows enterprise as a fourth column
- moves the lifted card style to the current plan of the organization +
gives it a neutral "current plan" badge
- moves the compare plans and pricing faq links below the plan cards +
removes the stagger animation on the cards
- changes the pricing page illustrations to pick the light or dark image
with css because the server render does not know the theme
- changes the spend cap animation to resize the bars instead of
remounting them
2026-11-24 18:04:01 +08:00
K-Dog (Kevin) 2d39665757 fix: do not display Free Micro upgrade on Platform Plan (#53920)
Streamline to use common helper function `isEligibleForFreeMicroUpgrade`
2026-11-24 16:54:56 +08:00
Danny White 1c85e3efb7 fix(studio): clarify OAuth permission labels (#53699)
## Problem

OAuth mixes abbreviated access levels with permission names whose
meaning is hard to infer.

## Solution

Use **Read and write** and **Read only** consistently, and add
keyboard-accessible definitions for Database management and Environment.
Reuse the dotted underline from Pipelines and document above-label
placement.

| Before | After |
| --- | --- |
| <img width="926" height="1936" alt="CleanShot 2026-11-20 at 12 20
42@2x"
src="https://github.com/user-attachments/assets/053b4afa-f428-4c0d-8f3b-dbc3f3dd5cf8"
/> | <img width="886" height="1902" alt="CleanShot 2026-11-20 at 12 21
20@2x"
src="https://github.com/user-attachments/assets/8277064b-1e73-43ff-b7b5-4d4af7d6c68f"
/> |
| _No tooltips, old “READ-WRITE”._ | _Tooltips for ambiguous
permissions, “READ AND WRITE” for clarity and to match setup
terminology._ |

## Review instructions

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

**What to check**

1. Open consent for a test app that requests database read/write,
environment read, and projects read access.
2. Check the small **Read and write** and **Read only** headings. Hover
or Tab to Database management and Environment. Each definition should
appear above its dotted-underlined label.
3. Optionally open an existing Pipeline and hover over an annotated
status label to check the shared underline.
2026-11-24 10:13:36 +11:00
Vaibhav 601cb1fe0f fix(studio): keep inline editor results on expand (#53790)
## TL;DR

fixes the inline sql editor dropping its results when opened in the full
sql editor

## prob/sol

expanding only passed the sql along, so the full editor opened on `Click
Run to execute your query` and the query had to be run again


ps: now they end up carrying the inline results over to the new snippet
on expand,
so they show w/o another run

| before | after |
| ------ | ----- |
| <video
src="https://github.com/user-attachments/assets/586a5aa3-3793-4e9c-ac51-a63a076e6fdd"
controls></video> | <video
src="https://github.com/user-attachments/assets/c17200df-2ea7-4da4-a39d-a33dea87561c"
controls></video> |

## ref

- closes: https://github.com/supabase/supabase/issues/53779
2026-11-23 07:20:43 -06:00
K-Dog (Kevin) 649f2b04f7 chore: More prominent Nano -> Micro upgrade badge if available (#53847)
Use a more prominent badge for the Compute Size if a Free Upgrade is
available, aligned with the Upgrade available banner (same badge with
same animation).
2026-11-23 18:59:43 +08:00
K-Dog (Kevin) 286dc37677 chore: Free Micro Upgrade banner less permanently dismissible (#53838)
We want more customers to upgrade their instances to Micro on paid
plans.

- Only dismiss for 7 days at a time per project
- Render it if available, not only when there's a performance related
reason
2026-11-23 18:09:42 +08:00
Alaister Young c3a7e1019e chore(api-types): sync types with production OpenAPI specs (#53839) 2026-11-23 17:38:29 +08:00
Joshen Lim c9a25cf11f Joshenlim/fe 5172 deprecate old table component (#53728)
## Context

More housekeeping - deprecates the old Table component in favor of the
Table component under `ui`

JFYI also realised as part of this that the following 2 routes are
unreachable from the dashboard and hence am opting to deprecate them
with a redirect
- /logs/explorer/recent
- /logs/explorer/saved

## Areas affected to check
- [ ] Integrations -> Webhooks
<img width="600" alt="image"
src="https://github.com/user-attachments/assets/58523cdb-6219-49be-9d2f-5bc26ae03d7f"
/>
- [ ] Database -> Column Privileges
<img width="600" alt="image"
src="https://github.com/user-attachments/assets/98bea654-24ac-4646-9c65-5bc4f18565e9"
/>
- [ ] Observability -> API  
<img width="600" alt="image"
src="https://github.com/user-attachments/assets/a6512c6f-bd04-4d25-8e3c-99c85883434a"
/>
- [ ] Observability -> Storage
  - Its a table under "Request caching" which I don't have data for 😅 🙏 
- [ ] Observability -> Database
<img width="600" alt="image"
src="https://github.com/user-attachments/assets/4f0ba203-64b3-41f7-971e-974e232bdedd"
/>
- [ ] Table Editor -> Project API Docs -> Column list
<img width="600" alt="image"
src="https://github.com/user-attachments/assets/6358e7a8-5770-46f9-a5a2-4851855ae97f"
/>
- [ ] Table Editor -> Project API Docs -> RPC parameters list
<img width="600" alt="image"
src="https://github.com/user-attachments/assets/5e45a1d6-cd29-451c-bf00-5d806ef37cec"
/>
2026-11-23 10:59:28 +07:00
kemal.earth 53f2bb416d feat(studio): saved views in sidebar (#53630)
## Problem

Unified Logs had saved views behind a dropdown in the toolbar. The
dropdown couldn't show more than a name per row, had no room for
grouping, and gave new projects nothing to start from — an empty list
until you built and saved a filter combination yourself.

## Solution

Moved saved views into the filter sidebar as a second level, following
the Explorer notebooks/chats pattern: a Saved views button in the
sidebar header swaps the filters out for a Views panel, with a
breadcrumb back to Logs.

Key choices:

- **`FilterSideBar` stays generic.** It takes `section`, `headerAction`
and `onReset` slots; all saved-views specifics live in `LogsViewsPanel`.
- **Presets are virtual, not seeded.** Three built-in views (Errors,
Failed requests, Database health) render from a constant with `preset:`
ids. No per-project write, so they work for read-only members and can't
be deleted into oblivion. They can be duplicated into a real saved view,
but not renamed, edited or deleted.
- **One dialog for naming.** `ViewNameDialog` backs create, rename and
duplicate.
- **Clicking a modified view opens the update prompt** instead of
re-applying it, which previously discarded unsaved filter edits with no
warning.

Also fixed two pre-existing alignment issues in the sidebar: filter
options sat 4px left of their section heading, and the User filter — a
hand-copied clone of the filter row markup — had drifted from the shared
one.

## Review instructions

1. Enable the Unified Logs feature preview and the `logsSavedViews`
flag, then open **Logs**.
2. Click the layers button in the sidebar header. The filters swap for
the Views panel, with **Preset views** above **Saved views**.
3. Click **Errors**. The filter applies and the row highlights; the
layers icon turns green.
4. Change a filter. The row reads **Modified** and the update prompt
appears. Go back to Logs and return — the prompt is still available.
5. Open the ⋮ menu on a preset: only **Duplicate** is offered. Duplicate
it and confirm it lands under Saved views with rename/delete available.
6. Click **+** in the Views header to save the current filters, then
rename and delete it.
7. Hit the reset button in the header and confirm the active view clears
along with the
   filters.
2026-11-20 15:28:59 +00:00
Danny WhiteandJoshen Lim 8fcd5e7f65 feat(studio): add Warehouse report date controls (#53494)
## Problem

The Warehouse report only shows the last hour.

## Solution

Add date selection and refresh using the shared report controls. Respect
the organisation’s log retention limits and the metrics API’s 30-day
maximum.

| After |
| --- |
| <img width="1688" height="1050" alt="CleanShot 2026-11-18 at 11 35
24@2x"
src="https://github.com/user-attachments/assets/88267bf8-1054-480b-ac26-c0c2b58386bc"
/> |
| _The new controls._ |
| <img width="2420" height="1028" alt="CleanShot 2026-11-18 at 11 47
52@2x"
src="https://github.com/user-attachments/assets/383c06a0-5470-4748-b9a6-fe80647a1399"
/> |
| _The standard retention upgrade prompt follow tapping either of these
on a Pro plan._ |

## Review instructions

1. Open the [Studio staging
preview](https://studio-staging-git-dnywh-warehouse-metrics-range-supabase.vercel.app)
and select a staging project with Warehouse access.
2. Open **Observability > Warehouse**, or
`/project/<ref>/observability/warehouse`
([example](https://studio-staging-git-dnywh-warehouse-metrics-range-supabase.vercel.app/dashboard/project/yirnfrgkxmnqgexikhfc/observability/warehouse)).
Change Last 60 minutes to Last 24 hours and check that the chart or
no-data state reflects the selected period.
3. Refresh the report. Check that the selected period stays selected.
4. On a paid staging organisation, select a period beyond its log
retention (for example, Last 14 days with 7-day retention). Check that
the retention upgrade prompt appears and the current period stays
selected.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-11-19 15:08:18 +11:00
Danny WhiteandJoshen Lim 48c90094d9 feat(studio): show Warehouse query activity in Observability (#53495)
## Problem

Warehouse query activity is not available in Observability.

## Solution

Add a Warehouse report showing query rate over the last hour, with
loading, setup, no-data and request-error states. The report uses live
project metrics and appears in navigation for projects with Warehouse
access.

| After |
| --- |
| <img width="2548" height="1416" alt="CleanShot 2026-11-17 at 16 55
33@2x"
src="https://github.com/user-attachments/assets/4d6796e0-72f1-45d5-b6b7-2cd4a3577496"
/> |
| <img width="2552" height="1390" alt="CleanShot 2026-11-17 at 16 56
18@2x"
src="https://github.com/user-attachments/assets/d96efdfd-4ca9-42fe-ac30-9cb4667c95d7"
/> |
| <img width="2544" height="1388" alt="CleanShot 2026-11-17 at 16 32
11@2x"
src="https://github.com/user-attachments/assets/bc80af8d-0468-4229-98d0-ac2681823059"
/> |
| <img width="2560" height="1344" alt="CleanShot 2026-11-17 at 16 59
53@2x"
src="https://github.com/user-attachments/assets/1ed70348-c2fc-4673-85a7-530d9734886c"
/> |


Visitor | What they see
-- | --
Signed-in customer without Warehouse access | No Warehouse entry in
Observability
Customer with Warehouse access, not configured | “Warehouse is not set
up” empty state and setup button
Customer with Warehouse disabled | “Warehouse is disabled” empty state
and setup button
Customer with active Warehouse | Query rate chart, or the relevant
loading/empty/error state



## Review instructions

1. Open the [Studio staging
preview](https://studio-staging-git-dnywh-warehouse-metrics-client-supabase.vercel.app)
with a staging project that has Warehouse access.
2. Go to **Observability > Warehouse**, or
`/project/<ref>/observability/warehouse`
([example](https://studio-staging-git-dnywh-warehouse-metrics-client-supabase.vercel.app/dashboard/project/yirnfrgkxmnqgexikhfc/observability/warehouse)).
3. Check the query-rate chart after running Warehouse queries. A project
without measurements shows an explicit last-hour empty state.
4. Open the report on a project where Warehouse is not set up and check
the setup link.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-11-19 14:57:39 +11:00
Alaister YoungandAlaister Young bbb0af65cb [FE-3106] (part 14) – refactor(studio): drop the dual-runtime shims and aliases (#53223)
Drops the remaining Next-era shims and aliases that only existed for the
dual runtime (FE-3106). Part 14 of the stack.

**Depends on:** #53222

**Changed:**
- ~45 files – import Sentry from `@sentry/react` directly instead of the
aliased `@sentry/nextjs`
- `hooks/ui/usePreventNavigationOnUnsavedChanges.ts` – is now the
TanStack `useBlocker` implementation (previously swapped in by a Vite
alias)
- `components/interfaces/App/RouteValidationWrapper.tsx` – `next/router`
→ `useNavigate` + the leaf route's `fullPath` (`/project/$ref/sql/$id`)
for the exempt-route and last-visited checks
- `hooks/misc/withAuth.tsx` – no `getLayout` forwarding
- `TemplateEditor.test.tsx` – renders inside a router for the
unsaved-changes blocker

**Removed:**
- `compat/sentry-nextjs.ts` and its Vite alias, the
`usePreventNavigationOnUnsavedChanges` alias and Next hook,
`types/next.ts` (`NextPageWithLayout`), the `@sentry/nextjs` dependency

The `compat/next/*` shims for `link`, `router`, `head`, `image`,
`navigation`, `dynamic` and `script` stay: about 300 components outside
`routes/**` still import them.

Addresses
[FE-3106](https://linear.app/supabase/issue/FE-3106/move-page-bodies-into-route-files-and-delete-pages).

## To test

- Trigger an error (e.g. a failing query) – it reaches Sentry as before
- Edit an email template or edge function and navigate away – the
unsaved-changes prompt appears
- Open an org you don't belong to – toast and redirect home; open a SQL
snippet, leave and come back – last snippet is restored

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-11-17 17:49:20 +09:00
Alaister YoungandAlaister Young cf223ae74a [FE-3106] (part 13) – chore(studio): remove next entry files and config (#53222)
Removes the Next-only entry files and config now that every page lives
in `routes/**` (FE-3106). `routes/__root.tsx` already mirrors
`pages/_app.tsx` (dayjs plugins, providers, telemetry, error boundary,
favicons). Part 13 of the stack.

**Depends on:** #53221

**Changed:**
- `components/interfaces/App/{NotFoundPage,ServerErrorPage}.tsx` – the
404/500 pages, rendered by `__root.tsx`, now with native
`Link`/`useNavigate` and `<img>`
- `routes/api/{status-page,scoped-access-token-permissions}.ts` – App
Router handlers from `app/api/**` moved in (`NextResponse.json` →
`Response.json`); `buildAPIPermissionScopeMap` moves to `lib/api/`
- `package.json`, `tsconfig.json` – no `next typegen` step or
`.next/types` include
- `packages/ui-patterns/.../InstructionBlocks.tsx` – asset map typed
`StaticImageData | string`: under Vite a png import is a URL string,
which Next's global image types used to hide
- `vite.config.ts`, `knip.jsonc`, `turbo.jsonc` and comments across
studio – Next build references removed

**Removed:**
- `pages/{_app,_document,404,500}.tsx`, `pages/_error.jsx`,
`pages/README.md`, `app/**`, `next.config.ts`, `proxy.ts`,
`instrumentation{,-client}.ts`, `sentry.{server,edge}.config.ts`,
`fonts/index.ts` (next/font), `BootTimeoutFallback`,
`postcss.config.cjs`, the `next/server` shim
- `@next/bundle-analyzer`, `raw-loader`, `postcss`,
`@tailwindcss/postcss` dev dependencies

Addresses
[FE-3106](https://linear.app/supabase/issue/FE-3106/move-page-bodies-into-route-files-and-delete-pages).

## To test

- Open an unknown URL – the 404 page renders with working "Head back"
- `/api/status-page` and `/api/scoped-access-token-permissions` on
platform – same JSON and `Cache-Control`
- Fonts (Inter, Manrope, Source Code Pro) still load

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-11-17 17:33:02 +09:00
Alaister YoungandAlaister Young 96e4543ea9 [FE-3106] (part 9) – refactor(studio): move logs and observability page bodies (#53218)
Moves the `/logs/*` and `/observability/*` page bodies into their route
files and deletes the pages (FE-3106). Part 9 of the stack.

**Depends on:** #53217

**Changed:**
- `routes/project/$ref/logs/**` – 20 page bodies inlined. `logs/index`
keeps its `withAuth` wrapper; `replication-logs` redirects with
`<Navigate search hash>`; the Logs Explorer save navigates with `search:
{ queryId }` (never a query inside `to`)
- `routes/project/$ref/observability/**` – 12 page bodies inlined; chart
highlight actions navigate with `search` params
- `components/interfaces/Observability/DatabaseReport.hooks.ts` – the
database report's URL hooks move out of the page (with their test)
- `components/ui/Charts/ComposedChartHandler.tsx` – imports
`UpdateDateRange` from `ChartHighlightActions` instead of a page

**Removed:**
- 32 page files

Addresses
[FE-3106](https://linear.app/supabase/issue/FE-3106/move-page-bodies-into-route-files-and-delete-pages).

## To test

- Logs Explorer: run a multi-line query, save it – the URL keeps
newlines and the saved query reopens
- Each log source (Postgres, Auth, Edge, Storage, Realtime, …) – same
layout and title
- Observability reports – charts render; highlighting a range links to
the right logs page

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-11-17 16:24:24 +09:00
K-Dog (Kevin) 412df7746e feat: revamped free plan limit modals / downgrade improvements (#53257)
Whenever customers run into their 2 Free Plan project limit, we were
previously just listed the affected members:

<img width="1044" height="566" alt="image"
src="https://github.com/user-attachments/assets/d1c1327d-2532-4d8e-8af2-425da9ce1ee5"
/>

While this lists the affected members, it is pretty unclear which
organizations are affected or which projects contribute to this and what
the best course of action is.

This PR revamps all components that are displayed in this situation (new
project launch, downgrade to Free, project unpause) to show the affected
organizations + projects primarily and give more actionable tips:

<img width="1014" height="638" alt="Screenshot 2026-11-11 at 3 57 45 PM
(1)"
src="https://github.com/user-attachments/assets/ae38f71d-bbde-4181-a623-24bef778afee"
/>

<img width="768" height="152" alt="image"
src="https://github.com/user-attachments/assets/b3b0efd7-678b-4ac0-9602-4cc5d735a9aa"
/>


---

Additionally, this contains small improvements to the downgrade flow:
- Rename button to "Downgrade Now" as opposed to "Confirm" to make it
more clear that this is immediate
- Explicitly mention downgrades are immediate and there is still another
invoice for unbilled usage
- Larger modal width for improved readability
2026-11-17 12:25:05 +08:00
Saxon FletcherandClaude Opus 5.5 07574deea7 chore(studio): refine log detail panel (#52750)
<img width="823" height="614" alt="image"
src="https://github.com/user-attachments/assets/1c1ac47f-07e2-4bbe-a91e-5690e849e519"
/>

## Problem

The log detail panel felt cramped. The header split across two lines,
contrast between the header, tabs and properties was weak, and long
values overflowed their column. Edge function logs also had no path in
the unified logs query, so their title fell back to the raw event
message, which repeated the status and cut off the function name.

The panel also moved under the user. Clicking a Timeline step jumped to
Overview, so stepping through a request meant switching back each time,
and an "Enriching log..." row pushed the details down while they loaded.

## Solution

- **Header:** one line with the type icon, status badge, method and
path. The log type name moves to the icon's tooltip. Long paths clip
from the start so the most specific segment stays visible.
- **Type and spacing:** 15px title, 12px property labels and values,
40px section and "Logged" rows, and more room around the tabs. The panel
uses the card background.
- **Long values:** wrap inside their column instead of overlapping the
label.
- **Edge function paths:** the ClickHouse query now reads
`request.pathname` for `function_edge_logs`, matching the BigQuery
query.
- **Timeline:** clicking a step keeps the Timeline tab open, while the
header, actions and other tabs follow the clicked log. A single hidden
step is shown instead of "+1 more", and the first step shows its
absolute time in place of the "Request started" row.
- **Loading:** the header's type icon becomes a spinner of the same size
while the log's details load, replacing the "Enriching log..." row.
- **User tab:** the "No signed-in user" state uses the same centered
empty state as the Timeline tab.

Side effects to check:

- Edge function rows now fill the Path column, so function-scoped tables
can show that column. Path filters and facets include these rows, and
Timeline steps show method and path.
- Audit Logs and the Auth Users panel share these components. Audit Logs
picks up the taller section rows, and Auth Users fields drop to 12px.

## How to test

On `/project/<ref>/logs`:

1. Select an API Gateway log. The header is one line: icon, status
badge, `METHOD /path`. The icon spins while details load, and nothing
below it shifts when it stops.
2. Open **Timeline** and click a few steps. The tab stays on Timeline
while the header and highlight follow each click, and Overview then
shows the clicked log. The first step shows a time instead of `+0 ms`.
3. Select an edge function log. The title shows `METHOD
/functions/v1/<name>` and the Path column is filled. Filtering by part
of that path matches these rows.
4. Select a Postgres log. The title shows the message, and its **User**
tab shows a centered empty state like Timeline's "No related logs".
5. Select a log with a long URL in a narrow panel. Values wrap inside
their column and the title clips from the start. This has only been
checked in Chromium.
6. Open an entry in Audit Logs and a user in Auth > Users, and check the
spacing and type.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 07:14:44 +10:00
kemal.earth d17e66f202 fix(studio): unified logs sidebar styling (#53470)
## Problem

Unified Logs sidebar title and a few other bits fell out of sync after a
recent change.

## Solution

The Unified Logs filter sidebar hand-rolled its own header instead of
using the shared `ProductMenuBar` header, so it drifted from every other
section. This brings it back in line.

- **Title**: `<p className="text-lg">` → `<h4 className="text-sm">`,
matching `ProductMenuBar`.
- **Header**: `px-4` → `px-6`, `gap-3` → `gap-2`, and `h-[48px]` →
`min-h-(--header-height)`.
- **Filter area**: `p-2` → `px-4 py-1.5`, so filter labels share the
same left edge as the title.
- **"Capture your logs" card**: dropped `mx-2` so it spans the container
gutter.
- **Reset button**: `variant="text"`, tooltip moved to `side="bottom"`.
- **Card surfaces**: removed the ad-hoc `bg-muted/10 border-border/50`
override so cards use the default border and inherit the sidebar
surface.

Note: `FeaturePreviewSidebarPanel` is shared, so the Advisors sidebar
card loses the same tint — intentional, it brings all usages in line.

| Before | After |
|--------|--------|
| <img width="293" height="745" alt="Screenshot 2026-11-16 at 19 11 05"
src="https://github.com/user-attachments/assets/dc1ec664-382a-4e3b-a85b-40d37a8b479f"
/> | <img width="265" height="739" alt="Screenshot 2026-11-16 at 19 10
43"
src="https://github.com/user-attachments/assets/315fece5-3b45-4826-8e5c-5f6f9a1c258b"
/> |

## Review instructions

1. Open Unified Logs (`/project/_/logs`) with the unified logs preview
enabled.
2. Compare the sidebar header ("Logs" + Beta badge) against another
section's sidebar header, e.g. Observability
(`/project/_/advisors/rules` → Observability menu). The title size,
weight and left padding should now match.
3. Confirm the filter labels ("Time Range", etc.) line up with the
"Logs" title on the same left edge, and that the "Capture your logs"
card spans the same width as the filter rows above it.
4. Apply a filter so the Reset button appears. It should render as a
text button (no raised/filled background) and its tooltip should open
below it.
5. Check the "Capture your logs" and "Go back to old logs" cards have no
tinted background — just a border against the sidebar surface.
6. Check the Advisors sidebar (`/project/_/advisors`) card picks up the
same treatment.
2026-11-16 19:33:41 +00:00
Joshen Lim 4ed3627d72 Joshenlim/fe 3891 improve handling of partition tables in (#53268)
## Context

The Table Editor doesn't really handle partitioned tables well given the
following issues:
- Partitioned tables are rendered as a flat list in the Table Editor
side menu, so the menu could get very long and noisy - this was the
primary motivation for this PR
- Child partitioned tables are not indicated with a proper icon, they're
treated as regular tables in the Table Editor which is incorrect

## Changes involved
- Table Editor side menu now only lists parent partitioned tables, omits
all child partitioned tables
- Child partitioned tables can be viewed by clicking on the button
tooltip here or drilling down via "View partitions"
<img width="300" alt="image"
src="https://github.com/user-attachments/assets/e3cfbe4b-21ff-47df-8fcd-81d0c9f68d94"
/><br />
<img width="400" alt="image"
src="https://github.com/user-attachments/assets/5d0747cb-fb52-4301-ad9e-c7be504f43c9"
/>

  - Selecting that will then render a nested nav as such
<img width="291" height="323" alt="image"
src="https://github.com/user-attachments/assets/bff0a42b-4265-4317-8299-537d82544388"
/>

- Sub partitioned tables can be drilled into the same way, and the back
CTA steps up one level
<img width="485" height="306" alt="image"
src="https://github.com/user-attachments/assets/66f6f6cb-8b7d-46c5-8ea3-4ee4fd57aa84"
/>

- Parent partition tables have the following actions (Previously was
only copy name and schema)
<img width="465" height="257" alt="image"
src="https://github.com/user-attachments/assets/2aa90995-7c30-4bcf-a446-d01ab52c1ede"
/>

- Deleting a parent partition table will also delete the child partition
table, and that's highlighted in the confirmation modal
<img width="418" height="316" alt="image"
src="https://github.com/user-attachments/assets/0d61984b-f85e-4c93-84d0-549d300838c9"
/>

- Child partition tables have the following actions (Edit + duplicate
removed since they aren't supported via the UI)
<img width="482" height="229" alt="image"
src="https://github.com/user-attachments/assets/e028b13d-2e92-4491-b05c-7a6cb0a129d6"
/>


## To test
In general, just verify the viewing UX of partitioned tables to see if
it all feels alright, can use the following SQL to quickly set up
partitioned tables
```sql
   create schema if not exists tint;
   create table public.nest_demo (id int, hue int not null, primary key (id, hue))
     partition by range (hue);
   create table public.nest_demo_blue partition of public.nest_demo
     for values from (200) to (300) partition by range (hue);
   create table public.nest_demo_blue_light partition of public.nest_demo_blue
     for values from (200) to (250);
   create table tint.nest_demo_blue_deep partition of public.nest_demo_blue
     for values from (250) to (300);
   create table public.nest_demo_other partition of public.nest_demo
     for values from (0) to (200);
   ```
2026-11-16 17:23:59 +07:00
Saxon FletcherandClaude Opus 5.5 7ee828f3f6 chore(studio): center Explorer query result states (#53437)
## What

The Explorer results area showed its idle and no-rows states as a small
line in the top-left corner, which was easy to miss, and showed nothing
while a query ran. These states now sit in the center of the results
area, with an icon above the label:

- **Before a run:** "Run the query to see results"
- **While running:** "Running query…" (new). When a re-run has previous
rows, they stay on screen, dimmed, under the running state, so notebook
cells don't collapse and grow back.
- **No rows:** "Success. No rows returned"

Assistant query cells also show the running state after you approve a
query, since that run happens outside the editor.

## Testing

Enable the `explorer` flag and open Explorer.

1. Open a new query tab and check that "Run the query to see results" is
centered.
2. Run `select pg_sleep(2)`. "Running query…" shows while it runs, then
the result appears.
3. Run `select 1 where false` and check that "Success. No rows returned"
is centered.
4. Run `select * from pg_tables`, then re-run it. The rows stay visible,
dimmed, under the running state.
5. In a notebook with several cells, click **Run notebook**. Cells keep
their height while they run.
6. Ask the Assistant to run a query and approve it. The cell shows
"Running query…" until the result arrives.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 17:54:25 +10:00
Danny White 000320e914 fix(studio): keep form text consistent across breakpoints (#53429)
## Problem

Small and medium form controls and related text grow from 14px to 16px
below a viewport breakpoint, making them larger than surrounding
dashboard text.

## Solution

Keep these sizes at 14px across breakpoints in shared controls and form
layouts, plus Studio search fields and assistant textareas. Explicit
large and extra-large variants keep their existing sizes. The shared
sizing change also applies to buttons.

```diff
- text-base md:text-sm
+ text-sm
```

This accepts iOS Safari’s automatic zoom when focusing smaller editable
fields. User zoom remains available.

Validation: Prettier, scoped Studio ESLint, and whitespace checks pass.
Browser checks and a full build have not been run.

## Review instructions

1. Open a project’s **Settings > General**. Resize across 768px and
check that field text, labels, helper text, and buttons keep the same
font size.
2. Open the organisation/project selector and resize across 640px. Its
search text should stay at 14px.
3. Open the assistant and check that its textarea text stays the same
size across 768px.
4. On an iPhone, focus an editable field and check that the accepted
focus zoom behaviour remains usable.

## Checklist

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
2026-11-16 09:56:27 +11:00
Charis ed6d1b4c63 feat(studio): show error details in AlertError and attribute user faults in SQL errors (#53242)
## Problem

`AlertError` gives users and support no way to correlate a failure with
Sentry or platform logs. It also treats every failure the same: a bad
table editor filter or an offline browser gets "try refreshing, contact
support".

On the reporting side, SQL errors were attributed by who wrote the whole
statement. That made errors in the user's part of mixed SQL Studio's
fault: policy expressions, function bodies, cron schedules, table editor
filters and row edits. Marking them as user SQL instead would drop them
from Sentry entirely.

Part of FE-4772.

## Solution

**`AlertError`**
- Platform and Studio faults show the request ID, the Sentry event ID
(labeled "before sampling", since the event may be sampled out) and a
"Copy details" button.
- The copied text never includes `formattedError`, metadata, the cause
or SQL.
- SQL errors copy the SQLSTATE, position and query name instead of the
message.
- User faults (`isUserError`) show their message with "Please try again.
If the issue persists, try refreshing your browser." There is no support
link, no IDs and no copy button.
- Offline shows only "You may be temporarily offline. Check your
internet connection and try again."
- Defaults come from `getErrorPresentation`, and props the caller passes
still win. The table editor passes a filter-specific description when
filters are set.

**SQL error classification**
- `executeSql` takes an optional `isUserFaultSqlState` predicate for
Studio SQL. When it matches, the error is a `StudioSqlError` with reason
`user_input` and fault `user`, and is still redacted to SQLSTATE plus
query name.
- `isUserFaultForValues` (classes 22, 23 and P0, plus 42501 and 57014)
is for typed values: table editor filters and row edits, cron name and
schedule.
- `isUserFaultForSql` (any SQLSTATE except server classes 08, 53, 57
other than 57014, 58 and XX) is for embedded user SQL: policies,
functions, the custom access token hook.
- `isUserFaultForStatsStatement` is for `pg_stat_statements` text (Query
Insights `EXPLAIN`, index advisor). It treats 42P02 (`$1` placeholders)
as Studio's fault.
- `UserSqlError` is now only SQL the user wrote in full, and it is still
never sent.
- The policy, function and cron mutation hooks no longer take
`sqlOrigin`.

**Routing and types**
- `ERROR_ROUTING` is one table keyed by tag, then by fault. Its type
requires exactly the faults each class can produce.
- User faults get `SAMPLE_USER_FAULT` (default 0.01, set with
`NEXT_PUBLIC_SENTRY_SAMPLE_RATE_USER_FAULT`) to catch misclassification.
- The error class decides privacy (`isNeverReportedError`), separately
from the rate.
- Sentry events get a `reason` tag.
- Each class declares its `reasons`, so a mistyped reason fails
typecheck.

## Review instructions

1. Open the table editor, add a filter with a wrong-typed value (text on
an integer column). The alert shows the Postgres error, the filter hint,
and no support link, IDs or copy button.
2. Make a query fail with a platform error (e.g. block a `/platform/`
request in DevTools). The alert shows the request ID, the event ID and
"Copy details". Paste the copied text and check it has no SQL or
`formattedError`.
3. Go offline in DevTools and trigger a query. Only the offline message
shows.
4. Create a policy with an invalid `USING` expression. The toast shows
the Postgres error. In Sentry it is a `StudioSqlError` with reason
`user_input`, sampled at the user-fault rate.
5. Review `lib/errors/error-routing.ts` and
`data/error-classification.ts` for the routing table and the SQLSTATE
predicates.
2026-11-12 15:19:25 -05:00
Charis 115a2ffeef feat(studio): gate database functions, triggers, and webhooks on sql grants (#53269)
Resolves FE-4744. Part of the grants rollout; builds on the read/write
SQL variants from #53185.

## What

- **Data layer:** the database functions, triggers, database webhooks,
and event triggers queries now take a `read` grant (exposed as
`queryOptions` factories). All 8 create/update/delete mutations take a
`write` grant and mark their SQL with `asWriteSql`.
- **Guards:** the hand-written FGA checks in the functions, triggers,
event triggers, and database webhooks lists, the functions page, the
triggers layout/route, and the webhooks integration tab now derive from
grants, with denied and error states.
- **Other consumers** updated to pass grants: `CreateFunction`,
`TriggerSheet`, `EditHookPanel`, `DeleteHookModal`,
`ChooseFunctionForm`, `FunctionSelector`, `AutoEnableRLSNotice`, and SQL
editor definition/autocomplete hooks.

## Behavior changes

- **Webhooks integration tab:** was gated on
`database_webhooks_config_read`; now gated on `database_read`, which is
what the backend checks for the pg-meta query it uses. Both permissions
are granted to the same built-in roles, so there is no change for
built-in roles. A permissions-load failure now shows an error alert
instead of the content.
- **`AutoEnableRLSNotice`:** hidden unless the user has read access,
since it can't tell whether the trigger already exists without it.

## Out of scope

- User-authored SQL execution in `QueryEditor` / `useSqlEditorExecution`
stays `unguarded.migrating` (FE-4750).

## Testing

- New tests: query factories and write mutations
(`data/database-sql-grants.test.ts`), webhooks tab granted/denied/error,
functions list read/write granted/denied/error.
- Typecheck, Prettier, lint ratchet, and Studio vitest suites for
affected areas pass.
2026-11-12 14:58:01 -05:00
Pamela Chia f2af7ea280 chore(studio): remove the terms of service update notice (#53323)
I removed the "We've updated our Terms of Service" notice from the
dashboard. It was added in #51302 and has been up since early October,
and it had no expiry of its own. I also removed its landing-path helper,
its tests and its dismissal key.

## To test
Tested on the PR preview, in a browser profile that never dismissed the
notice:
- [x] Open an organization's landing page (`/org/<slug>`): expect no
"We've updated our Terms of Service" card in the bottom right. Observed:
no card on the organizations list or on an org's landing page, with the
dismissal key unset on both.

## Linear
- fixes GROWTH-1494
2026-11-12 22:41:33 +09:00
Anthony Lio 0ed90ae460 fix(ui): split button divider (#53258)
## Problem

- in dark mode split button shows a middle divider that is lighter and
heavier than the outer edge, and the design system
`button-split-dropdown` example has the same bug
- button edge is a translucent inset shadow over a translucent fill, so
the `-ml-px` overlap stacks two edges and two fills in one column
- light mode has the same defect on hover and with the menu open,
because the hover fill is translucent too

## Solution

- adds a `SplitButtonGroup` component to `ui`, so a split button has a
`role="group"` wrapper and one shared divider
- fixes the divider color in both themes, because only one button paints
the shared border column
- changes the shared column to follow the hovered button, so the divider
takes its edge color in a fixed place
- removes the press scale from buttons in the group, so no gap opens
between the two buttons
- changes the design system split button docs to `SplitButtonGroup`

| before | after |
| -------|------|
| <img width="428" height="219" alt="image"
src="https://github.com/user-attachments/assets/4cbc5dc9-3575-4eef-83b9-a6141796ccc8"
/> | <img width="428" height="219" alt="image"
src="https://github.com/user-attachments/assets/9c5b283d-e6bd-428a-bee1-7f59249aeb83"
/> |
| <img width="428" height="219" alt="image"
src="https://github.com/user-attachments/assets/046338f9-6dfd-4c32-8e33-30c1b0f84715"
/> | <img width="428" height="219" alt="image"
src="https://github.com/user-attachments/assets/c79e1c7a-e1ac-4682-a898-1a36c6b028fc"
/> |

<!--
## 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
[/design-system/docs/components/button](https://design-system-git-antlio-fix-split-button-divider-supabase.vercel.app/design-system/docs/components/button#split-with-dropdown)
preview in dark mode, and zoom in on the split example
2. make sure that the divider has the same color and weight as the outer
edge
3. hover the primary action, and make sure that the divider takes its
edge color and stays in the same place
4. hover the chevron and open the menu, and make sure that the divider
takes the chevron edge color
5. switch to light mode, and repeat steps 2 to 4
6. press and hold the primary action, and make sure that it does not
shrink
7. tab to the chevron, and make sure that the focus ring shows on all
four sides and that Enter opens the menu
8. open the
[/design-system/docs/fragments/admonition](https://design-system-git-antlio-fix-split-button-divider-supabase.vercel.app/design-system/docs/fragments/admonition#split-button-with-dropdown)
preview at a narrow width, and make sure that the split fills the row
with one divider
9. open the
[/dashboard/project/\_/settings/log-drains](https://studio-git-antlio-fix-split-button-divider-supabase.vercel.app/dashboard/project/_/settings/log-drains)
preview, and make sure that the `primary` split looks 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-12 09:17:27 +02:00
Joshen Lim 53ffdf75c9 Joshenlim/fe 4945 cmd k support searching for all table (#53262)
## Context

Probably the final piece for this series of changes towards resource
aware Cmd K. We currently only present results for tables when searching
in Cmd K, this PR adds in other entity types like views, materialized
views, foreign tables, and partitioned tables (only the parent)

Note that the results excludes entities created from database extensions
to reduce the chance of noise

<img width="500" alt="image"
src="https://github.com/user-attachments/assets/27bf5026-937a-4883-b365-75694d551a39"
/>

## Related changes
- Tweaked the entity icon for partitioned tables a little to be blue
(previously gray) and
- Added an entity icon for child partition tables in the table editor
that's slightly lighter than the partition table icon, currently child
partition tables just render with the same icon as tables which can be
confusing
<img width="286" height="128" alt="image"
src="https://github.com/user-attachments/assets/638af7c3-512d-4264-bfae-0a8827b3ef94"
/>
- Note that i'm planning to look into this separately RE how to better
render child partition tables so this might go away subsequently

## Performance

As always, ran a claude benchmarking session - this runs on debounced
keystrokes against a live catalog, so it's benchmarked at scale:
**45,653 `pg_class` rows**
- 12k tables
- 3,143 views
- 3,002 matviews
- 3,001 foreign tables)
Taking a median of 15 runs, all variants measured against the same
catalog in one process.

| scenario | query | master | this PR | worst |
|---|---|---|---|---|
| exact table name | `t_500` | 19.5ms | 24.3ms | 29.1ms |
| view name | `v_10` | 19.3ms | 23.7ms | 25.8ms |
| foreign table name | `ft_10` | 18.9ms | 24.1ms | 26.9ms |
| no match | `zzz_nothing` | 19.4ms | 24.0ms | 27.5ms |
| broad prefix (~3k matches) | `t_1` | 30.8ms | 38.7ms | 45.1ms |
| broad matview prefix | `mv_1` | 26.6ms | 37.5ms | 41.7ms |
2026-11-12 11:37:45 +08:00
Lukas BernertandClaude Fable 5 f38928ad90 fix(studio): resolve disk limits from the project's instance configuration (#52367)
## Problem

Studio validates disk IOPS/throughput against one minimum value per
compute size. Projects whose hardware supports more get blocked below
their actual limits, charts and banners can show the wrong baseline, and
burst charts are gated by a hardcoded size list that is wrong for some
configs.

Fixes PROD-674

## What changed

- New per-configuration limits table:
`packages/shared-data/instance-disk-limits.ts` (values from the AWS
EBS-optimized tables).
- The size-wide floors in `compute-disk-limits.ts` are now derived from
that table as per-size minimums. Published values are unchanged and
pinned in tests.
- New `useProjectDiskLimits()` resolves a project's limits from its
primary database, falling back to the floors.
- Disk form validates against the project's actual limits (floors when a
different compute size is selected). New inline hint when provisioning
between baseline and max.
- Burst charts/tiles/metrics show only if baseline is below max.
- Chart reference lines and the disk IO banner use the resolved values.

## How to test

1. Settings → Database → Disk on a Large+ project: IOPS/throughput
accept values up to the project's actual limits, error above them, and
show the burst hint between baseline and max.
2. Reports: burst metrics are offered only for projects whose disk IO
bursts; a saved burst chart on a non-bursting project renders an
"unavailable" placeholder instead.
3. `pnpm --filter studio vitest run
components/interfaces/DiskManagement/DiskManagement.test.ts
data/reports/database-charts.test.ts`

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-11-11 17:58:26 +01:00
Victor FarazdagiandJoshen Lim 00adb5a81b chore(studio): remove the Iceberg pipeline destination (#52229)
## Problem

Retire the deprecated Iceberg (Analytics Bucket) destination from
Pipelines.

## Solution

- Remove the destination UI, configuration mappings, feature-flag usage,
and generated API variants.
- Remove the legacy Pipelines integration from Storage while preserving
standalone Analytics Buckets.
- Remove unused components and sheet-layout support, and add regression
coverage for retained Storage operations.
- Remove the stale Pipelines claim from the Storage docs overview.

## Validation

- Pipelines, Storage, and replication data tests
- After the final cleanup: Studio typecheck and all 3 Analytics Bucket
regression tests passed.
- Formatting, scoped ESLint, Knip, and whitespace checks passed; lint
warnings are pre-existing.
- Storage overview: Prettier, ESLint with zero warnings, content-listing
schema validation, and Markdown rendering passed.

Production API-type verification remains pending the coordinated API
deployment. Legacy Iceberg pipelines, destinations, and slots must be
cleaned up before rollout.

## Review instructions

1. Verify that Pipelines offers BigQuery, DuckLake, Snowflake, and
ClickHouse, with no Analytics Bucket option.
2. Verify that Storage Analytics Bucket creation, namespace/table
operations, and wrapper/key cleanup remain available without Pipelines
controls.

## Checklist

- [x] Read CONTRIBUTING.md.
- [x] Updated the Storage overview copy and checked the docs authoring
guidance.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-11-11 12:18:04 +03:00
Charis 395a54f2b7 feat(studio): gate jwt signing keys, legacy api keys, and third-party auth on grants (#53241)
Resolves
[FE-4732](https://linear.app/supabase/issue/FE-4732/grants-rollout-jwt-signing-keys-legacy-api-keys-and-third-party-auth).

## Changes
Gates the JWT signing keys, legacy API keys, and third-party auth
endpoints on grants instead of `unguarded.migrating`, and replaces their
V2 permission guards with `useGrant`:
- **Data layer (11 sites):** `data/jwt-signing-keys/*`,
`data/api-keys/legacy-api-keys-status-query`,
`data/api-keys/legacy-api-key-toggle-mutation`, and
`data/third-party-auth/*`. Queries become grant-gated query option
factories; mutations take the grant in their variables.
- **Consumers:** the JWT settings page, the JWT signing keys table and
its dialogs, `jwt-settings`, `ToggleLegacyApiKeys`, `Project/APIKeys`,
and the third-party auth page, form, and create dialogs. Each consumer
renders denied and error states.
- **JWT signing keys table:**
- It's gated only on the signing keys reads (`GET signing-keys` and `GET
signing-keys/legacy`, both `auth_signing_keys_read`).
- The legacy API keys status is only used by the revoke dialogs. If it
can't be read, revoking the legacy JWT secret fails closed: the user
sees the "disable legacy API keys first" warning, with copy explaining
why, instead of the confirm modal.
- **Legacy JWT secret query:** a 404 (secret not imported as a signing
key yet) resolves to `null` and shows the "Migrate JWT secret" panel.
Other errors now render an error instead of being treated as "not
migrated".
- **Write actions:**
- `getWriteGrantTooltip` moves from `APIKeys.utils` to `lib/grants` and
takes a resource noun. Disabled write actions use it to explain why
they're disabled.
- New `getWriteGrantToastMessage`: handlers that run without a grant now
show a toast instead of silently doing nothing. This includes the API
keys handlers from #52966.

## Permission changes
- **Legacy API keys toggle and status** (`GET`/`PUT
/v1/projects/{ref}/api-keys/legacy`): the guard moves from
`auth_signing_keys_read`/`_write` to the endpoint annotation,
`api_gateway_keys_read`/`_write`. The annotation was confirmed against
the backend controller (FE-4728). As a result, the JWT signing keys
table's legacy revoke check now depends on `api_gateway_keys_read`.
- **API keys last-used analytics**
(`/platform/projects/{ref}/analytics/endpoints/api_keys.last_used.otel`):
this endpoint uses legacy permissions (`analytics:Read` on `logflare`),
not FGA. Its check moves from the V2 `auth_signing_keys_read` check to
`useAsyncCheckPermissions(PermissionAction.ANALYTICS_READ, 'logflare')`.
- Every other guard already matched its annotation:
  - `auth_signing_keys_read`/`_write` for signing keys
  - `auth_config_read`/`_write` for third-party auth

## Testing
- Data layer: `jwt-signing-keys.test.ts`, `legacy-api-keys.test.ts`, and
`third-party-auth.test.ts` cover every migrated fetcher, check that
factories stay disabled without a grant, and cover legacy-key 404 vs.
500.
- `jwt-secret-keys-table/index.platform.test.tsx`:
- Legacy status denied: the table still renders, and revoking the legacy
key shows only the warning.
  - Legacy status known enabled or disabled.
  - Signing keys read denied.
  - Legacy key 404 vs. 500.
- `create-key-dialog.platform.test.tsx`: triggering create without a
grant shows the toast and sends no request.
- `ToggleLegacyApiKeys.platform.test.tsx`,
`ThirdPartyAuthForm.platform.test.tsx`, and
`settings/jwt/index.platform.test.tsx`: granted, denied, error, and
partial-permission cases.
- `lib/grants.test.ts`: the tooltip and toast helpers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-11-10 15:30:58 -05:00
44573b7a5c feat(studio): rename Advisors to Issues in navigation (#52993)
Part 5 of 6: #52989 → #52990 → #52991 → #52992 → #52993 → #53138

Switches Studio navigation between Advisors and Issues with
`issuesInbox`. With the flag off, the existing Advisors sidebar, pages,
command menu entries, shortcuts, header panel, and contextual finding
links remain available. With it on, these entry points show Issues and
legacy Advisor URLs forward to the matching Issues category while
preserving finding context. Direct Issues routes remain accessible in
either state. The homepage section remains hidden when the flag is off.

Telemetry event names are unchanged.

## How to test

1. Turn `issuesInbox` off: desktop and mobile navigation show Advisors,
the header opens Advisor Center, and Security, Performance, and enabled
Health Advisor pages remain usable.
2. Turn it on: navigation and the header show Issues. Legacy Advisor
category URLs forward to matching Issues lists.
3. `G` then `V` opens the active variant. `V` then `S`, `P`, or `H`
follows the active category links; shortcut reference labels match.
4. Table Editor finding links open the legacy finding when off and its
issue when on.
5. Direct Issues routes remain usable with the flag off; the homepage
section stays hidden.

## Validation

- Broad navigation/layout/redirect/shortcut regression suite: 456 tests
passed, retries disabled.
- Focused suite: 181 tests passed with shuffle seed 52993, retries
disabled.
- Full Studio TypeScript, scoped ESLint, and changed-file Prettier pass.
- Behavioral mutation probes detect broken flag guards, finding links,
and redirect destinations; source restored afterward.


[DEBUG-255](https://linear.app/supabase/issue/DEBUG-255/replace-advisor-terminology-with-issues-throughout-studio)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Jordi Enric <jordi.err@gmail.com>
2026-11-10 14:47:16 +01:00
Drew McLellan 3aa85cc774 feat(studio): show warning and error counts on the edge function status codes chart (#53171)
## Problem

On the edge functions report, the Edge Function Status Codes chart shows
a single combined count in its header, which is hard to read when
responses include errors. The count would be more intuitive if it were
broken down by status code.

Resolves FE-4025.

## Solution

Add **Warnings** (4xx) and **Errors** (5xx) counts to the right of the
total in the chart header. This matches the request cards on the project
home page, and uses the same warning and error definitions as the Logs
Explorer filters. Per-code detail stays in the legend and tooltip.

- The counts show the period totals by default and follow the hovered
point, like the total does.
- Charts opt in through a new optional `getHeaderStats` on
`ReportConfig`, passed through `ReportChartV2` and `ComposedChart` to
`ChartHeader`. Only the status codes report sets it, so other reports
are unchanged.
- The counts are summed from the existing pivoted status code series
(`getStatusClassCounts`), so the log queries are untouched and both the
BigQuery and otel paths work.
- The chart's info tooltip now explains what warnings and errors mean.

<img width="756" height="305" alt="Image"
src="https://github.com/user-attachments/assets/808085f5-abd9-43ec-903b-dfa0d5e4f598"
/>

## Review instructions

1. Run Studio and open **Observability → Edge Functions** for a project
that has edge function traffic.
2. On the **Edge Function Status Codes** chart, check that **Warnings**
and **Errors** appear next to the total, and that they match the 4xx and
5xx rows in the legend.
3. Hover the chart. The total, Warnings and Errors should all follow the
hovered point, then return to the period totals when you move away.
4. Check that **Total Edge Function Invocations**, **Execution Time**
and **Invocations by Region** show no Warnings or Errors.
5. Try a narrow viewport to check the header doesn't crowd the buttons.

Unit tests cover the counting and the header (period totals, hover, and
charts without stats): `pnpm exec vitest run
components/interfaces/Reports components/ui/Charts`.

## Checklist

Check all before review:

- [ ] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-11-10 13:39:13 +00:00
Saxon Fletcher 8872322a86 feat(studio): show issues on the project homepage (#52992)
Show ordered issue cards and open counts on the project homepage behind the issuesInbox flag.
2026-11-10 11:01:15 +01:00