mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
create-pull-request/patch
563
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
b0254cf15d |
chore(deps): bump ws to 8.23.1 (#54552)
## Problem `pnpm audit` flags `ws` 8.22.1 for a high-severity advisory: memory exhaustion through unbounded automatic pong responses (affects `>=8.0.0 <8.23.0`). ## Solution Bump the transitive `ws` 8.x resolution to 8.23.1 in the lockfile. The change comes from `scripts/fix-audit-vulnerability.ts ws`, which applied the bump and confirmed the advisory is gone. No `package.json` or `pnpm-workspace.yaml` changes, and no permanent overrides. ## How to verify 1. `pnpm install --frozen-lockfile` succeeds. 2. `pnpm tsx scripts/fix-audit-vulnerability.ts --json` no longer lists `ws`. 3. `pnpm why ws --recursive` shows only patched copies (`ws@7.5.14`, `ws@8.23.1`). ## Checks Ran `pnpm tsx scripts/fix-audit-vulnerability.ts ws --json` (status `fixed`, 8.22.1 → 8.23.1), then `pnpm install --frozen-lockfile`, the audit listing above, and `pnpm why ws --recursive`. Only `pnpm-lock.yaml` changed. No typecheck, lint, or tests ran, because no source file changed; CI runs them on the PR. ## Checklist - [x] I have read the [CONTRIBUTING.md](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-5304](https://linear.app/supabase/issue/FE-5304/bump-a-single-vulnerable-dependency). Tedd doesn't read comments on this PR. Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com> |
||
|
|
5a506a54dd |
chore(deps): bump react-router to 7.18.7 (#54420)
## Problem `pnpm audit` reports a high-severity advisory for `react-router` 7.18.2, which `lite-studio` and the UI library install. ## Solution Bump the installed `react-router` to 7.18.7, the patched release, with `scripts/fix-audit-vulnerability.ts`. Only `pnpm-lock.yaml` changes: no `package.json` edit and no permanent override in `pnpm-workspace.yaml`. Every workspace that uses `react-router` now resolves the single patched copy. ## How to verify 1. Run `pnpm install --frozen-lockfile`. It succeeds with the lockfile as committed. 2. Run `pnpm why react-router --recursive`. Every copy is 7.18.7. 3. Run `pnpm audit`. It no longer lists `react-router`. 4. Run `pnpm turbo run typecheck --filter=lite-studio --filter=library`. It passes. ## Checks Ran `scripts/fix-audit-vulnerability.ts react-router --json` (status `fixed`, 7.18.2 → 7.18.7), `pnpm install --frozen-lockfile`, `pnpm why react-router --recursive`, `pnpm audit`, and `pnpm turbo run typecheck --filter=lite-studio --filter=library` (10 of 10 tasks passed). No source files changed, so no lint or format check applies. ## 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) ## Feedback for Tedd To ask Tedd for a change to this PR, reply in Tedd's session on [FE-5260](https://linear.app/supabase/issue/FE-5260/bump-a-single-vulnerable-dependency). Tedd doesn't read comments on this PR. Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com> |
||
|
|
e1be0f2646 |
chore(deps): bump cross-spawn to 7.1.2 (#54481)
## Problem `pnpm audit` reports a critical advisory for `cross-spawn` (command injection on Windows when spawning batch files). Versions `>=7.0.0 <7.1.0` are affected, and the lockfile resolved 7.0.6. ## Solution Bumps the transitive `cross-spawn` 7.x resolution from 7.0.6 to 7.1.2 with `scripts/fix-audit-vulnerability.ts`. The script resolved the fix without a permanent override, so only `pnpm-lock.yaml` changes. The 6.x copy already resolves to 6.0.10, which is patched (`>=6.0.7`). ## How to verify 1. Run `pnpm install --frozen-lockfile`. It succeeds. 2. Run `pnpm audit`. It reports no `cross-spawn` advisory. 3. Run `pnpm why cross-spawn --recursive`. Only `cross-spawn@6.0.10` and `cross-spawn@7.1.2` are installed. ## Checks Ran `pnpm tsx scripts/fix-audit-vulnerability.ts cross-spawn --json` (status `fixed`), `pnpm audit`, `pnpm why cross-spawn --recursive`, and `pnpm install --frozen-lockfile`. No source files changed, so no typecheck, lint, or unit tests apply. ## 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-5295](https://linear.app/supabase/issue/FE-5295/bump-a-single-vulnerable-dependency). Tedd doesn't read comments on this PR. Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com> |
||
|
|
6d8af8e950 |
chore(api-types): regenerate types from production specs (#54472)
## Problem `packages/api-types` has drifted from the production OpenAPI specs. #54394 regenerated them but was reverted in #54404, because the API had rolled out ahead of its OpenFGA model. That has since been fixed on the backend, so the regen can land. ...plus I need the new spec for #54391 and didn't want to blow up my branch. ## Solution Regenerated with `pnpm --filter=api-types codegen:prod` (production specs, not the localhost `codegen`), plus the type fixes the new specs require: - `platform-webhooks-fetchers.ts` — `page` is now a deep object in the spec, so the query params move from `page[limit]` keys to a nested `page` object with a `deepObject` serializer. - `InvoicesSettings.test.tsx` — four newly-required invoice fields in the mock. - `packages/shared-data` — `@supabase/shared-types` 0.1.98 → 0.1.102, matching `apps/studio`. Notable additions: the `environment_*` FGA scopes and `GET /v2/projects/{ref}/analytics/traces/{trace_id}`. ## Review instructions 1. `pnpm --filter=api-types run verify-production-types` — passes. 2. `pnpm typecheck` and `pnpm --filter=studio test` — pass. 3. Only the three non-generated files need reading; the rest is generated output. Note: `verify-production-api-types` was removed from the required checks during the #54394 incident and hasn't been restored. Worth putting back after this merges. |
||
|
|
0c97b9789b |
[FE-3107] chore(studio): remove remaining Next.js references (#54426)
Removes the remaining Next.js dependencies, compatibility shims, test
mocks, ESLint/TypeScript presets, and webpack/Next workarounds from
Studio following the TanStack Start migration.
Addresses FE-3107.
**Removed:**
- `next` and `next-router-mock` from `apps/studio/package.json` (and
updated `pnpm-lock.yaml`)
- Orphaned `apps/studio/compat/next/script.tsx` shim, `script.test.tsx`,
`compat/**` knip entry, and `nextCompat()` / `ssr.noExternal` `/^next/`
plumbing from `apps/studio/vite.config.ts`
- `apps/studio/tests/lib/route-mock.ts` and all `next-router-mock`
setup/imports across `tests/vitestSetup.ts`,
`tests/lib/custom-render.tsx`, and 12 test files
- `apps/studio/tests/pages/` directory (moved the 3 remaining tests to
`components/interfaces/Organization/Organization.utils.test.ts` and
`apps/studio/tests/routes/`)
- Unused `'use client'` directives across 23 Studio files
- Next.js/webpack workarounds: `graphiqlViteWorkers()` in
`vite.config.ts`, webpack `import.meta.glob` `try/catch` fallback in
`ConnectStepsSection.tsx`, shell `NODE_ENV=test` override in
`vite.config.ts` / root `package.json` / `studio-e2e-test.yml`, Next
`getPathMatch` and `_next` passthrough in `redirects.shared.*`,
`window.next?.router` check in `monaco-graphiql-coexistence.spec.ts`,
and unused `ANALYZE` env var in `apps/studio/turbo.jsonc`
- Next-only Sentry/chunk-load filters (`NEXT_NOT_FOUND`,
`NEXT_REDIRECT`, Next `/org/[slug]/` regex, `/app:\/\//`, dead
`includeThirdPartyErrorFilter` plumbing, webpack chunk error regex) and
stale Next/Pages Router comments, docs, and `#__next` CSS selector
**Changed:**
- `apps/studio/eslint.config.cjs`: switched from
`eslint-config-supabase/next` to the new `eslint-config-supabase/react`
preset (dropping `@next/next/no-img-element: off`, keeping `.next` /
`next-env.d.ts` ignored for local checkouts with stale pre-migration
build artifacts)
- `apps/studio/tsconfig.json`: extends `tsconfig/base.json` directly
instead of `tsconfig/nextjs.json` (identical resolved compiler options)
- `apps/studio/.github/eslint-rule-baselines.json`: pruned 33 stale
`pages/...` and `types/next.ts` entries without changing any rule
thresholds
- `apps/studio/tests/lib/custom-render.tsx`: backed
`TestFrameworkProvider` with TanStack Router instead of
`next-router-mock`
-
`apps/studio/components/interfaces/Integrations/GraphQL/GraphiQLTab.tsx`:
imports `graphiql/setup-workers/vite` directly
- `apps/studio/styles/globals.css`: replaced `@source
'../pages/**/*.{js,ts,jsx,tsx}'` with `@source
'../routes/**/*.{js,ts,jsx,tsx}'`
- `apps/studio/turbo.jsonc`: declared `"NEXT_PUBLIC_*"` in
`tasks.build.env` now that Turborepo infers `nitro` instead of `nextjs`
-
`apps/studio/components/interfaces/Organization/Organization.utils.ts`:
narrowed `buildOrgUrl`'s `slug` parameter to `string[] | undefined`
**Added:**
- `packages/eslint-config-supabase/shared.js` and
`packages/eslint-config-supabase/react.js` (plus `presets.test.ts`),
decoupling non-Next React apps from `eslint-config-next` with verified
zero non-`@next/*` rule drift while keeping
`eslint-config-supabase/next` unchanged for the Next.js apps
## To test
- Run `pnpm --filter eslint-config-supabase run test` and confirm preset
parity tests pass
- Run `pnpm --filter studio run lint`, `pnpm --filter studio run
lint:ratchet`, `pnpm --filter studio run typecheck`, `pnpm knip
--workspace apps/studio`, and `pnpm --filter studio run test`
- Run `pnpm --filter studio run build` and verify the production build,
prerendered routes, chunk-cycle check, and GraphiQL web workers succeed
- Smoke-test Studio locally (`pnpm dev:studio`): verify GraphiQL loads
cleanly, ConnectSheet framework steps render, and Tailwind styles on
route pages are intact
---------
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
|
||
|
|
0265ff935e |
feat(studio): configure direct database access in OAuth app settings (#54006)
> [!WARNING] > Partner eligibility requires [CTRL-2282](https://linear.app/supabase/issue/CTRL-2282) in the target environment; production deployment is pending. ## Problem Trusted Partners need to configure direct database access for OAuth apps. [DEPR-733](https://linear.app/supabase/issue/DEPR-733) ## Solution - Save and reload direct-access scopes independently of Database management. - Allow new grants only for eligible organisations and organisation-bound apps. - Allow existing direct access to be removed when eligibility changes. | After | | --- | | <img width="1280" height="754" alt="OAuth Apps Organization Settings Basket Supabase" src="https://github.com/user-attachments/assets/e9b78fb6-65e4-4299-ad07-a2f9538a36d5" /> | | `"is_trusted_partner": false` or missing | | <img width="1280" height="754" alt="OAuth Apps Organization Settings Basket Supabase (1)" src="https://github.com/user-attachments/assets/cf78db2c-952c-47e9-9239-82aab2c8398a" /> | | `"is_trusted_partner": true` | ## Review instructions 1. Open the [staging preview](https://studio-staging-git-dnywh-depr-733-oauth-app-dat-c71d4a-supabase.vercel.app/dashboard), select a test organisation and open **OAuth Apps**. It should already be `true, but enable `enableScopedOAuthPublish` in the Studio dev toolbar’s **Flags** tab if needed. 2. Open Chrome DevTools → **Network**, then click **Publish OAuth app**. 3. In Network, select the **GET** request whose URL ends in `/platform/organizations/YOUR_ORG_SLUG`, without `/oauth/apps` after it. Its response contains the organisation’s name and slug. 4. Right-click that request → **Override content**. Choose a local folder and click **Allow**. Add `"is_trusted_partner": true` to the top-level JSON object, keeping every other field. Save with **Cmd/Ctrl+S**. 5. Reload with DevTools open, reopen **Publish OAuth app**, and choose **An owner, once for the whole organization** under authorisation. 6. Under **Application permissions**, find **Direct database access**. Try **No access**, **Read only** and **Read and write**. Change **Database management** separately and check the two values stay independent. 7. With direct access selected, check **Each member, for themselves** is unavailable. Set direct access to **No access**, choose member authorisation, and check the Direct database access dropdown becomes disabled. 8. Switch back to organisation authorisation, select direct access and open **Preview consent for users**. Check its label and access level match the form. 9. Change the overridden field to `false`, save and reload. Reopen the new-app form and check Direct database access is hidden. 10. Disable **Sources → Overrides → Enable Local Overrides**. In a genuinely eligible staging organisation, create a disposable app with direct access, save and reopen it. Change its access level, save and reopen again, then remove direct access. Check Database management remains unchanged. --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
dc4f247e79 |
Revert "chore: update prod api types (#54394)" (#54404)
This reverts commit
|
||
|
|
37d4f444b4 |
chore: update prod api types (#54394)
Updated API types and addressed any type issues. Had to update shared-types alongside. |
||
|
|
f05fe34966 |
feat(ui): scroll area (#54023)
## Problem - on `/kb/guides/migrate-from-auth0` in safari 27 on macos, the mouse wheel does not scroll the page and a trackpad does - radix scroll area bar in the table of contents adds a non-passive `wheel` listener on `document` - webkit stops mouse-wheel page scroll when that listener meets `overscroll-behavior-y: none` on `html`, which kb sets ## Solution - replaces radix with base ui in the `ui` scroll area parts because base ui binds its wheel listener to the scrollbar element - replaces the radix `display: table` workarounds in the studio token sheets and the connect sheet with a reset of the base ui content `min-width` - changes the docs ask ai scroll area to use the `ui` scroll area - adds an inset focus ring to the scroll area viewport because base ui makes an overflowing viewport focusable - adds a `getAnimations` stub to the jsdom test setups because the base ui viewport calls it - adds `@base-ui/react` to the pnpm catalog + points the design system scroll area page at the base ui docs <!-- ## Preview links If relevant, include links to changed pages for easy review access. Copy the preview base URL from the Vercel bot comment on this PR. Use the following table as an example template. | Site | Live | Preview | Search for | | -------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------- | | WWW | [/blog/your-post](https://supabase.com/blog/your-post) | [/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post) | unique phrase from the change | | Docs | [/docs/guides/your-page](https://supabase.com/docs/guides/your-page) | [/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page) | unique phrase from the change | | Studio | [/dashboard](https://supabase.com/dashboard) | [/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard) | unique phrase from the change | | Design system | [/design-system](https://supabase.com/design-system) | [/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system) | unique phrase from the change | | UI library | [/library](https://supabase.com/library) | [/library](https://ui-library-git-branch-name-supabase.vercel.app/library) | unique phrase from the change | | Knowledge base | [/kb/guides/your-page](https://supabase.com/kb/guides/your-page) | [/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page) | unique phrase from the change | --> <!-- ## Additional context Optionally add any other context or screenshots. --> ## Review instructions 1. open the preview [/kb/guides/migrate-from-auth0](https://kb-git-antlio-ui-scroll-area-supabase.vercel.app/kb/guides/migrate-from-auth0) in safari on macos with a mouse 2. turn the mouse wheel and make sure that the page scrolls and the table of contents marks the active heading 3. open the preview [/design-system/docs/components/scroll-area](https://design-system-git-antlio-ui-scroll-area-supabase.vercel.app/design-system/docs/components/scroll-area) and make sure that each demo shows its bar on hover and scrolls with the wheel 4. make sure that the horizontal demo scrolls sideways 5. press `tab` until a demo takes focus and make sure that it shows an inset focus ring 6. open a project in the [studio preview](https://studio-staging-git-antlio-ui-scroll-area-supabase.vercel.app/dashboard), click `Connect` and make sure that a long code line scrolls inside its code block and the sheet body does not scroll sideways 7. open the [docs preview](https://docs-git-antlio-ui-scroll-area-supabase.vercel.app/docs), press `cmd+k`, search for `auth` and make sure that the results list scrolls ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) |
||
|
|
90a0bcdcfe |
feat(studio): bump @supabase/mcp-server-supabase to 0.20.0 and pass schemas to type generation (#54139)
## Problem Self-hosted Studio still uses `@supabase/mcp-server-supabase` 0.17.0, two releases behind even before [0.20.0](https://github.com/supabase/mcp/releases/tag/mcp-server-supabase-v0.20.0). ## Solution Bump `^0.17.0` to `^0.20.0` in `apps/studio/package.json` and update the lockfile, which takes `@supabase/mcp-utils` from 0.10.0 to 0.11.1. The platform interface only gained optional arguments, so the bump itself compiles without changes. - The debugging group gains `get_issues`, which covers security and performance checks on self-hosted. It reports the health check as unavailable because self-hosted has no health advisors. - `generate_typescript_types` now accepts an optional `schemas` parameter. Without this fix, self-hosted would silently ignore it and could return types for different schemas than the caller requested. `lib/api/self-hosted/mcp.ts` now passes `schemas` to `generateTypescriptTypes` in `lib/api/self-hosted/generate-types.ts`, which sends it to pg-meta as `included_schemas`. When the caller omits `schemas`, self-hosted still uses the schemas PostgREST exposes. Tests in `generate-types.test.ts` and `mcp.test.ts` cover both cases. The MCP Apps support from 0.18.0 and 0.19.0 stays off because Studio doesn’t opt in. ## Review instructions 1. Confirm CI passes. 2. With self-hosted Studio running, connect an MCP client to `/api/mcp` and confirm `tools/list` includes `get_issues`. 3. Call `generate_typescript_types` with `schemas: ["auth"]` (or another schema PostgREST doesn’t expose) and confirm it returns types only for the requested schema. Closes [AI-1582](https://linear.app/supabase/issue/AI-1582) |
||
|
|
cbcdf4c84c |
fix(studio): storage lifecycle policy execution (#54138)
## Problem Non-current versions in storage weren't showing the correct expiration value based on the lifecycle policies settings. ## Solution Fix client logic and improve communication around expiration. Adding "Archived at" info make the version history crowded, so some information has been moved into the dropdown menu of each noncurrent version. <img width="445" height="314" alt="Screenshot 2026-11-26 at 16 58 23" src="https://github.com/user-attachments/assets/efb345f7-9a1c-4a53-b5e2-8b05505f9856" /> Note: when the "Newest noncurrent versions to keep" threshold is met, older versions that exceed such thresholds will expire no earlier than in 1d. ## Review instructions - Enable object versioning and set lifecycle policies on a File Storage bucket - add new versions to reach and exceed policy threasholds - check that expiration rules apply as intended |
||
|
|
7c368aadfd |
refactor(ui-patterns): use FrameworkProvider for routing and drop next (#53907)
Migrates the remaining router consumers in `packages/ui-patterns` (`MobileSheetNav`, `CommandProvider`, `useCrossCompatRouter`) to `useFramework()` from `common`, removing the final `next` imports and `next` peerDependency from `packages/ui-patterns`. **Changed:** - `MobileSheetNav`: read `asPath` from `useFramework()` instead of `next/router`, and close as soon as a link inside it is tapped (Studio only updates `asPath` once the destination route has loaded) - `CommandProvider`: close the menu when `asPath` changes (ignoring hash-only changes), in every framework - `useCrossCompatRouter`: call `useFramework().push` and close/reset the menu once it settles. No `startTransition` around the push – awaiting a Pages Router push inside a transition deadlocks, since Next renders the route change in a transition of its own. This drops the `useTransition` / `onPendingEnd` plumbing - Updated `MobileSheetNav` and `CommandMenu` tests to wrap with `FrameworkProvider` instead of mocking `next/*`, plus regression tests for a Pages Router-style push, same-URL pushes, pushes that throw, children staying mounted, hash-only changes, and sheet link taps **Removed:** - `next` from `packages/ui-patterns/package.json` `peerDependencies` - `next-router-mock` from `packages/ui-patterns/package.json` `devDependencies` and `packages/ui-patterns/vitest.setup.ts` - `useCrossCompatRouter` from the `CommandMenu` barrel (no consumers outside `ui-patterns`) ## To test - Run `packages/ui-patterns` tests and typecheck - Open the command menu (`Cmd+K`) in Studio and WWW (both an App Router page and a Pages Router page), navigate to a route, and confirm it navigates and closes cleanly - Search docs from the command menu on a WWW Pages Router page and open a result - Open a mobile sheet nav in Studio, navigate routes/queries, and verify close-on-route-change and `shouldCloseOnQueryChange` behavior --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
d6e4089b1a |
feat(common): add FrameworkProvider and remove next imports (#53905)
Introduces a lightweight `FrameworkProvider` React context in `packages/common` (`Link`, `Image`, `pathname`, `asPath`, `isReady`, `params`, `push`), wires it up in the consuming apps, and removes the `next` dependency from `packages/common`. **Added:** - `FrameworkProvider`, `useFramework`, `FrameworkLink`, and `FrameworkImage` in `packages/common/framework.tsx`, with plain HTML defaults (`DefaultFrameworkLink` / `DefaultFrameworkImage`). `useFramework().push` always exists and falls back to `window.location.assign` - App-level framework providers wiring `next/link`, `next/image`, and router state in `www` (App + Pages routers), `docs`, `design-system`, `learn`, and `ui-library`, and native TanStack Router bindings in `studio` (`StudioFrameworkProvider`) - `StudioFrameworkProvider` reuses the common defaults (its image only applies the basePath) and reports `isReady` once the first route load commits, so the first page view carries the final route after any redirect - Unit tests for `StudioFrameworkProvider` (`useParams`, `FrameworkLink`, `FrameworkImage`, query/hash-only navigation, `isReady`) and for `PageTelemetry` route-change sends and the `TelemetryTagManager` consent gate **Changed:** - `common/hooks/useParams.ts`: read params from `useFramework()` instead of `next/compat/router` - `common/telemetry.tsx`: replace `next/script` in `TelemetryTagManager` with `useEffect` script injection, and read route state from `useFramework()` in `PageTelemetry` - `common/MetaFavicons/app-router.ts`: drop type-only `Metadata` import from `next` - Moved `MetaFaviconsPagesRouter` to `apps/www/components/MetaFaviconsPagesRouter.tsx` (its sole consumer) - Studio: `toRoutePattern` and `applyBasePath` now live once in `lib/internal-url.ts`, shared by the provider and the `compat/next` shims - `PageTelemetry` throws outside production when no `FrameworkProvider` is mounted, since it would otherwise send only the landing pageview. `useFramework()` itself still falls back to the defaults - `ui-library`: renamed its code-sample framework context to `FrameworkPreferenceProvider` / `useFrameworkPreference` so `FrameworkProvider` only means the `common` one **Removed:** - `learn`'s unused copy of that context (`useCourse` had no callers) - `next` from `packages/common/package.json` peerDependencies App Router adapters set `asPath` to the pathname only, same as the `usePathname`-based telemetry on master (reading search params at the root would opt static pages out of static rendering). ## To test - Run `packages/common` tests and typecheck, and `apps/studio` `StudioFrameworkProvider` / `route-render` / `telemetry` tests - Navigate between routes in Studio, Docs, and WWW and confirm page telemetry fires once per navigation (and does not duplicate on hash-only changes) - Load Studio at `/` (which redirects) and confirm the first page event has the final route - Verify URL params (`useParams`) continue resolving route and search params in Studio --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
3272305eb6 |
chore(deps): bump postcss-selector-parser to 7.2.1 (#54012)
## Problem The lockfile resolves `postcss-selector-parser` 7.x to 7.1.5. That version has a moderate advisory: flat selector parsing has quadratic complexity, which allows CPU exhaustion (vulnerable `>=7.0.0 <7.1.6`, patched in 7.1.6). ## Solution `scripts/bump-package.ts postcss-selector-parser` moves the 7.x copy, which `shadcn` pulls in, from 7.1.5 to 7.2.1. The script added a temporary override, installed, then removed the override and reinstalled. Only `pnpm-lock.yaml` changes: no override stays in `pnpm-workspace.yaml`, and no `package.json` changes. This is a partial fix. The copy that `@tailwindcss/typography@0.5.19` pulls in stays at 6.0.10, which is still affected by the 6.x range of the same advisory (patched in 6.1.5). Updating it needs a change to `@tailwindcss/typography`, so `pnpm audit` still reports `postcss-selector-parser` after this PR. ## How to verify 1. `pnpm install --frozen-lockfile` succeeds. 2. `pnpm why postcss-selector-parser --recursive` lists 7.2.1 and 6.0.10, with no 7.1.5. 3. `git diff origin/master --stat` shows only `pnpm-lock.yaml`. ## Checks Ran `pnpm tsx scripts/bump-package.ts postcss-selector-parser` (exit 0), `pnpm install --frozen-lockfile`, and `pnpm why postcss-selector-parser --recursive`. Did not run typecheck, lint, or builds: the change is a lockfile-only patch bump of a transitive dependency. ## Checklist - [x] I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) guide - [ ] 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-5206](https://linear.app/supabase/issue/FE-5206/bump-a-single-vulnerable-dependency). Tedd doesn't read comments on this PR. Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com> |
||
|
|
1f6ee9e8b9 |
chore(www): replace markdown-toc with the local TOC helper to drop vulnerable toml (#53879)
## Problem `markdown-toc@1.2.0` (its latest release) depends on `gray-matter@2.1.1`, which pins `toml@^2.3.2`. That leaves `toml@2.3.6` in the lockfile, and `pnpm audit` flags it with several high-severity advisories (fixed in `>=5.0.1`). Neither parent has a release that moves off toml 2.x, so a lockfile-only bump or a temporary override can't remove it. ## Solution The customer story (`/customers/[slug]`) and alternatives (`/alternatives/[slug]`) pages built a `toc` prop at build time, but neither page nor `LayoutComparison` ever read it. This PR removes that prop, the `markdown-toc` dependency, and `apps/www/lib/toc.ts`, which had no other callers. With `markdown-toc` gone from `apps/www/package.json`, `gray-matter@2.1.1` and `toml` leave the dependency tree. www keeps using `gray-matter@4.0.3` directly. The lockfile change only removes entries. ## Review instructions 1. Run `pnpm why toml --recursive` and check it finds no `toml`. 2. Run `pnpm tsx scripts/fix-audit-vulnerability.ts --json` and check `toml` is not in `vulnerabilities`. 3. Open a customer story on the preview, for example `/customers/asap-work`, and an alternatives page, for example `/alternatives/supabase-vs-auth0`. Each page builds and renders as it does on production. Checks run: `pnpm install --frozen-lockfile`, `pnpm run typecheck` in `apps/www` (next typegen + tsc), eslint on both changed pages (no errors), and `oxfmt --check` on the changed files. ## 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) [FE-5192](https://linear.app/supabase/issue/FE-5192/bump-a-single-vulnerable-dependency) ## Feedback for Tedd To ask Tedd for a change to this PR, reply in Tedd's session on [FE-5192](https://linear.app/supabase/issue/FE-5192/bump-a-single-vulnerable-dependency). Tedd doesn't read comments on this PR. --------- Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com> |
||
|
|
8fe6df84f3 |
chore(deps): bump vitest to 5.1.1 (#53945)
## Problem `pnpm audit` reports a moderate advisory for `@vitest/mocker` 5.0.0, which `vitest` 5.0.0 pulls in. An override can't fix it, because `vitest` pins its own `@vitest/mocker` version. ## Solution Raise the workspace catalog entries for `vitest`, `@vitest/coverage-v8` and `@vitest/ui` from `^5.0.0` to `^5.1.1`, and regenerate the lockfile with `pnpm install`. The three packages ship together, so they move together to keep their peer versions matched. Every workspace package uses `catalog:` for them, so no `package.json` changes. ## Checks - `pnpm install` resolves `vitest` and `@vitest/mocker` to 5.1.1. `pnpm audit` no longer reports `@vitest/mocker`, and `pnpm peers check` reports no vitest peer issues. - `pnpm --filter common exec vitest run`: 302 tests pass. `pnpm --filter ui exec vitest run`: 85 tests pass. - `pnpm --filter dev-tools exec vitest run` has one failing test (`getEventCountBadge > returns a capped pill for large counts`). It fails the same way on master before this change. - Full typecheck and the other test suites are left to CI. ## How to verify - CI passes: typecheck, lint, and the unit test jobs for every package that uses vitest. - `pnpm why vitest --recursive` shows only 5.1.1. - `pnpm audit` lists no advisory for `@vitest/mocker`. ## Feedback for Tedd To ask Tedd for a change to this PR, reply in Tedd's session on [FE-5188](https://linear.app/supabase/issue/FE-5188/bump-a-single-vulnerable-dependency). Tedd doesn't read comments on this PR. --------- Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com> |
||
|
|
50bab5657f |
chore: bump pnpm to 12.21.0 (#53676)
Splits the pnpm bump out of #53589 so the Node 26 bump can land on its own. Updates `packageManager`, `engines.pnpm`, the studio Dockerfile, the www turbo-build fixture, and the lockfile header. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
ff4638535e |
chore(dev-tools): remove next dependency (#53902)
Removes the `next` dependency from `packages/dev-tools` so it works cleanly across both Next.js apps (`www`, `docs`) and TanStack Start (`studio`). **Removed:** - `next/image` imports in `DevToolbar` and `DevToolbarTrigger` - `next/image` mock and `next/navigation` test mock in `packages/dev-tools` - `next` and `next-router-mock` from `packages/dev-tools/package.json` - `apps/studio/public/img/logo-pixel-small-light.png` (now unused) **Added:** - `DevToolbarLogo` component using an inline data URI for the 244-byte pixel logo (also fixes the missing `/img/logo-pixel-small-light.png` icon in `docs` and `www`). It's decorative (`alt=""` + `aria-hidden`) since the trigger and sheet are already labelled ## To test - Open the dev toolbar in Studio, Docs, and WWW in local dev (`window.devToolbar()`) and verify the pixel logo renders in both the trigger button and the toolbar header - Run `packages/dev-tools` tests and typecheck (`getEventCountBadge > returns a capped pill for large counts` also fails on master and isn't touched here) --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
fc228529bc |
chore: bump to Node 26 (#53589)
Aligns with our backend and updates to the latest LTS version of Node. Vercel already supports Node 26, so we can switch the Vercel configuration as well, but that shouldn't need immediate coordination as part of the deployment. To prevent errors on Vercel builds, we are using `>=24` in the `package.json`, so this can be deployed on 24.x and 26.x. Once all Vercel deployments are switched to 26.x, we can pin this to 26. The pnpm bump lives in a separate PR. --------- Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
8a49c1e3f9 |
refactor: plan upgrade screen (#53670)
A fully revamped plan change screen covering Free -> Paid Plan or Paid Plan <> Paid Plan changes. Out of scope is the downgrade to Free Plan, which is a separate modal and process. Besides a visual refresher of the current modal, we are addressing common misconceptions about our pricing and being as transparent as possible. The new modal is available behind the feature flag `billingPlanUpdateRedesign`, which is enabled on local/staging and will be rolled out gradually after further testing in production. |
||
|
|
fcbdda8107 |
chore: migrate formatter from Prettier to oxfmt (#53835)
Migrate code formatting across the monorepo from Prettier to `oxfmt`
(`0.79.0`, pinned) for much faster formatting checks locally and in CI
while keeping code churn minimal (78 files total, 0.7% of the repo).
Studio's `@ianvs/prettier-plugin-sort-imports` ordering
(`<BUILTIN_MODULES>`, `<THIRD_PARTY_MODULES>`, blank line, then `@/` and
relative imports) is preserved via `oxfmt`'s native `sortImports`
override for `apps/studio/**/*.{js,jsx,ts,tsx}`.
### Performance (before vs after, uncached)
| Benchmark | Prettier (`3.8.x`) | oxfmt (`0.79.0`) | Speedup |
| --- | ---: | ---: | ---: |
| CI formatting step (`blacksmith-4vcpu-ubuntu-2404`, full repo) | `73s`
| **`7s`** | **~10×** |
| Local `apps/studio` JS/TS (`5,157` files) | `17.74s` | **`0.36s`** |
**~49×** |
| Local full monorepo (`11,131` files) | — | **`2.39s`** | — |
**Added:**
- `.oxfmtrc.jsonc` at repo root with Prettier-matching options,
`sortPackageJson: false`, the Studio `sortImports` override, and ignore
patterns migrated from `.prettierignore`
- `oxfmt` (`0.79.0` exact pin) in `pnpm-workspace.yaml` catalog and
workspace `devDependencies` / `dependencies`
- Shared `.agents/scripts/format_and_lint.sh` hook script and
`.agents/hooks.json` (used by both Claude Code and Antigravity)
**Changed:**
- Replaced `test:prettier` with `format:check` and switched `format` in
root `package.json` to `oxfmt`
- Updated `packages/api-types` (`codegen`,
`verify-production-types.mjs`), `apps/design-system` (`build:registry`),
`apps/docs` (`CodeSample.ts`, `generate-sitemap.ts`, `next.config.mjs`,
`spec/Makefile`), `apps/www` (`generate-sitemap.mjs`), and
`packages/build-icons` (`generateIconFiles.mjs`) from Prettier to
`oxfmt`
- Updated `.github/workflows/prettier.yml` (keeping the `format` job ID
intact), `.github/workflows/autofix_linters.yml`,
`.claude/settings.json`, `AGENTS.md`, `CONTRIBUTING.md`, and
`.github/copilot-instructions.md`
- Applied one-time `oxfmt` formatting pass in a separate commit (78
files: 30 `i18n/README.*.md` trailing spaces, 19 Studio files, 17 other
TS/TSX/generated types, 8 MD/MDX, 3 `package.json`, 2 example CSS files)
**Removed:**
- `prettier`, `@ianvs/prettier-plugin-sort-imports`, and
`prettier-plugin-sql-cst` from `devDependencies` (note: `.sql` files
were not part of the CI formatting glob; `eslint-config-prettier` is
kept for ESLint)
- `prettier.config.mjs`, `.prettierignore`, and
`.claude/scripts/format_and_lint.sh`
## To test
- Run `pnpm run format:check` and confirm it passes cleanly across all
matched files
- Run `pnpm --filter api-types test`, `pnpm --filter docs exec vitest
run features/directives/CodeSample.test.ts`, and `pnpm --filter www exec
vitest run generate-sitemap.test.ts`
- Edit an `apps/studio` file with out-of-order imports and run `pnpm run
format` to confirm builtin/third-party vs `@/`/relative grouping matches
prior behavior
- Check that the `Check Code Formatting` CI workflow passes on this PR
---------
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
|
||
|
|
ba7d7727c2 |
chore(deps): bump ip-address to 10.7.6 (#53858)
## Problem `pnpm audit` reports eight advisories against `ip-address@10.2.0` (one high, seven moderate), covering SSRF and trust-boundary bypasses and a parsing denial of service. Studio pulls it in through `@modelcontextprotocol/sdk` > `express-rate-limit`. Docs and the UI library pull it in through `socks`. ## Solution Bump `ip-address` to 10.7.6 in the lockfile only. `scripts/bump-package.ts ip-address 10.7.4` moved the `socks` path. The `express-rate-limit` path stayed on 10.2.0 because the existing scoped override `express-rate-limit>ip-address: ^10.1.1` still accepted the locked version. `pnpm update ip-address --recursive --depth Infinity` re-resolved that path within the same override range. The lockfile now has a single `ip-address@10.7.6`. No `package.json` or `pnpm-workspace.yaml` changes, and `express-rate-limit`, `socks` and `@modelcontextprotocol/sdk` keep their versions. ## Review instructions 1. Run `pnpm install --frozen-lockfile`. It succeeds. 2. Run `pnpm why ip-address --recursive`. It shows only `ip-address@10.7.6`. 3. Run `pnpm audit --json`. It reports no advisories for `ip-address`. Checks run: `pnpm install --frozen-lockfile`, `pnpm why` for `ip-address`, `express-rate-limit`, `socks` and `@modelcontextprotocol/sdk` (unchanged versions), `pnpm audit --json`, and `pnpm turbo run typecheck --filter=studio` (9/9 tasks pass). ## 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) [FE-5181](https://linear.app/supabase/issue/FE-5181/bump-a-single-vulnerable-dependency) --------- Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com> |
||
|
|
95cf9a78a7 |
docs(cli): show config examples in TOML and JSONC (#53449)
## Problem The CLI reads `supabase/config.jsonc` (and `config.json`) since v3.1.0, but every docs page still shows `config.toml` only. There's also no page explaining the formats, how to switch, the `$schema` / `#:schema` declaration, or editor setup, and no reference pages for the new `supabase config convert` and `supabase config validate` commands. Linear: CLI-2871 ## Solution - **Dual-format examples from one source.** A new directive (`features/directives/ConfigFormats.ts`) picks up any ```` ```toml ```` fence with `name=supabase/config.toml` and renders it as `supabase/config.toml` / `supabase/config.jsonc` tabs. The JSONC is generated at build time with `convertCliConfigTomlToJsonc` from `@supabase/config`, the same converter `supabase config convert` uses, so authors only write TOML and the JSONC matches what the CLI would produce (comments included). Inside `<$CodeTabs>` the JSONC is added as an extra tab. - **The format choice sticks.** `ConfigCodeTabs` keeps the selected format in `localStorage`, so choosing JSONC switches every config example on the page and on later pages. - **Config reference.** The `usage` examples on `/guides/local-development/cli/config` use the same tabs (they were highlighted as Python before), and the intro mentions `config.jsonc`. The `remotes.<branch_name>` example now uses `[remotes.staging]`, since `<branch_name>` isn't a valid TOML key. - **New guide, "Config file formats"** (`/guides/local-development/cli/config-formats`): which file wins, minimum CLI version, `convert` and `validate`, schema declaration and versioning, and editor setup (VS Code trusted domains, Even Better TOML, Tombi, SchemaStore). - **CLI reference.** Adds `supabase-config-convert` and `supabase-config-validate` to the CLI reference nav. `cli_v1_commands.yaml` is the generated v3.2.0 reference, identical to the release bot's update in #53463, so the two PRs don't conflict. - **Content.** About 60 existing config examples across the guides, including the Branching configuration page, are tagged `name=supabase/config.toml`. Branching reads `config.json` and `config.jsonc` as well, and the Branching configuration page now says so. Non-Supabase TOML (`pyproject.toml`, `bunfig.toml`) and the v2-era `[inbucket]` before/after snippet stay TOML-only. - **Format-neutral prose.** Sentences that described the config as `config.toml` now say "your config file", naming `supabase/config.toml` and `supabase/config.jsonc` once per page. TOML section syntax in prose (`max_frequency` under `[auth.email]`) is written as key paths (`auth.email.max_frequency`), which read the same in both formats. Headings that named `config.toml` keep their old anchors. Sentences about what `supabase init` creates still say `config.toml`. - **Markdown export for agents.** `internals/generate-guides-markdown.ts` runs the same transform, so the `.md` pages served to AI agents include the JSONC example after each TOML one. - A test converts every tagged example under `content/`, so a broken TOML example fails tests instead of the build. New dependencies for `apps/docs`: `@supabase/config` (^1.8.0) and `effect` (the same `effect` version Studio pins). `config convert` and `config validate` ship in CLI v3.2.0, which is now stable. ## Review instructions 1. Open `/docs/guides/local-development/seeding-your-database` on the preview. Switch an example to `supabase/config.jsonc` and check the other examples on the page switch too. 2. Open `/docs/guides/local-development/cli/config` and check the usage examples open on JSONC. 3. Read `/docs/guides/local-development/cli/config-formats`. 4. Open `/docs/reference/cli/supabase-config-convert` and `/docs/reference/cli/supabase-config-validate`. ## Self-review Ran the `review-the-docs` local self-review (content, pipeline, and component checks) over the 54 changed pages. - No blockers. Fixed the nits it found: leftover TOML section syntax in prose (diff engines, declarative schemas, Branching, the common settings table on Local and hosted projects), a few long or ungrammatical sentences, and the conversion follow-up steps on Config file formats, now a list. - Links, custom anchors, nav wiring, and frontmatter check out. - The `.md` export on the preview shows each TOML example followed by its JSONC version. - `test-the-docs` deferred: the changed fences are config snippets, and `ConfigFormats.test.ts` already converts every tagged example. No procedural steps changed apart from the `config convert` and `config validate` commands on the new page. ## 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) |
||
|
|
3b12d2e167 |
feat(ui): switch component (#53379)
## Problem * the shared switch in `packages/ui` uses the radix primitive * the thumb does not react to hover or press, and only the track color shows the state * a click on a switch label toggles the switch, but the label keeps the default cursor ## Solution * replaces the radix switch with base ui, and keeps a native `<button>`, so labels and `role="switch"` work as before * changes the thumb to white and the resting track one step darker, so the off state shows on light pages * replaces the hover color change with a thumb stretch that grows more on press, so the thumb reacts to the pointer * adds a pointer cursor on labels next to an enabled switch, because a click on the label toggles it * removes the `PointerEvent` stand-in from the studio test setup, because it blocks base ui switch clicks in jsdom * changes the install step in the switch docs to `@base-ui/react`, so the manual install matches the component <!-- linear:table-colwidths:345,344 --> <table> <thead> <tr> <th></th> <th>preview</th> </tr> </thead> <tbody> <tr> <td>light</td> <td> https://github.com/user-attachments/assets/a7c33dda-3487-43b8-881b-344e28891650 </td> </tr> <tr> <td>dark</td> <td> https://github.com/user-attachments/assets/9718057b-f983-4099-8f7e-82521001b625 </td> </tr> </tbody> </table> ## Preview links | Site | Live | Preview | Search for | | -- | -- | -- | -- | | Design system | [/design-system/docs/components/switch](<https://supabase.com/design-system/docs/components/switch>) | [/design-system/docs/components/switch](<https://design-system-git-feat-switch-base-ui-supabase.vercel.app/design-system/docs/components/switch>) | Airplane Mode | | Studio | [/dashboard/project/\_/storage/files](<https://supabase.com/dashboard/project/_/storage/files>) | [/dashboard/project/\_/storage/files](<https://studio-git-feat-switch-base-ui-supabase.vercel.app/dashboard/project/_/storage/files>) | Public bucket | ## Review instructions 1. open [/design-system/docs/components/switch](<https://supabase.com/design-system/docs/components/switch>) and [/design-system/docs/components/switch](<https://design-system-git-feat-switch-base-ui-supabase.vercel.app/design-system/docs/components/switch>) side by side 2. hover and click the "airplane mode" label, and make sure that the cursor is a pointer and the switch toggles 3. change the theme to light and to dark, and make sure that the thumb stays white in the on and off states 4. scroll to the form example, and make sure that the disabled "security emails" switch does not toggle or stretch 5. open [/dashboard/project/\_/storage/files](<https://studio-git-feat-switch-base-ui-supabase.vercel.app/dashboard/project/_/storage/files>), click "new bucket" and turn on "public bucket", and make sure that the "public buckets are not protected" warning shows ## 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>) |
||
|
|
4442d91d77 |
feat(studio): Wire org and users authorized apps list to backend (#53674)
## Description Part of the work for OAuth apps with the scoped permissions. This PR wires the org and users authorized apps lists to backend. |
||
|
|
12bd59d18a |
chore(deps): bump nuxt to 4.6.4 (#53541)
## Problem `pnpm audit` reports a moderate-severity advisory for `nuxt` 4.6.3, which `@supabase/vue-blocks` (`blocks/vue`) pulls in. ## Solution Bump `nuxt` from 4.6.3 to 4.6.4 in `pnpm-lock.yaml` with `scripts/fix-audit-vulnerability.ts nuxt`. The script resolved it without a permanent override, so `pnpm-workspace.yaml` and every `package.json` are unchanged. The lockfile diff is nuxt 4.6.4 and the `@nuxt/*` packages it pins at the same version. ## Review instructions This change has no UI. To verify it: 1. `pnpm install --frozen-lockfile` succeeds. 2. `pnpm why nuxt --recursive` shows a single version, `nuxt@4.6.4`. 3. `pnpm --silent tsx scripts/fix-audit-vulnerability.ts nuxt --json` returns `"status": "not_vulnerable"`. 4. `pnpm --filter @supabase/vue-blocks run typecheck` passes. ## 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) [FE-5131](https://linear.app/supabase/issue/FE-5131/bump-a-single-vulnerable-dependency) Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com> |
||
|
|
fb6bfd86ea |
chore(deps): bump next to 16.4.6 (#53509)
## Problem `pnpm audit` reports a moderate advisory for `next` 16.4.3, which the lockfile resolves today. Versions `>=16.4.5` are patched. ## Solution Ran `scripts/fix-audit-vulnerability.ts next`. It added a temporary override to resolve `next` to `^16.4.5`, reinstalled, removed the override, reinstalled again, and confirmed that the audit passes without the override. Every workspace now resolves `next@16.4.6`. Only `pnpm-lock.yaml` changes. No `package.json` edits and no permanent overrides in `pnpm-workspace.yaml`. ## Review instructions 1. `pnpm install --frozen-lockfile` succeeds. 2. `pnpm why next --recursive` lists only `next@16.4.6`. 3. `pnpm audit` reports no advisory for `next`. 4. `pnpm turbo run typecheck --filter='...[origin/master]'` passes (25/25 tasks, run with `--concurrency=1`). 5. The Studio, docs and www previews build and load. Note: `pnpm turbo run lint --filter='[origin/master]'` ran out of memory twice in `studio#lint:type-checks` (JavaScript heap out of memory) in the build sandbox. The other lint tasks passed. CI should run it. ## 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) [FE-5089](https://linear.app/supabase/issue/FE-5089/bump-a-single-vulnerable-dependency) Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com> |
||
|
|
bbb0af65cb |
[FE-3106] (part 14) – refactor(studio): drop the dual-runtime shims and aliases (#53223)
Drops the remaining Next-era shims and aliases that only existed for the dual runtime (FE-3106). Part 14 of the stack. **Depends on:** #53222 **Changed:** - ~45 files – import Sentry from `@sentry/react` directly instead of the aliased `@sentry/nextjs` - `hooks/ui/usePreventNavigationOnUnsavedChanges.ts` – is now the TanStack `useBlocker` implementation (previously swapped in by a Vite alias) - `components/interfaces/App/RouteValidationWrapper.tsx` – `next/router` → `useNavigate` + the leaf route's `fullPath` (`/project/$ref/sql/$id`) for the exempt-route and last-visited checks - `hooks/misc/withAuth.tsx` – no `getLayout` forwarding - `TemplateEditor.test.tsx` – renders inside a router for the unsaved-changes blocker **Removed:** - `compat/sentry-nextjs.ts` and its Vite alias, the `usePreventNavigationOnUnsavedChanges` alias and Next hook, `types/next.ts` (`NextPageWithLayout`), the `@sentry/nextjs` dependency The `compat/next/*` shims for `link`, `router`, `head`, `image`, `navigation`, `dynamic` and `script` stay: about 300 components outside `routes/**` still import them. Addresses [FE-3106](https://linear.app/supabase/issue/FE-3106/move-page-bodies-into-route-files-and-delete-pages). ## To test - Trigger an error (e.g. a failing query) – it reaches Sentry as before - Edit an email template or edge function and navigate away – the unsaved-changes prompt appears - Open an org you don't belong to – toast and redirect home; open a SQL snippet, leave and come back – last snippet is restored --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
cf223ae74a |
[FE-3106] (part 13) – chore(studio): remove next entry files and config (#53222)
Removes the Next-only entry files and config now that every page lives in `routes/**` (FE-3106). `routes/__root.tsx` already mirrors `pages/_app.tsx` (dayjs plugins, providers, telemetry, error boundary, favicons). Part 13 of the stack. **Depends on:** #53221 **Changed:** - `components/interfaces/App/{NotFoundPage,ServerErrorPage}.tsx` – the 404/500 pages, rendered by `__root.tsx`, now with native `Link`/`useNavigate` and `<img>` - `routes/api/{status-page,scoped-access-token-permissions}.ts` – App Router handlers from `app/api/**` moved in (`NextResponse.json` → `Response.json`); `buildAPIPermissionScopeMap` moves to `lib/api/` - `package.json`, `tsconfig.json` – no `next typegen` step or `.next/types` include - `packages/ui-patterns/.../InstructionBlocks.tsx` – asset map typed `StaticImageData | string`: under Vite a png import is a URL string, which Next's global image types used to hide - `vite.config.ts`, `knip.jsonc`, `turbo.jsonc` and comments across studio – Next build references removed **Removed:** - `pages/{_app,_document,404,500}.tsx`, `pages/_error.jsx`, `pages/README.md`, `app/**`, `next.config.ts`, `proxy.ts`, `instrumentation{,-client}.ts`, `sentry.{server,edge}.config.ts`, `fonts/index.ts` (next/font), `BootTimeoutFallback`, `postcss.config.cjs`, the `next/server` shim - `@next/bundle-analyzer`, `raw-loader`, `postcss`, `@tailwindcss/postcss` dev dependencies Addresses [FE-3106](https://linear.app/supabase/issue/FE-3106/move-page-bodies-into-route-files-and-delete-pages). ## To test - Open an unknown URL – the 404 page renders with working "Head back" - `/api/status-page` and `/api/scoped-access-token-permissions` on platform – same JSON and `Cache-Control` - Fonts (Inter, Manrope, Source Code Pro) still load --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
805dfd71d1 |
chore(deps): bump hono to 4.13.18 (#53465)
## Problem `pnpm audit` reports a moderate-severity advisory for `hono@4.13.14`, patched in `>=4.13.16`. `hono` is a transitive dependency (via `@hono/node-server`, used by `@modelcontextprotocol/sdk` and `@modelcontextprotocol/node`) of `studio`, `library` and `@supabase/vue-blocks`. ## Solution Ran `scripts/fix-audit-vulnerability.ts hono`, which temporarily overrides the version, reinstalls, removes the override, and checks the audit again. The result changes only `pnpm-lock.yaml`: `hono` resolves to `4.13.18` (one version across the workspace). There are no permanent overrides and no `package.json` changes. ## Review instructions 1. `pnpm install --frozen-lockfile` succeeds with no changes. 2. `pnpm why hono --recursive` shows a single version, `hono@4.13.18`. 3. `pnpm --silent tsx scripts/fix-audit-vulnerability.ts hono --json` returns `"status": "not_vulnerable"`. 4. `pnpm --filter studio typecheck` passes. No UI changes. ## 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) [FE-5103](https://linear.app/supabase/issue/FE-5103/bump-a-single-vulnerable-dependency) Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com> |
||
|
|
6196382e8e |
chore(deps): bump astro to 7.4.10 (#53406)
## Problem `pnpm audit` reports moderate advisories for `astro` (vulnerable range `<=7.4.6`; the lockfile resolved `7.4.2`). `astro` is used by `apps/kb` directly and through `@astrojs/mdx`. ## Solution Updated `astro` in `pnpm-lock.yaml` from `7.4.2` to `7.4.10` using `scripts/fix-audit-vulnerability.ts astro`. The script resolved the fix with a temporary override, then removed it; the patched version stays resolved without any permanent override. Only `pnpm-lock.yaml` changes (the extra lockfile lines are transitive dependencies of the new `astro` version). No `package.json` or `pnpm-workspace.yaml` changes. ## Review instructions 1. `pnpm install --frozen-lockfile` succeeds. 2. `pnpm why astro --recursive` shows a single `astro@7.4.10`. 3. `pnpm audit` reports no advisories for `astro`. 4. `cd apps/kb && pnpm exec astro build` completes (73 pages built locally). 5. On the kb preview, `/kb` pages render as before. ## 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) [FE-5085](https://linear.app/supabase/issue/FE-5085/bump-a-single-vulnerable-dependency) Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com> |
||
|
|
e7093263eb |
kb: add sentry to the kb search (#53126)
## Problem The search in KB currently does not have Sentry ## Solution This PR adds Sentry to the KB search ## Review instructions - I tried to match the style in the docs while keeping everything simple, but does it look alright? - I haven't added the env variables into Vercel yet. I wanted to get this PR in front of eyes of others first. ## 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) |
||
|
|
d7308d776c |
ci(kb): run the shadcn lint ratchet on kb (#51584)
## Problem kb has no eslint config and no `lint` script, so the shadcn tailwind rules that already check www, docs, design-system, ui-library and learn never run on it ## Solution - moved the `supabase/shadcn` block out of `eslint-config-supabase/next.js` into its own `eslint-config-supabase/shadcn.js` + `next.js` imports it, so the rules and settings stay in one file - added `apps/kb/eslint.config.cjs` + `lint` and `lint:ratchet` scripts - `.astro` files get linted too, not just `.ts`/`.tsx` - added kb to `lint-ratchet.yml` and `lint-ratchet-decrease.yml` <!-- ## Preview links If relevant, include links to changed pages for easy review access. Copy the preview base URL from the Vercel bot comment on this PR. Use the following table as an example template. | Site | Live | Preview | Search for | | -------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------- | | WWW | [/blog/your-post](https://supabase.com/blog/your-post) | [/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post) | unique phrase from the change | | Docs | [/docs/guides/your-page](https://supabase.com/docs/guides/your-page) | [/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page) | unique phrase from the change | | Studio | [/dashboard](https://supabase.com/dashboard) | [/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard) | unique phrase from the change | | Design system | [/design-system](https://supabase.com/design-system) | [/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system) | unique phrase from the change | | UI library | [/library](https://supabase.com/library) | [/library](https://ui-library-git-branch-name-supabase.vercel.app/library) | unique phrase from the change | | Knowledge base | [/kb/guides/your-page](https://supabase.com/kb/guides/your-page) | [/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page) | unique phrase from the change | --> <!-- ## Additional context Optionally add any other context or screenshots. --> ## Review instructions 1. run `pnpm --filter ./apps/kb run lint` and check for 5 warnings, all in `.astro` files 2. run `pnpm --filter ./apps/kb run lint:ratchet` and check it prints `Stable: No regressions for selected rules.` 3. add `className="p-[13px] bg-[#fff] foo-bar"` to any kb `.tsx` component and rerun step 3. it should fail with 3 new warnings ## 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) |
||
|
|
4c9304d385 | chore(deps): bump @hono/node-server to 2.1.6 (#53378) | ||
|
|
c8748c7c26 |
chore: pin Node.js to v24 across the repository (#53287)
## Problem `engines.node` used open-ended ranges (`>=22.23.4` at the root, `>=22.12.0` in `apps/kb`). Vercel resolves an open-ended range to the newest Node.js major, so it overrides the project's configured version and warns that future majors will be picked automatically. The other apps declared no engine at all, and `.nvmrc` (used by local dev and CI) still pointed at Node 22. ## Solution Pin Node.js 24 everywhere the repo declares a Node version: - `.nvmrc`: `22.23.4` -> `24.22.3` (latest v24 LTS). CI workflows read `node-version-file: .nvmrc`, so they follow. - Root `package.json` and `apps/kb/package.json`: `engines.node` -> `24.x`. - Every other app (`design-system`, `docs`, `learn`, `lite-studio`, `studio`, `ui-library`, `www`): add `engines.node: "24.x"`. Vercel reads the Node.js version from `engines.node` in the project's `package.json`; `vercel.json` has no setting for it, so this is how each Vercel project gets an explicit version. - `.agents/skills/test-the-docs/sandbox/Dockerfile`: `node:22-bookworm-slim` -> `node:24-bookworm-slim`. - `AGENTS.md`: update the stated Node requirement. Notes: - `engineStrict: true` is set in `pnpm-workspace.yaml`, so `pnpm install` now requires Node 24 locally. - `.github/workflows/self-host-tests-smoke.yml` hardcodes `node-version: '22'` and is not changed here. - No builds or tests were run for this change. Checked that all changed `package.json` files parse and that Prettier passes on the changed files. ## Review instructions 1. Open the Vercel build logs for this PR's deployments (studio, docs, www, kb, and so on). 2. Confirm each build uses Node.js 24.x. 3. Confirm the logs no longer show the warning that the `engines` field overrides the project's Node.js version, or the warning about automatic upgrades to new major versions. 4. Confirm CI jobs that use `.nvmrc` set up Node 24.22.3. ## 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) [FE-5004](https://linear.app/supabase/issue/FE-5004/bump-the-nodejs-version-across-the-repository) --------- 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> |
||
|
|
64fad1a785 |
chore(studio): bump @supabase/mcp-server-supabase to 0.17.0 (#53360)
## Problem Self-hosted Studio is on `@supabase/mcp-server-supabase` 0.16.0, and [0.17.0](https://github.com/supabase/mcp/releases/tag/mcp-server-supabase-v0.17.0) is out. ## Solution Bump the package from `^0.16.0` to `^0.17.0`. No code changes are needed: the breaking change in 0.17.0 is in the `elicitation` options, which self-hosted Studio doesn't set. This also picks up 0.16.1, which enables the notebook tools by default. The self-hosted platform is still typed without `notebooks`, so those tools stay out, and the existing test in `tests/routes/api/mcp/index.test.ts` covers that. ## Review instructions 1. Check that CI passes. 2. Run self-hosted Studio, connect an MCP client to `/api/mcp`, and see that `tools/list` returns the tools with no notebook tools. Closes [AI-1487](https://linear.app/supabase/issue/AI-1487) |
||
|
|
afe5b4ed58 |
fix(studio): remove Braintrust tool output masking workaround (#53244)
Removes the temporary `TODO:` tool output masking introduced in https://github.com/supabase/supabase/pull/52106 now that [Braintrust 3.40.0](https://github.com/braintrustdata/braintrust-sdk-javascript/releases/tag/braintrust%403.40.0) logs `toModelOutput` in tool spans and parent span results. SQL error redaction remains in place. Verified locally at the `schema` opt-in level by running the Assistant against a development project. The Braintrust traces for [SQL rows](https://www.braintrust.dev/app/supabase.io/p/Dev%20(mattrossman%2FAssistant)/logs?r=2bca625a69c40d34ee41289acc073ea5&sid=a6304c155ecf7eed), [SQL error](https://www.braintrust.dev/app/supabase.io/p/Dev%20(mattrossman%2FAssistant)/logs?r=b6f0581cbd273c7cd1d70bb6713877d8&sid=43fbbf283faa0da9), and [notebook results](https://www.braintrust.dev/app/supabase.io/p/Dev%20(mattrossman%2FAssistant)/logs?r=05409f3af4e66131efa768a03bb8a67f&sid=321520afdd3fa7af) omit the sample rows and errors shown in Studio. | Studio | Braintrust | | --- | --- | | <a href="https://github.com/user-attachments/assets/dbf43dda-c78e-4782-acf7-951d8920a283"><img src="https://github.com/user-attachments/assets/dbf43dda-c78e-4782-acf7-951d8920a283" width="350" alt="Notebook results at limited sharing"></a> | <a href="https://github.com/user-attachments/assets/4ff513ae-c76c-47ad-ba1f-0dbc8bcfeee7"><img src="https://github.com/user-attachments/assets/4ff513ae-c76c-47ad-ba1f-0dbc8bcfeee7" width="350" alt="Braintrust notebook output with redacted results"></a> | Closes AI-1374 |
||
|
|
cd6b25614c |
feat(design-system): trace row, cell, lane and duration (#52161)
## Problem We're adding tracing UI primitives to the design system as building blocks for future trace waterfalls. This is PR 3 in a stack of small, component-by-component PRs. PR 2 added the waterfall container and the time ruler, and this one adds the span rows. It's the first PR where the tree is interactive. Part of [DEBUG-243](https://linear.app/supabase/issue/DEBUG-243/tracing-ui-primitives-stacked-prs) ## Solution Adds `Trace.Rows`, `Trace.Cell`, `Trace.Lane` and `Trace.Duration`: - `Trace.Rows` is a virtualized, scrollable `role="tree"` list of span rows, so large traces stay fast. Rows are flattened from the span tree and the collapse state, and collapsed spans hide their descendants. The children you pass are the per-row template. - `Trace.Cell` is the tree column for a row: indent by depth, an expand/collapse toggle when the span has children, the span name and `Trace.Duration`. - `Trace.Lane` is the timeline column for a row. For now it's only the positioned container that bars and markers will fill in the next PR, and it has no padding so it lines up with the Ruler. - `Trace.Duration` shows the formatted duration, and pulses (motion-safe only) while the span is running. - The root now holds view state: `selectedId` and the set of collapsed spans. Both are uncontrolled and available through `useView()`. Selection is here because rows are interactive and the Inspector PR will read it. - Keyboard support follows the tree pattern, with a roving tabindex: - Up/Down move focus. - Right expands a collapsed row. - Left collapses an expanded row, or moves focus to the parent from a collapsed row or a leaf. - Enter or Space selects. - Arrow keys move focus only. Selection is separate and happens on Enter, Space or click. - `utils.ts` gains `flattenTree` (visible rows with depth, `hasChildren` and `isExpanded`) and `formatDuration` (three significant digits on top of `formatMs`). - New dependency: `@tanstack/react-virtual` in `ui-patterns`, using the same range as Studio (`^3.13.24`) and with a matching `pnpm-lock.yaml` change. - The Tracing docs example now renders the rows, with the preview sitting under the "Rows" heading. There are no bars yet, so the timeline column is empty apart from the ruler. Bars come in the next PR. ## Additional context This is PR 3 of a stack, so it builds on `kemal/debug-243-2-trace-waterfall-ruler` and PR 4 builds on this branch. The earlier exploration is in the draft #51184, which stays open as reference until the stack lands. Left out on purpose: - Controlled `selectedId` props. - `aria-setsize` and `aria-posinset`. - Hidden-descendant counts, which come with the collapsed-children marks in PR 4. A span whose parent is missing is treated as a root, which is how PR 1 already behaves, so there's no separate orphan handling here. ## Review instructions 1. Open the preview link and find the Tracing page under UI Patterns. 2. In the example, check the rows render with indent, toggles, names and durations, and that the timeline column lines up under the ruler. 3. Collapse and expand a parent with the toggle. Its descendants should disappear and reappear. 4. Click into the tree and use the keyboard: 1. Down moves focus to the next row. 2. Right expands a collapsed row. 3. Left collapses an expanded row. 4. Left on a leaf or a collapsed row moves focus to its parent. 5. Enter selects the focused row. 5. In the live example, check the running span's duration pulses, and that it doesn't when your OS has reduced motion on. 6. Switch between light and dark mode and check the rows, toggles and selected state are legible in both. 7. Read `Rows.tsx`, the view state in `Trace.tsx` and the additions to `utils.ts`. Run the Trace unit tests in `packages/ui-patterns`, which now cover `flattenTree` and `formatDuration`, and run typecheck and Prettier. |
||
|
|
1854331fb6 |
[FE-3106] (part 2) – refactor(studio): move api handlers into route files (#53202)
Moves every `pages/api/**` handler into its TanStack server route under `routes/api/**` and deletes `pages/api/**`, part of the final pass of the TanStack Start migration (FE-3106). Handlers move verbatim and still run through `toWebHandler`, so auth (`apiWrapper`), response shapes and headers are unchanged. Part 2 of the stack. **Depends on:** #53199 **Changed:** - `routes/api/**` – each route now holds its handler (formerly the `pages/api` default export) as a local `nextHandler`/named function. Next-only `config`/`maxDuration` exports are dropped: `vite.config.ts` already sets the function `maxDuration`, and `toWebHandler` parses bodies itself - `routes/api/ai/docs.ts` – Web-native handler inlined, `NextRequest` → `Request` - `lib/api/apiHelpers.ts` – `getPgMetaRedirectUrl` moved here from the old `tables` handler, which the other pg-meta routes imported it from - `eslint.config.cjs`, `.github/CODEOWNERS` – `pages/api` paths → `routes/api` - `tests/routes/api/**`, `lib/api/{generate-v4,rate}.test.ts`, `scripts/__tests__/server-source-maps.test.ts` – call the route's registered handler with a Web `Request` (`tests/lib/server-route.ts`); the MCP query-validation cases now run against the native route **Removed:** - `pages/api/**` (102 files), including the Next twins of the already-native `routes/api/mcp/index.ts` and `functions/$slug/body.ts` - unused `ProjectSettings` types and the `node-mocks-http` dev dependency Parity: every route registers the same methods its handler serves. The exceptions are `check-cname`, `get-ip-address`, `get-utc-time`, `get-s3-keys`, `get-deployment-commit`, `cli-release-version` and `connect`: in Next they answered any method, and their routes register `GET` only, as before this PR. Addresses [FE-3106](https://linear.app/supabase/issue/FE-3106/move-page-bodies-into-route-files-and-delete-pages). ## To test - Load the table editor, SQL editor and Auth users on a self-hosted build – `/api/platform/**` and `/api/v1/**` respond as before - Use the Assistant and the docs search – `/api/ai/**` streams as before - `GET /api/get-deployment-commit` – same JSON and `Cache-Control` Ran typecheck, ESLint, lint ratchet, knip, Prettier, the TanStack build and the full Studio vitest suite: all pass except `lib/server/configcat.test.ts`, which also fails on `master` in an environment with ConfigCat env vars set. Self-hosted E2E is CI-only. --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
86f9c0c250 |
chore(deps): bump node-forge to 1.4.3 (#53261)
## Problem `pnpm audit` reports a moderate advisory for `node-forge` 1.4.2 (patched in `>=1.4.3`). It is a transitive dependency, pulled in through `nuxt` > `@nuxt/nitro-server` > `nitropack` > `listhen` by `@supabase/vue-blocks`. ## Solution Ran `scripts/fix-audit-vulnerability.ts node-forge`, which resolved `node-forge` to 1.4.3 without leaving a permanent override. The only change is in `pnpm-lock.yaml` (`node-forge` 1.4.2 to 1.4.3). No `package.json` or `pnpm-workspace.yaml` changes. Checks run: - `pnpm install --frozen-lockfile` succeeds. - `pnpm why node-forge --recursive` shows a single version, 1.4.3. - `pnpm tsx scripts/fix-audit-vulnerability.ts --json` no longer lists `node-forge`. - `pnpm --filter @supabase/vue-blocks run typecheck` passes. ## Review instructions No UI change. To verify: 1. Run `pnpm install --frozen-lockfile`; it succeeds. 2. Run `pnpm why node-forge --recursive`; it shows only `node-forge@1.4.3`. 3. Run `pnpm tsx scripts/fix-audit-vulnerability.ts --json`; `node-forge` is not in `vulnerabilities`. 4. Confirm the diff touches only `pnpm-lock.yaml`. ## 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) [FE-4990](https://linear.app/supabase/issue/FE-4990/bump-a-single-vulnerable-dependency) --------- 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> |
||
|
|
1a2e8c679b |
feat(studio): handle visible project permissions for scoped pat (#53227)
## Problem We had some org permissions lingering when the permission form was scoped to project only. ## Solution We narrow the possible permissions you can pass, here's what changed with some guards. - On Project scope, 11 permissions that can’t work no longer appear. These are the org-level ones (Members, Projects, Billing and the like) plus a few rows with nothing behind them. Organization scope and full-access tokens look exactly as before. - Organization Settings lost its “Read” option on Project scope. You can pick None or Read-write. Read-write is still needed for one thing: claiming a project through OAuth. - Hidden permissions can’t slip through. Switching scope clears them, presets skip them, the counters ignore them, and the request sent to the API drops them as a last check. - A shared package was updated, which wasn’t in the plan. Six of those rows weren’t showing in the form at all because shared-data was on an older version of @supabase/shared-types than Studio. Claude Code updated it so the form matches the full permission list. **That makes the PR touch package.json and the lockfile, so call it out in review.** - One loose end: the Full access preset description still mentions “organization members”, which is now hidden on Project scope. Fixing it would mean changing copy, so it was left for a follow-up. ## Review instructions 1. Check out the branch and run `pnpm install` — `packages/shared-data` picks up a new `@supabase/shared-types`, so this isn't optional. 2. Run `pnpm dev:studio` and open http://localhost:8082/account/tokens. 3. Open the dev toolbar (the floating Supabase button, or the user dropdown), go to **FLAGS → ConfigCat**, and turn on `scopedPAT`. 4. Click **Generate new token**. **Resource access** defaults to **Project**. 5. Expand all five permission categories. See that 11 rows are gone: Organizations, Organization Audit Logs, Organization Billing And Invoices, Organization Configuration, Organization Members, Organization Projects, Platform Webhooks (organization), Project Authentication Hooks, Project Authentication Users, Perform Developer Level Operations, and the project-level SQL Snippets. 6. See that SQL Snippets (account-wide), Projects (account-wide), Organization Settings, and every other row are still there. 7. Open the **Organization Settings** dropdown. See that it offers only **None** and **Read-write**. 8. Switch **Resource access** to **Organization**. See that all 11 rows come back, and Organization Settings offers **Read** again. 9. Set **Organization Members** to Read-write and **Organization Settings** to Read. Switch to Project, then back to Organization. See that both are now **None**. 10. Switch back to Project and apply **Preset · Read-only**. See that Organization Settings stays at None and no hidden row is set. 11. Fill in a name, organization, and project, then create the token. See that the `POST /platform/profile/scoped-access-tokens` request body contains none of the hidden scope IDs. |
||
|
|
2ac3b77594 |
chore: replace pnpm hooks and chains with turbo task dependencies in the remaining apps (#53169)
## Problem `ui-library`, `design-system`, `learn`, `kb`, `www` and `studio` still order their build, dev and typecheck steps with pnpm `pre`/`post` hooks, `&&` chains and `run-p`. Turbo can't see those steps, so it can't cache or parallelize them. Follow-up to #52556, which migrated `apps/docs`. Part of [FE-4977](https://linear.app/supabase/issue/FE-4977/migrate-remaining-apps-pnpm-scripts-to-turbo-tasks). ## Solution The ordering now lives in each app's `turbo.jsonc` as `dependsOn`, the hooks and chains are gone, and scripts with same-package prerequisites are wrapped with `maybe-turbo`. `node .agents/skills/turbo-scripts/scripts/audit.mjs apps/<name>` reports no findings for any of the six apps. - **`ui-library`, `design-system`, `learn`:** content, registry and markdown steps are turbo tasks with declared outputs. `dev:content` uses the `with` key. `build:next` and `dev:next` are folded into `build` and `dev`. `ui-library`'s markdown task now depends on `build:registry`, which the old chain hid. `pnpm --filter library build:registry` still regenerates the committed registry output. - **`kb`:** `fetch:federated-content` is uncached, and the tasks that read its output use `jit` inputs. - **`www`:** - `build` depends on `docs#build:guides-markdown`, so federated content is fetched once instead of twice. - `build:next` is folded into `build`. - `typecheck` runs `next typegen` itself. - `turbo-build.test.ts` is updated for the new task graph. It reads `PATH` through a copy of the env, because `turbo/no-undeclared-env-vars` flags it once the `passThroughEnv: ["*"]` wildcard is gone. - `passThroughEnv: ["*"]` is gone, and the env vars the content scripts read are declared. - **`studio`:** `typecheck` runs `next typegen` inline, and `lint` depends on a new `lint:type-checks` task. The `predev` turbopack cache clean moved into `scripts/dispatch.js`. It's a local side effect, and making it a turbo task would route `dev` through turbo's strict env filtering, which drops `NODE_ENV`, `MODE` and `STUDIO_FRAMEWORK`. ## Review instructions - For each app, check that a second `pnpm build` hits the cache. `www`'s fetch and content tasks re-run by design, since they're uncached. - Not verified: the `www` and `studio` dev servers started from the repo root, a Studio production build, the e2e flow, and runs with real production credentials. - `kb`'s build reads a remote database that turbo can't hash. It stays cached, keyed on `SUPABASE_URL`. Say if you'd rather make it uncached. - Builds rewrite two tracked files, `apps/docs/public/markdown/manifest.json` and `apps/www/public/customers-rss.xml`, so a fresh checkout can miss the cache once. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
653dfb7104 |
Fix client crash when landing on new project page (#53206)
## Why it's happening
Opening `/new/[slug]` on the TanStack/Vite dev server crashes with
`TypeError: Cannot read properties of undefined (reading 'from')`. It is
thrown from `.vite/deps/randombytes.js`, inside a `<Lazy>` boundary.
From what I understand it's happening as:
- `lib/project.tsx` imports `generate-password-browser`, which imports
`randombytes`, which imports `safe-buffer`.
- `safe-buffer` calls `require('buffer').Buffer.from`.
- In dev, Vite swaps the Node `buffer` built-in for an empty stub, so
`Buffer` is `undefined`.
Fix is to alias `buffer` to the `buffer` npm package in
`vite.config.ts`, and add `buffer` as a direct Studio dependency.
It's oddly only happening on local but not staging/prod which I'm not
too sure why honestly. Afaict from investigating with Claude, prod
builds already bundle the real `buffer` package, so `Buffer.from` exists
there, but not exactly sure how the build finds it, since nothing in the
repo declared it.
## To test
Only on local:
- [ ] First verify if the client crashes when landing on `/new/[slug]`
- Please let me know if this isn't happening on your end in which case
it might be something on my machine then perhaps
- [ ] Then checkout this branch and verify that client doesnt crash when
landing on `/new/[slug]`
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
3a76beea91 |
feat(studio): classify fetch-layer errors with endpoint and method (#53048)
## Problem Follow-up to #52730. Resolves part of FE-4772. Fetch failures and aborts were classified as `UnexpectedError`, and HTTP error responses with empty, HTML, or plain-text bodies did too. ## Solution **Network failures and aborts keep their classification.** `fetchHandler` used to rewrite `Failed to fetch` into a plain `Error`, so openapi-fetch network failures were classified as `UnexpectedError`. It now throws `classifyError(err, { endpoint, method })`, giving `NetworkUnreachable` (same user-facing message, original error as `cause`) or `RequestAborted`. The endpoint comes from `schemaPath`, recorded in `onRequest`. Tagged aborts are no longer named `AbortError`, so `isRequestAborted()` checks for both. `state/storage-explorer.tsx` uses it, so cancelling a folder load no longer shows an error toast. **One place reads error responses.** `readResponseError` in `data/error-classification.ts` turns an HTTP error response into a `RawResponseError`. It reads the status, `Retry-After`, the message from a JSON body or a short `text/plain` body (never HTML), plus `requestId`, `endpoint`, and `method`. The openapi-fetch middleware serializes its result into the error body. openapi-fetch builds `error` only from the response body, so that step can't be skipped. `parseResponseErrorBody` now only checks the shape. Empty, HTML, and plain-text error bodies now classify by status. Before, they became `UnexpectedError`. `fetchGet`/`fetchPost`/`fetchHeadWithTimeout` (Studio's own `/api` routes) use the same helper. This also fixes a non-JSON error body making them reject with a `SyntaxError`. **`requestPathname` is replaced by `endpoint`.** The no-retry list and the statement-timeout check in `query-client.ts` match OpenAPI patterns exactly. Critical error messages in `lib/error-reporting.ts` use the pattern, so concrete project refs stay out of them. `path-to-regexp` is no longer used, so it's removed. ## Review instructions 1. From `apps/studio`, run `vitest run data lib components/interfaces/ErrorHandling state`. Expect 4,034 passing tests. 2. Review `readResponseError` in `data/error-classification.ts` and its use in `data/fetchers.ts`. ## Additional context ### Notes - Critical error messages now read `endpoint … w/ message: …`. This regroups those Sentry issues. - A JSON body's `error` string is now accepted as a message for API responses. Before, only the `/api` route path read it. ### Testing - New `data/fetchers-errors.test.ts` covers network failure, abort, empty/HTML/plain-text/JSON error bodies, service derivation, and `/api` route non-JSON bodies. - Unit tests for `readResponseError`, `isRequestAborted`, and the no-retry endpoint set. - `vitest run data lib components/interfaces/ErrorHandling state`: 4,034 pass. ## 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) |
||
|
|
11a71d795a |
chore(docs): replace pnpm lifecycle hooks with turbo task dependencies (#52556)
## Problem `apps/docs` ordered its build, dev and codegen steps with pnpm `pre`/`post` hooks and `&&` chains. Turbo couldn't see those steps, so it couldn't cache or parallelize them, and running the build through turbo ran the codegen twice. Part of [FE-4948](https://linear.app/supabase/issue/FE-4948/migrate-the-pnpm-scripts-to-use-turbo). ## Solution The ordering now lives in `apps/docs/turbo.jsonc` as `dependsOn`, and every pre/post hook is gone. The new `maybe-turbo` workspace bin runs a script through `turbo run` unless it's already inside turbo, so `pnpm build`, `pnpm dev`, `pnpm codegen:references` and the other entry points keep running their prerequisites. Turbo is bumped to 2.11.10 for its `jit` input mode. Tasks downstream of the uncached remote fetches use it to hash the gitignored files those fetches write after they finish, so a cache hit can't restore output built from older content. Strict-mode env vars are declared. Other changes: - The R2 upload moves from `postbuild` to the `vercel.json` build command, so it still runs when the build is a cache hit. - `codegen:references:new:ensure` re-downloads when any JavaScript TypeDoc dump is missing or empty. - The guides manifest is now sorted, so its output is deterministic. - A new `turbo-scripts` agent skill (listed in `AGENTS.md`) documents these conventions for every app. Its audit script, `node .agents/skills/turbo-scripts/scripts/audit.mjs apps/<name>`, flags scripts that need `maybe-turbo`, leftover `pre`/`post` hooks, script chains, and wrapped scripts without a turbo task. ## Review instructions 1. Read `packages/maybe-turbo/README.md`, `apps/docs/turbo.jsonc` and `.agents/skills/turbo-scripts/SKILL.md`. 2. From `apps/docs`, set `GH_TOKEN=$(gh auth token)` for the federated fetch and run `pnpm run build:markdown` a few times. Once warm, every task except `build:federated-content` and `codegen:references:new:ensure` should hit the cache. 3. Run `pnpm build` from `apps/docs` and check that the docs Vercel preview deploys and renders normally. ## 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) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
597d1ce56e |
fix(studio): pass caller options to grant-gated query factories (#53088)
## Context Grant-gated query factories returned `queryFn: skipToken` when the caller had no grant. TanStack Query keeps one options object per cache entry, overwritten by whichever observer rendered last. When that was a grant-less observer, invalidation refetched with `skipToken` and failed with `Missing queryFn`, breaking the query for every other observer on the key. #53075 patched two call sites; this fixes the factories. ## Changes - New `grantedQueryOptions` helper (`data/granted-query-options.ts`). Without a grant, the factory sets `queryFn: undefined` instead of `skipToken`, so TanStack borrows the query function from a subscribed observer that has one. The caller's `enabled` applies only when the factory has a query function. - `apiKeysQueryOptions`, `revealedApiKeysQueryOptions`, `branchesQueryOptions`, `branchQueryOptions` and `branchDiffQueryOptions` take caller options as a second argument. Call sites change from `useQuery({ ...f(vars), enabled })` to `useQuery(f(vars, { enabled }))`, so callers can't override the grant gate. - New type-aware `fga/no-spread-granted-query-options` lint rule (error). `grantedQueryOptions` returns a type-only brand, and the rule flags any spread or `Object.assign` of a branded value, however it was built or named. - Restores typed linting as a separate pass (`eslint.type-checks.config.cjs`, run by `pnpm lint` via `lint:type-checks`), as #44678 did. Enabling type info in the main config changes what other plugins report, so it stays separate. - `studio-queries` skill documents the pattern. Callers still pass their own grant, so the UI gates on the same grant the request carries. ## Testing - `data/api-keys/api-keys-query.test.tsx`: a granted and a grant-less component share the key, with the grant-less one rendering last; invalidation via the delete mutation refetches successfully. Fails on master with `Missing queryFn`. - `data/granted-query-options.test.ts`: `enabled` gating, factory fields win over caller fields, `select` type inference. - Lint rule cases in `scripts/__tests__/fga-eslint-rules.test.ts`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
fe7b3ad6af |
chore: bump @graphql-codegen and its deps (#52785)
## Problem `@graphql-codegen/cli` and related packages in `apps/studio` and `apps/docs` were pinned to old major versions (`cli` 5.0.5, `typescript` 4.1.6, `typescript-resolvers` 4.5.0). ## Solution - Bump `@graphql-codegen/cli` to `^7.0.0` and `@graphql-codegen/typescript-resolvers` to `^6.0.0`. Drop the explicit `@graphql-codegen/typescript` dependency from `apps/docs`. - Regenerate the Studio GraphQL output in `apps/studio/data/graphql/` with the new codegen. The generated files now include an `index.ts` export change, and `graphql.ts` is much smaller. - Refresh `apps/studio/scripts/schema.graphql`, which picks up the new `ManagementApiReference` search result type. - Update `.prettierignore` (ignore `apps/studio/.output`, `apps/studio/dist`, and all of `apps/ui-library/public`) and run Prettier on the regenerated files. ## Review instructions 1. Check the dependency bumps in `apps/studio/package.json` and `apps/docs/package.json`. 2. Re-run the Studio codegen and confirm it produces no diff in `apps/studio/data/graphql/`. 3. Run `pnpm typecheck` and confirm the GraphQL consumers in Studio still compile. ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
da6360147c |
chore(studio): bump @supabase/mcp-server-supabase to 0.16.0 (#53044)
## Summary - Bump `@supabase/mcp-server-supabase` from `^0.15.0` to `^0.16.0`. - Share the self-hosted MCP platform between both `/api/mcp` routes, typed without `notebooks`, so the notebook tools enabled in 0.16.0 stay out of self-hosted. Self-hosted Studio doesn't support notebooks yet. Closes [AI-1407](https://linear.app/supabase/issue/AI-1407/2b-update-self-hosted-remote-mcp-server-self-hosted-studio-assistant) |
||
|
|
6d08d66b7d |
Add eslint rule for google translate dynamic spans + address all issues (#52949)
## Context We've been seeing many `NotFoundError: Failed to execute 'removeChild' on 'Node'` and `NotFoundError: Failed to execute 'insertBefore' on 'Node'` events on Sentry which are historically known to be caused by Google Translate in the browser. There's technically no _right way_ to address this unfortunately, but one of the solutions which should address most of these issues is to wrap any dynamic text within a span - we've considered that quite a while back tbh but never took the time to do this until today with the help of Claude. Although just a heads up that it might not necessarily completely eradicate those issues. Also added an eslint rule which should prevent future occurences of this <img width="1264" height="192" alt="image" src="https://github.com/user-attachments/assets/b2c32ea0-45a2-4ccd-82fe-1a859905fc29" /> |
||
|
|
1f75a630c2 |
fix: update Ask AI model (#52736)
OpenAI is retiring the pinned GPT-4o mini snapshot on January 14, 2027, but "Ask AI" on our site(s) still uses it. This PR replaces it with GPT-6 Luna at low reasoning, which is a similarly cost effective model. Its completion budget is increased to allow room for reasoning, while the total cap preserves the previous input allowance. I noticed the `packages/ai-commands` where this was defined also includes dead code from older versions of SQL and cron helpers, so this also removes them for housekeeping. I also upgraded the OpenAI SDK to support types for the new model. To test, try asking a question in "Ask AI" in the docs [preview](https://github.com/supabase/supabase/pull/52736#issuecomment-6618563374) build: <img width="568" height="583" alt="CleanShot 2026-11-03 at 7 22 29 PM@2x" src="https://github.com/user-attachments/assets/fe8f824f-3884-44b8-affd-5710343e0101" /> Note the "Rename with Supabase AI" feature doesn't work but that's an existing issue not related to this PR: https://github.com/supabase/supabase/issues/51438 **References** - https://developers.openai.com/api/docs/deprecations - https://developers.openai.com/api/docs/models/gpt-6-luna Closes AI-1397 |