Commit Graph
758 Commits
Author SHA1 Message Date
Danny White 9052601faf fix(studio): validate direct database access permissions (#54506)
## Problem

Direct database access requires Database management read access, but
OAuth app settings currently allow saving an invalid combination. The
consent screen’s readiness checks then fail.

## Solution

Show an inline error when direct database access lacks Database
management read access, and prevent saving through the button, keyboard
shortcut, or form submission. Both controls stay editable, and neither
changes the other automatically.

| After |
| --- |
| <img width="1280" height="1103" alt="OAuth Apps Organization Settings
Office Supabase (1)"
src="https://github.com/user-attachments/assets/6cfd203b-d320-46da-b7b5-9ede2e9d814c"
/> |
| _Immediate inline error, cleared as soon as it’s corrected._ |
| <img width="1280" height="1103" alt="OAuth Apps Organization Settings
Office Supabase"
src="https://github.com/user-attachments/assets/f2637d92-c149-4d1a-9d83-130e0f54ce66"
/> |
| _Follow-up footer pattern if that error (or any inline error) is
ignored._ |

## Review instructions

1. Open the [staging
preview](https://studio-staging-git-dnywh-trusted-partner-permis-56807c-supabase.vercel.app/dashboard)
→ Organization → OAuth Apps. Edit an organisation-bound app, or select
**Publish OAuth app**. If your organisation is not a Trusted Partner,
use the DevTools steps below first.
2. Select Direct database access, then set Database management to No
access or Write. Check that the inline error explains that “Database
management” requires at least read access and Confirm stays enabled.
Click Confirm: saving should be blocked and “Fix the errors above to
continue.” should appear in red above the footer actions.
3. Select Database management Read only or Read and write. Check that
the inline and footer errors clear. Confirm should remain enabled.
4. Repeat in the opposite order, or remove Direct database access.
Neither control should change automatically.


<details>
<summary>Review without a Trusted Partner organisation (Chrome
DevTools)</summary>

1. In the Studio dev toolbar’s **Flags** tab, enable
`enableScopedOAuthPublish` if needed.
2. Open Chrome DevTools → **Network**, then open **Publish OAuth app**
or edit an existing app.
3. Select the **GET** request whose URL ends in
`/platform/organizations/YOUR_ORG_SLUG`, without `/oauth/apps` after it.
Its response contains your organisation’s name and slug.
4. Right-click the request → **Override content**. Choose a local folder
and click **Allow**. Add `"is_trusted_partner": true` to the top-level
JSON object, or change the existing value to `true`. Keep every other
field and save with **Cmd/Ctrl+S**.
5. Reload with DevTools open and reopen the app form. For a new app,
choose **An owner, once for the whole organization** under
**Authorization**. Fill in the required name, website and callback URL
so other validation does not interfere.
6. Under **Application permissions**, select **Direct database access →
Read only** while **Database management** has **No access**. Check that
the inline error appears and **Confirm** stays enabled. Click
**Confirm** and check that saving is blocked, with “Fix the errors above
to continue.” in red above the footer actions.
7. Set **Database management → Read only** or **Read and write**. Check
that the inline and footer errors clear, while **Confirm** remains
enabled. Change it to **Write** and check that the error returns.
Neither permission should change automatically.
8. Set **Direct database access → No access**. Check that the inline and
footer errors clear. Cancel the form without saving.
9. Turn off **Sources → Overrides → Enable Local Overrides** and reload
when finished.

The override only changes the response in your browser. It does not
grant backend Trusted Partner eligibility, so use it to review the UI
validation. Saving an app with direct database access requires a
genuinely eligible organisation.

</details>
2026-12-03 13:39:50 +07:00
kemal.earth 6d8af8e950 chore(api-types): regenerate types from production specs (#54472)
## Problem

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

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

## Solution

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

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

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

## Review instructions

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

Note: `verify-production-api-types` was removed from the required checks
during the #54394 incident and hasn't been restored. Worth putting back
after this merges.
2026-12-02 13:51:52 +00:00
Danny WhiteandJoshen Lim be27ad8cf5 feat(studio): show apps and confirm token access changes (#53917)
> [!WARNING]
> This PR relies on #53705 being merged first.

## Problem

Project admins need to see authorised apps before changing token access.
[DEPR-734](https://linear.app/supabase/issue/DEPR-734)

## Solution

- Show Apps below Members only when authorised apps exist; hide the
section while loading or empty, and retain verification errors.
- Show access levels and links to each app’s access sheet.
- Include members and authorised apps in toggle confirmations; wait for
complete counts and offer retry on errors.

| After |
| --- |
| <img width="725" height="560" alt="CleanShot 2026-12-02 at 14 44 13"
src="https://github.com/user-attachments/assets/6f033b2f-a8b4-4a64-824f-ef0cc270ff6c"
/> |
| No authorised apps (no empty state) |
| <img width="728" height="773" alt="CleanShot 2026-12-02 at 14 11 31"
src="https://github.com/user-attachments/assets/76b31461-abca-4f9a-b76d-bb664093dd67"
/> |
| Loading error |
| <img width="727" height="749" alt="CleanShot 2026-12-02 at 14 38 34"
src="https://github.com/user-attachments/assets/0722002c-a5cf-4877-b00b-15f9e4a6524c"
/> |
| 1× authorised app |
| <img width="418" height="222" alt="CleanShot 2026-12-02 at 14 39 27"
src="https://github.com/user-attachments/assets/db5cc89a-2099-4a6f-969c-b4e2c38ac972"
/> |
| Disabling token access whilst 1× app is relying on it |
| <img width="424" height="387" alt="CleanShot 2026-12-02 at 14 39 58"
src="https://github.com/user-attachments/assets/e15c1227-8190-42f4-876b-5f55a321848b"
/> |
| Re-enabling token access which will immediately restore access for N
members and apps |


## Review instructions

1. Open the [staging
preview](https://studio-staging-git-dnywh-depr-734-temporary-acc-b81819-supabase.vercel.app/dashboard),
select a project you administer, and open **Database → Settings**.
Enable database token access in **Feature previews**, plus `jitDbAccess`
and `enableScopedOAuthManage` in the dev toolbar’s **Flags** tab if
needed.
2. Open DevTools → **Console**, paste the setup below and run it.
Navigate to another Studio page (possibly outside of Database) and back
to **Database → Settings**, without reloading. Check **Test Partner
App** appears under Apps with **Read and write** access.
3. Turn token access off. Check the confirmation includes the app, then
choose **Cancel**.
4. Run `tokenAccessReview.state = 'disabled'` in Console, then navigate
away and back. Turn token access on, expand **Who will regain access?**,
check the app is listed, then choose **Cancel**.
5. Run `tokenAccessReview.state = 'enabled'; tokenAccessReview.fail =
true`, then navigate away and back. Check the Apps error disables the
toggle. Run `tokenAccessReview.fail = false` and choose **Retry apps**
to recover.
6. Run `tokenAccessReview.apps = false`, then navigate outside Database
and back. Check Apps is hidden once loaded. Reload to remove the setup.

The setup mocks GET responses only, requires no app authorisation, and
does not change saved access. Use **Cancel** in both confirmations. Do
not reload between steps; reloading removes the setup. Network’s
Response tab does not show these browser-generated responses.

<details>
<summary>Console setup</summary>

```js
(() => {
  if (window.tokenAccessReview) throw new Error('Review setup is already active. Reload to reset it.')
  const projectRef = location.pathname.match(/\/project\/([^/]+)/)?.[1]
  if (!projectRef) throw new Error('Open a project’s Database Settings first.')
  const appId = '75e64165-b74e-432f-bb70-80d6ae432f06'
  const grantId = 'review-org-grant'
  const scopes = ['database_token_access:write']
  const originalFetch = window.fetch
  const review = window.tokenAccessReview = { state: 'enabled', apps: true, fail: false }
  const approvals = /\/platform\/organizations\/[^/]+\/oauth\/approvals$/
  const grants = new RegExp(`/platform/organizations/[^/]+/oauth/approvals/${appId}/grants$`)
  const page = (data) => Response.json({ data, links: { next: null, prev: null } })
  window.fetch = function (input, init) {
    const url = new URL(input instanceof Request ? input.url : input, location.href)
    const method = init?.method ?? (input instanceof Request ? input.method : 'GET')
    if (method.toUpperCase() === 'GET') {
      if (url.pathname.endsWith(`/v1/projects/${projectRef}/jit-access`)) {
        return Promise.resolve(Response.json({ state: review.state, appliedSuccessfully: true }))
      }
      if (approvals.test(url.pathname)) {
        return Promise.resolve(page(review.apps ? [{
          id: appId, type: 'oauth_app', attributes: {
            app: { name: 'Test Partner App', icon: null, created_by: null },
            last_approved_at: '', target: 'organization',
            org_grant: { grant_id: grantId, approved_scopes: scopes, approved_at: '' },
          },
        }] : []))
      }
      if (grants.test(url.pathname)) {
        if (review.fail) return Promise.resolve(Response.json({ message: 'Review: apps unavailable' }, { status: 500 }))
        return Promise.resolve(page([{
          id: grantId, type: 'oauth_grant', attributes: {
            kind: 'organization_bound', user: null, approved_at: '', approved_scopes: scopes,
            projects: [{ ref: projectRef, name: 'Review project' }],
          },
        }]))
      }
    }
    return originalFetch.call(this, input, init)
  }
})()
```

</details>

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-12-02 19:55:19 +07:00
Danny WhiteandJoshen Lim 4dbb966b2e feat(studio): show Trusted Partner access on OAuth consent (#53583)
> [!WARNING]
> Live readiness checks require
[CTRL-2277](https://linear.app/supabase/issue/CTRL-2277) in the target
environment; production deployment is pending.

## Problem

Trusted Partner consent must explain direct database access and project
blockers before authorisation.
[DEPR-732](https://linear.app/supabase/issue/DEPR-732)

## Solution

- Show Direct database access alongside the requested permissions.
- Check selected projects, or every project page for organisation-wide
grants.
- Separate blocking issues from SSL notices; block authorisation during
loading or errors and offer retry.

| After |
| --- |
| <img width="1280" height="1323" alt="Authorize API Access Supabase"
src="https://github.com/user-attachments/assets/adb6367a-bace-4b62-81b5-68ba4c11396c"
/> |
| Consent screen with Direct database access (previously “Table data”)
and Database management |
| <img width="1280" height="1323" alt="Authorize API Access Supabase"
src="https://github.com/user-attachments/assets/0c35900c-1059-49cd-b1c5-4e0cf5441b9b"
/> |
| Selected-project blockers and the separate SSL notice |
| <img width="1280" height="1323" alt="95741"
src="https://github.com/user-attachments/assets/1fbef4f0-0433-4c93-b390-84d210dfb665"
/> |
| Organisation-wide blockers _without_ project-removal actions |

## Review instructions

1. Open the [staging consent
screen](https://studio-staging-git-dnywh-depr-732-trusted-partn-f24cfb-supabase.vercel.app/dashboard/authorize?auth_id=11666aa8-7f7e-4705-b33a-981903fd682e).
Enable `enableScopedOAuthConsent` in the dev toolbar’s **Flags** tab if
needed.
2. Open Chrome DevTools → **Network** and reload. Select the **GET**
request ending in `/platform/oauth/authorizations/{id}`.
3. Right-click that request → **Override content**. Choose a local
folder and click **Allow**. Add `database_token_access:read` and
`database_token_access:write` to `scopes`. Use only the read scope to
check read-only access. Keep every other field, save with
**Cmd/Ctrl+S**, then reload with DevTools open.
4. Select projects. Override each **GET** request ending in
`/platform/organizations/{slug}/oauth/authorizations/{id}/projects/{ref}/database-access`.
Use `{"issues":[],"enables_ssl":false}` for ready projects, then
`{"issues":[],"enables_ssl":true}` for an SSL notice. Save and reload
after each change. Check Direct database access and Database management
are separate, and SSL alone allows authorisation.
5. Change a readiness response to
`{"issues":["postgres_upgrade_required","platform_unsupported"],"enables_ssl":true}`.
Save and reload. Check blockers prevent authorisation, SSL stays
separate, and removing a blocked project clears its blockers.
6. Set `project_scoping_mode: false` in the authorisation override. Save
and reload. Check any blocked project prevents organisation-wide
authorisation, with no project-removal actions.
7. Block a database-access request in Network and reload. Check
authorisation stays disabled. Unblock it and choose **Retry checks**.
8. For a returning app, override `existing_grant.approved_scopes` in the
request ending in `/preflight`. Save and reload. Check added, removed
and unchanged permissions.
9. Disable **Sources → Overrides → Enable Local Overrides**. Repeat
ready and blocked project checks with a real staging authorisation
before approving live readiness behaviour.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-12-02 16:19:30 +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
Danny WhiteandJoshen Lim 05cbf8ca50 feat(studio): show Trusted Partner access in Authorized Apps (#53705)
## Problem

Organisation admins need to see authorised apps’ direct database access.
[DEPR-731](https://linear.app/supabase/issue/DEPR-731)

## Solution

- Show the approved direct-access level in Authorized apps.
- Show permissions and project coverage in **View access**.

| After |
| --- |
| <img width="1280" height="813" alt="OAuth Apps Organization Settings
Basket Supabase"
src="https://github.com/user-attachments/assets/d2bbc682-6e6f-462f-b5c2-3a2a8ff813ba"
/> |
| Authorized apps list showing read-only direct access |
| <img width="1280" height="813" alt="OAuth Apps Organization Settings
Basket Supabase (4)"
src="https://github.com/user-attachments/assets/24506547-461a-44e0-880f-6ade23fd734c"
/> |
| Authorized apps list showing read-write direct access |
| <img width="1280" height="813" alt="OAuth Apps Organization Settings
Basket Supabase (1)"
src="https://github.com/user-attachments/assets/53ac2662-9fb7-4cfc-b118-31ef5778b339"
/> |
| View access sheet with permission groups and project coverage |
| <img width="1280" height="813" alt="OAuth Apps Organization Settings
Basket Supabase (3)"
src="https://github.com/user-attachments/assets/a21cefa7-c656-4b5c-bb0c-075c724350f9"
/> |
| View access sheet with permission groups and project coverage |
| <img width="424" height="297" alt="CleanShot 2026-12-02 at 15 09 39"
src="https://github.com/user-attachments/assets/e1f83068-21a8-43c4-9ca8-dcf6a3164b01"
/> |
| Added second paragraph for revoking access to apps with direct
database access. This “existing connections will close shortly” is only
accurate one CTRL-2141 merges, as discussed
[here](https://github.com/supabase/supabase/pull/53705/changes#r4764576735).
|

## Review instructions

1. Open the [staging
preview](https://studio-staging-git-dnywh-depr-731-authorized-apps-supabase.vercel.app/dashboard),
select a test organisation and open **Apps**
(`/dashboard/org/{slug}/apps`). Enable `enableScopedOAuthManage` in the
Studio dev toolbar’s **Flags** tab if needed.
2. Open Chrome DevTools → **Network** and reload. Select the **GET**
request ending in `/platform/organizations/{slug}/oauth/approvals`.
3. Right-click that request → **Override content**. Choose a local
folder and click **Allow**. For an existing organisation-bound app, add
`database_token_access:read` to `attributes.org_grant.approved_scopes`.
Keep every other field, save with **Cmd/Ctrl+S**, then reload with
DevTools open.
4. Open the app’s **View access**. Override the **GET** request ending
in `/platform/organizations/{slug}/oauth/approvals/{app_id}/grants`. Add
the same scope to the matching grant’s `attributes.approved_scopes`.
Save and reload.
5. Check read-only direct access in the list and access sheet. Change
the scope to `database_token_access:write` in both overrides, save and
reload. Check read-write access and compare it with a standard app.
6. Compare the grants response’s existing `attributes.projects` list
with `null` for all projects. Save and reload after each change. Check
permission groups, project coverage and the app ID in **View access**.
7. Open **Revoke access**, check the existing OAuth access explanation,
then choose **Cancel**.
8. Disable **Sources → Overrides → Enable Local Overrides**. Repeat with
real authorised staging apps.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-12-02 14:05:39 +07:00
Danny WhiteandJoshen Lim 0265ff935e feat(studio): configure direct database access in OAuth app settings (#54006)
> [!WARNING]
> Partner eligibility requires
[CTRL-2282](https://linear.app/supabase/issue/CTRL-2282) in the target
environment; production deployment is pending.

## Problem

Trusted Partners need to configure direct database access for OAuth
apps. [DEPR-733](https://linear.app/supabase/issue/DEPR-733)

## Solution

- Save and reload direct-access scopes independently of Database
management.
- Allow new grants only for eligible organisations and
organisation-bound apps.
- Allow existing direct access to be removed when eligibility changes.

| After |
| --- |
| <img width="1280" height="754" alt="OAuth Apps Organization Settings
Basket Supabase"
src="https://github.com/user-attachments/assets/e9b78fb6-65e4-4299-ad07-a2f9538a36d5"
/> |
| `"is_trusted_partner": false` or missing |
| <img width="1280" height="754" alt="OAuth Apps Organization Settings
Basket Supabase (1)"
src="https://github.com/user-attachments/assets/cf78db2c-952c-47e9-9239-82aab2c8398a"
/> |
| `"is_trusted_partner": true` |

## Review instructions

1. Open the [staging
preview](https://studio-staging-git-dnywh-depr-733-oauth-app-dat-c71d4a-supabase.vercel.app/dashboard),
select a test organisation and open **OAuth Apps**. It should already be
`true, but enable `enableScopedOAuthPublish` in the Studio dev toolbar’s
**Flags** tab if needed.
2. Open Chrome DevTools → **Network**, then click **Publish OAuth app**.
3. In Network, select the **GET** request whose URL ends in
`/platform/organizations/YOUR_ORG_SLUG`, without `/oauth/apps` after it.
Its response contains the organisation’s name and slug.
4. Right-click that request → **Override content**. Choose a local
folder and click **Allow**. Add `"is_trusted_partner": true` to the
top-level JSON object, keeping every other field. Save with
**Cmd/Ctrl+S**.
5. Reload with DevTools open, reopen **Publish OAuth app**, and choose
**An owner, once for the whole organization** under authorisation.
6. Under **Application permissions**, find **Direct database access**.
Try **No access**, **Read only** and **Read and write**. Change
**Database management** separately and check the two values stay
independent.
7. With direct access selected, check **Each member, for themselves** is
unavailable. Set direct access to **No access**, choose member
authorisation, and check the Direct database access dropdown becomes
disabled.
8. Switch back to organisation authorisation, select direct access and
open **Preview consent for users**. Check its label and access level
match the form.
9. Change the overridden field to `false`, save and reload. Reopen the
new-app form and check Direct database access is hidden.
10. Disable **Sources → Overrides → Enable Local Overrides**. In a
genuinely eligible staging organisation, create a disposable app with
direct access, save and reopen it. Change its access level, save and
reopen again, then remove direct access. Check Database management
remains unchanged.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-12-02 16:50:36 +11:00
b53403e1d7 docs(integrations): add Build a Supabase integration guide (#54088)
## Problem

The steps to build a Supabase integration are spread across five pages:
the Partner Catalog page, creating an OAuth app, OAuth scopes, the
partner install flow, and the Management API reference. A partner has no
single page that says where to start or what to do next. Linear:
DOCS-1720.

## Solution

Add one guide, **Build a Supabase integration**, as the first item under
**Build Your Own** in the integrations sidebar. It does not repeat the
detail on the other pages. It links to them.

- **The path at a glance:** two short paths. Partner Catalog: apply,
build a landing page, publish. Integration: apply, build the OAuth flow,
build the integration, publish.
- **Apply to the Partners program**, then **Choose: Partner Catalog or
Integration**, a comparison table with wireframe images (SVG, light and
dark).
- **Partner Catalog: Build your landing page** and **Integration**
(build the OAuth flow, build the integration), each with "Build it"
cards that link to the top of the existing page.
- **Publish:** ask the partner manager to list the partner on the
Partner Catalog or the Integrations page.
- Removes the redirect from
`/docs/guides/integrations/build-a-supabase-integration` to the OAuth
guide, so the new page is reachable at that URL. The old `/oauth-scopes`
redirect stays.
- The progression and card data is in
`apps/docs/data/content-listings/build-a-supabase-integration.data.ts`.

Not in this PR: edits to the existing pages. The cards link to page
tops, so nothing here depends on those edits.

## Please check

- The five progression icons are placeholders from the built-in set. New
icons are coming.
- The table images sit inside table cells with a fixed width. I checked
them in the dev server only.
- I rendered the page with `pnpm dev` and ran `oxfmt --check` on the
changed files. I did not run the docs tests or `build:guides-markdown`.
- Two details are unverified: how partners hand their public key to
Supabase for a signed redirect, and partner status callbacks. The guide
does not describe either.
- The Dashboard Integrations tab wireframe is a drawing, not a
screenshot.

## Preview links

| Site | Live | Preview | Search for |
| ---- | ---- | ------- | ---------- |
| Docs |
[/docs/guides/integrations/build-a-supabase-integration](https://supabase.com/docs/guides/integrations/build-a-supabase-integration)
(redirects to the OAuth guide until this merges) | Vercel bot comment |
`The path at a glance` |

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

---------

Co-authored-by: John Stokvis <345546350+stokvis-at-supabase@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Nik Richers <nik@validmind.ai>
Co-authored-by: John Stokvis <johnstokvis@Johns-MacBook-Pro.local>
2026-12-01 09:53:58 -06:00
Gildas Garcia fd5c02f1a0 fix(studio): Scoped OAuth apps - improve text for projects with permission issues (#54409)
## Problem

When an authorization fails because of permission issues, we currently
display _Unavailable_ next to the problematic projects in the project
selector list. This is confusing as those projects are available, just
not selectable for this authorization

## Solution

Display _permission issues_ instead

<img width="417" height="601" alt="image"
src="https://github.com/user-attachments/assets/331073ac-71e0-45b0-a607-dcbd47268d91"
/>
2026-12-01 16:07:27 +01:00
K-Dog (Kevin) dc4f247e79 Revert "chore: update prod api types (#54394)" (#54404)
This reverts commit 37d4f444b4.

OpenFGA model needs updating first before updating the API types
2026-12-01 21:46:40 +08:00
K-Dog (Kevin) 37d4f444b4 chore: update prod api types (#54394)
Updated API types and addressed any type issues. Had to update
shared-types alongside.
2026-12-01 19:42:54 +08:00
Alaister YoungandAlaister Young 680633ee4f [FE-5108] (part 5) refactor(studio): migrate remaining interfaces off next/link (#54308)
Part 5 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 | `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 ← this PR** | **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 the remaining `components/interfaces/**` directories off
`next/link`, leaving zero `next/link` component imports in
`apps/studio`.

**Changed:**

- Replaced `next/link` across all 73 remaining interface files
(`Organization`, `OrganizationInvite`, `Billing`, `Auth`, `Support`,
`ProjectHome`, `Home`, `Project`, `ProjectCreation`, `ProjectAPIDocs`,
`ApiAuthorization`, `App`, `ConnectSheet`, `SignIn`, `APIKeys`,
`Account`, `CliLogin`, `Docs`, `JwtSecrets`, `Platform`)
- Converted the sole remaining `UrlObject` link (`<Link href={{
pathname: '/sign-in-sso', query }}>`) in `SignInSSOForm.tsx` to `<Link
to="/sign-in-sso" search={query}>`
- Migrated `SupportLink.tsx` onto `DynamicLink`
(`createSupportFormUrl(...)`)
- Standardized external `target="_blank"` anchors with `rel="noreferrer
noopener"`, switched `OverviewMetrics.tsx` observability link to typed
`<Link to="/project/$ref/observability/auth">`, and adopted `InlineLink`
/ `InlineLinkClassName` on inline paragraph links per review feedback

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

## To test

- [ ] Check Organization (billing, usage, team, documents, AWS
Marketplace), Auth (providers, templates, rate limits, users, OAuth
apps), Support form/links, Project Home, Connect sheet, and Sign-In/SSO
links
- [ ] Verify `SignInWithSSOButton` preserves query params when
navigating to `/sign-in-sso`
- [ ] Verify `SupportLink` pre-populates support form query parameters
cleanly

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-12-01 17:33:03 +08:00
Gildas Garcia 7a6c6f7df8 fix(studio): fix Publish OAuth app button tooltips (#54359)
## Problem

Users who don't have the required permissions to publish an oauth app
may see two tooltips when hovering the _Publish OAuth app_ button.

<img width="620" height="208" alt="image"
src="https://github.com/user-attachments/assets/fedf7150-35e6-4429-b0c0-2fbc4cd2aa5e"
/>

## Solution

Hide the shortcut tooltip when users don't have the required permissions
to publish an oauth app
2026-12-01 10:15:50 +01:00
Alaister YoungandAlaister Young 0f14ef4d67 [FE-5109] (part 5) refactor(studio): migrate remaining interfaces and router events off next/router (#54057)
Part 5 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 | `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 ← this PR** | **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 remaining `apps/studio/components/interfaces/**`
directories off `next/router`, including the last production
`router.events` consumer (`QueryInsightsTable`) and the only default
`next/router` import (`DiscordCTACard`). After this PR, zero files under
`apps/studio/components/**` import `next/router` or
`next/compat/router`.

**Added:**

-
`apps/studio/components/interfaces/QueryInsights/QueryInsightsTable/QueryInsightsTable.test.tsx`:
verifies that pathname changes clear selected query state without
mutating destination or history search params, while same-pathname
search updates preserve selection

**Changed:**

- Replaced the sole production `router.events.on('routeChangeStart',
...)` consumer in `QueryInsightsTable.tsx` with a `pathname` effect that
clears `onCurrentSelectQuery` on pathname changes, and derived
`searchQuery` directly from `nuqs` (`urlSearch`) instead of mirroring it
in local state. Drops the legacy `setQueryStates({ search: null })` call
on leave, which ran after `history.push` on TanStack Router (targeting
the destination URL rather than the previous history entry, while
browser Back is expected to restore previous search params).
- Removed the `router: NextRouter` prop from `ReportWidgetRendererProps`
in `Reports/ReportWidget.tsx` and updated its callers (`ChartBlock`,
`ReportHeader`, `CreateReportModal`)
- Updated `LOG_ROUTES_WITH_REPLICA_SUPPORT` in
`Settings/Logs/Logs.constants.ts` from `[ref]` to `$ref` for TanStack
route patterns
- Replaced the default `import router from 'next/router'` in
`Support/DiscordCTACard.tsx` with `useNavigate`
- Replaced `useRouter` across `Account`, `Advisors`, `App`, `Auth`,
`ErrorHandling`, `Home`, `HomePageActions`, `Integrations`, `Linter`,
`LocalDropdown`, `Observability`, `Organization`, `OrganizationInvite`,
`Platform/Webhooks`, `Project`, `ProjectCreation`, `ProjectHome`,
`QueryPerformance`, `RedeemCredits`, `Settings`, `Sidebar`, `SignIn`,
`Support`, `UnifiedLogs`, and `UserDropdown`
- Updated affected tests (`Auth/Users/UserPanel`, `Home/ProjectList`,
`LocalDropdown`, `Organization/*`, `OrganizationInvite`,
`RedeemCredits`, `Settings/General/*`, `SignIn/SignInRecoveryCodeForm`,
`UnifiedLogs/*`)

**Simplified:**

- `LocalDropdown`, `UserDropdown` and `RedeemCredits` build the current
route from `location.href`, so the hash keeps its leading `#`
- `NewOrgForm` navigates to the `returnTo` path instead of an absolute
URL, which was being treated as external. It also uses a typed
`/new/$slug` navigate.
- Read search params from `useParams()` instead of `location.search`
casts (`CronJobPage`, `QueuePage`, `LogsPreviewer`,
`LinkSupportTicketPage`, `MarketplaceSidebar`, `PlanCards`,
`SignUpForm`)
- Dropped the dead `isReady`/`isRouterReady` constants and the
`navigate<AnyRouter, string>` casts where typed routes work
(`ForgotPasswordWizard`, `SignInPartner`, `ReportWidget`,
`ProjectUpgradeAlert`)
- Linter, `ReportHeader` and `LogsPreviewer` use `to: '.'` instead of a
separate pathname subscription. `CreateReportModal` builds the preserved
query params in `onSuccess` instead of a `useMemo`.
- Tests use the shared `createTestRouter` and `customRender` router.
`LocalDropdown` now tests that the hash is kept.

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

## To test

- [x] Query Insights: select a query and confirm search/filter updates
keep selection while switching projects/routes clears it; navigating to
Logs keeps Logs' query params intact and pressing Back restores Query
Insights' `?search=` param cleanly
- [x] Auth / Sign-in flows: sign in, sign up, MFA, recovery code,
forgot/reset password, and partner sign-in preserve `returnTo` and
redirect as expected
- [x] Organization & Project flows: creating an org/project, accepting
an org invite, claiming a project, redeeming credits, and
deleting/pausing/restarting a project or branch navigate cleanly
- [ ] Logs & Reports: replica selector appears on supported log routes
(`LOG_ROUTES_WITH_REPLICA_SUPPORT`), saved log queries open, and custom
reports create/navigate properly
- [ ] Sidebar, LocalDropdown, UserDropdown, Integrations
(Cron/Queues/Marketplace), Advisors/Linter, and Unified Logs navigate
cleanly

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-12-01 14:53:27 +08:00
Danny White 3dcb524f9e fix(studio): make OAuth access levels single-select (#54109)
## Problem

The OAuth app editor has separate Read and Write checkboxes. The menu
closes after each click, so choosing both scopes takes two trips through
the menu.

## Solution

Use Studio’s single-select control to set the full access level in one
step. The current scopes determine the label on the trigger. The choices
are **No access**, **Read only**, **Write**, and **Read and write**.
Each choice updates the scopes for that row and preserves other rows.

This is the base for #54006. The scoped personal access token editor has
a companion update in #54164.

| Before | After |
| --- | --- |
| <img width="651" height="297" alt="CleanShot 2026-11-26 at 15 33 36"
src="https://github.com/user-attachments/assets/dd74666a-9a5a-42fa-97f3-d866e5394d93"
/> | <img width="649" height="307" alt="CleanShot 2026-11-27 at 11 30
25"
src="https://github.com/user-attachments/assets/48395dd5-032e-49eb-9663-709eeac40fc3"
/> |

## Review instructions

1. Open the [OAuth Apps
preview](https://studio-staging-git-dnywh-oauth-permission-acces-6a3679-supabase.vercel.app/dashboard/org/_/apps)
and select **Publish OAuth app**.
2. Under **Application permissions**, try each access level on a row.
Check that one selection closes the menu and updates the trigger.
3. Select **No access** and check that both scopes are cleared for that
row. Check that another row’s selection stays in place.
2026-12-01 14:53:15 +11:00
Danny White 556faeab51 feat(studio): clarify authorized app grant details (#54284)
## Problem

The grants dialog makes project coverage and each member’s permissions
hard to inspect.

## Solution

- Replace the dialog with a grant-details sheet.
- Separate organisation and member access, with project references and
permissions grouped by access level.
- Move app IDs into Details and add a revoke action for authorised
admins.
- Build on #54285 using the existing grants API.

| Before | After |
| --- | --- |
| <img width="1280" height="1323" alt="OAuth Apps Organization Settings
Basket Supabase"
src="https://github.com/user-attachments/assets/b6bb0082-9cee-48b4-adb4-058f14f10f9f"
/> | <img width="1280" height="1323" alt="OAuth Apps Organization
Settings Basket Supabase"
src="https://github.com/user-attachments/assets/b32a7723-9fa0-452d-95f5-1762fd364163"
/> |
| <img width="1280" height="1185" alt="OAuth Apps Organization Settings
Basket Supabase"
src="https://github.com/user-attachments/assets/9a7982ba-aebe-42f4-9ac6-9308136150f7"
/> | <img width="1280" height="1221" alt="OAuth Apps Organization
Settings Basket Supabase"
src="https://github.com/user-attachments/assets/1965f7e4-8554-4fa9-86ef-7e53af1d0038"
/> |

## Review instructions

1. Sign in to staging and use an authorised app, or [authorise the test
app](https://api.supabase.green/v1/oauth/authorize?client_id=75e64165-b74e-432f-bb70-80d6ae432f06&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A54321%2Fcallback&state=grant-sheet-review).
The localhost callback may fail after the grant is saved.
2. Open the
[preview](https://studio-staging-git-dnywh-oauth-grant-details-supabase.vercel.app/dashboard/org/_/apps#authorized-apps),
select the same organisation and choose **Manage app → View access**.
3. Check the grant sections, project references and permission groups.
Test narrow widths, closing the sheet and cancelling **Revoke access**.

### Mixed-grant overrides

In **DevTools → Network**, override only the GET ending in
`/oauth/approvals/<app-id>/grants` with this response. Save, reload and
reopen the sheet. Remove any parent `/approvals` override to avoid
Chrome’s file/folder clash.

<details>
<summary>grants.json</summary>

```json
{
  "data": [
    {
      "id": "22222222-2222-4222-8222-000000000001",
      "type": "oauth_grant",
      "attributes": {
        "approved_at": "2026-11-30T00:00:00Z",
        "approved_scopes": [
          "database:read",
          "database:write",
          "projects:read"
        ],
        "kind": "organization_bound",
        "projects": null,
        "user": null
      }
    },
    {
      "id": "22222222-2222-4222-8222-000000000002",
      "type": "oauth_grant",
      "attributes": {
        "approved_at": "2026-11-30T00:00:00Z",
        "approved_scopes": [
          "projects:read"
        ],
        "kind": "member_bound",
        "projects": [
          {
            "name": "Example storefront",
            "ref": "example-storefront"
          }
        ],
        "user": {
          "username": "alex",
          "email": "alex@example.com",
          "gotrue_id": "33333333-3333-4333-8333-000000000001"
        }
      }
    },
    {
      "id": "22222222-2222-4222-8222-000000000003",
      "type": "oauth_grant",
      "attributes": {
        "approved_at": "2026-11-30T00:00:00Z",
        "approved_scopes": [],
        "kind": "member_bound",
        "projects": [],
        "user": {
          "username": "sam",
          "email": "sam@example.com",
          "gotrue_id": "33333333-3333-4333-8333-000000000002"
        }
      }
    }
  ],
  "links": {
    "next": null,
    "prev": null
  }
}
```

</details>

Check that organisation access covers all projects, Alex has only read
access to Example storefront, and Sam has no projects or permissions.
Disable overrides when finished.

Requires `enableScopedOAuthManage` for the organisation.
2026-12-01 09:57:35 +11:00
Danny WhiteandGildas Garcia 99a665b8d7 feat(studio): polish authorized app access actions (#54285)
## Problem

Authorized Apps hides access details behind a menu and uses a lengthy
revoke confirmation. Opening and closing these views should work
consistently with a mouse and keyboard.

## Solution

- Open access details from the app row, app name or **View access** menu
action.
- Remove the menu tooltip, use consistent labels and hide
unavailable-action separators.
- Use a compact **Revoke access** confirmation with focus returned to
the initiating control.
- Keep the existing grants dialog and table IDs; the sheet follows in
#54284.

| Before | After |
| --- | --- |
| <img width="1274" height="687" alt="CleanShot 2026-11-30 at 17 40 25"
src="https://github.com/user-attachments/assets/e7eb9411-cc2e-4bf2-8599-979f06069791"
/> | <img width="1273" height="679" alt="CleanShot 2026-11-30 at 17 40
05"
src="https://github.com/user-attachments/assets/d6b38690-7ba2-4c8c-adfc-0e0e356f7687"
/> |
| <img width="576" height="284" alt="CleanShot 2026-11-30 at 17 44 18"
src="https://github.com/user-attachments/assets/e2b7f015-c214-4034-b6ab-a4afc050510d"
/> | <img width="424" height="207" alt="CleanShot 2026-11-30 at 17 44
36"
src="https://github.com/user-attachments/assets/77df776d-bc93-4cdb-b333-2c6c54ed6554"
/> |


## Review instructions

1. Use a staging test organisation with an authorised app. If needed,
[authorise the existing test
app](https://api.supabase.green/v1/oauth/authorize?client_id=75e64165-b74e-432f-bb70-80d6ae432f06&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A54321%2Fcallback&state=grant-sheet-review).
The localhost callback may fail to load after the grant is saved.
2. In the [Studio staging
preview](https://studio-staging-git-dnywh-oauth-access-list-polish-supabase.vercel.app/dashboard/org/_/apps#authorized-apps),
open **OAuth Apps → Authorized Apps** at
`/dashboard/org/_/apps#authorized-apps`. Click an app row or name, then
use **Manage app → View access**. Each opens the existing grant-details
dialog.
3. Focus the app name and press Enter or Space. Close the dialog and
check focus returns to the app name. Opening from the row or menu should
return focus to **Manage app**.
4. As an admin, select **Manage app → Revoke access**. Check the compact
confirmation names the app and explains the organisation and member
impact. Cancel it and check that grant details do not open accidentally
and focus returns to the app menu. Revoke only a disposable test grant
when checking submission.
5. As a user without revoke permission, check the menu has no revoke
action or stray separator. Repeat the controls and confirmation at a
narrow width.

---------

Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com>
2026-12-01 09:47:05 +11:00
9b3435010c fix(studio): show client ID and app ID on OAuth apps page (#54324)
## Problem

On the OAuth apps page in Studio, the table showed only the Client ID,
and the edit panel showed the app ID as unlabeled `ID: ...` text under
the app name. It was hard to tell the two IDs apart, or to copy the
right one. That contributed to the wrong ID type being handed to the
team that manages the Stripe pipeline allowlist (incident, Nov 20–23).

## Solution

- **Table:** add an **App ID** column next to **Client ID**. Both are
shown shortened (`65****9a71`) with a copy button. Hover an ID to show
the whole value. The copy button always copies the whole value.
- **Edit panel:** show **Client ID** and **App ID** as separate labeled,
copiable fields (full value, not shortened), each with one line of
helper text:
- Client ID: "Used to identify your app when it makes OAuth requests to
Supabase."
- App ID: "Used to manage your app on Supabase, such as updating or
deleting it."
- Remove the old `ID: ...` description under the app name.
- Add one small shared component, `OAuthAppId`, used by the table and
the edit panel.

The helper text follows the discussion in Slack: `client_id` is what the
deployed app sends in OAuth requests to the Management API, and `app_id`
is the primary key the app's author uses in platform APIs (for example
to update or delete the app).

Not in this PR: the Authorized apps table already shows its App ID with
a copy button, so it is unchanged. No API or data changes.

## Please check

- **Helper text wording.** Is it accurate for both IDs?
- **Shortened IDs.** The first 2 and last 4 characters, with `****`
between, only for IDs longer than 20 characters.

## Review instructions

1. Open **Organization → OAuth Apps** (`/org/<slug>/apps`) and create an
app if there is none.
2. In **Publishable apps**, check that **Client ID** and **App ID** both
show as shortened values, and that each copy button copies the full
value.
3. Hover a shortened ID. It should show a tooltip with the full value.
4. Open the app's edit panel. Check that Client ID and App ID are
labeled, show the full value, and copy correctly, and that the old `ID:
...` text under the app name is gone.

Checked locally against the full platform stack (format, lint,
type-check, and by eye). No tests added: the change is layout and
display only.

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

---------

Co-authored-by: John Stokvis <345546350+stokvis-at-supabase@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: kemal <hello@kemal.earth>
2026-11-30 15:55:56 -06:00
Gildas Garcia 418d251abe fix(studio): ensure we allow partial grants on all projects (#54311)
## Problem

When users try to authorize all current and future projects with
unsufficient permissions for an app that allows partial grants, the
consent screen does not display the correct message and block them from
authorizing the app.

## Solution

Fix the conditions to display the proper message about missing features
and allow authorization with partial grants.

## Review instructions

- Configure an app that allows partial grants (must be member bound)
- Configure a user without enough permissions (Read-only for instance)
- Use the oauth example app to authorize the app with this user
- Check that you are warned about missing features but that you can
still authorize the app
2026-11-30 17:45:21 +01:00
Gildas Garcia ce6c5e71fa feat(studio): OAuth app consent screen support for partial grants (#54213)
## Problem

Supabase admins can enable support for partial grants on some apps but
the consent screen doesn't support this scenario

## Solution

Detect partial grant support and warn users when they lack some
permissions, allowing them to confirm they want to authorize the app
anyway

<img width="846" height="2150" alt="image"
src="https://github.com/user-attachments/assets/37c48da9-395b-4425-b33d-7acdc8f3dcc1"
/>
2026-11-30 10:13:26 +01:00
K-Dog (Kevin) 4e589266af chore(billing): revised card errors (#54179)
- Improved error messaging around card errors and toast position to be
closer to the actual action (customers often miss it in the top right)
- For card errors when setting up payment methods with a direct error
via the Stripe API, map to an appropriate actionable error message
2026-11-28 12:57:32 +08:00
Charis fb118a978c fix(studio): link maintenance banner titles to their status page (#54195)
## What

The incident banner links to the status page, but the in-progress and
upcoming maintenance banners had no link.

The maintenance banner titles ("Scheduled maintenance in progress",
"Upcoming scheduled maintenance") now link to that maintenance's own
status page entry (`item.url`).

To support this, `HeaderBanner`'s `title` prop now accepts `ReactNode`
instead of only `string`.
2026-11-27 08:31:48 -05:00
Julian Domke d85e9b8616 feat(billing): use new upcoming invoice data (#53342)
Makes use of the new data returned from the upcoming invoice endpoint
and wraps it in an accordion-based layout.

The current implementation is fairly bare-bones, so discussed with
@kevcodez that we roll out this version first (which should already be
an improvement), then talk to a designer on the team to get it polished.

Ran `pnpm api:codegen:prod` from the root of the repo.

The $10.01 in Compute Credits are an upstream data issue on Orb 😢 

## Testing

If you'd like to test this in the browser, these are the steps:

1. checkout commit, launch local stack, create org + project; upgrade to
paid
2. reach out to me so I can set up some usage and credits for your
project/org
3. click around the upcoming invoice


https://github.com/user-attachments/assets/6a814560-5d05-479a-a3f8-d658532b91c1

<img width="1180" height="235" alt="Screenshot 2026-11-13 at 10 03 01"
src="https://github.com/user-attachments/assets/682083b7-77ea-4da8-a599-36f5063e922b"
/>
<img width="910" height="235" alt="Screenshot 2026-11-13 at 10 02 59"
src="https://github.com/user-attachments/assets/59903f2a-2af4-4e18-8d97-35baee7401e0"
/>

<img width="815" height="140" alt="Screenshot 2026-11-13 at 12 03 17"
src="https://github.com/user-attachments/assets/4370d10a-dc5a-4010-b03e-dcf0b23140d1"
/>
<img width="507" height="143" alt="Screenshot 2026-11-13 at 12 03 21"
src="https://github.com/user-attachments/assets/3243855e-b02a-4e93-8139-5a7dfaad3230"
/>
2026-11-27 13:24:54 +01:00
Pamela Chia 0755ba6556 feat(studio): use the onboarding survey in the AWS Marketplace org form (#53938) 2026-11-26 23:27:19 +08:00
Joshen Lim 434c00cb14 Joshenlim/fe 5196 move off scaffold components for remaining (#53911)
## Context

Final clean up of deprecated Scaffold components, just touches
- Account audit logs
- Project home page
- Database -> Column privileges
- Storage -> Analytics bucket details
- Storage -> Vector bucket details
- Settings -> Infrastructure -> Disk management
- Settings -> Infrastructure -> Read replica details
- Integrations -> Wrappers overview (Only for non supported integration
UI)
- Edge functions -> Empty state
- Auth -> Performance

Also replaces usage of `ScaffoldDivider` with just the `Separator`
component
And also adjusts the page container sizes of database pages from large
to default - these only have visual differences on viewport widths
larger than a laptop

Testing just needs a quick sweep of all these surfaces to make sure
nothing looks weird - will do so on my end too once the builds go
through!

For @supabase/security's review - review requirement was triggered as
`Documents.tsx` was updated in the organization settings page. But it
was just to change the Divider component 🙏
2026-11-26 21:28:17 +07: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
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
K-Dog (Kevin) 574cd4ba46 chore: remove old plan change UI (#54105)
Revamped plan change UI is fully rolled out for everyone. Removing the
now obsolete components.
2026-11-26 16:01:29 +08:00
Joshen Lim 52a7fddc95 Joshenlim/fe 5198 clean up to be cleaned folder (#54106)
## Context

Another housekeeping - just deprecates the `to-be-cleaned` folder
- Removes `ListIcon -> Only `vercelIcon` was being used which I've
replaced to use the existing static SVG instead
- Removes `ProductEmptyState` -> replaced with
`EmptyStatePresentational`
2026-11-26 10:59:43 +07:00
Gildas Garcia 107b7dbad2 feat(studio): already approved request preselect org and projects (#54036)
## Problem

When users navigate back to the consent screen after a redirect error,
they have to reselect the org and projects despite the request having
been approved already

## Solution

When present, `approved_organization_slug` should set the organization
picker and override `organization_slug` from query parameters. Likewise,
`approved_project_refs` should take precedence over project refs from
query parameters or an existing grant in the preflight check.
2026-11-25 16:23:14 +01:00
K-Dog (Kevin) 653f914ca1 feat: post plan upgrade screen (#54003)
Right now, when customers upgrade from free → paid or even pro → team,
we simply redirect to the org billing page with a quick banner that
vanishes after 3 seconds confirming the plan was changed. it’s quite
unsatisfying and feels like a missed opportunity to display what the
customer now unlocked and next steps. I want to especially highlight
projects that are now upgradeable from nano → micro, but we can later
expand and make the “next steps” smarter and do it context-based.
2026-11-25 11:30:19 +00:00
kemal.earthandGildas Garcia 8597e7dc5a feat(studio): oauth apps form update (#53893)
## Problem

The Authorization section of the OAuth app publish form was two toggles,
each with its own inline warning box and its own "I understand this is
permanent" checkbox, plus a static info box describing what users would
see. Two problems with that:

- The settings are a one-way door, so the permanence warning appeared
twice and was easy to click past.
- Nothing showed what the two settings combine into, or what the person
connecting the app actually ends up seeing.

## Solution

UI only — the saved fields (`grant_kind`, `project_scoping_mode`) and
the save logic are unchanged, and `allow_partial_grants` is untouched.

- **Two radio groups** in place of the toggles: "Who approves access?"
(an owner, once for the org / each member, for themselves) and "Which
projects can it reach?" (all projects / let them choose). Built on
`RadioGroupStacked`, grouped with `fieldset`/`legend`.
- **One-way door made visible**: the saved option carries a `Current`
badge, the stricter options carry `Permanent`, and once a stricter value
is saved the looser option is disabled and badged `Can't switch back`.
- **Live preview** replaces the info box: a dimmed, cropped view of the
real consent screen, reusing `ScopeGroupCard` and the interstitial's
width, so it reflects the app's actual scopes and updates as the radios
change. A footer row states the resulting grant, and what it is today
when there are unsaved changes.
- **One confirmation, at save time**: both inline warnings and their
checkboxes are gone. Saving a stricter value opens a `ConfirmationModal`
listing only what changed, with a single acknowledgement checkbox gating
"Save permanently".

Unit tests cover the badge/locking states and the preview; the dialog's
bullets and acknowledgement gate have their own tests.

## Review instructions

1. Enable the `enableScopedOAuthPublish` flag and open **Organization
settings → OAuth Apps**.
2. Publish a new app. Both questions should default to the looser option
with no `Current` badges, and the stricter options should show
`Permanent`.
3. Change each radio and watch the preview and the "Resulting grant"
line update — switching "Which projects can it reach?" should swap the
fixed projects row for the picker.
4. Save with a stricter value selected. Confirm the dialog lists only
the changes you made, and that "Save permanently" stays disabled until
the checkbox is ticked.
5. Reopen the app. The saved values should show `Current`, and the
looser options should be disabled and badged `Can't switch back`.
6. Edit an app without touching authorization and save — no dialog
should appear.

---------

Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com>
2026-11-25 10:24:54 +00:00
Danny White f6dede6c37 feat(studio): make OAuth permission changes easier to scan (#53700)
## Problem

When a returning app changes its permissions, the consent screen mixes
old and new access levels in a list of parenthetical labels.

## Solution

Show added, removed and unchanged permissions in their access groups. A
level change appears in both the old and new groups. Green comes from
the success token so it stays green across accent settings.

| Before | After |
| --- | --- |
| <img width="868" height="2164" alt="CleanShot 2026-11-20 at 12 40
23@2x"
src="https://github.com/user-attachments/assets/74e8462c-60eb-44c5-be25-7e683083be8d"
/> | <img width="866" height="1986" alt="CleanShot 2026-11-20 at 12 38
47@2x"
src="https://github.com/user-attachments/assets/a739e619-8fc7-4a91-9a28-4b3c176b882b"
/> |

## 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-diff-supabase.vercel.app/dashboard/authorize?auth_id=606dbb8e-60ea-4155-bb36-70a7d31378dd).

**What to check**

1. Open Chrome DevTools → **Network** → **Fetch/XHR**, filter by the
`auth_id` in the consent URL, and reload. Right-click each of these two
**GET** requests and select **Override content**. Choose a local
Overrides folder if Chrome prompts you.
- `/api/platform/oauth/authorizations/<auth_id>` is the new request. Set
its top-level `scopes` to
`["database:read","database:write","projects:read","storage:read"]`.
-
`/api/platform/organizations/<org-slug>/oauth/authorizations/<auth_id>/preflight`
is the existing grant check. In that response, replace
`"existing_grant": null` with this field and leave the rest of the
response intact.

     ```json
     "existing_grant": {
       "grant_id": "00000000-0000-4000-8000-000000000001",
"approved_scopes": ["database:read", "projects:read", "secrets:read"],
       "project_refs": null,
       "approved_at": "2026-11-19T00:00:00.000Z"
     },
     ```

2. Keep the other fields as returned. Save both overrides and reload
with DevTools open.
3. Check that Database management is removed from **Read only** and
added to **Read and write**, Projects is unchanged, Storage is added,
and Secrets is struck through. Clear the overrides when done.
2026-11-25 10:55:08 +11:00
Gildas Garcia 8583896114 feat(studio): Improve OAuth app consent screen loading state (#53927)
## Problem

The OAuth consent screen appears before the preflight data has loaded,
briefly showing the default state.

## Solution

Keep the loading animation visible until that request completes so users
do not see the intermediate state

## Review instructions

- Throttle the network speed in the browser devtool 
- Using the OAuth example app, reauthorize an app (preferably one that
targets projects as it's easier to see the preflight has loaded)
- Verify you only see the consent form with the existing grant settings
applied (the projects are pre-selected)
2026-11-24 12:28:35 +01:00
Pamela Chia d2709729d6 feat(studio): track the plan change flow after the plan CTA click (#53916)
Studio sends no events between the plan CTA click and the backend's
subscription update, so we can't see where people stop in the plan
change flow. The redesigned plan change screen from #53670 is also gated
by a ConfigCat flag, and ConfigCat flag values are not attached to
events, so its rollout can't be compared against the legacy dialog. I
added the missing events and a property for the flag state.

**Changed:**
- **Which screen a user gets**: I added `planUpdateRedesignEnabled` and
`origin` (the `source` query param the panel was opened with) to
`studio_pricing_plan_cta_clicked`.
- **Confirm and completion**: the redesigned screen now sends
`studio_pricing_plan_change_confirm_clicked` on the confirm button and
`studio_pricing_plan_change_completed` once the change succeeds. A
payment confirmation that the API answers with 202 (payment taken, plan
still syncing) counts as completed too.
- **Compute explainer and docs links**: expanding "Billed every hour,
even when idle" sends `studio_pricing_compute_billing_explainer_opened`,
and the compute and project transfer docs links send
`studio_pricing_plan_change_docs_link_clicked`.
- **Stale origin**: closing the pricing panel now removes `source` from
the URL. Before, reopening the panel from the billing page reported the
previous entry point as the origin.

**Note:** the legacy dialog gets no new events, and
`planUpdateRedesignEnabled` should be removed together with it.

## To test
Needs the `billingPlanUpdateRedesign` flag on. Watch the
`telemetry/event` requests in the network tab.

Tested on the PR preview:
- [x] Open `/org/<slug>/billing?panel=subscriptionPlan&source=backups`
on a Free org and click "Upgrade to Pro", expect
`studio_pricing_plan_cta_clicked` with `planUpdateRedesignEnabled: true`
and `origin: "backups"`. Observed, and the redesigned screen opened.
- [x] On the same panel, click the Enterprise card's "Contact us",
expect exactly one `studio_pricing_plan_cta_clicked` with `selectedPlan:
"Enterprise"`, `planUpdateRedesignEnabled: true` and `origin:
"backups"`. Observed, one event.
- [x] Expand "Billed every hour, even when idle", expect one
`studio_pricing_compute_billing_explainer_opened`. Collapse it, expect
no event. Observed, and a second expand sent a second event.
- [x] Click "Learn about compute", expect
`studio_pricing_plan_change_docs_link_clicked` with `docsLink:
"compute"`. Observed, and the "Transfer" link sent `docsLink:
"project_transfer"`.
- [x] Go back and close the pricing panel, expect `source` to be gone
from the URL. Observed: the URL ended at `/billing` with no `panel` or
`source`.
- [x] With the flag overridden off and the page reloaded, click "Upgrade
to Pro", expect `planUpdateRedesignEnabled: false` and the legacy
dialog. Observed.
- [x] Confirm with a declining card, expect
`studio_pricing_plan_change_confirm_clicked` and no
`studio_pricing_plan_change_completed`. Observed: the subscription
update returned 402 and no completion was sent.
- [x] Confirm the upgrade with a test card, expect
`studio_pricing_plan_change_confirm_clicked` then one
`studio_pricing_plan_change_completed` with `currentPlan: "Free"`,
`selectedPlan: "Pro"`, `origin: "backups"` and no project group.
Observed, with `groups` holding only `organization`.
- [x] Upgrade again with a card that requires 3D Secure, expect one
`studio_pricing_plan_change_completed`, sent only after the challenge.
Observed on a Pro to Team change.

I also confirmed ingestion by querying the staging PostHog project: all
five events from this run arrived from the preview host with the
properties above. The run included the CTA click with both `true` and
`false` for `planUpdateRedesignEnabled`, `docsLink` values `compute` and
`project_transfer`, completions for Free to Pro and Pro to Team, and
only an organization group on every event.

## Linear
- fixes GROWTH-1565
2026-11-24 18:40:22 +08:00
Pamela Chia 5e68983307 fix(studio): send the pricing panel opened event after the org loads (#53919)
`studio_pricing_side_panel_opened` fires as soon as the pricing panel is
visible. On a page load that lands on `?panel=subscriptionPlan`, that is
before the organization and subscription have loaded, so the event went
out without `currentPlan` (about 45% of these events) and sometimes
without the organization group. I now send it once the selected
organization has loaded, and read `currentPlan` from the organization.
The tracking lives in a small `useTrackPanelOpened` hook in the same
file.

**Note:** I read the plan from the organization instead of the
subscription because the subscription query waits on a billing
permission check and never runs for members without billing access.
`EnterpriseCard` already sources `currentPlan` the same way.

## To test
Watch the `telemetry/event` requests in the network tab.

Tested on the PR preview:
- [x] Load `/org/<slug>/billing?panel=subscriptionPlan&source=backups`
with a full page load, expect one `studio_pricing_side_panel_opened`
with `currentPlan` set, `origin: "backups"` and `groups.organization`
set. Observed on three consecutive full loads, one event each.
- [x] From the billing page, click "Change subscription plan", expect
one `studio_pricing_side_panel_opened` with `currentPlan` set. Observed,
with the organization group set.
- [x] Close the panel and open it again, expect one more event. Leave it
open, expect no further events. Observed.

I also confirmed ingestion by querying the staging PostHog project:
every event from this run arrived from the preview host with
`currentPlan` and the organization group set.

## Linear
- fixes GROWTH-1566
2026-11-24 18:18:10 +08:00
Pamela ChiaandJoshen Lim 86ab87efd7 chore(studio): remove the onboarding survey experiment flag (#53918)
The onboarding survey experiment on the new-org form is finished and the
survey version is now the default. I removed the
`onboardingSurveyPlacement` flag from Studio: the form always shows the
survey, and I deleted the old form path.

**Changed:**
- **New-org form**: always renders the name field plus the optional
"Help improve Supabase" survey card. Org type and size are saved through
the survey endpoint only, as they already were for the survey variant.
- **Experiment plumbing removed**: I deleted the flag read, its exposure
event (`onboarding_survey_placement_experiment_exposed`) and the variant
constants, so the form no longer starts on the old layout while flags
load.
- **Tests**: the survey tests keep their assertions with the flag setup
removed. I deleted the test for the old form (org type sent at creation,
no survey) because that behavior no longer exists.

**Note:** I removed the `renderFieldWrapper` option from
`OrganizationDetailsFields`, which only the old form path used. The
cloud marketplace org form still uses the component unchanged.

## To test

Tested on the PR preview:
- [x] Sign in and open `/new`: expect a Name field with no Type field
above the plan picker, and a "Help improve Supabase" card with the org
type, "What are you building?" and "Do you know how to code?" questions.
Observed: Name, Plan, then the card with "Who is this org for?" (default
Personal) and both questions.
- [x] Create a free org with the survey untouched: expect the create
request body to carry no `kind` or `size`, no `onboarding-survey`
request, and the follow-up card on the new org's projects page.
Observed: create body `{"name":"…","tier":"tier_free"}` (201), no survey
request, and the follow-up card with Answer and Skip on the org page.
- [x] Create a free org with type Company, a company size and a "What
are you building?" answer: expect one `POST
/platform/organizations/onboarding-survey` with those answers returning
204, and no follow-up card. Observed: one request with `kind:
"COMPANY"`, `size: "50"`, `building: "b2b_saas"` (204), create body
again without `kind` or `size`, no follow-up card.
- [x] Watch telemetry requests while `/new` loads: expect no
`onboarding_survey_placement_experiment_exposed` event. Observed: none
across both org creations, while `onboarding_survey_dismissed` and
`onboarding_survey_submit_button_clicked` (both `surface: org_form`)
were sent.
- [x] Added: the survey card is in the first render of `/new` and the
Name input keeps focus, with no layout switch after flags load.

## Linear
- fixes GROWTH-1562

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-11-24 18:13:38 +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) aa0fb9e84b fix: plan upgrade price rounding (#53924)
While we want to round up the price for compute, so it does not display
$9.87 or the likes, we do not want any type of rounding for taxes or
amount due.
2026-11-24 17:23:50 +08:00
K-Dog (Kevin) 8a49c1e3f9 refactor: plan upgrade screen (#53670)
A fully revamped plan change screen covering Free -> Paid Plan or Paid
Plan <> Paid Plan changes. Out of scope is the downgrade to Free Plan,
which is a separate modal and process. Besides a visual refresher of the
current modal, we are addressing common misconceptions about our pricing and being as transparent as possible.

The new modal is available behind the feature flag
`billingPlanUpdateRedesign`, which is enabled on local/staging and will
be rolled out gradually after further testing in production.
2026-11-24 13:52:36 +08:00
Joshen Lim 85194a05d8 Joshenlim/fe 5190 move off scaffold components in (#53849)
## Context

Housekeeping to deprecate more deprecated UI components, this one's
focusing on the `Scaffold` components.
The main visual differences are just the width within PageSections since
the new components where the right content takes up a bit more width
than the left content. (Ref org billing + usage)

Starting the refactor with the organization pages:
- Billing
- Team
- Usage
- Settings -> SSO
- Settings -> Security
- Settings -> Audit Logs
- Settings -> Documents
2026-11-24 10:39:33 +07:00
Danny White a1b71bfdce fix(studio): clarify OAuth consent copy and hierarchy (#53702)
## Problem

The consent screen repeats information below the permissions and puts
the organization-level error away from the button it blocks.

## Solution

Place the member-bound role limit under **Permissions requested**, mark
section headings as headings, and group the role error with the action.
Keep the redirect destination centred in the footer.

| Before | After |
| --- | --- |
| <img width="890" height="1892" alt="CleanShot 2026-11-20 at 12 46
26@2x"
src="https://github.com/user-attachments/assets/1fa1b266-a82a-4fec-a840-50408f1e04fa"
/> | <img width="872" height="1706" alt="CleanShot 2026-11-20 at 12 46
32@2x"
src="https://github.com/user-attachments/assets/f0e510b1-e6b3-4e66-b3f7-61845c4cab71"
/> |
| <img width="874" height="1970" alt="CleanShot 2026-11-20 at 12 52
19@2x"
src="https://github.com/user-attachments/assets/97bcef92-50e7-453d-a1e4-9962b01a7cdf"
/> | <img width="862" height="1488" alt="CleanShot 2026-11-20 at 12 47
59@2x"
src="https://github.com/user-attachments/assets/556eb2f7-2d71-47ed-a21d-8a71a577bae6"
/> |

## 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-consent-copy-supabase.vercel.app/dashboard/authorize?auth_id=606dbb8e-60ea-4155-bb36-70a7d31378dd).

**What to check**

1. Open consent for a member-bound staging test app. Compare the role
explanation under **Permissions requested** and the centred redirect
destination with the current staging screen.
2. Open an organization-wide request with a role that cannot grant it.
Alternatively, in Chrome DevTools → Network, use **Override content** on
the successful organization preflight GET response for an unscoped
request. Set `validation_failure` to
`{"scope_target":"all_projects","role":{"name":"read-only"},"failed_scopes":["database:write"]}`
and reload with DevTools open.
3. Check that the warning sits above the disabled **Authorize** button
and the requested permissions are hidden. Clear any overrides when done.
2026-11-24 10:14:44 +11:00
Danny White 828bd84820 fix(studio): make OAuth project scope explicit (#53701)
## Problem

An unchecked box leaves users to figure out that access is limited to
selected projects.

## Solution

Show two explicit project scope options as a set of radio buttons. A new
grant starts with selected projects. Reauthorising an all-projects grant
still preselects all projects.

## 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-project-scope-supabase.vercel.app/dashboard/authorize?auth_id=606dbb8e-60ea-4155-bb36-70a7d31378dd).

| Before | After |
| --- | --- |
| <img width="880" height="1904" alt="CleanShot 2026-11-20 at 12 43
31@2x"
src="https://github.com/user-attachments/assets/87ed5f18-eebd-455e-a37a-9131fc9ac269"
/> | <img width="884" height="1948" alt="CleanShot 2026-11-20 at 12 43
45@2x"
src="https://github.com/user-attachments/assets/1ec03fb1-1208-496c-8ad0-1d5b6736c5da"
/> |

**What to check**

1. Open consent for a project-scoped staging test app in an organization
with projects.
2. Check that **All current and future projects** appears first and
**Selected projects only** is selected for a new grant.
4. Select a project, switch to all projects, then switch back. The
picker should reappear with your selection.
5. Repeat with an existing all-projects grant and check that the first
option is selected.
2026-11-24 10:14:13 +11: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
Joshen Lim 3cfd882683 Joshenlim/fe 5169 refactor pagelayout for storage functions (#53719)
## Context

Just some housekeeping to move off old layout components - this PR
targets the Storage + Edge Function + Wildcard pages, specifically:

Project wildcard route (/project/_)
Organization wildcard route (/org/_)
Storage -> Analytics Buckets
Storage -> Vector Buckets
Edge Function -> New function

Just need to make sure that these pages still render fine
2026-11-23 10:59:11 +07:00
Gildas Garcia e6986b5296 feat(studio): OAuth apps consent screen should allow to select another org (#53744)
## Problem

The OAuth apps consent screen does not allow users to change the
selected org. If the calling app didn't provide the org slug, we select
the first available org from the users orgs.

## Solution

Add an organization selector:
<img width="436" height="570" alt="image"
src="https://github.com/user-attachments/assets/a5579f2c-ff54-4d02-9d4a-ac75ed245719"
/>

## Review instructions

Requirements:
- have multiple orgs
- have a published app that needs projects selection and at least one
authorization already granted
- have the oauth example app ready

Tests:
- authorizing the app again on the same org it was before should
preselect the projects
- you should be able to select another org and if you do, that should
clear the selected projects and you should see only this org projects in
the options
- reselecting the initially granted org should reselect the projects it
had in the existing grant
2026-11-20 18:16:48 +01:00
Gildas Garcia 4448134b3b fix(studio): OAuth apps consent screen permission diff may show an empty Already granted section (#53729)
## Problem

The OAuth apps consent screen may show an empty _Already granted_
section in the permissions diff
<img width="802" height="474" alt="image"
src="https://github.com/user-attachments/assets/f49bca9e-20da-4554-83dd-98b93b752a0a"
/>

## Solution

Hide it when empty

## Review instructions

- Publish an oauth app with only the _Database Read_ permission
- Use the oauth example to authorize it 
- Update the published app to add the _Database Write_ permission
- Use the oauth example to authorize it again

You shouldn't see an _Already granted_ button
2026-11-20 14:22:43 +01:00
claude[bot]andClaude c3c049ea53 chore: remove public TIA PDF and point to Trust Center (#53687)
<!-- claude-slack-attribution -->
_Requested by **Ivan Vasilov** · [Slack
thread](https://supabase.slack.com/archives/C0161K73J1J/p1795121287621619)_

## Problem

**Before:** The Studio org Documents page linked directly to
`https://supabase.com/downloads/docs/Supabase+TIA+250314.pdf`, and that
PDF was served publicly from `apps/www/public/downloads/docs/`.
Legal/Security wants people to get the latest TIA from the Trust Center
instead, and the old PDF taken off the public site.

**After:** The Studio TIA section links to https://trust.supabase.io,
and the PDF is deleted from `apps/www`. The old PDF URL permanently
redirects to the Trust Center, so existing links don't 404.

This removes the public TIA PDF and repoints the dashboard to the Trust
Center.

## Solution

- Deleted only `apps/www/public/downloads/docs/Supabase+TIA+250314.pdf`
(the other docs in that folder are untouched).
- `TIA.tsx` in Studio: the button now links to
`https://trust.supabase.io` (the same form already used in the legal
FAQ), reads "View TIA in Trust Center", uses the external-link icon, and
drops the `download` attribute. Description copy mentions the Trust
Center. The existing `document_view_button_clicked` telemetry is
unchanged.
- `apps/www/lib/redirects.js`: added a permanent redirect for
`/downloads/docs/Supabase\\+TIA\\+250314.pdf` to
`https://trust.supabase.io`, following the existing DPA PDF redirect.
This is easy to drop if you'd rather have a hard 404.

No other references to the PDF exist in the repo (checked www, studio,
docs, packages). The legal FAQ already links to the Trust Center.

## Important caveats

- Deleting the file does **not** remove the blob from git history.
`supabase/supabase` is public, so the PDF stays fetchable through the
repo's history. If it must be truly gone, that needs a separate decision
(history rewrite and/or contacting GitHub support).
- A CDN/Vercel cache may serve the PDF briefly after deploy (and the
redirect takes effect once deployed).

## Review instructions

1. In the Studio preview, open an org's Documents page and check the TIA
section: the button opens https://trust.supabase.io in a new tab.
2. On the www preview, request `/downloads/docs/Supabase+TIA+250314.pdf`
and confirm it redirects to the Trust Center.

## Testing

Typecheck, lint and tests were not run: `pnpm install` is partially
blocked in my environment (npm.jsr.io is egress-blocked) and prettier
couldn't load its plugins. I only confirmed `redirects.js` loads in Node
and the entry parses. I couldn't reach supabase.com, so the live URLs
are unverified.

---
_Generated by [Claude Code](https://claude.ai/code)_

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-20 10:30:36 +01:00
Gildas Garcia 4442d91d77 feat(studio): Wire org and users authorized apps list to backend (#53674)
## Description

Part of the work for OAuth apps with the scoped permissions. This PR
wires the org and users authorized apps lists to backend.
2026-11-19 21:40:12 +01:00