mirror of
https://github.com/supabase/supabase.git
synced 2026-12-05 07:59:03 +00:00
create-pull-request/patch
22209
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
797a43c7d0 |
feat(studio): add a shared shield badge to identity verification (#53145)
## Problem The authenticator and recovery-code verification screens use the plain Supabase logo, while other security interstitials use a badge to show the purpose of the screen. ## Solution Add the same shield with a cut-out check to **Verify your identity** and **Use a recovery code**, using `InterstitialLogoBadge`. | After | | --- | | <img width="942" height="456" alt="CleanShot 2026-11-09 at 18 02 09@2x" src="https://github.com/user-attachments/assets/6e19eb79-7b42-4f95-967d-479ca38cc347" /> | | _Note the grey “Shield with cut-out check” for verification interstitials like this one._ | | <img width="1016" height="454" alt="CleanShot 2026-11-09 at 10 35 46@2x" src="https://github.com/user-attachments/assets/dca51146-c7ee-44fd-a318-ef7101f1c77f" /> | | _No visual changes here, just showing the family of badges._ | ## Review instructions 1. On [Security on this preview](https://studio-staging-git-dnywh-verification-shield-badge-supabase.vercel.app/dashboard/account/security), follow [#52352’s breakpoint steps](https://github.com/supabase/supabase/pull/52352#review-instructions) with a disposable MFA account that has recovery codes. Check for the shield in the top-right corner of the Supabase logo. 2. Choose **Use recovery code instead**. Check that the same badge appears on the recovery-code screen. |
||
|
|
c6a9401801 |
fix(studio): standardise interstitial logo badges (#52748)
## Problem Interstitial logo badges use custom sizes and scaling. This becomes brittle as we extend the amount of icons beyond just those in Admonition. ## Solution Share a standard 20 px badge with a 14 px icon with the new `InterstitialLogoBadge`. Apply it to the _Secure your account_ interstitial. This `InterstitialLogoBadge` will be used with a `shield-check` like icon for the one-time password interstitial. | After | | --- | | <img width="1016" height="454" alt="CleanShot 2026-11-09 at 10 35 46@2x" src="https://github.com/user-attachments/assets/dca51146-c7ee-44fd-a318-ef7101f1c77f" /> | | _See the orange badge; this is now served via `InterstitialLogoBadge`. No visual changes._ | ## Review instructions 1. With a spare or disposable staging account: open [Account Security on this preview](https://studio-staging-git-dnywh-interstitial-logo-badge-supabase.vercel.app/dashboard/account/security). Set the following conditions: - Has one MFA method - Has no recovery codes (you might need to delete these) 3. Navigate to any other Studio page (you can just tap _Back to dashboard_). Assuming you haven’t snoozed a reminder recently (see local storage), you should land on _Secure your account_ interstitial. 4. Check the warning badge overlaps the Supabase logo cleanly in light and dark mode. |
||
|
|
a93a3a78f5 |
feat(studio): clarify configured sign-in methods (#52356)
## Problem In Account Preferences, the option to add a password looks like an email sign-in method that is already set up. ## Solution - Make configured sign-in methods easier to scan, with consistent rows, icons and edit controls. - Put **Add password** above the list as a separate suggestion. If GitHub is your only way to sign in, explain how a password gives you a backup. The Email row appears after you set a password. This PR updates the existing section in Preferences and can merge on its own. #52358 moves the section to Security and decides which action to emphasise across sign-in, MFA and recovery codes. | After | | --- | | <img width="744" height="294" alt="Security Account Supabase" src="https://github.com/user-attachments/assets/f11d102f-58a3-4d8b-88fd-d03b51b40c0f" /> | | _User with GitHub only._ | <img width="1442" height="484" alt="CleanShot 2026-11-09 at 13 09 00@2x" src="https://github.com/user-attachments/assets/885537d3-6b01-47dc-95f9-d545b7f8f249" /> | | _When a user has both GitHub and email sign-in, and a password attached to that email address._ | | <img width="1432" height="390" alt="CleanShot 2026-11-09 at 13 08 43@2x" src="https://github.com/user-attachments/assets/f2d6f635-43f9-47ea-92cd-09d6c216f7bd" /> | | _SSO user._ | ## Review instructions 1. Open [Sign-in methods](https://studio-staging-git-dnywh-recovery-signin-polish-supabase.vercel.app/dashboard/account/me#sign-in-methods) with an OAuth-only test account. Check the password suggestion sits above the configured methods. 2. On a disposable account, add a password. Check the Email row appears and the email-edit tooltip opens above its button. Linking a provider should still return you to Preferences. --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
b9fd4f8bdf |
Fix TS (#53189)
### Context Just fixing TS issues from merging this [PR](https://github.com/supabase/supabase/issues/53079) |
||
|
|
2ecd504df8 |
docs: add Nick Clark to humans.txt (#53187)
## Problem Add Nick Clark to the Supabase team list in `apps/docs/public/humans.txt`. ## Solution Insert the name in alphabetical order between Nick B and Nick Littman. ## Review instructions 1. Open `apps/docs/public/humans.txt`. 2. Confirm `Nick Clark` appears once, between Nick B and Nick Littman. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md). - [x] This change does not add or edit a docs topic. ## Self-review - Verified the one-line diff and ran `git diff --check`. - No build or tests were run for this static text entry. Co-authored-by: Nick Clark <nick.clark@supabase.io> Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
f87de2f0d0 |
Joshenlim/fe 4593 cmd k related resources while in table editor (#53079)
## Context Building on towards resource-aware Cmd K, the changes done up so far have all been to allow users to search for database resources from anywhere in the project, with the intention to get you to the resource quickly without having to go through the navigation hierarchy of the dashboard. This PR explores a way to quickly glance related resources for a table in the Table Editor through Cmd K for that same intention, but listing out the policies, triggers or functions that run on the table that you're currently viewing in the Table Editor. E.g here we've got the `blog_authors` table opened: <img width="500" alt="image" src="https://github.com/user-attachments/assets/78c9b85f-cd30-4564-a264-c1a2a596d5c2" /> Policies and triggers are fairly straight forward since we can determine what's related by their target table. Functions are a bit more fuzzy as we're trying to find what's related by checking the function definition, if it does anything to the table. For e.g based on the screenshot above, `blog_handle_new_user` has this definition which was why it was flagged <img width="500" alt="image" src="https://github.com/user-attachments/assets/fb8f3be4-05df-4d87-8440-8b75d95546ae" /> We're also deliberately decoupling loading of policies + triggers and functions since searching functions takes slightly longer, so opting to load results of policies + triggers first, then lazy load functions subsequently once results are ready ## Performance As usual, ran a benchmarking session with Claude just to make sure that the added SQL doesn't cause any performance issues, these are aggregates of 4–5 runs. **Catalog size (stress catalog)** | Query | 2,000 tables | 10,000 tables | |---|---|---| | Policies and triggers, hub table (many FKs) | 0.1 ms | 0.5–1.3 ms | | Policies and triggers, ordinary table | ~0 ms | ~0 ms | | Functions, every body matches | 1.4 ms | 4–8 ms | | Functions, no match (full scan) | 1.8 ms | 7.3–7.7 ms | | Functions, table not visible | 0 ms | 0 ms | **Large function bodies** (random text, 2,000 tables plus 2,000 small functions, plus the large ones added) | Function source | Largest function | Functions: no match (full scan) | Functions: every body matches | |---|---|---|---| | 56 MB (600 functions) | 94 KB | ~50 ms | 2 ms | | 103 MB (+10 multi-MB) | 4.7 MB | ~92 ms | 2 ms | ## To test Use a project with a table that has at least one policy, one trigger, and a function that mentions the table in its body. - [ ] Open that table in the Table Editor and press Cmd+K. A **Related resources** section appears at the top with its policies, triggers, and functions. - [ ] Click a policy, a trigger, and a function. Each opens its editor on the right resource. - [ ] A trigger's function does not also appear under the functions rows. - [ ] Type part of one of those names. The section narrows to matching rows and the project-wide entity results appear below. A resource can appear in both. - [ ] Type something that matches nothing in the table. The section disappears rather than showing empty. - [ ] Clear the input. The full section comes back without a loading flicker, since the data is cached. - [ ] Open the table editor on a table with no policies, triggers, or referencing functions. Cmd+K shows no empty **Related resources** section. - [ ] Switch to a different table and press Cmd+K. The section shows that table's resources, not the previous table's. - [ ] Open Cmd+K from a non-Table Editor page, such as the SQL Editor. The section is not shown. - [ ] In the network tab, check that opening the menu sends one query for policies and triggers and one for functions. Typing sends no additional ones for this section. |
||
|
|
c62f07f940 |
fix(kb): ai tools events (#53180)
## Problem - kb guide sidebar shows the AI tools block from docs, with the same shared `AiTools` component - docs sends `agent_setup_clicked`, `copy_as_markdown_clicked` and `ask_ai_clicked` from that block, but kb sends no event for any click ## Solution - adds the docs events to the kb AI tools block, so a kb click sends the same event as a docs click - adds `kb` to the `pageType` values, because the kb sidebar also shows on troubleshooting pages, so `guide` is not correct - changes `agent_setup_clicked` to send with `keepalive`, because the connect link opens a page in the same tab and the browser can cancel the request - moves the kb telemetry sender to one module, so kb search and the sidebar use the same platform and consent checks - adds a test that clicks each AI tools item and checks the event that kb sends <!-- ## 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 kb test`, and make sure that `GuideSidebar.test.tsx` and `KbSearch.test.tsx` pass 2. open [/kb/guides/best-supabase-auth-providers](https://kb-git-antlio-fix-kb-ai-tools-event-supabase.vercel.app/kb/guides/best-supabase-auth-providers) and accept the cookie banner 3. open the browser network panel, turn on "Preserve log" and filter the requests by `telemetry/event` 4. click "Copy as Markdown", "Ask ChatGPT" and "Ask Claude" in the AI tools block 5. make sure that each click sends one request, and that `custom_properties` has `pageType: "kb"` and `platform: "kb"` 6. go back to the guide and click "Connect your AI agent" 7. make sure that the log shows one `agent_setup_clicked` request after the docs page opens 8. search for a term in the kb header, and make sure that `kb_search_submitted` still sends ## 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) |
||
|
|
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) |
||
|
|
f314e6dc19 |
feat(studio): one click attribute filters in the unified logs overview panel (#53170)
## Problem Filtering via properties in the Overview tab of Unified Logs had a couple of clicks to it. ## Solution Attribute rows now expose equals and not-equals directly, through one shared code path. - **Hover devices** (`(hover: hover) and (pointer: fine)` above `md`): hovering or keyboard-focusing a row reveals borderless icon buttons at its right edge — equals, not equals, copy — following the same reveal pattern as the "Only" button on the sidebar filters. The value fades out behind them so nothing is occluded or reflowed. - **Touch devices and small viewports**: unchanged dropdown, now listing "Filter: equals", "Filter: not equals" and "Copy <attribute>" instead of the single "Add filter". - Only rows that can actually be filtered get filter actions; everything else gets copy alone. | Before | After | |--------|--------| | <img width="451" height="191" alt="Screenshot 2026-11-09 at 16 12 08" src="https://github.com/user-attachments/assets/ffc68a34-4373-44ea-8922-8f5b3dd436a0" /> | <img width="465" height="148" alt="Screenshot 2026-11-09 at 16 12 25" src="https://github.com/user-attachments/assets/0bf41014-25d7-4390-ba5f-ab7a796ec1de" /> | ## Review instructions 1. Open the preview, go to a project's Logs, and click a log row to open the detail dock on the Overview tab. 2. Hover a filterable row (Path, Method, Status, or any attribute). Equals, not-equals and copy buttons fade in at the right edge; the value fades out. Tab into them to check the focus rings and tooltips. 3. Click the equals button on Path. The filter appears in the filter bar and the log list updates. Do the same with not-equals on another row and confirm the chip uses `<>`. 4. Hover a row that can't be filtered (for example Host or Client). Only the copy button appears, and no filter action is offered. 5. Apply the same filter twice — no duplicate chip. Then apply the opposite operator on that column — the chip's operator is replaced rather than mixed. 6. Narrow the window below 768px (or use a touch device). The hover buttons disappear and clicking a row opens the dropdown with "Filter: equals", "Filter: not equals" and "Copy <attribute>". |
||
|
|
5b09806690 |
fix(studio): apply Studio error policy on the TanStack server (#53174)
Part of FE-4772. Follow-up to #53059. ## Problem #53059 made `beforeSend` drop `UserSqlError` and redact `StudioSqlError`, and added that hook to `sentry.server.config.ts`. Only the Next build loads that file. Production runs the TanStack Start build, which initializes server Sentry in `instrument.server.mjs` with no `beforeSend`. ## Solution - **`buildSentryServerOptions`** (`lib/sentry-server-options.ts`) holds the shared server options: DSN, environment, trace sample rate, `ignoreErrors`, and `beforeSend` calling `applyStudioErrorPolicy`. It mirrors `buildSentryClientOptions` on the client. - **All three server inits use it:** `sentry.server.config.ts` (Next, Node), `sentry.edge.config.ts` (Next, edge), and `instrument.server.mjs` (TanStack, Nitro). The TanStack init passes the commit SHA as `release`. Next leaves it unset so the release from `withSentryConfig` still applies. - **The edge runtime now gets `beforeSend`** and the full `ignoreErrors` list, which it didn't have before. - `instrument.server.mjs` imports the builder by relative path. Studio's tsconfig doesn't include `.mjs` files, so the `@/` alias may not resolve there. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) |
||
|
|
2c871b42b7 |
fix(studio): show OAuth app client secret in a blocking modal (#53167)
## Problem After creating a confidential OAuth app or regenerating its client secret, the credentials appeared in a small dismissible banner above the apps table. The secret can't be retrieved again, so a missed banner meant regenerating the secret and breaking existing integrations. ## Change - Replace `NewOAuthAppBanner` with `NewOAuthAppModal`, following the pattern of the S3 access key `CreateCredentialModal`. - The modal shows the client ID and client secret with copy buttons and states the secret won't be shown again. - It can only be closed with Done. Outside clicks, Escape and the close button are blocked. - Public apps (no client secret) and plain edits behave as before: no modal. - Create and both regenerate entry points (row menu and sheet) feed the same modal, so no data-layer changes. Step 1: <img width="420" height="251" alt="Image" src="https://github.com/user-attachments/assets/74430837-90fd-49e9-9441-234abc97588a" /> Step 2: <img width="420" height="375" alt="Image" src="https://github.com/user-attachments/assets/92ab3786-8bd1-46cf-a4b4-b2643f288e65" /> ## Testing - Added `NewOAuthAppModal.test.tsx`: credentials and warning render, no modal for public or missing apps, only Done dismisses. - Manual: Authentication → OAuth Apps → create a confidential app, and regenerate from the row menu and the sheet. Closes #53116 Linear: FE-4976 |
||
|
|
0208c0b242 |
feat(studio): send the platform marker on flag tracking calls (#53165)
I changed Studio's feature-flag tracking call to send `platform: 'studio'`, so `$feature_flag_called` events captured by the management API carry the same app marker as Studio's other events (#53078). I held this step back until the API's strict flag-track body schema accepted the field in production, which it has since 2026-11-09. **Note:** I regenerated `packages/api-types` with a full `codegen:prod` run, so it also includes other recent production API additions. The `verify-production-api-types` check diffs every type file against production, so a single-type update would fail it. ## To test Accept the cookie banner first: flag tracking only fires after consent. Tested on the PR preview: - [x] Sign in to the studio-staging preview, open any project page, and find the `POST /platform/telemetry/feature-flags/track` request in DevTools: expect the body to include `"platform":"studio"` and a 2xx response (a 400 means the field was rejected). Observed `{"feature_flag_name":"proBenefitWording","feature_flag_value":"variant-a","platform":"studio"}` with a 201, and every `/platform/telemetry/feature-flags` GET returned 200. ## Linear - fixes GROWTH-1461 |
||
|
|
529ca5aa1d |
fix(studio): update CPU usage docs link FE-4820 (#53168)
## Problem The CPU usage info icon was reported to open a 404 page. Its chart definition points to the former telemetry reports URL, which currently redirects to the observability guide. ## Fix Link directly to the CPU usage section at `/guides/observability/reports#cpu-usage`. ## How to test - Open the Database report and click the info icon next to CPU usage. - Expected result: the Reports guide opens at the CPU usage section. Verified this interaction in the Studio staging preview for commit `316d6a8ae87d52ba3d338da2151c1d7dd99d6339`. Prettier, typecheck/lint, lint ratchet, and all four Studio unit-test shards pass in CI. Local report tests and ESLint were blocked by missing installed dependencies (`effect` and `@eslint/compat`). No new test was added for a static URL change. |
||
|
|
bc9d68a813 |
fix(studio): handle architecture-prefixed Postgres versions in version helpers (#53162)
## Problem `getDatabaseMajorVersion` and `getSemanticVersion` in `apps/studio/lib/helpers.ts` returned `NaN` for Postgres versions with an architecture prefix, e.g. `supabase-postgres-arm64-17.9.0.019` (expected 17 / 1790019). `parseAppVersionKey` already handled `arm64-` and `x86_64-`, but the two helpers did not. Fixes FE-4974 Closes #53109 ## Solution - `formatSemver` now strips any leading architecture token (`^[a-z][a-z0-9_]*-`) rather than a hardcoded list. A version segment always starts with a digit, so this covers `arm`, `arm64`, `x86_64`, `aarch64`, `amd64` and future values. - `APP_VERSION_KEY_RE` in `useSelectedProject.utils.ts` uses the same rule, so the two parsers stay consistent. - Because the rule is generic, strings like `supabase-postgres-custom-123` would otherwise parse as a number. `formatSemver` now rejects anything that doesn't look like `\d+.\d+` after stripping, and both helpers return `0` for it (matching their existing empty-string behavior). Callers only compare the result numerically, so `0` behaves like the previous `NaN`. Tests cover each prefix on both helpers and on `parseAppVersionKey`, a release suffix (`-vault-rc1`), and non-version strings. Not changed: `getSemanticVersion` concatenates segments without padding (`17.10.0.001` becomes 171001, which compares below `17.9.0.019`). That predates this change and its callers pin to a single major line. |
||
|
|
d7f2b501b5 |
feat(studio): add the issue detail page (#52991)
Add issue details, affected resources, and copy actions with coverage for secondary checks and clipboard outcomes. |
||
|
|
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> |
||
|
|
5a3e1fd871 |
docs(logs): document unified CLI logs DEBUG-267 (#53086)
## Problem The unified CLI logs commands need a public guide. The existing SQL guide also says the CLI cannot query hosted ClickHouse logs, which is only true for v2. ## Fix Add **Logs in the CLI** to the Observability navigation and overview cards. Cover local and remote queries, filters and time ranges, interactive versus JSON output, exports, SQL, command options, migration, and troubleshooting. Include screenshots of the explorer and full record details using demo local logs. Keep the v2 CLI reference unchanged and update links from the existing logs and SQL guides. Merge after the CLI version with unified logs is released. Tracks [DEBUG-267](https://linear.app/supabase/issue/DEBUG-267) and [DEBUG-268](https://linear.app/supabase/issue/DEBUG-268). ## How to test Open `/docs/guides/observability/cli-logs` in the preview. Check the section order, images, option tables, and links from Observability, Logs in Studio, and Query logs with SQL. Local examples were verified using the CLI PR build and retained log fixtures. Hosted examples were checked against the implementation but were not rerun against a live project for this docs change. ## Screenshots Explorer showing demo local logs:  Full selected record:  |
||
|
|
e04c556bd5 |
feat(studio): add the issues list (#52990)
Add the Issues list, URL filters, and overview counts with complete advisor refresh handling. |
||
|
|
22c3587058 |
fix(studio): add sqlOrigin and queryName to row large values query (#53164)
## What Fixes the Studio typecheck failure on `master`. #53091 (copy large values when duplicating a row) added an `executeSql` call in `row-large-values-query.ts`. #53059 (split SQL errors into user and Studio SQL) made `sqlOrigin` and `queryName` required. Each PR passed CI by itself, but together they break typecheck. This PR adds the two fields, following the pattern used in the other `data/table-rows` queries. ## Verification - `pnpm typecheck` passes (17/17 tasks) |
||
|
|
c0e92057a6 |
feat(studio): split SQL errors into user and Studio SQL (#53059)
Part of FE-4772. ## Why Errors from the pg-meta query endpoint didn't say who wrote the SQL, so a Sentry issue like SUPABASE-APP-KXE couldn't tell a user's query from one Studio composed. That event came from the assistant's `execute_sql` tool and was captured by the Vercel AI integration on the server, so it skipped `reportStudioError` and had no fault tags. The Postgres message also went to Sentry as-is, and it can contain user SQL and data. ## What - **`sqlOrigin` is required on `executeSql`.** `'user'` covers SQL the user or an AI agent wrote, in whole or in part: SQL editor, editor panel, Explorer, AI `execute_sql` and `run_notebook`, report blocks, Query Insights EXPLAIN, the policy, function, and cron editors, and running a stored cron job. Everything else is `'studio'`. The policy, function, and cron mutation hooks and `useDbQuery` take `sqlOrigin` too. - **`classifySqlResponseError`** turns a 400 from the query endpoint into `UserSqlError` (`user`, `user_sql`) or `StudioSqlError` (`studio`, `studio_sql`). Pattern rules (connection timeouts) and other statuses keep their classes. - **`UserSqlError` never reaches Sentry.** Its routing is `SAMPLE_NEVER`, `alwaysCapture` doesn't override it, and `beforeSend` drops it. - **`StudioSqlError` is redacted.** Error classes can set `sentryMessage`; for `StudioSqlError` it is the SQLSTATE and the query's `queryName`, a static name that `executeSql` requires for Studio SQL. The query key is never reported, since its segments can hold IDs, schemas, and search terms. `applyStudioErrorPolicy` applies it from `beforeSend` on the client and the server, so it holds however the error was captured. The server config gets a `beforeSend` for this. Events get `query_name` and `sql_state` tags and are grouped by both, since every SQL error shares the `executeSql` stack. - **A custom `handleError` gets the classified error**, matching its declared type. The SQL editor, editor panel, and policy editor rethrow it, so their errors are now `UserSqlError` instead of being reported as `UnexpectedError`. The error keeps Postgres's `position` for the editor's line highlight. The error message, `formattedError`, and `position` stay on the error for the UI. The query-performance Sentry context no longer carries the raw error message, which bypassed redaction. ## Known gaps - Index advisor queries run users' query text from `pg_stat_statements` but are marked `'studio'`. Redaction keeps the text out of Sentry, but their failures count as Studio faults. - 5xx responses for user SQL are still `PlatformError` and keep their message. - The self-hosted MCP `executeSql` calls `executeQuery` directly and isn't covered. ## Testing - Unit tests for `classifySqlResponseError`, `applyStudioErrorPolicy`, and the client `beforeSend`. - Full Studio vitest suite passes except `useReportDateRange.test.ts` (169 vs 168 hourly buckets across the DST change), which this PR doesn't touch. |
||
|
|
170dcfc9a0 |
content(kb) - queues listicle (#52982)
## Context Queues provider listicle ## Preview links https://kb-git-kody-devrel-804-queues-listicle-supabase.vercel.app/kb/guides/best-queue-providers --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> |
||
|
|
3ad7cccbf5 |
chore: update cli reference doc (#49619)
Updates the CLI reference from the supabase/cli release workflow. Generated by `scripts/generate-docs-spec.ts` in supabase/cli — edit the command tree or the content under `apps/cli/docs/` there rather than this file. New commands also need an entry in `apps/docs/spec/common-cli-sections.json` — without one a command's page is silently dropped from the docs site. Sections fixes can be committed directly onto this branch — later releases add commits on top instead of rewriting it. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Julien Goux <hi@jgoux.dev> Co-authored-by: Ali Waseem <waseema393@gmail.com> |
||
|
|
011b7cd4ac |
feat(studio): derive issues from advisor lints (#52989)
Part 1 of 6: #52989 → #52990 → #52991 → #52992 → #52993 → #53138 Advisors becomes Issues. This PR maps lints to issues on the client: one issue per check, each lint an affected resource, plus one issue for banned IPs. There's no Issues API yet, so issues exist only while their check fails. Nothing renders them until #52990. ## How to test - Read `data/issues/lint-to-issue.ts`; the rest follows from it. - `pnpm --filter studio exec vitest run data/issues components/interfaces/Issues` --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Jordi Enric <jordi.err@gmail.com> |
||
|
|
4c68610167 |
feat(studio): copy large values when duplicating a row (#53091)
## What Follow-up to #52952. The grid truncates large columns (over 10 KB) in the database query, so \"Duplicate row\" used to leave those fields blank. It now fetches their full values and fills them into the Insert Row panel. ## Behavior - Truncated columns are fetched by primary key after the panel opens. Each one is disabled with \"Loading full value...\" until it arrives, and Save is disabled until every value has settled. Submitting the form another way (e.g. pressing Enter) is blocked too. - Only the truncated fields are filled in, so anything the user has edited is never overwritten. - If a value can't be copied, the field stays empty with a note saying why: - the value is over 1 MB (it isn't sent, so a single row can't pull an unbounded amount of data into the browser) - the table has no primary key - the fetch failed (also shows a toast) - The fetch honors \"View as role\", like the existing \"Load full\" buttons. ## How - New `useRowLargeValuesQuery` in `data/table-rows/` selects the truncated columns of one row in a single query. Each column is returned as `NULL` when it exceeds `MAX_ROW_LARGE_VALUE_BYTES`. The SQL is built with `ident()`, `literal()` and the Query builder. - A new `useCopiedLargeValues` hook owns the fetch and per-field status, to keep `RowEditor` from growing further. Pure helpers (`getTruncatedFieldNames`, `getPrimaryKeyMatch`, `mergeLargeValues`) are in `RowEditor.utils.ts`. - `InputField` takes an optional `status` and renders the note. ## Also changes `isValueTruncated` now compares byte length instead of character length. The query truncates when a value exceeds the limit in bytes but cuts by characters, so a value of multibyte characters could be truncated and still be shorter than the limit in characters, and wasn't detected. Comparing bytes still never flags a genuine value, because an untruncated value is at most the limit in bytes. Edit row's \"Load full\" buttons benefit from the same fix. ## Notes - A fetched value over 10 KB that genuinely ends in `...` still looks truncated to the existing check, so the form disables that field, as it already does when editing such a row. - A column that changed to `NULL` after the grid loaded also shows the \"too large\" note. ## Testing - Unit tests for the SQL builder (including identifier and literal escaping), the byte-aware detection, and the new helpers. - Component tests for `RowEditor`: the full value is fetched and included in the insert; field and Save are disabled while loading (including form submit); too large, fetch failure, and no primary key leave the field empty with a note; nothing is fetched when no value was truncated. I confirmed the loading test fails when the Save guard is removed. Resolves FE-4927 |
||
|
|
d69d8e1bc1 |
fix(studio): retry empty JSON GET responses without the HTTP cache (#53089)
## Problem
Successful GET requests sometimes reach Studio as a `200` with an empty
body. The fetcher turns these into `data: {}`, which doesn't match the
generated types, so components crash on nested reads such as
`pages[0].pagination.count`, `project.ref` and `features.vectorBuckets`.
Sentry diagnostics from #51123 show:
- Nearly all of these events come from Firefox.
- A `cache: 'no-store'` refetch of the same request returns a normal
body in more than 99% of events, so the API isn't sending empty
responses.
- The API sends no `Cache-Control` and a weak ETag, so Firefox
revalidates stored entries with `If-None-Match`. A browser cache or
revalidation bug is the most likely cause, but it isn't proven.
## Solution
When a successful response has an empty body,
`normalizeEmptyBodyResponse` now tries to recover it before falling back
to `{}`:
1. If only the clone used for the peek was empty, it reads the original
response and uses that body.
2. For JSON GET requests, it re-fetches once with `cache: 'no-store'`
and a new `X-Request-Id`, using plain `fetch` so the middleware can't
recurse. The retry uses the query's abort signal. A `2xx` response with
a body is returned to the caller.
3. Otherwise it keeps today's behavior: `Content-Length: 0`, which gives
`data: {}`.
The retry only covers GET requests with an `application/json` response,
so these stay unchanged:
- empty mutation responses
- the branch diff endpoint, which legitimately returns an empty
`text/html` body when there's no diff
The retry replaces the diagnostic probe, so a failure costs two requests
instead of three. The Sentry report gets a new `recovered_by` tag
(`original_body`, `refetch` or `none`), which will show whether the fix
works and whether the clone or the cache was at fault. The existing
`probe_*` fields keep their names, and Sentry still only receives body
lengths, never bodies.
### Why not bypass the cache for every request?
We chose not to send every request with `cache: 'no-store'`. It would
remove every `304 Not Modified` response, so unchanged data would come
back as a full `200` body each time and more data would go over the
network. The retry keeps HTTP caching for normal requests and only skips
the cache for requests that already came back empty.
## How to test
- `pnpm vitest run data/empty-body-diagnostics.test.ts
data/normalizeEmptyBodyResponse.test.ts` from `apps/studio` covers:
- refetch recovery, and the secret value never reaching Sentry
- fallbacks when the retry is empty, rejects, returns non-2xx or is
aborted
- no retry for non-JSON responses or non-GET requests
- the original-body path
- After release, check the `recovered_by` tag on the "Empty response
body on successful API request" Sentry issues, and confirm the related
crash issues (`pagination is undefined`, `can't access property "ref"`)
trend down.
Part of FE-4665
Related to FE-4912
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
||
|
|
a1538e957b |
feat(www): advertise the AI catalog from the homepage (#53153)
I added an AI catalog pointer to the homepage, following agentready.org practice AR-FIND-04: a `<link rel="ai-catalog">` tag in the head and a matching entry in the existing `Link` header on `/`. I also bumped the MCP server card from 0.15.0 to 0.16.1, the latest `@supabase/mcp-server-supabase` release. **Note:** Both point at `/.well-known/ai-catalog.json`, the path the spec names, which is our rewrite alias for `ard.json`. ## To test Tested on the PR preview: - [x] `curl -sI <preview>/`, expect a `link` header carrying both `rel="api-catalog"` and `rel="ai-catalog"` - [x] `curl -s <preview>/`, expect `<link rel="ai-catalog" href="/.well-known/ai-catalog.json"/>` before `</head>` - [x] `curl -s <preview>/.well-known/mcp/server-card.json`, expect `"version": "0.16.1"` ## Linear - fixes GROWTH-1469 |
||
|
|
9fd979e20a |
Added myself to humans.txt (#53066)
## Problem I have a task in my onboarding hub ## Solution Added myself to humans.txt ## 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) |
||
|
|
032f0d0710 |
fix: broken links from the Web 404 Review, week of 2026-11-02 (#53144)
<!-- claude-slack-attribution --> _Requested via [Slack thread](https://supabase.slack.com/archives/C076KTY11DF/p1794189210976169?thread_ts=1794189210.976169&cid=C076KTY11DF)_ ## Problem The Web 404 Review for the week of 2026-11-02 flagged these paths as returning 404: - `/docs/guides/local-development/cli/customizing-email-templates`: the guide moved out of `cli/` and the old path has no redirect. - `/docs/swift/javascript/auth-mfa-enroll`: the Swift v1 and v2 `mfa.challengeAndVerify()` notes link to this malformed path. - `/docs/guides/database/triggers`: the guide moved to `/docs/guides/database/postgres/triggers` and the old path has no redirect. - `/docs/guides/local-development/cli/managing-config`: the guide moved out of `cli/`. Its sibling paths (`cli/managing-environments`, `cli/migrations`, `cli/seeding-your-database`) already redirect, this one was missed. ## Solution One commit per fix, so any fix can be dropped by reverting its commit: - `/docs/guides/local-development/cli/customizing-email-templates`: permanent redirect to `/docs/guides/local-development/customizing-email-templates` in `apps/docs/lib/redirects/static-redirects.json`. - `/docs/swift/javascript/auth-mfa-enroll`: link changed to `/docs/reference/swift/auth-mfa-enroll` in `apps/docs/spec/supabase_swift_v1.yml` and `apps/docs/spec/supabase_swift_v2.yml`, matching the other languages and the sibling `mfa.challenge()` note. - `/docs/guides/database/triggers`: permanent redirect to `/docs/guides/database/postgres/triggers` in `static-redirects.json`. - `/docs/guides/local-development/cli/managing-config`: permanent redirect to `/docs/guides/local-development/managing-config` in `static-redirects.json`, next to its siblings. All redirect targets exist in `apps/docs/content/guides`. `node apps/docs/scripts/generate-static-redirects-md-variants.mjs` runs clean with the new entries. ## Review instructions Open each path in the To test list on the docs preview and check the result. ## To test - [x] Open `/docs/guides/local-development/cli/customizing-email-templates`: redirects to `/docs/guides/local-development/customizing-email-templates`. 308, target returns 200. - [x] Open `/docs/reference/swift/auth-mfa-challengeandverify` and `/docs/reference/swift/v1/auth-mfa-challengeandverify`: the "enrolled factor" link goes to `/docs/reference/swift/auth-mfa-enroll`. Both pages, target returns 200, no `/docs/swift/javascript/` hrefs remain. The v1 page linking to the latest enroll page matches the other v1 specs (Dart, Kotlin) and the sibling `challenge()` note. - [x] Open `/docs/guides/database/triggers`: redirects to `/docs/guides/database/postgres/triggers`. 308, target returns 200. - [x] Open `/docs/guides/local-development/cli/managing-config`: redirects to `/docs/guides/local-development/managing-config`. 308, target returns 200. - [x] Sibling redirect `/docs/guides/local-development/cli/managing-environments` still goes to `/docs/guides/deployment/managing-environments` (200). - [x] Markdown variant `/docs/guides/database/triggers.md` redirects to `/docs/guides/database/postgres/triggers.md` (308, 200). - [x] The three redirect targets load directly with no further redirect. ## 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) ## Linear - fixes GROWTH-1459 --- _Generated by [Claude Code](https://claude.ai/code/session_011aGhSA9eHLKUDz5xbi7tY2)_ --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
8fb806a2b2 |
feat(studio): place account security below preferences (#51642)
## Problem Security is separated from Preferences in the account sidebar. ## Solution Place Security directly below Preferences. ## Review instructions 1. Open [Account Security](https://studio-staging-git-dnywh-account-recovery-ux-supabase.vercel.app/dashboard/account/security). 2. Confirm Security sits directly below Preferences and both links open the correct page. |
||
|
|
5cf3cf1032 |
feat(studio): make security the home for sign-in and recovery setup (#52358)
## Problem - Sign-in methods are in Preferences, separate from MFA and recovery settings. - The risk of a single sign-in method (e.g. GitHub, and getting locked out of that account) isn’t clearly communicated. ## Solution - Bring sign-in methods, MFA and recovery codes together on the Security page. If Security is disabled, sign-in methods remain accessible in Preferences. - Highlight the most important next step with a primary button. For example, when MFA is off, “Set up MFA” takes priority over adding a password. - Explain the risk of relying on a single sign-in provider, and make it clear which email address a new password will apply to. - After connecting a sign-in provider, return users to the settings page they can access. Links to password setup open the password dialog directly. | After | | --- | | <img width="1460" height="1426" alt="CleanShot 2026-11-06 at 14 54 23@2x" src="https://github.com/user-attachments/assets/afb82601-1b6f-43be-9e98-a0edb8d529c8" /> | | _The “Sign-in methods” section moved to Account → Security. Note also the new Admonition regarding the risk of a single (GitHub) sign-in method._ | ## Review instructions 1. Open [Security](https://studio-staging-git-dnywh-recovery-security-home-supabase.vercel.app/dashboard/account/security#sign-in-methods). Check sign-in methods appear above MFA and recovery codes. With MFA off, “Set up MFA” should be primary. 2. Open Preferences. Sign-in methods should be absent unless Security is disabled. 3. On a test account, check password setup, email editing and provider linking. [Open password setup directly](https://studio-staging-git-dnywh-recovery-security-home-supabase.vercel.app/dashboard/account/security?securityAction=set-password#sign-in-methods), then cancel and confirm it stays closed. |
||
|
|
1d31266c82 |
fix(docs): stop sending Ask AI question text to telemetry (#53142)
<!-- claude-slack-attribution --> _Requested via [Slack thread](https://supabase.slack.com/archives/C076KTY11DF/p1794187436590809?thread_ts=1794187436.590809&cid=C076KTY11DF)_ ## Problem **Before:** `docs_search_v2_ask_ai_question_submitted` sent the user's Ask AI question, cut to its first 300 characters, as a `question` property (added in #52459). Free-text questions can contain personal data such as names, emails, pasted logs, or connection strings. **After:** the event sends only `questionLength` and `questionSource`. No question text leaves the browser. This matches `kb_search_submitted`, which already leaves the query text out and sends only its length. Linear: [GROWTH-1458](https://linear.app/supabase/issue/GROWTH-1458/stop-sending-ask-ai-question-text-in-docs-search-v2-ask-ai-question) ## Solution - `packages/common/telemetry-constants.ts`: remove `question` from `DocsSearchV2AskAiQuestionSubmittedEvent` and note in the event doc that the question text is left out, as `KbSearchSubmittedEvent` does. - `apps/docs/features/SearchV2/AskAiPanel.tsx` (typed questions) and `SearchV2Provider.tsx` (questions carried over from search): drop the `question` property. - `apps/docs/features/SearchV2/constants.ts`: delete `ASK_AI_QUESTION_TELEMETRY_LENGTH`, which nothing uses now. - `SearchV2.telemetry.test.tsx`: replace the truncation test with one that checks a typed question sends exactly `{ questionLength, questionSource: 'typed' }`, has no `question` property, and does not contain the question text. Out of scope: `docs_search_v2_search_submitted.query` and `docs_search_v2_result_clicked.query` stay as they are. ## Review instructions 1. Check that the event type in `telemetry-constants.ts` no longer has `question`, and that typecheck enforces this at both call sites. 2. Run `pnpm vitest --run features/SearchV2` in `apps/docs`. All 33 tests pass locally. 3. `tsc --noEmit` passes in `apps/docs` (after `codegen:graphql`) and `packages/common`. Prettier is clean on 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) (not applicable: no docs content changed) --- _Generated by [Claude Code](https://claude.ai/code/session_011aGhSD3LLt9nZYbsWkZBjJ)_ Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
b83ad78d77 |
feat(studio): show recovery code health in account security (#52355)
## Problem Users can run out of recovery codes without a clear warning that they have lost a backup way to sign in. ## Solution Show a warning when codes are running low or used up, with Regenerate beside the code count. When MFA is enabled but codes are missing, explain how to generate them. Keep recovery codes hidden until MFA is enabled. Remove standalone code deletion. Users can regenerate codes while MFA is enabled. | Before | After | | --- | --- | | <img width="1024" height="682" alt="Security Account Supabase" src="https://github.com/user-attachments/assets/1c7a4c52-00c9-4c31-8b3a-ef0599555a1a" /> | <img width="1024" height="682" alt="81082" src="https://github.com/user-attachments/assets/ae662802-4fab-4c93-a5cb-52ed39d16f87" /> | | _3/10 codes left._ | _3/10 codes left._ | | <img width="1024" height="682" alt="21450" src="https://github.com/user-attachments/assets/82049f44-2fca-4477-84bf-23ab009868be" /> | <img width="1024" height="682" alt="Security Account Supabase" src="https://github.com/user-attachments/assets/e2185026-af6a-42a5-bc10-b587e3d2d4ab" /> | | _0/10 codes left._ | _0/10 codes left._ | ## Review instructions 1. Open [Recovery codes](https://studio-staging-git-dnywh-recovery-code-health-supabase.vercel.app/dashboard/account/security#recovery-codes) with one authenticator and generated codes. 2. In DevTools, override GET `/factors/recovery-codes`: keep the other fields, set `remaining` to `0`, save and reload. Check the warning. Repeat with `3`, then restore the response. 3. With MFA off, check that the Recovery codes section is hidden. Disable overrides before using Regenerate. |
||
|
|
52cc917752 |
feat(studio): clarify authenticator setup and backup status (#52354)
## Problem MFA setup and backup status are difficult to scan, and unverified factors can appear as configured authenticators. ## Solution - Show only verified authenticators (non-abandoned setup), with a clear setup state when none are configured. - Show backup guidance from the shared recovery checks and emphasise the most relevant MFA action once those checks succeed. - Align authenticator rows with the existing controls, use removal icons with tooltips, and prevent removal when recovery-code status cannot be confirmed. | Before | After | | --- | --- | | <img width="1024" height="759" alt="7693" src="https://github.com/user-attachments/assets/1deb07ef-91ce-481b-87f6-4baa7b023f94" /> | <img width="1024" height="759" alt="18215" src="https://github.com/user-attachments/assets/f17248a2-2001-4d95-ba28-3f16b75af0fb" /> | | <img width="1024" height="759" alt="Security Account Supabase" src="https://github.com/user-attachments/assets/ede61c84-0baa-4139-9773-0953a05cbd94" /> | <img width="1024" height="759" alt="14038" src="https://github.com/user-attachments/assets/58ab1a70-0392-4706-8df3-2ba078c5a8ba" /> | ## Review instructions 1. Open [MFA settings](https://studio-staging-git-dnywh-recovery-mfa-status-supabase.vercel.app/dashboard/account/security#mfa) without a verified authenticator. Confirm the setup empty state offers “Set up MFA”. 2. Use an account with one authenticator and healthy codes. Check the backup warning, aligned icon row, and remove tooltip. ## Validation 14 focused tests passed, including Auth SDK network responses and failed recovery-status reads keeping removal unavailable. Formatting passed. Focused ESLint passed with the locally incompatible TanStack exhaustive-deps rule disabled; standard lint is blocked by the installed plugin rejecting the current rule options. Full local typecheck still reports errors in untouched panel and MCP files; none remain in this PR's changed files. |
||
|
|
edc09b78ae |
Add go page: aws-reinvent/schedule (#53063)
## Problem We want a landing page where people can book 1:1 time with the Supabase team at AWS re:Invent 2026. ## Solution - Adds a go page at `/go/aws-reinvent/schedule` using the existing `hubspot-meeting` section, modeled on the Stripe Sessions scheduler page. Registered in `apps/www/_go/index.tsx` with a removal date of Dec 31, 2026. - Adds three entries to `apps/www/lib/authors.json` with headshots under `apps/www/public/images/blog/avatars/`. - Adds `whitespace-pre-line` to the go hero `<h1>` so a title can contain a line break. No existing go page title contains a newline, so other pages should not change. ## Review instructions 1. Open the preview at `/go/aws-reinvent/schedule`. 2. Check the hero copy, including the line breaks in the title and description. 3. Confirm the scheduler loads and shows availability. 4. Check `HeroSection.tsx` for the `whitespace-pre-line` change. ## 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 (not applicable) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Wendie Cheung <wendie.cheung@supabase.io> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
6f1e7516bf |
kb: add BetterAuth with Supabase CLI migrations article (#53072)
## Problem Adds a new article covering how to use Supabase native database migrations with BetterAuth to add BetterAuth to a Supabase project. ## Preview links https://kb-git-tylershukert-devrel-599-supabase-better-d064e1-supabase.vercel.app/kb/guides/setup-better-auth-with-declarative-schema ## 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) --------- Co-authored-by: Kody Jackson <kody.jackson@supabase.io> |
||
|
|
c7b49e2b1b |
feat(studio): resume account actions after recovery-code verification (#52747)
## Problem Recovery-code verification uses a separate sign-in layout and returns users to Security without resuming the selected action. ## Solution Visually align with other security checks: use InterstitialLayout and return to the selected authenticator’s removal confirmation. Cancel returns to Security without signing out. Verification never removes the authenticator automatically. | Before | After | | --- | --- | | <img width="1280" height="1323" alt="Supabase" src="https://github.com/user-attachments/assets/404e7b6d-6fe6-492a-b853-dc3b13b8f767" /> | <img width="1280" height="1323" alt="47214" src="https://github.com/user-attachments/assets/0100cf2f-3252-4f5c-a3a6-17bb0d81dfa5" /> | | After | | --- | | <img width="1280" height="1323" alt="45032" src="https://github.com/user-attachments/assets/584254e2-0772-4dae-a0e5-9be6a8f99239" /> | | _Loading state._ | | <img width="1280" height="1323" alt="8565" src="https://github.com/user-attachments/assets/6d14459d-f172-4338-a021-fb5721649fda" /> | | _Standard unfilled state._ | | <img width="1280" height="1323" alt="47304" src="https://github.com/user-attachments/assets/83eca080-0fb6-4b3e-a52b-0110c6f8714a" /> | | _Error state. I’ve removed `font-mono` since this screenshot._ | This PR also includes the _Use recovery code instead_ option into the prior PR’s _Verify your identity_ interstitial: | After | | --- | | <img width="1280" height="763" alt="6526" src="https://github.com/user-attachments/assets/a05e3bc5-061d-4297-9fd0-e456dba44d4a" /> | | _Addition of the _Use recovery code instead_ button._ | ## Review instructions Use a disposable MFA account with saved recovery codes. Successful verification consumes one code. 1. Open [Security on this preview](https://studio-staging-git-dnywh-recovery-code-verification-supabase.vercel.app/dashboard/account/security). Follow [#52352’s breakpoint steps](https://github.com/supabase/supabase/pull/52352#review-instructions) on this preview to show Verify your identity. Remove the breakpoint before continuing. 2. Choose Use a recovery code instead. Check the code visibility control and an invalid-code error, then enter a valid saved code. The selected authenticator’s removal confirmation should open. Nothing is deleted until you click Remove. 3. Repeat and Cancel on the recovery-code screen. Return to Security and remain signed in. --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
1052d414ad |
fix(studio): verify identity before removing authenticators (#52352)
## Problem Authenticator removal can fail when the session has not completed MFA. This is difficult to test (see below) but shows an awkward toast with unclear “AAL1” and ”AAL2” copy, which is unhelpful to the user. ## Solution Checks the session before removal confirmation. If needed, shows _Verify your identity_ first. Depends on #52351. Badge presentation: #52748. Recovery-code verification: #52747. | After | | --- | | <img width="814" height="725" alt="Security Account Supabase" src="https://github.com/user-attachments/assets/8d0dc002-3777-4ba5-a4bc-9d98a059c2c4" /> | | _Unfilled state._ | | <img width="814" height="725" alt="63727" src="https://github.com/user-attachments/assets/5472de19-99b6-4403-aaca-f92e319445cb" /> | | _Errored state._ | | <img width="814" height="725" alt="27157" src="https://github.com/user-attachments/assets/f8480f0b-5cc4-432f-b38f-79cd311274cf" /> | | _What the above (success state) unlocks: being able to remove authenticator._ | ## Review instructions Use a disposable MFA account and sign in normally. 1. Open [Security locally](http://localhost:8082/account/security) (so the breakpoint feature can be used). Click Delete beside an authenticator. Since you already entered an MFA code at sign-in, removal confirmation should open directly. Cancel keeps the authenticator. Click Cancel. 2. To show verification, open DevTools → Sources → ⌘P. Find `mfa-authenticator-assurance-level-query.ts`. Inside `getMfaAuthenticatorAssuranceLevel`, click the line number beside **`return data`** to add a breakpoint, then (back in the Studio interface) click Delete. 3. When Paused in debugger appears, press Esc for the Console drawer (in DevTools) and run `data.currentLevel = 'aal1'`. Remove the breakpoint by clicking its line number again, then press F8 or Resume ▶ (at the top of Studio in the yellow strip). 4. Try an invalid authenticator code, then a valid one. Verification must lead to a separate removal confirmation. Cancel must keep the authenticator. --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
ed03223f5a |
fix(studio): preserve authenticator removal progress on failure (#52351)
## Problem Failed authenticator removal shows a toast and can repeat completed steps on retry. A failed recovery-code status check can also allow removal before Studio knows whether codes exist. ## Solution Show errors below the dialog content, preserve removal progress on retry, and block removal until recovery-code status is known. Add Retry for failed status checks. | After | | --- | | <img width="1450" height="458" alt="CleanShot 2026-11-04 at 15 34 41@2x" src="https://github.com/user-attachments/assets/98989ad0-9b43-4203-95e4-1767346f2a8e" /> | | _Retry action._ | | <img width="1514" height="246" alt="CleanShot 2026-11-04 at 15 16 37@2x" src="https://github.com/user-attachments/assets/969b6525-c380-4a8a-9826-58bfe04887f8" /> | | _Blocked `recovery-codes` means user cannot delete MFA._ | | <img width="1088" height="1040" alt="CleanShot 2026-11-04 at 15 18 08@2x" src="https://github.com/user-attachments/assets/08e6631f-e90e-4719-bd0b-6360d5871d48" /> | | _If `recovery-codes` becomes unavailable after dialog is open, show the error inline (not as a toast)._ | ## Review instructions Use a disposable MFA account with recovery codes. Successful removal deletes the authenticator and, if it was the last, its codes. 1. Open [Security](https://studio-staging-git-dnywh-recovery-removal-errors-supabase.vercel.app/dashboard/account/security). In DevTools Network, right-click GET `/factors/recovery-codes` → Block request, then reload. Confirm removal is disabled. Unblock and click Retry to enable it. 2. Open the removal dialog, then block the same request without reloading. Click Remove: the error should appear below the content. Unblock and retry: removal should succeed. |
||
|
|
d862ac18f2 |
feat(telemetry): stamp the app's platform on every event (#53078)
Every first-party PostHog event now carries a `platform` property naming
the supabase.com app that sent it. Each app passes its directory name
(`studio`, `www`, `docs`, `kb`, `learn`, `ui-library`) once at telemetry
setup, and I stamp it on both send paths.
**Changed:**
- **Events sent through the Management API**
(`/platform/telemetry/event`): `buildTelemetryEventRequest` adds
`platform` to `custom_properties`. This also covers kb's search events,
which build the request without `sendTelemetryEvent`.
- **Events sent by posthog-js** (pageviews, page leaves, identify,
experiment exposures): a `before_send` hook stamps `platform` at send
time.
- **App setup**: `PageTelemetry` takes a required `platform` prop, and
kb's island sets the value directly. While unset, the property is left
off instead of defaulting to an app.
**Note:** I used `before_send` instead of `posthog.register()`. Super
properties persist in localStorage, which every supabase.com app shares,
so events sent before `register()` runs would carry the previous app's
value.
**Do not merge yet.** Studio's `trackFeatureFlag` body still needs
`platform`. That commit waits for the Management API change that accepts
the field to reach production, plus an `api-types` regen. The flag-track
body is strict, so sending `platform` early returns 400 on every flag
call.
## To test
On each app's preview, accept cookies and add `?__posthog_debug=true` to
the URL.
- [x] Studio: load a page, expect `$pageview` with `properties.platform:
"studio"` (seen at ingestion: the staging PostHog project has
`$pageview` and `$pageleave` events from the studio-staging preview
host, all with `platform: "studio"`)
- [x] www: load the homepage, expect `send "$pageview"` with `platform:
"www"`; click "Start your project", expect the
`/platform/telemetry/event` request body to have
`custom_properties.platform: "www"` (both seen)
- [x] docs: load a guide, expect `send "$pageview"` with `platform:
"docs"` (seen); added: "Copy as Markdown" sends `custom_properties:
{"pageType":"guide","platform":"docs"}`
- [x] kb: load a page, expect `send "$pageview"` with `platform: "kb"`;
run a search, expect the `/platform/telemetry/event` body to have
`custom_properties.platform: "kb"` (seen on both `kb_search_submitted`
and `kb_search_result_clicked`)
- [ ] learn and ui-library: load a page, expect `send "$pageview"` with
`platform: "learn"` and `"ui-library"` respectively. Not checkable on
previews: learn has no preview deployment, and the ui-library preview
host is not on the consent provider's allowlist, so telemetry never
starts there.
- [x] Added, negative check: on docs, kb and www, no captured posthog-js
event had `platform` unset or set to another app
- [x] Added, ingestion: in the staging PostHog project,
`copy_as_markdown_clicked` (docs) and `start_project_button_clicked`
(www) carry `platform` as a top-level event property
## Linear
- fixes GROWTH-1450
|
||
|
|
156738417b |
fix(studio): centre the account recovery interstitial (#53073)
## Problem The account recovery interstitial sits too high on tall screens because it overrides the shared layout with fixed top padding. ## Solution Use the shared interstitial layout's vertical centring for the reminder, loading and unavailable states. | Before | After | | --- | --- | | <img width="1451" height="957" alt="69167" src="https://github.com/user-attachments/assets/b473a983-93a9-4c57-866c-5ce6dd02dddf" /> | <img width="1280" height="1323" alt="Organizations Supabase" src="https://github.com/user-attachments/assets/fe0af974-36fb-4edf-adfd-abfa75c22038" /> | ## Review instructions 1. Use this PR's **[studio-staging](https://studio-staging-git-dnywh-fixrecovery-interstiti-efb132-supabase.vercel.app/)** preview with `enableAccountRecoveryInterstitial` and `enableAuthRecoveryCodes` enabled. Sign in with a non-SSO test account that has MFA but no recovery codes, and complete MFA verification. 2. If the account has previously skipped the reminder, remove its `account-recovery-reminder:<user-id>` entry from local storage on this preview origin, then reload. 3. Open `/dashboard/organizations` The reminder appears over the dashboard after its background checks finish. Confirm the card is vertically centred on a tall desktop viewport. 4. Use a narrow viewport, a short viewport and 200% browser zoom. Confirm all content and **Skip for now** remain reachable by scrolling when needed. Skip rather than generating codes if you do not want to change the test account. |
||
|
|
dc73b346c1 |
docs: document feature flags and experiments for PMs (#53067)
## Problem PMs want to ship docs changes behind feature flags and A/B test them. Only code comments and old PR descriptions (#52049, #52191) document how. ## Solution - `apps/docs/CONTRIBUTING.md` (with a pointer from the root file): says that docs supports flags and A/B tests, and whom to contact. The internal how-to is in Notion. - `ask-the-docs`: new `reference/feature-flags.md` covers the static and PostHog flag systems, the variant hook pattern, and gotchas. - `pm-the-docs`: sends flag requests to Docs Engineering. People outside Supabase also use these skills, so the flag content fails gracefully for them. ## Test plan - [x] Prettier passes on the changed files. - [x] Every cited code path exists on master. - [ ] The root `CONTRIBUTING.md` anchor link resolves after the merge. --------- Co-authored-by: Nik Richers <nik@validmind.ai> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
396358c7cb |
chore(docs,www) - added, deleted, redirected URLs (#53097)
## Problem added, deleted, redirected URLs + urls for new blog posts ## Preview links N/A --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
b1f49edc3b |
docs: revise Option 1 placements from the tree test results (#52969)
Closes DOCS-1473 Closes DOCS-1578 ## Problem The [tree test results on the live trees](https://app.notion.com/p/40e5004b775f811b91bed8f7c76ac7f6) found four tasks where agents look in a different place from where Option 1 puts the page: - **Shared responsibility:** agents look in Security and compliance. The page is under Deploy to production, and every arm failed the task. - **RLS testing:** agents look in Local Development and CLI. The page is under Database. - **Project transfer:** with two levels visible, agents open Team, because the task is about organizations. - **Leaked API key:** with two levels visible, agents see Start's "API keys" and choose it. The rotation page sits a level deeper, under Security and compliance. ## Solution Revises four Option 1 placements and labels. Option 1 only. Today's nav, page content, and URLs don't change. No subheads. | Task | Change | | --- | --- | | Shared responsibility | Moved from Deploy to production to Security and compliance › Compliance. The `docs:compliance` flag moves to the SOC 2, HIPAA, and GDPR items so the page shows in every build. | | RLS testing | New Testing group under Local Development and CLI, with Overview, Test RLS policies with pgTAP, Testing your database, and pgTAP advanced guide. Database's Testing group goes away. | | Project transfer | "Projects, compute and scaling" becomes "Projects, organizations and compute", in the sidebar and the top nav. "Transfer Project" becomes "Transfer to another organization". | | Leaked API key | Start's "API keys and key rotation" becomes an "API keys" group with two pages: API keys, and Rotate a leaked API key. The rotation page moves out of Security and compliance. | Each page keeps one home. Every level stays at 7 items or fewer, 5 levels at most, and labels at 35 characters or fewer. In the tree test on this preview, all four tasks now pass with no wrong turns at two levels. Set-aside tasks score 83% against Option 1's 71% at two levels, and the same within noise at one level. ## Preview links | Site | Live | Preview | Search for | | --- | --- | --- | --- | | Docs | Not live until supabase/supabase#52735 merges | [/docs/nav-tree.json](https://docs-git-docs-ia-option-1-placement-revisions-supabase.vercel.app/docs/nav-tree.json?docs-ia-mvp-v1=option-1) | Rotate a leaked API key | ## Additional context - **The leaked-key move trades views.** With two levels visible, as in the top nav dropdown, agents choose the rotation page in 3 of 3 runs, up from 0. With one level at a time, as on mobile, they look in Security and compliance first and find it in 0 of 3, down from 3. A follow-up link from the Security and compliance hub to the rotation page would help one-level readers without listing the page twice. - **Set-aside tasks:** the shared responsibility and project transfer cases are set-aside tasks. A gain on either can't count as unseen-task evidence. Only a fresh holdout set can confirm it. ## Review instructions 1. Open `/docs/nav-tree.json?docs-ia-mvp-v1=option-1` on the preview. Check that each moved page appears once, under its new parent. 2. Open `/docs/nav-tree.json` without the parameter. Check that it matches supabase/supabase#52737's. 3. Open `/docs?docs-ia-mvp-v1=option-1` on the preview and hover Start. Check that API keys shows as a group with Rotate a leaked API key inside. ## 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) |
||
|
|
f59c795eb5 |
feat(docs): render Option 1 on the server when the variant is forced (#52735)
Closes DOCS-1520 ## Problem The original PR was only client-side. This is adding server-side integration. The docs-nav evals fetch each page's HTML with no JavaScript and add `?docs-ia-mvp-v1=option-1` to every request. The option-1 arm gets the control navigation anyway. Guide pages are statically generated, so the server can't read the query parameter. `useIaNavVariant` reads the override from the URL after the page loads, so the fetched HTML always has today's nav, hidden with an `invisible` class. The top nav dropdowns have a second gap. Their panels mount on the client, so their links are not in the server HTML for either variant. Every eval case starts at `/docs`, where those links are the only way into the Option 1 groups. ## Solution - **Rewrite option-1 requests:** `proxy.ts` sends `/docs` and guide pages with `?docs-ia-mvp-v1=option-1` to `/docs/ia/option-1/…`. Pages there render on the first request and are then cached, so nothing is added to the build. Requests without the parameter, and `.md` requests, are not rewritten. - **Read the variant from the route:** `IaNavRouteProvider`, in the root layout, reads the variant from the layout segments. `useIaNavVariant` returns it on the server and records no PostHog exposure for it. `useIaNavReady` is ready at once, so the nav has no `invisible` class. - **Strip the route prefix:** on the server, `usePathname` returns the rewritten path. The nav components, breadcrumbs, and `AiTools` use `useDocsPathname`, which strips the `/ia/option-1` prefix. - **Breadcrumbs follow the variant:** they resolve from the visitor's nav config, not always today's. - **Top nav subheads in the HTML:** a `<noscript>` block next to the top nav lists the dropdown links for the visitor's variant, inside an `sr-only` nav. Browsers with JavaScript ignore it. - **No index for the route:** direct visits to `/docs/ia/option-1/…` get `noindex`. Canonical URLs point to the real guide. **Not changed:** - **Reference pages:** they keep today's nav, even with the parameter. - **Config pages:** the five generated config pages under `self-hosting` and `local-development/cli` are not in the markdown manifest, so they keep today's nav too. - **Links:** they don't carry the query parameter, so a click in the browser leaves the forced variant. This was already the case before this PR. - **Conflicts with #52679:** it changes the same hooks. Whichever PR merges second needs a rebase. ## Review instructions `grep -c` counts the lines of server HTML that contain the text. A count of 1 or more means the text is in the HTML that an agent fetches without JavaScript. A count of 0 means it is not. 1. Run `curl -s "https://docs-git-docs-ia-option-1-server-render-supabase.vercel.app/docs/guides/auth/sessions?docs-ia-mvp-v1=option-1" | grep -c "Run and manage"`. The count is 1 or more. "Run and manage" is an Option 1 top nav label, so this checks that the parameter gets Option 1's nav from the server. 2. Run `curl -s "https://docs-git-docs-ia-option-1-server-render-supabase.vercel.app/docs/guides/auth/sessions" | grep -c "Run and manage"`. The count is 0. This checks that a request without the parameter still gets today's nav. 3. Run `curl -s "https://docs-git-docs-ia-option-1-server-render-supabase.vercel.app/docs?docs-ia-mvp-v1=option-1" | grep -c "guides/platform/ssl-enforcement"`. The count is 1 or more. The home page has no sidebar, and this link sits only in the "Run and manage" dropdown, so this checks that the top nav subhead links are in the server HTML. 4. Run `curl -s -o /dev/null -w "%{http_code}" "https://docs-git-docs-ia-option-1-server-render-supabase.vercel.app/docs/guides/auth.md?docs-ia-mvp-v1=option-1"`. It returns `200`. This checks that the markdown version still loads with the parameter. 5. Open [/docs/guides/auth](https://docs-git-docs-ia-option-1-server-render-supabase.vercel.app/docs/guides/auth) in a browser and hover over the top nav. You see today's nav and dropdowns. ## 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) |
||
|
|
9f351563a9 |
fix(studio): prevent column comment data loss from sensitivity marker (#53051)
## What Studio stores a column's "sensitive data" flag in-band by adding `[SENSITIVE]` to the column's comment. The encode/decode helpers matched the marker **anywhere** in the string, which caused two problems: * A comment that merely *contains* `[SENSITIVE]` (e.g. `Fields marked [SENSITIVE] are PII`) was wrongly treated as sensitive. * The marker was stripped from the **middle** of the user's text on save - even when the sensitivity toggle was off - silently corrupting user-authored content. Discussion: https://github.com/orgs/supabase/discussions/52699 ## Changes Following the direction in the discussion: 1. **One shared helper** - the marker logic was duplicated in three places (`ColumnEditor.utils.ts`, `state/table-editor-table.tsx`, and the toggle in `TableEditor/Column.tsx`), each slightly different. These are consolidated into a single `lib/sensitive-column-comment.ts` with `isSensitiveComment` / `encodeSensitiveComment` / `decodeSensitiveComment`. 2. **Prefix-anchored detection and removal** - the marker is only matched and stripped when it's an exact leading prefix (plus at most one following space), so a mid-string `[SENSITIVE]` is preserved verbatim. 3. **Standardized the marker position** - `Column.tsx`'s toggle previously appended the marker to the *end* of the comment, while the column editor prepended it. The toggle now writes the canonical prefix, so detection is consistent across all paths. 4. **Backward compatibility** - to avoid losing the flag on columns that were saved with a *trailing* marker (the old toggle behavior), `decodeSensitiveComment` also recognizes and strips an existing trailing marker. Re-saving such a column migrates it to the prefix form. ## Example ```ts // Before encodeSensitiveComment('a [SENSITIVE] b', false) // -> 'a b' (data loss) // After encodeSensitiveComment('a [SENSITIVE] b', false) // -> 'a [SENSITIVE] b' (preserved) ``` Tests Added lib/sensitive-column-comment.test.ts covering the encode/decode round trip, the mid-string case, the bare-marker case, and legacy trailing-marker migration (16 cases). Note for reviewers Point 4 (decoding a legacy trailing marker) is the one behavior I'd like a sanity check on.... it's there so columns already flagged via the old grid toggle don't silently lose their flag after this change. Happy to drop it if you'd prefer to keep decode strictly prefix-only. |
||
|
|
c920e07d9c |
feat(studio): review a pending network restrictions change (#52984)
## Problem A network restrictions change that was never applied can now wait for the customer's review ([API Docs](https://api.supabase.com/api/v1#tag/projects/POST/v1/projects/{ref}/network-restrictions/review), [CTRL-1934](https://linear.app/supabase/issue/CTRL-1934)). Studio doesn't show it. Lists with an entry that isn't a valid IP range also fail to save without saying which entry is wrong. ## Solution - A change in review shows one callout with **Apply change** and **Discard change**, and both lists together: added entries in green, removed ones in red. Editing is disabled until it's resolved, and discarding asks for confirmation. Only the change on screen is resolved (`pending_requested_at`). - A list the worker is still applying shows as applying and is polled, instead of showing the "not applied correctly" error. - Entries that aren't valid ranges are marked Invalid with a suggested correction, and can be saved corrected. The add dialog rejects IPv4-mapped IPv6 addresses and finds duplicates spelled differently. There's no way to create a review yet: a change only ends up in review when the backend fails to apply a list. I tested the review state locally by editing the database directly. Stacked on #53046, which syncs the API types with production, including the review endpoint. This PR will be retargeted to `master` once that merges. ## Screenshots <img width="712" height="473" alt="Screenshot 2026-11-04 at 5 10 19 PM" src="https://github.com/user-attachments/assets/c72cc38d-f7b4-4269-a787-f27dfe382086" /> ### If pressing `apply` <img width="704" height="150" alt="Screenshot 2026-11-04 at 5 19 27 PM" src="https://github.com/user-attachments/assets/92dce8e5-8d58-48b8-8899-ed01c9f242c2" /> ### If pressing `discard` <img width="712" height="473" alt="Screenshot 2026-11-04 at 5 10 38 PM" src="https://github.com/user-attachments/assets/85656004-d510-4cef-89c1-80d9f95ebb83" /> ### Invalid <img width="754" height="596" alt="Image" src="https://github.com/user-attachments/assets/4ba480f6-af4c-4253-9693-2c545fb77ab1" /> ### Invalid repair <img width="704" height="680" alt="Screenshot 2026-11-04 at 6 03 20 PM" src="https://github.com/user-attachments/assets/ed4e3dcf-8d9b-4588-afc0-938248c78712" /> ### Invalid and Pending <img width="704" height="593" alt="Image" src="https://github.com/user-attachments/assets/7ad76b50-0d08-4505-89ad-b6afff6865af" /> ### Invalid and Pending repair <img width="704" height="585" alt="Screenshot 2026-11-04 at 6 05 04 PM" src="https://github.com/user-attachments/assets/b123453f-0f30-452d-b84c-a556c52458a0" /> ## Review instructions 1. Locally, put a project's network restrictions into review by editing the database directly. There's no API that creates one. 2. Open Database Settings > Network restrictions and check the callout and the added and removed entries. 3. Apply or discard the change. ## 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) |
||
|
|
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) |
||
|
|
fcd79b69eb |
chore(docs): webhook secret leak documentation
Document the new events we recently shipped that fire when a credential is leaked belonging to a project/org. PR: https://github.com/supabase/supabase/pull/53000 Co-authored-by: Paweł Gulbinowicz <pawel.gulbinowicz@supabase.io> |
||
|
|
a7649ec1ce |
content(kb) - passwordless auth providers (#52566)
## Problem Listicle on passwordless auth providers ## Preview links https://kb-git-kody-devrel-800-passwordless-auth-providers-supabase.vercel.app/kb/guides/best-passwordless-auth-providers |
||
|
|
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> |