mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 15:39:13 +00:00
create-pull-request/patch
40502
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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> |
||
|
|
d57ff4ea06 |
ci: run typecheck, format and Docs E2E on PRs into release (#54416)
The `release` ruleset requires `typecheck`, `format` and `Docs E2E`, but those workflows only trigger on PRs into `master`, so every PR into `release` sits blocked waiting for checks that never report (e.g. #54413). Adds `release` to the `pull_request` branch filter in `typecheck.yml`, `prettier.yml` and `docs-e2e.yml`. |
||
|
|
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> |
||
|
|
0cf8b266ff |
fix(studio): tables not showing on mobile (#54412)
## Problem On a mobile device the list of tables in the table editor are not showing: <img width="403" height="702" alt="Screenshot 2026-12-01 at 15 27 07" src="https://github.com/user-attachments/assets/cfb23739-50c8-4997-9d7b-f86ef5375e7d" /> ## Solution Tables are now showing: <img width="403" height="702" alt="Screenshot 2026-12-01 at 15 27 28" src="https://github.com/user-attachments/assets/8bc8c909-b866-4351-83bd-4bee4631cdd8" /> Closes #54400 |
||
|
|
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" /> |
||
|
|
0252fd8cad |
[FE-5114] (part 7) – refactor(studio): remove Next API adapter (#54034)
## Problem With all Studio API routes migrated to native TanStack Start handlers (or removed when unused) in parts 1–6, the Next Pages Router API adapter and legacy `NextApiRequest`/`NextApiResponse` wrappers are no longer used. Part 7 of 7 for [FE-5114](https://linear.app/supabase/issue/FE-5114/rewrite-api-routes-as-native-tanstack-start-handlers-and-remove-the) tears them down. ## Solution **Removed:** - `compat/next/api.ts` and `compat/next/api.test.ts` (`toWebHandler`) - Legacy `apiWrapper`, `apiAuthenticate`, and `fetchUserClaims` (`NextApiRequest`/`NextApiResponse`) functions and their legacy tests in `lib/api/apiWrapper.ts`, `lib/api/apiAuthenticate.ts`, `lib/api/apiWrappers.test.ts`, and `lib/api/apiAuthenticate.test.ts` - The now-unused `fromNodeHeaders` helper (and its `node:http` import) and its tests in `lib/api/apiHelpers.ts` / `lib/api/apiHelpers.test.ts` **Changed:** - Updated comment in `lib/server/configcat.ts` from `apiAuthenticate` to `authenticateRequest` ## Review instructions 1. Confirm `git grep -E "NextApiRequest|NextApiResponse|compat/next/api|toWebHandler|fromNodeHeaders|from 'next'" apps/studio/` returns no matches. 2. Run `pnpm --filter studio run typecheck`, `pnpm knip --workspace apps/studio`, and `pnpm --filter studio exec vitest run lib/api/ tests/routes/api/ scripts/__tests__/server-source-maps.test.ts`. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
ccd691423b |
[FE-5114] (part 6) – refactor(studio): migrate platform storage routes (#54033)
## Problem Studio's `routes/api/platform/storage/**` routes still run legacy Next Pages Router handlers through `compat/next/api.ts`, and `buckets/$id/objects/download.ts` has no remaining callers. Part 6 of 7 for [FE-5114](https://linear.app/supabase/issue/FE-5114/rewrite-api-routes-as-native-tanstack-start-handlers-and-remove-the) migrates the 14 active storage routes to native TanStack Start handlers and removes the unused download route. ## Solution **Changed:** - Migrated 14 `buckets/**` and `vector-buckets/**` routes to `createApiHandlers` and `parseJsonBody` - Replaced the `parseAsInt`/`parseAsString`/`parseAsStringEnum` helpers in `buckets/index.ts` with a zod query schema that drops invalid values, keeping the conditional spreads so unset keys aren't sent to storage-js - Forwarded upstream `StorageError` status codes across all storage and vector-bucket routes via `storageErrorResponse` / `getStorageErrorStatus` (falling back to the route's default 400/500 when no valid HTTP status is present) - Guarded missing/invalid `SUPABASE_PUBLIC_URL` with a `500` error response in `objects/public-url`, `objects/sign`, and `objects/sign-multi` - Typed the `vector-buckets/$id/indexes` POST body from storage-js's `createIndex` options - Corrected stale `Allow` headers on `vector-buckets/$id` (`GET, DELETE`) and `vector-buckets/$id/indexes/$indexName` (`DELETE`) via `createApiHandlers` **Added:** - `lib/api/self-hosted/storage.ts` with `getStorageErrorStatus`, `storageErrorResponse`, `getStoragePublicOrigin`, `missingStoragePublicUrlResponse`, and `remapStoragePublicUrl` - Unit tests for `buckets/index` query parsing, `buckets/$id/objects/sign-multi` (`SUPABASE_PUBLIC_URL` guard, origin remapping, and upstream error status), and `vector-buckets` POST (exercising the real storage client through MSW) **Removed:** - Removed unused `routes/api/platform/storage/$ref/buckets/$id/objects/download.ts` and regenerated `routeTree.gen.ts` **Behavior changes vs master:** - `buckets` GET drops malformed `limit`/`offset`/sort values instead of `parseInt`-truncating them (e.g. `offset=1.5` is ignored rather than sent as `1`) - `vector-buckets` POST validates the body with zod and returns `400` when `bucketName` is missing or not a string - Storage routes forward the upstream HTTP status code from `StorageApiError` instead of hardcoding `400`/`500` - `objects/public-url`, `objects/sign`, and `objects/sign-multi` return a `500` JSON error when `SUPABASE_PUBLIC_URL` is unset or invalid instead of throwing an uncaught `TypeError` - Unused `buckets/$id/objects/download` route has been removed ## Review instructions 1. Run `pnpm --filter studio exec vitest run tests/routes/api/platform/storage/`. 2. On self-hosted Studio, create/list/empty/delete a storage bucket, upload/download/move/sign/delete an object, and check vector bucket operations. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
37414c5a61 |
[FE-5114] (part 5) – refactor(studio): migrate platform project routes (#54032)
## Problem Studio's `routes/api/platform/projects/**` routes still run legacy Next Pages Router handlers through `compat/next/api.ts`, and `projects/$ref/config/index.ts` and `projects/$ref/billing/addons.ts` are unused in self-hosted mode. Part 5 of 7 for [FE-5114](https://linear.app/supabase/issue/FE-5114/rewrite-api-routes-as-native-tanstack-start-handlers-and-remove-the) migrates the 19 active project routes to native TanStack Start handlers and removes the 2 unused routes. ## Solution **Changed:** - Migrated 19 project routes — analytics (`endpoints/$name`, `log-drains`, `log-drains/$uuid`), API proxies (`api/graphql`, `api/rest`), content snippets & folders (`content/**`), and config/settings/databases/lints/keys/monitoring routes — to `createApiHandlers` - Preserved FE-5124 fixes on `log-drains/$uuid` (empty-body `204` on `DELETE`, `try`/`catch` + `!response.ok` → `500`); its `Allow: GET, PUT, DELETE` and the previously stale `Allow` on `log-drains` (`GET, POST`) now come from `createApiHandlers` - Forwarded upstream error status and JSON body (falling back to `500` / `{ error: { message } }`) in `api/graphql` and `api/rest` - Parsed the JSON body once in `content/index.ts` `PUT` so the `not found` create fallback does not attempt to re-read the request stream - `content/index.ts` and `content/folders/index.ts` read query params through `getSearchParamsRecord`, so repeated `ids` (and repeated GET params on `content/index`) return `400` as they did with Next's query parsing - `run-lints` forwards headers via `constructHeaders(Object.fromEntries(request.headers))` **Added:** - `getSearchParamsRecord` in `lib/api/apiHelpers.ts`: collects URL search params into a record, mapping repeated keys to arrays so zod string schemas reject them - `folderQueryParamsSchema` and `listFolderContents(request, folderId?)` in `lib/api/snippets.utils.ts`, shared by `content/folders/index` and `content/folders/$id` - `getLogflareConfig()` in `lib/api/self-hosted/logflare.ts`: reads the Logflare env vars at call time (same `500` naming the missing vars) and builds the request URLs and headers for `analytics/log-drains` and `analytics/log-drains/$uuid` - Unit tests for `getSearchParamsRecord`, `analytics/endpoints/$name`, `analytics/log-drains/$uuid`, `content/index`, `content/folders`, and `api/rest` (`HEAD` and upstream error forwarding) **Removed:** - Removed 2 unused routes (`routes/api/platform/projects/$ref/config/index.ts` and `routes/api/platform/projects/$ref/billing/addons.ts`) and regenerated `routeTree.gen.ts` **Behavior changes vs master:** - `analytics/endpoints/$name` GET strips `name` and `ref` from the forwarded query (parity with master, where they arrived as route params in `req.query`) - `content/folders` and `content/folders/$id` GET validate query params and return `400` for invalid or repeated values - `api/graphql` and `api/rest` forward upstream non-OK status codes and error bodies instead of always returning `500` - Unused `projects/$ref/config/index` and `projects/$ref/billing/addons` routes have been removed ## Review instructions 1. Run `pnpm --filter studio exec vitest run lib/api/apiHelpers.test.ts tests/routes/api/platform/projects/`. 2. On self-hosted Studio, create/update/delete a log drain, create/save/delete a SQL snippet and folder, and verify REST/GraphQL API docs load. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
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) |
||
|
|
be32a941cd |
[FE-5114] (part 4) – refactor(studio): migrate platform auth and misc routes (#54031)
## Problem Studio's `routes/api/platform/auth/**` and platform misc/stub routes still run legacy Next Pages Router handlers through `compat/next/api.ts`, and 4 legacy database/props routes have no callers left. Part 4 of 7 for [FE-5114](https://linear.app/supabase/issue/FE-5114/rewrite-api-routes-as-native-tanstack-start-handlers-and-remove-the) migrates the 16 active routes to native TanStack Start handlers and removes the 4 unused ones. ## Solution **Changed:** - Migrated `platform/auth/$ref/{invite,magiclink,otp,recover}` to one-line `createAuthSenderHandlers` routes, and `users/index`, `users/$id/index`, and `users/$id/factors` to `createApiHandlers`, preserving the FE-5124 fixes (`Promise.all` MFA factor deletion, `code ?? 500` on auth senders, `Allow: PATCH, DELETE` on `users/$id`, now derived by `createApiHandlers`) - Migrated 9 platform misc/stub routes (`deployment-mode`, `integrations/{$slug,github/*}`, `organizations/{index,$slug/billing/subscription}`, `profile/index`, and `telemetry/event`) - Moved the `FETCH_TYPE_BYPASS_EXCEPTIONS` entries for the four sender routes in `eslint.config.cjs` to `lib/api/self-hosted/auth-senders.ts` **Added:** - `createAuthSenderHandlers(endpoint, field)` in `lib/api/self-hosted/auth-senders.ts`: shared POST handler for the self-hosted GoTrue `invite`, `magiclink`, `otp`, and `recover` endpoints (forwards only `email` or `phone`, uses `constructHeaders` with the service role key, and passes upstream errors through with `code ?? 500`) - Regression tests for `auth/$ref/users/$id/factors`, `auth/$ref/users/$id`, and all four auth sender routes **Removed:** - Removed 4 unused routes (`platform/database/$ref/pooling`, `platform/props/org/$slug`, `platform/props/project/$ref/index`, and `platform/props/project/$ref/api`) and regenerated `routeTree.gen.ts` ## Review instructions 1. Run `pnpm --filter studio exec vitest run tests/routes/api/platform/auth/`. 2. On self-hosted Studio, invite/ban/delete a user, remove MFA factors for a user, and confirm `GET /api/platform/auth/default/users/<id>` returns `405` with `Allow: PATCH, DELETE`. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
5fb027c28f |
feat(studio): launch week + builder day sign-ins redirect (#54317)
## Problem - dashboard sign-in sends a user back with `router.push(returnTo)`, and the path stays under `/dashboard` - lw16 card app at `/launch-week` (#54315) signs in with `returnTo=/launch-week?claim=1` and the user lands on a 404 at `/dashboard/launch-week?claim=1` - `validateReturnTo` rejects full urls, and the Builder Day site at `/builderday` has the same problem ## Solution - adds `/dashboard/launch-week` and `/dashboard/builderday` pages that load the same path outside the dashboard + keep the query and the hash - adds a test that a query with another address does not change the destination ## Preview links | Site | Live | Preview | Search for | | ---- | ---- | ------- | ---------- | | Studio | [/dashboard/launch-week?claim=1](https://supabase.com/dashboard/launch-week?claim=1) | [/dashboard/launch-week?claim=1](https://studio-git-antlio-studio-launch-week-return-supabase.vercel.app/dashboard/launch-week?claim=1) | the address bar | | Studio | [/dashboard/builderday](https://supabase.com/dashboard/builderday) | [/dashboard/builderday](https://studio-git-antlio-studio-launch-week-return-supabase.vercel.app/dashboard/builderday) | the address bar | ## Review instructions 1. open the preview [/dashboard/launch-week?claim=1](https://studio-git-antlio-studio-launch-week-return-supabase.vercel.app/dashboard/launch-week?claim=1) and make sure that the address changes to `/launch-week?claim=1` outside `/dashboard` 2. open the preview [/dashboard/builderday](https://studio-git-antlio-studio-launch-week-return-supabase.vercel.app/dashboard/builderday) and make sure that the address changes to `/builderday` 3. sign out and open the preview [/dashboard/sign-in?returnTo=%2Flaunch-week%3Fclaim%3D1](https://studio-git-antlio-studio-launch-week-return-supabase.vercel.app/dashboard/sign-in?returnTo=%2Flaunch-week%3Fclaim%3D1) 4. sign in and make sure that the browser ends at `/launch-week?claim=1` 5. sign out, open the preview [/dashboard/sign-in?returnTo=%2Forganizations](https://studio-git-antlio-studio-launch-week-return-supabase.vercel.app/dashboard/sign-in?returnTo=%2Forganizations) and make sure that the sign-in still returns to `/dashboard/organizations` ## 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) --------- Co-authored-by: Dion Zeneli <101271736+Dionysos288@users.noreply.github.com> |
||
|
|
8aaf216d22 |
docs: add Chloe Kavanagh as per onboarding process (#54385)
### Purpose As per onboarding doc- add my name to `humans.txt` file ### Solution Added my name as per instructions ### Review instructions Check that "Chloe Kavanagh" is in the list on the expected position. ### 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) |
||
|
|
c8378a0a32 |
docs: add Aaron Johnson to humans.txt (#54405)
## Problem My name is missing from the team list in `apps/docs/public/humans.txt`. ## Solution Add "Aaron Johnson" to the list. The entry sits after "Aaron Byrne" to keep the list in alphabetical order. ## Review category (docs PRs only) - [ ] Critical: needs a review as soon as possible - [ ] Urgent: the feature ships soon, or it's blocking something else - [ ] Moderate: good to have soon, not urgent - [x] Low: get to it when you can ## Review instructions 1. Open the diff for `apps/docs/public/humans.txt`. 2. Confirm that "Aaron Johnson" appears once, between "Aaron Byrne" and "Adam Howard". ## 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) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
dc4f247e79 |
Revert "chore: update prod api types (#54394)" (#54404)
This reverts commit
|
||
|
|
20a5212c42 |
[FE-5114] (part 3) – refactor(studio): migrate pg-meta and v1 routes (#54030)
## Problem Studio's `routes/api/platform/pg-meta/**` and `routes/api/v1/**` routes still run legacy Next Pages Router handlers through `compat/next/api.ts`, and 10 legacy `pg-meta` GET proxy routes are no longer called anywhere in the repo. Part 3 of 7 for [FE-5114](https://linear.app/supabase/issue/FE-5114/rewrite-api-routes-as-native-tanstack-start-handlers-and-remove-the) migrates the 9 active routes to native TanStack Start handlers and deletes the 10 unused proxy routes. ## Solution **Changed:** - Migrated `platform/pg-meta/$ref/query/index.ts` and all 8 `v1` routes (`api-keys`, `api-keys/$id`, `config/auth/signing-keys/{index,legacy}`, `database/migrations`, `functions/{index,$slug/index}`, `types/typescript`) to `createApiHandlers`; `query` and `database/migrations` share `pgMetaErrorResponse` - Enabled `{ withAuth: true }` on `api-keys`, `api-keys/$id`, and `config/auth/signing-keys/{index,legacy}` for consistency with the other `v1` routes - Updated `api-keys` route tests to use `callRoute` **Added:** - `pgMetaErrorResponse(error)` in `lib/api/self-hosted/pg-meta.ts` (keeps a `PgMetaDatabaseError`'s status and `{ message, formattedError }` payload expected by `data/error-classification.ts`, otherwise `500`) - Unit test for `pg-meta/$ref/query` (`tests/routes/api/platform/pg-meta/$ref/query/index.test.ts`) **Removed:** - Removed all 10 unused `pg-meta` GET proxy routes (`column-privileges`, `extensions`, `foreign-tables`, `materialized-views`, `policies`, `publications`, `tables`, `triggers`, `types`, `views`), removed their `FETCH_TYPE_BYPASS_EXCEPTIONS` entries from `eslint.config.cjs`, and regenerated `routeTree.gen.ts` - Removed `getPgMetaRedirectUrl` (`lib/api/apiHelpers.ts`) and `parseRevealQuery` (`lib/api/self-hosted/api-keys.ts`) **Behavior changes vs master:** - Routes forward only `cookie` and `x-connection-encrypted` to pg-meta via `constructHeaders(Object.fromEntries(request.headers))`, matching what master's adapter forwarded - `database/migrations` GET now forwards headers to `listMigrationVersions` (master passed them as the wrong argument) - `v1/projects/$ref/api-keys*` and `config/auth/signing-keys*` now pass `{ withAuth: true }` (no-op in self-hosted mode; consistent with the other `v1` routes) - The 10 unused `pg-meta` GET proxy routes have been removed (`pg-meta/$ref/query` and `v1/projects/$ref/types/typescript` remain) ## Review instructions 1. Run `pnpm --filter studio exec vitest run tests/routes/api/v1/ tests/routes/api/platform/pg-meta/`. 2. On self-hosted Studio, load tables/views/policies/extensions, run a query in the SQL Editor, check API keys, and generate TypeScript types. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
c5fca0a0d7 |
[FE-5114] (part 2) – refactor(studio): migrate AI API routes (#54029)
## Problem Studio's AI API routes under `routes/api/ai/**` still run legacy Next Pages Router handlers through `compat/next/api.ts`. Part 2 of 7 for [FE-5114](https://linear.app/supabase/issue/FE-5114/rewrite-api-routes-as-native-tanstack-start-handlers-and-remove-the) migrates the active AI routes to native TanStack Start (`Request` → `Response`) handlers and drops 3 unused AI endpoints. ## Solution **Changed:** - Migrated 8 active AI routes (`ai/code/complete`, `ai/feedback/{classify,rate}`, and `ai/sql/{check-api-key,cron-v2,filter-v1,generate-v4,title-v2}`) to `createApiHandlers` and `parseJsonBody` - Replaced Node `pipeUIMessageStreamToResponse` in `ai/sql/generate-v4.ts` with native `createUIMessageStreamResponse`, preserving the `x-braintrust-span-id` header - Replaced `req.on`/`res.on` in `ai/sql/generate-v4.ts` with `AbortSignal.any([request.signal, done.signal])` and a `TransformStream` whose `flush`/`cancel` tear down the MCP connection opened in `getTools` on stream completion, cancellation, or setup error - Removed the custom malformed-JSON handling in `ai/code/complete.ts` in favor of the wrapper's `400` - Updated `lib/api/generate-v4.test.ts` to assert against the real native SSE `Response` stream instead of mocking `pipeUIMessageStreamToResponse`, with a shared `mockOpenStream()` helper, a stream-cancellation abort test, and a Braintrust tracing test asserting `x-braintrust-span-id` matches the exported root span - Updated `lib/ai/README.md` to drop references to removed endpoints **Removed:** - Removed 3 unused AI routes (`routes/api/ai/onboarding/design.ts`, `routes/api/ai/sql/parse-client-code.ts`, and `routes/api/ai/sql/policy.ts`), dropped them from `lib/hosted-api-allowlist.ts`, and regenerated `routeTree.gen.ts` - Removed the now-unused `withoutApprovalTools` helper from `lib/ai/tool-filter.ts` and its test from `lib/ai/tool-filter.test.ts` **Behavior changes vs master:** - `ai/code/complete` returns the wrapper's `400` JSON `{ error: { message: 'Invalid JSON' } }` for malformed bodies - Unused `ai/onboarding/design`, `ai/sql/parse-client-code`, and `ai/sql/policy` endpoints have been removed ## Review instructions 1. Run `pnpm --filter studio exec vitest run lib/api/generate-v4.test.ts lib/api/rate.test.ts lib/ai/tool-filter.test.ts`. 2. Send a prompt in the AI Assistant panel, verify streaming output, and cancel mid-stream. 3. Trigger SQL title, cron, and filter generation as well as AI code completion. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
a27ef81d2e |
feat(studio): enable advanced V3 deployment for allowlisted organizations (#53158)
## Problem Currently, in production, the Supabase UI doesn't allow for a set of advanced deployment options, that we need to properly test new clusters before getting those into production. ## Solution Allow production dashboard requests to specify an AWS_K8S cluster when the organization is included in the comma-separated `orgsAllowedToUseV3AdvancedDeployment` setting. Limited the exception to cluster placement fields. Preserve existing permissions and cluster validation, require force for cordoned clusters, and keep system requests supported. Default the allowlist to empty. Updated the API descriptions and document ConfigCat setup. ## Review instructions - ## 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) |
||
|
|
431a55435a |
fix(studio): keep the function overview range in logs FE-4973 (#53867)
## Problem An Edge Function’s Overview can show an invocation from two hours ago. Selecting **Open logs** or pressing **O** then **L** opens the function’s Logs page with its default one-hour window, which hides that invocation. ## Fix Both actions now pass the start and end of the selected Overview window to the function’s Logs page. ## How to test 1. Open an Edge Function with invocations in the last three hours and select the three-hour interval on Overview. 2. Select **Open logs**. Check that Logs opens for the same function and the date range spans exactly three hours. If an invocation is older than one hour, confirm it appears in that range. 3. Return to Overview, select three hours again, and press **O** then **L**. Check the same function and time range. Related to [FE-4973](https://linear.app/supabase/issue/FE-4973). ## Verification On the Studio staging preview, both **Open logs** and **O** then **L** opened the same function with the exact Overview timestamps, 13:03:16.960 through 16:03:16.960 UTC. The results included a successful invocation more than one hour before the window ended. All 72 focused Overview and Logs navigation tests passed. Removing the date range from either entry point independently failed its regression assertion. |
||
|
|
b6c391a058 |
[FE-5114] (part 1) – refactor(studio): add native API helpers & routes (#54028)
## Problem Studio's `routes/api/**` server routes still run legacy Next Pages Router handlers through the `toWebHandler` shim in `compat/next/api.ts`. Part 1 of 7 for [FE-5114](https://linear.app/supabase/issue/FE-5114/rewrite-api-routes-as-native-tanstack-start-handlers-and-remove-the) adds native TanStack Start (`Request` → `Response`) helpers and migrates the top-level utility routes so we can remove the adapter at the end of the stack. ## Solution **Added:** - `createApiHandlers` in `lib/api/apiWrapper.ts`: wraps native TanStack Start route handlers with optional platform JWT auth, JSON `400` (`{ error: { message: 'Invalid JSON' } }`) on `InvalidJsonError`, Sentry capture + generic `500` on unexpected throws, and an `ANY` handler that returns `405` with an `Allow` header derived from the registered methods. Exports `ApiHandler` / `ApiHandlerContext` (`params` is `Record<string, string>`) - `authenticateRequest` in `lib/api/apiAuthenticate.ts` (Web `Request` counterpart of `apiAuthenticate`, same error messages) - `InvalidJsonError` and `parseJsonBody` in `lib/api/apiHelpers.ts` - `callRoute(route, request, params)` test helper in `tests/lib/server-route.ts` - Unit tests for `createApiHandlers` (exercising real `authenticateRequest` through MSW in `lib/api/createApiHandlers.test.ts`), `authenticateRequest`, `parseJsonBody`, `/api/generate-attachment-url`, and `/api/integrations/stripe-sync` **Changed:** - Updated `getRouteHandler` in `tests/lib/server-route.ts` to mirror TanStack Start's `HEAD` → `GET` → `ANY` dispatch order - Migrated 11 top-level API routes (`check-cname`, `cli-release-version`, `content/graphql`, `edge-functions/test`, `enabled-features-overrides`, `generate-attachment-url`, `get-deployment-commit`, `get-ip-address`, `get-s3-keys`, `get-utc-time`, `integrations/stripe-sync`) to native handlers - Added `withAuth: true` to `check-cname`, `content/graphql`, and `integrations/stripe-sync`, and updated `check-cname-mutation.ts` and `data/graphql/execute.ts` to attach `constructHeaders()` - Reused `withAuth` `claims` in `generate-attachment-url` to avoid a duplicate GoTrue lookup in platform mode - Converted `tests/routes/api/get-deployment-commit.test.ts` to `callRoute` **Removed:** - Removed 2 unused routes (`routes/api/connect/index.ts` and `routes/api/parse-query.ts`), dropped `/parse-query` from `lib/hosted-api-allowlist.ts`, removed Nitro's `traceDeps: ['libpg-query*']` in `vite.config.ts` (no server runtime route imports `libpg-query` anymore), and regenerated `routeTree.gen.ts` **Behavior changes vs master:** - Methods a route doesn't register now get a JSON `405` with an `Allow` header (previously they fell through to the SSR app). `HEAD` requests that TanStack Start dispatches to a `GET` handler also get `405`, matching master's method switches - `InvalidJsonError` returns JSON `{ error: { message: 'Invalid JSON' } }` (`400`) instead of plain text - `check-cname`, `content/graphql`, and `integrations/stripe-sync` now verify the platform JWT via `withAuth: true` - Unexpected throws return a generic `500` with `{ error: { message: 'Internal Server Error' } }` - Unused `/api/connect` and `/api/parse-query` routes have been removed ## Review instructions 1. Run `pnpm --filter studio exec vitest run lib/api/apiAuthenticate.test.ts lib/api/apiHelpers.test.ts lib/api/apiWrappers.test.ts lib/api/createApiHandlers.test.ts tests/routes/api/ scripts/__tests__/server-source-maps.test.ts`. 2. Smoke-test `/api/get-deployment-commit`, `/api/check-cname`, `/api/content/graphql`, `/api/generate-attachment-url`, and `/api/edge-functions/test` in Studio and confirm unsupported HTTP methods return `405` with an `Allow` header. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
cebd7a5eba |
docs(ref): add Kotlin v4 alpha reference (#54384)
## This PR - Adds a v4 alpha reference for Kotlin at `/reference/kotlin/v4`, using the prerelease flag from #53896. - v3 stays the default at `/reference/kotlin`. v4 shows the alpha notice and is listed under "Prereleases" in the version menu. - `spec/supabase_kt_v4.yml` is the v3 spec with links updated to `supabase/supabase-kt`. The API is the same in v4. - New `introduction`, `installing` (with `io.supabase` coordinates) and `upgrade-guide` pages under `docs/ref/kotlin/v4/`. ## Why - supabase-kt `4.0.0-alpha-1` is on Maven Central. It's the first official release of the Kotlin SDK and moves it to the `io.supabase` Maven group and package. The current reference only shows the v3 coordinates. ## Note - Guides, quickstarts and the existing v3 pages are unchanged. They switch to `io.supabase` with the stable 4.0.0 release. - Search doesn't index prerelease versions yet, same as Swift v3. - I didn't run the docs build locally. Please check `/docs/reference/kotlin/v4` and `/docs/reference/kotlin/v4/upgrade-guide` on the preview. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Safa <4990386+safaorhan@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
e58fa85e6c |
docs: correct py and kt deleteFactor claim that it signs the user out (#54361)
The Python and Kotlin `deleteFactor` reference notes said deleting a verified factor logs the user out of all active sessions, but the server only downgrades sessions that reached `aal2` with that factor to `aal1`. This updates the notes to describe what actually happens, matching the JS reference fix in supabase/supabase-js#2939. |
||
|
|
37d4f444b4 |
chore: update prod api types (#54394)
Updated API types and addressed any type issues. Had to update shared-types alongside. |
||
|
|
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> |
||
|
|
3e4ee05bfd |
docs(kotlin): add passkey, oauth server api, realtime filter docs (#49897)
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Docs update **Authentication and Authorization Enhancements:** * Added documentation and examples for passkey-based authentication and registration, including manual flows for starting and verifying authentication and registration using the underlying API methods. * Introduced detailed documentation for OAuth 2.1 server features, including methods for retrieving authorization details, approving/denying authorizations, listing grants, and revoking grants. **Query and Data Filtering Improvements:** * Added a new `dryRun()` (limit) function, allowing users to limit query results by count, with support for specifying a referenced table. * Updated `selectAsFlow` and `postgresListDataFlow` examples to demonstrate the use of inline filter lambdas, making it easier to filter results (e.g., by `id`). * Enhanced `postgresChangeFlow` example to show how to apply optional filters using a lambda. **Realtime and System Events:** * Added an example for listening to system updates via `systemFlow()` on a channel, including configuration for broadcasting system messages (e.g., replication readiness). --------- Co-authored-by: Safa Orhan <safaorhan@users.noreply.github.com> |
||
|
|
f4a929907b |
chore(studio): promote jsx-a11y/heading-has-content to error (#54320)
## Problem `jsx-a11y/heading-has-content` is tracked by the Studio ESLint ratchet with a baseline of 0 violations. The ratchet stops new violations from adding up, but the rule is still only a warning, so the editor and `lint` don't flag a new empty heading as an error. ## Solution Promote the rule to `error` in the Studio ESLint config, and remove its ratchet bookkeeping from `.github/eslint-rule-baselines.json` and `scripts/ratchet-rules.json`. No source file breaks the rule, so no code changes are needed. ## How to verify 1. `pnpm --filter studio run lint:ratchet` reports no regressions. 2. `pnpm --filter studio run lint` reports 0 errors. 3. `pnpm exec eslint --print-config <any studio file>` from `apps/studio` shows `jsx-a11y/heading-has-content` at severity 2 (error). ## Checks Ran `pnpm --filter studio run lint:ratchet` (no regressions), `eslint .` in `apps/studio` (0 errors, no `heading-has-content` findings), `eslint --print-config` (rule resolves to error), and `oxfmt --check` on the changed files. Skipped the typecheck because no TypeScript file changed. ## 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-5253](https://linear.app/supabase/issue/FE-5253/weekly-eslint-ratchet-review-for-supabasesupabase-appsstudio). Tedd doesn't read comments on this PR. Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com> |
||
|
|
e395e057cf |
[FE-5108] (part 6) chore(studio): remove next/link shim and Vite alias (#54309)
Part 6 (final) 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 | Remaining `components/interfaces/**` (Org, Billing, Auth, Support, Home, SignIn, ConnectSheet, etc.) | | **6** | **#54309 ← this PR** | **Remove `compat/next/link.tsx` shim, Vite alias, and update basePath tests/docs** | Now that no files in `apps/studio` import `next/link`, deletes `compat/next/link.tsx` and removes its Vite alias so any future `next/link` import fails the build. **Removed:** - `apps/studio/compat/next/link.tsx` - `'next/link'` entry from `nextShims` in `apps/studio/vite.config.ts` **Changed:** - Moved `apps/studio/compat/next/link-basepath-navigation.test.tsx` to `apps/studio/lib/navigation-basepath.test.tsx` to keep basePath navigation coverage for `DynamicLink` and `navigateToUrl` - Updated `nextCompat()` error text in `apps/studio/vite.config.ts` and routing docs in `apps/studio/AGENTS.md` to reflect that only `next/script` remains shimmed - Cleaned up stale `next/link` / `Link shim` comments in `apps/studio/lib/internal-url.ts`, `apps/studio/lib/router-url-shape.test.tsx`, and `knip.jsonc` Addresses [FE-5108](https://linear.app/supabase/issue/FE-5108/replace-the-nextlink-shim-with-tanstack-link) ## To test - [ ] Confirm `git grep -E 'next/link|compat/next/link' apps/studio knip.jsonc` returns zero matches - [ ] Confirm Studio typecheck, ESLint ratchet, Knip, production Vite build, and Vitest suite pass - [ ] Spot-check `apps/studio/lib/navigation-basepath.test.tsx` and `apps/studio/lib/router-url-shape.test.tsx` Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
6bd006dc08 |
feat(docs): layout toggle (#53688)
## Problem - docs layout v2 (variant `option-1` of the `docs-ia-mvp-v1` flag) is about to roll out and a reader in the rollout has no way back to the classic layout ## Solution - adds a toggle button bottom of the guide right column so user in the rollout can switch back - adds a dialog that asks for an optional reason when a reader switches back to classic, and stores the reason in `feedback_comments` with `metadata.source = 'docs_layout_switch'` so we relying on existing - adds the `docs_layout_updated` event and stops new experiment exposures for readers who picked a layout | toggle | survey | | -------|------| | <img width="654" height="312" alt="image" src="https://github.com/user-attachments/assets/69bcd4b8-7dd2-4fd3-9045-e3246625ccf9" /> | <img width="654" height="312" alt="image" src="https://github.com/user-attachments/assets/4b18eb76-b9f1-4d96-be25-14a960b11475" /> | <!-- ## Preview links If relevant, include links to changed pages for easy review access. Copy the preview base URL from the Vercel bot comment on this PR. Use the following table as an example template. | Site | Live | Preview | Search for | | -------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------- | | WWW | [/blog/your-post](https://supabase.com/blog/your-post) | [/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post) | unique phrase from the change | | Docs | [/docs/guides/your-page](https://supabase.com/docs/guides/your-page) | [/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page) | unique phrase from the change | | Studio | [/dashboard](https://supabase.com/dashboard) | [/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard) | unique phrase from the change | | Design system | [/design-system](https://supabase.com/design-system) | [/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system) | unique phrase from the change | | UI library | [/library](https://supabase.com/library) | [/library](https://ui-library-git-branch-name-supabase.vercel.app/library) | unique phrase from the change | | Knowledge base | [/kb/guides/your-page](https://supabase.com/kb/guides/your-page) | [/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page) | unique phrase from the change | --> <!-- ## Additional context Optionally add any other context or screenshots. --> ## Review instructions 1. open [/docs/guides/database/prisma?docs-ia-mvp-v1=option-1](https://docs-git-antlio-feat-docs-layout-switch-v2-supabase.vercel.app/docs/guides/database/prisma?docs-ia-mvp-v1=option-1) 2. click "Switch to classic layout" in the notice and make sure that a dialog asks "What made you switch back?" ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) |
||
|
|
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> |
||
|
|
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 |
||
|
|
df798783e1 |
[FE-5108] (part 4) refactor(studio): migrate integrations, settings & observability off next/link (#54307)
Part 4 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 ← this PR** | **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 `components/interfaces/{Integrations,Settings,Observability,LogDrains,Issues,Linter,Reports,QueryPerformance,QuerySources,ConfigDrift,DiskManagement,Compute}/` off `next/link`. **Changed:** - Replaced `next/link` across all 72 files in Integrations, Settings, Observability, LogDrains, Issues, Linter, Reports, QueryPerformance, QuerySources, ConfigDrift, DiskManagement, and Compute interfaces - Updated legacy permanent-redirect hrefs (`/settings/database` → `/database/settings`, `/settings/vault/secrets` → `/integrations/vault/secrets`, `/reports/database#database-size-report` → `/observability/database#database-size-report`) to canonical routes - Flattened legacy nested `<Link><a>...</a></Link>` markup in `DatabaseReadOnlyAlert.tsx` and dropped `passHref` in `Integrations/Queues/QueueTab.tsx` - Standardized external `target="_blank"` anchors with `rel="noreferrer noopener"`, switched `ObservabilityOverviewFooter.tsx` to `InlineLink` + `DOCS_URL`, and applied `InlineLinkClassName` to the typed billing links in `DatabaseReadOnlyAlert.tsx` per review feedback - Removed `vi.mock('next/link', ...)` from `Settings/General/Project.test.tsx` and `MobileIssuesNavigation.platform.test.tsx` Addresses [FE-5108](https://linear.app/supabase/issue/FE-5108/replace-the-nextlink-shim-with-tanstack-link) ## To test - [ ] Navigate across Integrations (marketplace, cron, queues, wrappers, Vercel/GitHub), Settings (database, infrastructure, read replicas, logs), Observability, Issues, and Compute pages - [ ] Verify Logs Preview → Logs Explorer links preserve multi-line SQL queries in search params - [ ] Verify billing and database-size links preserve query parameters and hash fragments --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
5be070974d | Add Data Processing Addendum v2 (effective December 1, 2026) (#54301) | ||
|
|
e0635f2f38 |
[FE-5108] (part 3) refactor(studio): migrate database, editors & storage off next/link (#54306)
Part 3 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 ← this PR** | **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 `components/interfaces/{Database,TableGridEditor,Storage,SQLEditor,BranchManagement,Branching,Functions,Realtime}/` off `next/link`. **Changed:** - Replaced `next/link` across all 60 importing files in Database, TableGridEditor, Storage, SQLEditor, BranchManagement, Branching, Functions, and Realtime interfaces - Updated legacy permanent-redirect hrefs (`/reports` → `/observability`, `/database/schema` → `/database/schemas`) to their canonical TanStack routes - Dropped legacy `passHref` in `GridHeaderActions.tsx`, removed duplicate `RouterLink` alias in `ChooseFunctionForm.tsx`, and removed `vi.mock('next/link', ...)` in `ReplicationPipelineLayout.test.tsx` Addresses [FE-5108](https://linear.app/supabase/issue/FE-5108/replace-the-nextlink-shim-with-tanstack-link) ## To test - [ ] Check Table Editor, SQL Editor, Database (tables, policies, functions, triggers, replication, backups), Storage (files/analytics/vector buckets), Edge Functions, Branching, and Realtime links - [ ] Verify SQL Editor and Table Editor links with query parameters (`schema`, `content`, `search`) do not double-encode values --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
6dd7062496 |
[FE-5108] (part 2) refactor(studio): migrate layouts & shell off next/link (#54305)
Part 2 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 ← this PR** | **`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 all `apps/studio/components/layouts/**` files and top-level navigation shell components off `next/link`. **Changed:** - Replaced `next/link` across `components/layouts/**` (`AccountLayout`, `AppLayout`, `AuthLayout`, `BranchLayout`, `DatabaseLayout`, `EdgeFunctionsLayout`, `ExplorerLayout`, `IssuesLayout`, `LogsLayout`, `Navigation`, `ObservabilityLayout`, `ProjectLayout`, `ProjectNeedsSecuring`, `SQLEditorLayout`, `SignInLayout`, `TableEditorLayout`, `Tabs`) and top-level shell components (`Sidebar.tsx`, `UserDropdown.tsx`, `LocalDropdown.tsx`, `HomePageActions.tsx`) - Removed `vi.mock('next/link', ...)` from `LocalDropdown.test.tsx` and `ProjectNeedsSecuring.test.tsx` - Added accessible labels where external icon/logo links switched from `<Link>` to plain `<a>` (`AdminStudioButton.tsx`, `ForgotPasswordLayout.tsx`) Addresses [FE-5108](https://linear.app/supabase/issue/FE-5108/replace-the-nextlink-shim-with-tanstack-link) ## To test - [ ] Navigate across top header, left sidebar, user/local dropdown, and project/org/branch switchers - [ ] Verify mobile navigation menu items and recent-tab links navigate with expected query params - [ ] Verify sign-in and forgot-password layout links work cleanly --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
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> |
||
|
|
477e2c136f |
[FE-5109] (part 6) chore(studio): remove next/router shims, aliases, and test mocks (#54058)
Part 6 (final) 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 | Remaining `components/interfaces/**` and `QueryInsightsTable` router events | | **6** | **#54058 ← this PR** | **Remove `next/router` & `next/compat/router` shims, `_router-events.ts`, Vite aliases, and test mocks** | Now that no files in `apps/studio` (or `packages/**`) import `next/router` or `next/compat/router`, deletes the router shims, `_router-events.ts`, their Vite aliases, and the obsolete router test mocks. `RouteValidationWrapper` is intentionally left for FE-3107. **Removed:** - `apps/studio/compat/next/router.ts`, `apps/studio/compat/next/compat/router.ts`, and `apps/studio/compat/next/_router-events.ts` - `'next/router'` and `'next/compat/router'` entries from `nextShims` in `apps/studio/vite.config.ts` - Global `vi.mock('next/router', ...)` and `vi.mock('next/compat/router', ...)` in `apps/studio/tests/vitestSetup.ts`, `mockNextRouter` in `apps/studio/tests/lib/route-aware-hooks.ts`, and the unused `vi.mock('next/router')` in `tests/features/logs/LogTable.test.tsx` - Obsolete shim tests and test helpers: `compat/next/router.test.ts`, `compat/next/router-navigation.test.tsx`, `tests/config/router.tsx`, and `tests/config/router.test.tsx` **Changed:** - Simplified `createNavigationHandler` in `apps/studio/lib/navigation.ts` (and `navigation.test.ts`) to accept TanStack's `UseNavigateResult<string>` only, dropping the `NextRouter` union branch - Updated `compat/next/link-basepath-navigation.test.tsx` (renamed from `router-basepath-navigation.test.tsx`), `lib/router-url-shape.test.tsx`, and `tests/lib/route-render.test.tsx` to exercise TanStack Router hooks directly instead of the removed router shim - Cleaned up stale `next/router` comments in `compat/next/link.tsx`, `lib/internal-url.ts`, `router.tsx`, and `tests/lib/route-mock.ts` **Simplified:** - Removed `routerMock` setup from about 19 tests that no longer read it. `next-router-mock` stays for now, because the test `FrameworkProvider` still feeds `useParams` from it. - `AGENTS.md` and the `vite.config.ts` error text now say only `next/link` and `next/script` are shimmed - Renamed `compat/next/router-basepath-navigation.test.tsx` to `link-basepath-navigation.test.tsx`, and removed stale router-shim references from comments Addresses [FE-5109](https://linear.app/supabase/issue/FE-5109/replace-the-nextrouter-shims-with-tanstack-router-hooks) ## To test - [ ] Confirm `git grep -E "next/(compat/)?router|_router-events" apps/studio` returns no code or config imports (only the prose guideline in `apps/studio/AGENTS.md`) - [ ] Confirm `pnpm --filter studio run typecheck`, `pnpm --filter studio run lint`, `pnpm --filter studio run build`, Knip, and the full Studio Vitest suite pass - [ ] Spot-check basePath navigation (`next/link` + `navigateToUrl`) and multi-line query param URLs in Studio --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
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> |
||
|
|
d8568215ad |
[FE-5109] (part 4) refactor(studio): migrate database, editor, storage, and functions interfaces off next/router (#54056)
Part 4 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 ← this PR** | **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 the database, branching, compute, functions, explorer, SQL editor, storage, and table editor interfaces off `next/router` and `next/compat/router`. **Changed:** - Migrated the sole `next/compat/router` consumer (`components/interfaces/Database/Replication/Destinations.tsx`) to `useNavigate` - Replaced `useRouter` across `BranchManagement`, `Branching`, `Compute`, `Database` (`Backups`, `Functions`, `Replication`, `Schemas`, `Tables`, `Triggers`), `EdgeFunctions`, `Explorer`, `Functions`, `SQLEditor`, `Storage` (`AnalyticsBuckets`, `FilesBuckets`, `VectorBuckets`, `StorageMenuV2`, `Storage.utils`), and `TableGridEditor` with TanStack Router hooks (`useNavigate`, `useLocation`, `useRoutePattern`) and `useParams` from `common` - Updated unit and component tests across `Database/Replication`, `Explorer`, `Functions`, and `Storage/FilesBuckets/DeleteBucketModal.test.tsx` to use TanStack Router **Simplified:** - `useSnippetEditor` and `useRedirectLegacyReadReplicaDestination` read search values from `useParams` instead of casting `location.search` - `resolveSourceSwitch` returns `replace: boolean` instead of a `push`/`replace` method name - `ExplorerQueryTab` and `EdgeFunctionDetails` guard on a defined ref instead of navigating with `ref ?? ''` - `useFunctionsDetailShortcuts` and `StorageMenuV2` use a local `goTo` helper for their navigation shortcuts - Tests use the shared `createTestRouter` and `customRender` router, use `toMatchObject` for search assertions, and drop duplicate assertions Addresses [FE-5109](https://linear.app/supabase/issue/FE-5109/replace-the-nextrouter-shims-with-tanstack-router-hooks) ## To test - [ ] SQL Editor: creating, renaming, moving, opening templates/examples, and keyboard shortcuts navigate between snippets cleanly - [ ] Table Editor & Database: opening tables, schema table nodes, triggers, functions, backups/PITR, and replication destination flows navigate as expected - [ ] Storage: switching between Files, Analytics, and Vector buckets and deleting a bucket navigates cleanly - [ ] Edge Functions & Explorer: opening function details/logs, explorer chat/query tabs, and branch management actions navigate properly --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
57d40e4705 |
[FE-5109] (part 3) refactor(studio): migrate layout components off next/router (#54055)
Part 3 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 ← this PR** | **`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 `apps/studio/components/layouts/**` files and the studio tab router integration off `next/router`. **Added:** - `useTabRouter()` in `apps/studio/state/tabs.tsx` so tab state actions navigate via TanStack's `useNavigate` + `navigateToUrl` instead of taking a `NextRouter` instance **Changed:** - Replaced `useRouter` across all layout directories (`AccountLayout`, `AdvisorsLayout`, `AppLayout`, `AuthLayout`, `BranchLayout`, `ComputeLayout`, `DatabaseLayout`, `DefaultLayout`, `EdgeFunctionsLayout`, `ExplorerLayout`, `LogsLayout`, `Navigation/*`, `ObservabilityLayout`, `OrganizationLayout`, `ProjectLayout`, `ProjectNeedsSecuring`, `ProjectSettingsLayout`, `RealtimeLayout`, `SQLEditorLayout`, `SignInLayout`, and `Tabs`) with TanStack Router hooks (`useNavigate`, `useLocation`, `useRoutePattern`) and `useParams` from `common` - Updated `ProjectDropdown.utils.ts` and `ProjectDropdown.test.ts` to work with TanStack `$param` route templates - Updated layout component tests (`AccountLayout.selfhosted.test.tsx`, `AdvisorsNavigationShortcuts.test.tsx`, `BranchLink.test.tsx`, `ExplorerLayout.test.tsx`, `ExplorerNavChats.test.tsx`, `ObservabilityMenu.utils.test.tsx`, `MobileIssuesNavigation.platform.test.tsx`, `ProjectLayout/index.test.tsx`, `ProjectNeedsSecuring.test.tsx`, `ProjectDropdown.test.tsx`) **Simplified:** - `OrganizationLayout` and `SettingsLayout` match against `useRoutePattern()` instead of the real pathname. An org slug ending in a settings segment (e.g. `acmeapps`) no longer gets the settings title. - `ProjectSettings.Commands` opens the Connect sheet through nuqs, the same way `Connect.Commands` does - `OrgMenuContent`, `OrganizationSettingsMenu` and `useTabRouter` read `orgSlug`/`schema` from `useParams` instead of casting `location.search` - Removed the dead `getPathnameWithoutQuery` helpers and their tests - `usePreservedQueryParams` builds its string in the `useLocation` selector (no `useMemo`), and `UnhealthyState` only navigates when `ref` is set - Moved `MobileIssuesNavigation.platform.test.tsx` onto a TanStack test router. It now covers the active-route logic again. - 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 - [ ] Switching projects, organizations, and branches from the top header dropdowns preserves the current sub-route where supported - [ ] Opening, switching, and closing Table Editor / SQL Editor tabs updates the URL and active tab cleanly - [ ] Active sidebar item highlighting works across Database, Auth, Edge Functions, Observability, Logs, Realtime, Explorer, and Project Settings layouts - [ ] Mobile navigation menu and floating toolbar sheets open and navigate properly --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
bd4912cbdc |
feat(studio): track SQL editor sidebar, snippet and editor tab usage (#54170)
## Context Adds seven PostHog events through `useTrack` for the SQL Editor to better identify usage patterns there, each fired from its click or submit handler: - `sql_editor_new_item_clicked` (`itemType`) for the "+" menu. <img width="229" height="150" alt="image" src="https://github.com/user-attachments/assets/f6281bdb-d70e-4e7c-adf3-edce0ec2116c" /> - `sql_editor_snippet_search_submitted`: once per search session, on the first keystroke into an empty search box. <img width="285" height="214" alt="image" src="https://github.com/user-attachments/assets/4c482385-cab1-49d3-9aaa-e2be1aafb1af" /> - `sql_editor_snippet_sort_updated` (`sortBy`) when the sort order changes. <img width="226" height="121" alt="image" src="https://github.com/user-attachments/assets/0e7268ee-bf4a-46d4-ba8d-f07a6e9b0675" /> - `sql_editor_snippet_action_clicked` (`action`, `isBulk`) for snippet and folder context-menu actions. <img width="254" height="275" alt="image" src="https://github.com/user-attachments/assets/7338df06-47df-47be-b44d-6fc2dd49c586" /> - `sql_editor_snippet_share_submitted` when the share modal is confirmed. <img width="531" height="309" alt="image" src="https://github.com/user-attachments/assets/997e7567-9fdb-400e-af1a-147a5dcbb7a7" /> - `sql_editor_snippet_moved` (`snippetCount`, `toNewFolder`) after a move succeeds. <img width="539" height="247" alt="image" src="https://github.com/user-attachments/assets/f0da9544-d29e-402f-a0d3-9b7f5e3fa3c6" /> - `editor_tab_closed` (`closeType`, `editor`) in the tab bar that the SQL, Table and Explorer editors share. It fires when the tabs actually close, after any unsaved-changes confirmation. <img width="147" height="64" alt="image" src="https://github.com/user-attachments/assets/96073c69-acf1-4829-8532-beb283b7f373" /> No property carries names, SQL or search text, and every event is sent with an explicit `track()` call. ## How to verify On the PR's Studio preview, with analytics consent accepted, watch the network requests to the telemetry endpoint: 1. In the SQL editor, open the "+" menu and pick a new snippet, a new folder and (when available) a new logs query. Each one sends `sql_editor_new_item_clicked` with the matching `itemType`. 2. Type into the snippet search box. One `sql_editor_snippet_search_submitted` goes out on the first character, and none on later ones. Clear the box and type again: one more goes out. 3. Change the sort to Alphabetical, then to Created At. Each change sends `sql_editor_snippet_sort_updated` with `sortBy` `name` or `inserted_at`. Picking the current sort again sends nothing. 4. Right-click a snippet and pick each action (open in new tab, rename, move, share, unshare, duplicate, add to or remove from favorites, export, delete). Each sends `sql_editor_snippet_action_clicked` with that `action` and `isBulk: false`. Shift-click several snippets and pick move or delete: `isBulk: true`. 5. Right-click a folder and pick create snippet, rename or delete: `action` is `folder_create_snippet`, `folder_rename` or `folder_delete`. 6. Confirm the share modal: `sql_editor_snippet_share_submitted` goes out. Move a snippet into a new folder: after it succeeds, `sql_editor_snippet_moved` goes out with `snippetCount: 1, toNewFolder: true`. 7. In the SQL editor and the Table editor tab bars, use Close, Close Others, Close to the Right and Close All, and the tab's X button. Each sends `editor_tab_closed` with the matching `closeType` and `editor`. If you cancel an unsaved-changes prompt, nothing is sent. --------- Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com> Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
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 |
||
|
|
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. |
||
|
|
1eef82327a |
Add TZP Group case study (#54347)
## Problem The TZP Group case study is ready to publish. Tracked in [MARKET-2535](https://linear.app/supabase/issue/MARKET-2535/case-study-tzp-group). ## Solution - Adds `apps/www/_customers/tzp-group.mdx` and the TZP Group logos (`on-light` and `on-dark` PNGs). - Moves "Key results" to the end of the TZP Group case study. - Moves "Key results" to the end of the Assignar case study too, so the two match. This changes a page that is already live. ## Preview links | Site | Live | Preview | Search for | | ---- | ---- | ------- | ---------- | | WWW | /customers/tzp-group | Vercel bot comment | One platform to rule them all | 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Wendie Cheung <wendie.cheung@supabase.io> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
64433ecf69 |
chore(github): drop review day counts from PR template (#54337)
## Problem Follow-up to [#54089](https://github.com/supabase/supabase/pull/54089), tracked in [DOCS-1590](https://linear.app/supabase/issue/DOCS-1590). The blocked-PR callout uses `[!WARNING]`, which signals risk rather than a merge dependency. The review categories also list review deadlines in business days, which the template doesn't need to commit to. ## Solution - The blocked-PR callout uses `[!IMPORTANT]`. - The review categories no longer list a number of days. The section still asks Supabase team members to select one category, and PRs from forks are still reviewed as Low. ## Review instructions 1. Read the diff to `.github/pull_request_template.md`. 2. Confirm the four category labels (`- [ ] Critical`, `Urgent`, `Moderate`, `Low`) still start the same way. ## 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) |
||
|
|
a5638ed9e2 |
fix(docs): check every changed page for broken links in Docs E2E (#53899)
## Problem The Docs E2E suite tests the guide pages a PR changes, but only the first 20 in sorted order. It drops the rest without a warning, so the check passes green with pages untested. That let a broken link through in #53561. The PR changed 62 guides, `delete-project` ranked 23rd, and the suite never loaded it. The link was missing its leading slash and resolved to a nested URL that returns 404 (fixed in #53871). A check that skips pages arbitrarily can't be relied on to catch the mistake it exists to catch. ## Solution The link check now runs on every changed page, with no cap. The accessibility scan no longer runs on pull requests, because it's slow and only checks the pages a diff names. A scheduled whole-site run fits it better, and that's tracked in [DOCS-1816](https://linear.app/supabase/issue/DOCS-1816/run-the-docs-e2e-accessibility-scan-on-a-schedule-across-the-whole). The `@a11y` tests stay in the suite, and `pnpm e2e:docs:a11y` still runs them. - The resolver returns every in-scope page. The 20-page cap is gone. - The workflow runs the suite with `--grep-invert @a11y`, so CI runs skip the accessibility scans. That includes manual `workflow_dispatch` runs, which ran them before. DOCS-1816 covers when CI runs them again. - Past 20 pages the suite runs on 3 workers instead of 1, the same as the Studio suite. - The suite no longer stops after 3 failed tests, so a run reports every page with a broken link. A broken link in a shared partial can fail many pages, and stopping at 3 left the rest unchecked. - The Docs E2E job now runs the harness unit tests (`pnpm -C e2e/docs test`) when `e2e/docs` or `e2e/shared` changes. No workflow ran them before, and harness-only changes skip Playwright. ## Run time Most PRs change few pages, so the added time is small. I looked at 51 recent merged PRs that touched guides: 67% changed 1 page, 20% changed 2-5, 8% changed 7-11, and 6% (3 PRs) changed 62-82. On the Vercel preview the link test takes about 6.5s per page. Estimated run time on the preview, excluding setup and retries. Skipping the accessibility scan (about 6.4s per page) offsets the extra link checks: | Pages changed | Before (capped at 20, link check and accessibility scan, 1 worker) | This PR (every page, link check only, 3 workers past 20) | | ------------- | ------------------------------------------------------------------ | -------------------------------------------------------- | | 1 | ~13s | ~7s | | 5 | ~1.1 min | ~0.5 min | | 11 | ~2.4 min | ~1.2 min | | 82 | ~4.3 min (62 pages unchecked) | ~3 min | On production, 40 link tests took 50s on one worker and 13s on four, so workers scale close to linearly. I haven't run a large page list in the CI workflow, and the Vercel preview might throttle 3 workers at once. If it does, lower the worker count in `playwright.config.ts`. CI retries a failing test up to 2 times, so a failing page can cost 3 runs. Since the suite no longer stops after 3 failures, a change that breaks many pages pays that cost for each of them. The job times out at 30 minutes, which the link check alone would reach at roughly 800 pages on 3 workers. ## Review instructions 1. Run `pnpm -C e2e/docs test` and confirm the scope tests pass, including the 82-page case. 2. Pipe 82 changed guide paths into the scope CLI and confirm `paths` lists all 82: ```bash printf 'apps/docs/content/guides/ai/%s.mdx\n' {1..82} | pnpm -C e2e/docs resolve-docs-scope ``` 3. List the tests the workflow runs for 3 pages and confirm there are 4 (1 guard, 3 link) and none for accessibility: ```bash cd e2e/docs && PLAYWRIGHT_BASE_URL=https://supabase.com DOCS_E2E_PAGE_PATHS=/docs/guides/auth,/docs/guides/database/overview,/docs/guides/storage pnpm exec playwright test --grep-invert @a11y --list ``` 4. Run the link test on 4 pages that don't exist and confirm all 4 fail, rather than the run stopping after 3: ```bash cd e2e/docs && PLAYWRIGHT_BASE_URL=https://supabase.com DOCS_E2E_PAGE_PATHS=/docs/guides/zz-nope-1,/docs/guides/zz-nope-2,/docs/guides/zz-nope-3,/docs/guides/zz-nope-4 pnpm exec playwright test --grep "loads and" ``` 5. Check that this PR's Docs E2E job runs the "Run docs E2E harness unit tests" step and that it passes. Verified locally: unit tests, the scope CLI with 82 paths, the test list above through the same `pnpm run e2e:docs --grep-invert @a11y` command the workflow uses, and the 4-failure run. Resolves [DOCS-1749](https://linear.app/supabase/issue/DOCS-1749/warn-instead-of-silently-skipping-pages-in-docs-e2e-when-a-pr-exceeds) ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
fb37145641 |
docs(skills): the docs review gives each new sentence a verdict and checks each claim (#54082)
## Problem [#53996](https://github.com/supabase/supabase/pull/53996) passed an author review, two agent readers, and a full agent review, and still needed [#54013](https://github.com/supabase/supabase/pull/54013) to fix it. The new section repeated three sections of the same page, described worker-pool internals that a reader can't configure, and left the Functions architecture guide saying the opposite. `review-the-docs` and the style guide already named repeated facts. The rule didn't hold, for these reasons: - The Content review listed problems as examples ("they aren't the full list"), and its checklist asked only that "each problem is reported". A light review and a full one produced the same report. - No rule gave content problems a severity, and core rule 6 called style notes suggestions. - No rule covered internals the reader can't act on, or a statement on another page that says the opposite. - The review had no claim check of its own. `write-the-docs` has an accuracy pass, but a review runs on its own and can't count on the author having used that skill. `test-the-docs` runs only snippets. Tedd's own review skills filled these gaps with stricter copies of the rules, so people, Tedd, and CodeRabbit reviewed against different rules. Closes [DOCS-1806](https://linear.app/supabase/issue/DOCS-1806/the-docs-review-checks-each-claim-and-gives-each-new-sentence-a) ## Solution **The Content review in `review-the-docs` asks for a verdict on each item.** Each new and changed sentence gets a verdict, and so does the sentence right after each change. Each of these problems is a blocker: - A repeated fact - A disagreement with the docs, searched for in `apps/docs/content/` and `apps/kb/src/content/` by the behavior's terms. The published page can be the wrong one, so the Fact check decides which sentence is true, and the change fixes the wrong one - Mechanism the reader can't act on - Detail that only fits one reporter's case. The fix for one error, or an answer that depends on the reader's stack, belongs in `/kb`, per the `/docs` and `/kb` split in `write-the-docs` - An unanswered follow-up question A change longer than the ask needs is a note, because no style guide rule covers it. The review also gives a verdict on each new section's place, each new example's pattern, and each new link. The style pass counts the words of each long sentence with a script, gives a verdict on each style guide rule that applies to the changed lines, and checks the page's template and WORD_LIST. The done criterion lists each verdict, so a skipped item shows. **A new Fact check gives each claim a verdict.** Each claim gets one verdict: ran (a row in a `test-the-docs` verification report), traced to the source at the version the page uses, or unverified. When a change has more than 20 claims, or a claim needs a repo that the reviewer can't read, the review asks the user before it continues. Each path an instruction names is its own claim. A wrong claim is a blocker, and an unverified claim is a note to the author. Code runs only through `test-the-docs`, so the tutorial and example reviews ask to build example apps there, not in the reviewer's checkout. Before a wrong claim is made more exact, the review checks whether the reader needs it at all. **The `write-the-docs` accuracy pass checks that the reader needs a claim.** Its old step 3 said to add an exception the code has, or narrow the sentence, which pushed #53996 toward more internals. A new step 2 cuts a claim about mechanism the reader can't use, instead of making it more exact. An exception goes in only when it changes what the reader sees or does. The skill stays self-contained: it runs whether or not a review follows. **The style guide holds the rules the review applies.** New rules: "Document what the reader can use", "Answer the reader's next question", "Name what a command changes", "Model an example on the page's other examples", and "Put text under the heading for its topic". "Cut repeated points" now says to link to a fact that another section or page states. Required text, such as the standard SQL snippet, doesn't count as a repeat, and neither does a one-sentence term explanation or a warning that the task needs. "Link selectively" now covers two sections that send the reader to each other. The review links to each rule instead of restating it. **CodeRabbit reviews docs content against the style guide.** `.coderabbit.yaml` applies each top-level file in `apps/docs/style-guide/`, but not the templates, to `apps/docs/content/**/*.mdx` as code guidelines, so a new rule file is picked up without a config change. **Stale references.** `ask-the-docs`'s `app-map.md` and `write-the-docs` no longer point at `content/troubleshooting/`, which #52339 removed. ## Review instructions 1. Read the Content review and Fact check in `review-the-docs/SKILL.md`. 2. Check that each blocker links to a rule in `apps/docs/style-guide/`. A fresh agent ran an earlier version of the Content review and Fact check on #53996's merge commit, without seeing #54013. It requested changes and reported the problems that #54013 fixed: - The CPU cap and rotation across workers, as mechanism the reader can't act on - The same reuse fact stated four times in the section, and "runs once per worker" repeated from a later section - `guides/functions/architecture.mdx` saying "A new V8 isolate is spun up for each invocation" and "each run is stateless" It also traced each claim to `supabase/edge-runtime@v1.79.2`, and found a repeated link, a 26-word sentence, and two unverified claims. Its internals finding has a caveat: the new style guide example comes from this same case. After the review suggestions, a second fresh agent ran the current Content review and Fact check on the same commit. It found the same three problems, as blockers. It listed 17 claims, under the 20 at which the Fact check asks before it continues, so it checked each one. It reported the repeats inside the section as notes, not blockers. ## Checklist - [ ] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) --------- Co-authored-by: Nik Richers <nik@validmind.ai> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: Nik Richers <nrichers@gmail.com> |
||
|
|
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. |
||
|
|
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> |
||
|
|
9623f958be |
feat: Produce sitemap and full markdown files for docs (#54069)
## Problem Agents have no single index of the docs markdown exports, unlike the KB's `sitemap.md`. www's `/llms.txt` and `/llms-full.txt` also read docs files from disk, which forces www's build to wait on the docs build. ## Solution **docs** - Add `build:markdown-sitemap`, which writes `public/markdown/sitemap.md`. It scans `public/markdown/**/*.md` and lists each file as `[title](url.md)`. Guide URLs are `/docs/guides/<page>.md` and the rest are `/docs/markdown/<page>.md`, built with the existing `internal-links` helpers. - Add `build:markdown-full`, which writes `public/markdown/full.md`. It concatenates the same files. - Both scripts share one file-list helper (`internals/markdown-files.ts`), so they always cover the same files and exclude `sitemap.md` and `full.md`. - Both tasks depend on `build:markdown` and are wired into `build` in turbo. - Search v2 ingestion and the `docs.tar.gz` archive now ignore both files. **www** - `/llms.txt` and `/llms-full.txt` now fetch `sitemap.md` and `full.md` from `NEXT_PUBLIC_DOCS_URL`, replacing only their docs parts. Pricing, product overviews, agent resources, the KB link and the customer stories link are unchanged. If docs is unreachable, the docs section is left out instead of returning a 404. - Remove the on-disk docs reads, the `outputFileTracingIncludes` entries, and the `docs#build:guides-markdown` dependency and docs input globs from www's turbo config. These routes were the only link between www and the docs build. `turbo-build.test.ts` is updated to match. - Add a `/docs.md` → `/docs/markdown/sitemap.md` redirect, next to the existing `/kb.md` one. Routes without a markdown export are not patched, they are simply absent from the sitemap. ## Review instructions From the Docs preview link: 1. Open /docs/markdown/sitemap.md it should show a file with all links to the docs pages available in markdown 1. Open /docs/markdown/full.md it should show a file with all the content from all the pages Sadly, only after deployed... 1. www project should return the content of both files when: a. supabase.com/llms.txt is queried should return docs sitemap.md content b. supabase.com/llms-full.txt is queried should return docs full.md content 1. supabase.com/docs.md should return sitemap.md file ## 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) |
||
|
|
1f3549570d |
chore(github): add docs review categories and blocked-PR callout to PR template (#54089)
## Problem Docs PRs have no review timeline. Some get reviewed the same day, and others sit for weeks with no expectation of when they'll be looked at. PRs that depend on another PR also get marked ready for review and reviewed before they can merge. Tracked in [DOCS-1590](https://linear.app/supabase/issue/DOCS-1590), part of the Docs PR Tracker ([DOCS-1689](https://linear.app/supabase/issue/DOCS-1689)). ## Solution Two additions to the shared PR template: - **Review category (docs PRs only).** Four checkboxes, each with its deadline in business days from when the PR is marked ready for review: Critical (1), Urgent (3), Moderate (5), and Low (10). The section says it only applies to docs PRs from Supabase team members. PRs from forks are always reviewed as Low. - **Blocked-PR callout.** An HTML comment at the top of the template tells authors to keep a blocked PR as a draft and start the description with a `[!WARNING]` callout naming the PR it depends on. Because it's a comment, it doesn't render on PRs that aren't blocked. The checkbox labels are fixed (`- [x] Critical`, and so on) because a later check reads them to find the category. Non-docs PRs can ignore the section. ## Review instructions 1. Read the diff to `.github/pull_request_template.md`. 2. Open a test PR, or preview the template, and confirm the callout comment doesn't render and the category section reads clearly. 3. Since the template is shared across the repo, confirm the "docs PRs only" wording is clear enough for non-docs authors to skip it. ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) |
||
|
|
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> |