mirror of
https://github.com/supabase/supabase.git
synced 2026-12-05 16:09:06 +00:00
create-pull-request/patch
6129
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
04f3c6c41c |
fix(studio): return to the buckets list after deleting a bucket from its page (#53028)
## Problem Deleting a bucket from its own page (`/storage/files/buckets/[bucketId]`) could leave Studio on the deleted bucket's route. The page kept loading and then showed "Failed to fetch buckets" / "Bucket not found". On success, `DeleteBucketModal` called `onClose()` and then `router.push` to the buckets list. On the bucket page, `onClose` clears the `?delete` query param through nuqs, which queues its own shallow push to the current bucket URL. That push could race with the navigation to the list and land back on the deleted bucket. The page then re-rendered with the bucket query already removed from the cache, refetched the missing bucket, and got a 404. ## Solution - On the bucket's own page, the success handler now awaits `router.push` to the buckets list and does not call `onClose`. The modal closes when the page unmounts. When there is no `bucketId` in the route, it still calls `onClose` as before. - Added a component test for deleting from the bucket page. It checks that Studio ends up on `/project/<ref>/storage/files` and that `onClose` is not called. The test opts out of the global `useParams` stub so the modal reads `bucketId` from the mocked route. It fails without the fix. ## How to verify 1. Open a project, go to Storage > Files, and open any bucket. 2. Choose Edit bucket > Delete bucket, type the bucket name, and confirm. 3. Studio shows the success toast and lands on the buckets list (`/project/<ref>/storage/files`). The deleted bucket no longer appears there. 4. Studio never shows the deleted bucket's page with a spinner that keeps loading, "Failed to fetch buckets" or "Bucket not found". ## Checks run - `pnpm --filter studio exec vitest run components/interfaces/Storage/FilesBuckets/DeleteBucketModal.test.tsx` (2 passed) - `pnpm turbo run typecheck --filter='...[origin/master]'` - `pnpm turbo run lint --filter='[origin/master]'` - Prettier check on the changed files [FE-4926](https://linear.app/supabase/issue/FE-4926/deleting-a-bucket-leaves-its-page-loading-until-an-error) --------- Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com> |
||
|
|
12440e62a9 |
feat(studio): add Test badge to webhook deliveries for test events (#52510)
## Problem Test deliveries in the webhook deliveries table look the same as real ones. Test events are sent with `is_test: true` in the event payload, but the UI doesn't surface it, so there's no way to tell them apart at a glance. Closes FE-4710. ## Solution - Added an `isTestDelivery` helper that checks `eventPayload.is_test === true`. It uses a strict comparison, so values like the string `"true"` don't count. - Show a green "Test" badge next to the event name in the deliveries table. - Show the same badge in the header of the delivery details sheet, next to the status badge. - Added unit tests for the helper and component tests for the table and the sheet, each covering a test delivery and a real one. ## Review instructions 1. Open a project's webhooks page and select an endpoint. 2. Click the button to send a test event and wait for its delivery to appear in the Deliveries table. 3. Check that the new row has a green "Test" badge next to its event name, and that existing rows without it have no badge. 4. Click the test row and check that the delivery details sheet shows the "Test" badge next to the status badge in the header. 5. Click a non-test row and check that its sheet has no "Test" badge. |
||
|
|
097e7a11ad |
feat(studio): duplicate row and keep values with Create more in Table Editor (#52952)
## What Two additions to the Table Editor's Insert Row flow: - **Duplicate row**: new item in the row context menu. Opens the Insert Row panel as a new record, pre-filled from the selected row. - **Keep values**: a gear button next to \"Create more\" (visible only while \"Create more\" is on) opens a \"Row creation options\" popover with a \"Keep values for the next row\" checkbox. When checked, the form keeps its values after each insert instead of clearing. Off by default, so existing behavior is unchanged. ## How - Both use a shared helper, `generateReusedRowFields`, that clears primary key, identity, function-defaulted (e.g. `gen_random_uuid()`, `nextval(...)`, `now()`, `CURRENT_TIMESTAMP`), and truncated values. Cleared columns fall back to their blank state so the database fills them in. A boolean with a function default is left unset so the database evaluates it. - Duplicate adds a `duplicateFrom` field to the `row` side panel state rather than reusing `row`, so the panel stays in insert mode and can't turn into an update. - The popover lives in a new co-located `RowCreationOptions` component. Its notch is a rotated square drawn inside the popover content, positioned over the trigger by Radix. <img width="165" height="220" alt="Screenshot 2026-11-04 at 15 22 20" src="https://github.com/user-attachments/assets/145e3aeb-9f6f-4826-a789-a0e462d3d1d5" /> <img width="678" height="202" alt="Screenshot 2026-11-05 at 11 41 35" src="https://github.com/user-attachments/assets/07cc5251-e2fc-417c-90bd-6b6268a2c0c7" /> ## Notes - Columns with unique constraints other than the primary key are still copied, so saving a duplicate can fail with the normal error toast. - Large values (over 10 KB) are truncated by the grid query, so duplicate clears them rather than copying a corrupted value. Copying them is tracked in FE-4927. ## Testing - Unit tests for the helper (clearing rules, literal defaults, keyword and boolean function defaults, truncated values). - Component tests for `RowEditor`: duplicate opens in insert mode with the identity key cleared and inserts without it; \"Create more\" clears by default and keeps values via the options popover; the gear only shows while \"Create more\" is on. - Checked manually in the app. Resolves FE-4516 |
||
|
|
dfe1e330a4 |
chore(studio): encourage shorter, clearer support requests (#52492)
## What Updates the Message field on the support form to encourage shorter, clearer requests. - Replaces the "Please be as detailed and specific as possible" placeholder with three plain questions: "What are you trying to do? What happened instead? What have you tried?" - Adds one line of guidance under the field, with a link to the KB article on formatting support requests - Replaces the static "5000 character limit" label with a live `count / 2,500` counter, and lowers the limit to 2,500 ## Why The old wording encouraged very long requests. Closes FE-4716: https://linear.app/supabase/issue/FE-4716/review-support-form-wording-to-encourage-shorter-clearer-requests Copy follows design feedback in the Slack thread. Layout changes to the wider support form are out of scope and tracked separately. The 2,500 limit comes from the proposed mockup on the ticket, which was marked as a proposal rather than an agreed change. Flagging it here so it gets confirmed in review. A prepopulated template is not included. A placeholder gives the same guidance without text users have to delete, and avoids conflicting with flows that prefill the message. ## How to test 1. Run `pnpm dev:studio` and open the support form 2. Check the placeholder shows the three questions, and disappears when you type 3. Check the line under the field links to the KB article via "Learn more" 4. Type in the field and check the counter goes up (`0 / 2,500` to `N / 2,500`) 5. Paste text longer than 2,500 characters and check it is cut off at the limit 6. Type `ipv4` in the message and check the IPv4 alert appears below the guidance, then delete it and check the alert disappears |
||
|
|
8bebf8206e |
fix(logs): retain loaded history on refresh DEBUG-233 (#51598)
Preserve loaded log history during refresh, bound refresh requests, and stop automatic polling when Live is paused. |
||
|
|
57a5087579 |
feat(studio): gate integrations landing api-keys query on grants (#52963)
Part 3 of 6 in a stack for [FE-4731](https://linear.app/supabase/issue/FE-4731/grants-rollout-api-keys-consumers-that-only-need-publishable-keys).. ## Stack 1. #52961 Docs and project API docs consumers 2. #52962 Edge functions and vector bucket examples 3. 👉 #52963 Integrations landing data 4. #52964 Connect sheet and project connection popover; remove the transitional api-keys hooks 5. #52965 `reveal` refinement for single api-key reads; API key pill 6. #52966 API key create and delete ## Changes `useProjectOAuthIntegrationData` (`Integrations/Landing/Landing.utils.ts`) read api-keys through the transitional hook with no guard. It now takes a plain `GET /v1/projects/{ref}/api-keys` grant. A query skipped by `skipToken` stays pending forever, so a small helper folds the grant into the api-keys query state: - loading grant: pending - denied: settles with no keys and no error, matching how a 403 was treated before (no request is sent) - permission-check error: surfaced as the hook's error ## Testing - `Landing.utils.platform.test.tsx`: granted, denied (settles, no request, no error), and permission-check error. 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
fa7e8b636a |
feat(studio): update flags for interstitals and apps list (#52955)
## Problem The single `OauthAppScopedGrants` flag gates three independent areas of scoped OAuth apps, so they can't be rolled out or rolled back separately. Resolves FE-4919 ## Solution Replace `OauthAppScopedGrants` with three flags, one per concern, and remove the old one. Gating is a straight swap with no behavior changes. | Flag | Files | | --- | --- | | `enableScopedOAuthConsent` | `pages/authorize.tsx` | | `enableScopedOAuthPublish` | `PublishAppSidePanel/index.tsx` | | `enableScopedOAuthManage` | `OAuthApps.tsx`, `pages/account/apps.tsx`, `AccountLayout.tsx` | The `authorize` page test now mocks only the consent flag. Note: `PublishableApps` (the org apps list) isn't gated today, so Manage covers only the authorized-apps table and the account page. I left that as is to keep this a pure flag swap. ## Review instructions Each flag can be toggled on its own. 1. Consent only: `/authorize?mock_scenario=default` shows the new consent screen. The app form and list pages are unchanged. 2. Publish only: `/org/[slug]/apps`, then publish or edit an app. The extra controls appear and nothing else changes. 3. Manage only: `/org/[slug]/apps` shows the new authorized-apps table, and `/account/apps` renders. `/authorize` uses the legacy screen. 4. All off: behavior matches `master`. Before merging, the three new flags must exist in ConfigCat with the same targeting that `OauthAppScopedGrants` has today. |
||
|
|
9659778769 |
feat(ui): scrollbar track (#52493)
## Problem - proposal to lift scroll bar ui accross the apps - fix shared `ScrollBar` in `ui` showing only a thin `bg-border` thumb with no track, so the scroll position is hard to see ## Solution - replaces the native scrollbars in the docs left nav and in the guide right column with the shared scroll area - replaces the native scrollbar in the docs search v2 results with the shared scroll area, and keeps the animated list height and the bottom fade - changes the command menu list to the shared scroll area, with the bar 2px from the edge so it does not touch the hover highlight - changes the studio connect sheet body and its framework combobox to the shared scroll area, so long code lines still scroll inside their own code blocks | state | preview | | -------|------| | before | <img width="473" height="260" alt="image" src="https://github.com/user-attachments/assets/ef22e643-b92a-4a23-9c77-6b10851e1445" /> | | after | <img width="473" height="260" alt="image" src="https://github.com/user-attachments/assets/46fe95e9-0574-4eef-afbd-20d591baa859" /> | <!-- ## 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 [/design-system/docs/components/scroll-area](https://design-system-git-antlio-feat-ui-scrollbar-track-supabase.vercel.app/design-system/docs/components/scroll-area), scroll the vertical and horizontal demos, and make sure that the thumb moves on a visible track and gets lighter on hover 2. open [/docs/guides/database/postgres/row-level-security](https://docs-git-antlio-feat-ui-scrollbar-track-supabase.vercel.app/docs/guides/database/postgres/row-level-security), scroll the left nav and the right column, and make sure that each shows the new scrollbar 3. resize the page to mobile width, open the menu, and make sure that it scrolls above the footer 4. make sure that the results scroll with the trackpad and with the arrow keys, and that the bottom fade shows 5. open [/dashboard](https://studio-git-antlio-feat-ui-scrollbar-track-supabase.vercel.app/dashboard), press `⌘K`, scroll the command menu, and make sure that the thumb does not touch the hover highlight of an item 6. open [/dashboard/project/_?showConnect=true](https://studio-git-antlio-feat-ui-scrollbar-track-supabase.vercel.app/dashboard/project/_?showConnect=true), scroll the connect sheet, and make sure that long code lines scroll inside their code blocks and do not widen the sheet ## 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) |
||
|
|
ebe8849f8b |
Skip resource aware search in cmd k while in a sub page (#52773)
## Context Related to the resource aware CMD K changes, this just skips the request for the resource aware search when searching in the CMD K field input if the user is on any sub page, as the search will no longer be relevant. |
||
|
|
5152899fac |
Joshenlim/fe 4720 cmd k support searching for functions (#52751)
## Context Building off from [here](https://github.com/supabase/supabase/pull/52678) to make Cmd+K resource-aware so finding and inspecting anything in a project doesn't depend on knowing where it lives in the dashboard. Specifically looking into database entities for now - end state would be that you could search for a table name for example, and Cmd K will pull up everything related to that table for you to skim (e.g Policies, Functions, Triggers, etc). Changes in this PR sets up searching for **database functions**. <img width="607" height="531" alt="image" src="https://github.com/user-attachments/assets/b4a2cd15-9874-4e80-80d4-d343d8c70fc3" /> ## Performance Ran a Claude session to benchmark `getSearchEntitiesSql` against the version on master (tables and policies only), on the same synthetic catalog: - 12,000 tables (36,651 `pg_class`), 6,001 policies, 27,258 `pg_proc` (12,000 user + 12,000 extension-owned functions), 290,915 `pg_depend`. - Median of 5 runs, `EXPLAIN ANALYZE`, local Postgres (warm cache). | Search | Matches | master | this PR | |---|---|---|---| | `t_1` | ~1/9 of tables | 12ms | 23ms | | `p_1` | broad policy-name match | 13ms | 25ms | | `fn_1` | user + extension functions | 8ms | 23ms | | `fn_` | every function | 8ms | 29ms | | `stress.fn_1` | schema-qualified | 10ms | 30ms | | `zzz` | nothing | 9ms | 22ms | - Adding functions costs +11 to +21ms at this scale - Most of it is fixed (+13ms even for a query that matches nothing): one pass over `pg_proc`, plus building the set of extension-owned functions. It doesn't grow with the number of matches. ## To test - [ ] Search a table name: Tables first, then policies, and functions - [ ] Search a function name: it appears under Functions and opens the editor panel in database/functions - [ ] Function outside public: schema filter switches and the function opens |
||
|
|
ab54becc60 |
docs(storage): move url signing keys to dedicated page (#52954)
## Problem Details about URL signing keys are embedded in the downloads page, but it is a broader security related topic that applies to both uploads and downloads. There is no signed URL guidance in the Standard Upload section ## Solution - Move details about URL signing keys to a dedicated page under the storage>security tab (content mostly the same) - Replace URL signing key details in downloads page with a brief blurb and a link (keep header in case it has been hot linked) - Add link to URL signing key details to resumable upload > signed url section - Add signed URL details to standard upload page, and similarly link to url signing key page - Update link in URL signing key page of dashboard to point to new dedicated URL Signing key page ## Additional context Follow up to: https://github.com/supabase/supabase/pull/52522 --------- Co-authored-by: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com> |
||
|
|
1decd82fcc |
feat(studio): gate edge functions and vector bucket api-keys consumers on grants (#52962)
Part 2 of 6 in a stack for [FE-4731](https://linear.app/supabase/issue/FE-4731/grants-rollout-api-keys-consumers-that-only-need-publishable-keys). Based on #52961. ## Stack 1. #52961 Docs and project API docs consumers 2. 👉 #52962 Edge functions and vector bucket examples 3. #52963 Integrations landing data 4. #52964 Connect sheet and project connection popover; remove the transitional api-keys hooks 5. #52965 `reveal` refinement for single api-key reads; API key pill 6. #52966 API key create and delete ## Changes Moves more publishable-key consumers onto the plain `GET /v1/projects/{ref}/api-keys` grant: - `Functions/TerminalInstructions` - `Functions/EdgeFunctionDetails`: only the `api_gateway_keys_read` check; the `edge_functions_write` check belongs to the edge functions rollout - `Storage/VectorBuckets/.../VectorBucketTableExamplesSheet`: still uses non-revealed keys. When keys can't be read, the note tells the user to substitute their own secret key. Each shows `ApiKeysAccessNote` when denied or errored. The old guards matched the annotation. ## Testing - `TerminalInstructions.platform.test.tsx`, `EdgeFunctionDetails.platform.test.tsx`, `VectorBucketTableExamplesSheet.platform.test.tsx`: granted, denied (no api-keys request), and permission-check error. 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
bde5e81f3a |
feat(studio): gate docs and project API docs api-keys consumers on grants (#52961)
Part 1 of 6 in a stack for [FE-4731](https://linear.app/supabase/issue/FE-4731/grants-rollout-api-keys-consumers-that-only-need-publishable-keys). ## Stack 1. 👉 #52961 Docs and project API docs consumers 2. #52962 Edge functions and vector bucket examples 3. #52963 Integrations landing data 4. #52964 Connect sheet and project connection popover; remove the transitional api-keys hooks 5. #52965 `reveal` refinement for single api-key reads; API key pill 6. #52966 API key create and delete ## Changes Moves api-keys consumers that only need publishable keys from the V2 `API_GATEWAY_KEYS_READ` check and the transitional `useAPIKeys` / `useAPIKeysQuery` hooks onto a plain `GET /v1/projects/{ref}/api-keys` grant with `apiKeysQueryOptions`: - Docs: `Authentication` and `LangSelector` - Project API docs: `ProjectAPIDocs` (still only fetches while the panel is open) and `Content/Introduction` Without access, the docs keep their placeholder keys: - On the Data API docs page, the key picker in `LangSelector` is hidden and `Authentication` keeps the placeholder. There's no inline note. - In the API docs slideover, "Show keys" is disabled, with a tooltip saying the user needs additional permissions (or that the permission check failed). The old guards matched the endpoint annotation (`api_gateway_keys_read`). ## Testing - `Docs/ApiKeysGrants.platform.test.tsx`: `LangSelector` offers keys when granted, and hides the picker without requesting keys when denied or when the permission check fails. `Authentication` prefills the key when granted and keeps the placeholder otherwise. - `ProjectAPIDocs/ProjectAPIDocs.platform.test.tsx`: "Show keys" reveals the client key when granted; when denied or errored it's disabled with the matching tooltip, and no keys are requested. 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
b3dd6612d7 |
feat(studio): classify errors with fault, reason, and per-tag Sentry sampling (#52730)
Follows #52707 (rename `ResponseError` to `StudioError`). Resolves FE-4772. ## What Introduces the error core for Studio error classification. - **Tagged errors.** `lib/errors/studio-errors.ts` defines `Data.TaggedError` classes (`RequestAborted`, `NetworkUnreachable`, `MalformedResponse`, `PlatformError`, `UnclassifiedApiError`, `DbConnectionTimeout`, `UnexpectedError`). Each carries `fault`, `reason`, `classifiedBy` (`rule` or `default`), `retryable`, and `service`. `StudioError` is the union type; use `isStudioError` instead of `instanceof`. - **Two classifiers** in `data/error-classification.ts`: - `classifyResponseError` is only for errors from an API response: known message patterns first, then defaults by status (5xx `PlatformError`, 4xx `UnclassifiedApiError`, no status `UnexpectedError`). - `classifyError` is for everything else: aborts, browser fetch failures (matched by message, so ordinary `TypeError` bugs stay `UnexpectedError`), and unexpected errors. - `handleError` picks between them, reports, and rethrows the same instance so React Query receives the classified error. - **Routing and sampling.** `lib/errors/error-routing.ts` maps every tag to a Sentry sample rate (`SAMPLE_NEVER`, `SAMPLE_OTHER`, `SAMPLE_OWNED`, `SAMPLE_ALWAYS`). `reportStudioError` tags events with `sample_rate`, and `beforeSend` applies it. `alwaysCapture` reports at rate 1. The global Sentry error `sampleRate` stays unset so the rates don't multiply. - **Network failures.** A fetch failure is a `user` fault with reason `offline` when the browser reports being offline, and a `platform` fault otherwise. - **Hand-built errors.** Call sites that wrapped caught exceptions or made up status codes now use `classifyError` or a specific class instead of `classifyResponseError`. ## Behavior changes - Errors that previously went unreported, including unexpected errors with a message, are now reported to Sentry at their routed sample rate. - `handleError` no longer logs the stack with `console.error`. - `MalformedResponse` is defined but not produced yet; a follow-up adds the empty-body check. ## Testing - Unit tests for classification, routing, reporting, and the `beforeSend` sampling helper. - `pnpm vitest run data lib components/interfaces/ErrorHandling`, typecheck, lint ratchet, and knip pass locally. |
||
|
|
bef73a722c |
feat(studio): gate storage, cron, and realtime key consumers on grants (#52728)
Part 4 of 4 in a stack for [FE-4694](https://linear.app/supabase/issue/FE-4694/pilot-split-api-keys-queries-and-add-first-refinement-reveal-variant). Based on #52727. ## Stack 1. #52723 Reveal refinement and split api-keys queries 2. #52724 API keys settings UI and command menu 3. #52727 Database and edge functions consumers that reveal secret keys 4. 👉 Storage, cron, and Realtime consumers; remove the transitional reveal path ## Changes Moves the remaining consumers that need secret keys onto the `reveal` grant with `revealedApiKeysQueryOptions`, replacing their V2 permission checks: - Analytics bucket configuration details and the update catalog token dialog - The Iceberg wrapper create mutation. Its V2 check only covered `api_gateway_keys_secret_read`, which didn't match the endpoint's requirement. Without keys it used to save a placeholder as the vault token; it now throws unless the grant is granted, and returns the grant so callers can explain why. The bucket create form disables Create and the missing-wrapper callout disables "Install wrapper", both showing `ApiKeysAccessNote`. The `storage_config_write` check is unchanged. - Cron job HTTP headers (edge function variant) `RealtimeTokensPopover` only reads the anon and publishable keys, so it moves to the plain grant and `apiKeysQueryOptions` instead of requesting revealed keys. With no `reveal: true` callers left, the transitional `useAPIKeysQuery` / `useAPIKeys` hooks drop their reveal path and only mint a plain grant. They remain for the publishable-only consumers until FE-4731. ## Testing - `iceberg-wrapper-create-mutation.platform.test.tsx`: `mutateAsync` throws without the reveal grant and makes no credentials request; the granted case exposes the grant. - `BucketCallouts.platform.test.tsx`: "Install wrapper" is enabled when granted, and disabled with the note when denied or with an error when the permission check fails. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
82671cbb65 |
feat(studio): gate database and functions reveal consumers on grants (#52727)
Part 3 of 4 in a stack for [FE-4694](https://linear.app/supabase/issue/FE-4694/pilot-split-api-keys-queries-and-add-first-refinement-reveal-variant). Based on #52724. ## Stack 1. #52723 Reveal refinement and split api-keys queries 2. #52724 API keys settings UI and command menu 3. 👉 Database and edge functions consumers that reveal secret keys 4. #52728 Storage, cron, and Realtime consumers; remove the transitional reveal path ## Changes Moves the database and edge functions consumers that need secret keys off the V2 permission checks and onto `useGrant('GET /v1/projects/{ref}/api-keys', scope, { variant: 'reveal' })` with `revealedApiKeysQueryOptions`: - Database webhooks (`Database/Hooks/HTTPHeaders`, `FormContents`) - Replication destination form (Analytics Bucket catalog token prefill) - Edge function tester sheet Adds `components/ui/ApiKeysAccessNote`, a small inline note shown when the reveal grant is denied, and an `AlertError` when the permission check fails. It doesn't block the rest of the form: users without secret-key access can still fill in headers or the catalog token manually, where before the keys were silently missing. ## Testing - Adds `HTTPHeaders.platform.test.tsx` covering granted (requests keys with `reveal=true`, no note), denied (note shown, form still usable, no request), and permission-check error. - Removes the partial V2 permissions mock from the DestinationForm test, which no longer needs it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
7bc32a82fd |
feat(studio): gate api keys settings UI on api-keys grants (#52724)
Part 2 of 4 in a stack for [FE-4694](https://linear.app/supabase/issue/FE-4694/pilot-split-api-keys-queries-and-add-first-refinement-reveal-variant). Based on #52723. ## Stack 1. #52723 Reveal refinement and split api-keys queries 2. 👉 #52724 API keys settings UI and command menu 3. #52727 Database and edge functions consumers that reveal secret keys 4. #52728 Storage, cron, and Realtime consumers; remove the transitional reveal path ## Changes Moves the API keys settings UI off the V2 permission checks and onto `useGrant('GET /v1/projects/{ref}/api-keys')` with the new query options: - `PublishableAPIKeys`, `SecretAPIKeys`, `Project/APIKeys`, and the api-keys settings page use a plain grant. They never requested revealed keys; individual secrets still come from the per-key endpoint. - The command menu's API keys commands use the `reveal` grant, since they copy secret key values. - Each consumer renders loading, denied (`NoPermission`), permission-check error (`AlertError`), and the existing data states. `Project/APIKeys` now shows `NoPermission` when denied instead of a skeleton that never resolved. ## Testing - Migrates `PublishableAPIKeys.test.tsx`, `CommandMenu/ApiKeys.test.tsx`, and the api-keys settings page test to MSW and `customRender`, without mocking the data module or the V2 permissions hook. - Adds `PublishableAPIKeys.platform.test.tsx` and `CommandMenu/ApiKeys.platform.test.tsx` for granted, denied, and error states. The denied test waits for the denied grant before asserting that no api-keys request was made. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
d727bb0081 |
feat(studio): add reveal refinement for api-keys and split queries (#52723)
Part 1 of 4 in a stack for [FE-4694](https://linear.app/supabase/issue/FE-4694/pilot-split-api-keys-queries-and-add-first-refinement-reveal-variant). Later PRs migrate the api-keys consumers onto grants. ## Stack 1. 👉 Reveal refinement and split api-keys queries 2. #52724 API keys settings UI and command menu 3. #52727 Database and edge functions consumers that reveal secret keys 4. #52728 Storage, cron, and Realtime consumers; remove the transitional reveal path ## Changes - Adds a `reveal` variant for `GET /v1/projects/{ref}/api-keys` in `lib/fga-refinements.ts`. It requires `api_gateway_keys_secret_read` on top of the base annotation, and owns the `reveal` query param: the fetch wrapper sets it to `'true'` for a reveal grant and `'false'` otherwise (including `unguarded`), so passing `reveal` by hand is a type error. - Splits the query into `apiKeysQueryOptions` (plain grant) and `revealedApiKeysQueryOptions` (reveal grant). Both use `skipToken` without a grant, and the grant stays out of the query key. - `useAPIKeysQuery` and `useAPIKeys` stay as deprecated transitional hooks that mint the matching grant with `useGrant`. They can't use `unguarded.migrating`: with `reveal` owned by the wrapper, that would silently return unrevealed keys to consumers that need secrets. - Marks the variant type parameter `const` in `getGrant`, `useGrant`, `ensureGrant`, and `testGrant`. Adding a second refinement with variants widened inference of the branch variants to a union. - Adds `tests/lib/project-grant-mocks.ts` for component tests that need `useGrant` to resolve, and updates tests that partially mocked the V2 permissions hook. ## Testing Adds the type and runtime tests deferred from FE-4689 to `data/guarded-fetch.test.ts`: type equality with the raw client for plain and reveal grants, `reveal` rejected as a caller-supplied param, a reveal grant rejected on an endpoint without that variant, brand invariance, `guardMethod` setting `reveal` from the grant, and `assertGrant` throwing on an unknown variant. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
706dba62f9 |
fix(studio): attribute storage policies to every bucket they reference (#52692)
## Problem
Studio's storage policy parser (\`extractBucketNameFromDefinition\`)
returned only the first quoted string near \`bucket_id\` and ignored the
operator. As a result:
- Policies covering several buckets (\`bucket_id in ('a', 'b')\`) were
listed and counted under the first bucket only.
- Negated policies (\`bucket_id <> 'a'\`) were attributed to the
excluded bucket.
- \`DeleteBucketModal\` could delete a negated or shared policy that
still protects other buckets.
Fixes FE-3993, supabase/supabase#48164.
Before:
<img width="884" height="444" alt="Screenshot 2026-11-03 at 10 46 08"
src="https://github.com/user-attachments/assets/fc6e4842-b07f-40be-8057-b94f4034e4eb"
/>
After (same data):
<img width="891" height="515" alt="Screenshot 2026-11-03 at 10 46 21"
src="https://github.com/user-attachments/assets/47248b30-a309-4774-8349-05260ad02111"
/>
## Solution
- Replace the parser with \`extractBucketNamesFromDefinition\`, which
returns every bucket referenced via \`=\`, \`= ANY (ARRAY[...])\` and
\`OR\`, and returns none for negated conditions (those fall into
Ungrouped).
- Add \`getPolicyBucketNames\`, which combines \`definition\` and
\`check\`, and use it in the Policies page grouping,
\`useBucketPolicyCount\`, and \`DeleteBucketModal\` so they agree.
- A policy is now listed under each bucket it covers.
- Bucket deletion only removes policies whose sole target is the deleted
bucket. Shared and negated policies are left in place. This is the
conservative choice: an unparsed policy is left behind, never deleted.
- Added unit tests for the parser shapes, negation, \`check\`-only
policies, and grouping.
|
||
|
|
b5d9f22f14 |
fix(studio): handle unknown upgrade warning types (#52775)
Fixes a page crash on Project Settings > General. The upgrade
eligibility API now returns a warning type
(`collation_reindex_required`) that Studio doesn't handle, so
`getWarningLink` returned `undefined` and `<Link href={undefined}>`
threw in `resolveHref`, taking the page down via the global error
boundary.
**Changed:**
- Added `default` cases to the warning title, description, and link
helpers in `UpgradeWarnings.tsx`. Unknown warning types now show generic
copy and link to the specific upgrade notes section of the docs, rather
than being hidden or crashing.
**Added:**
- `UpgradeWarnings.test.tsx`, covering a known warning type and an
unknown one. The unknown case failed with `href` undefined before this
change.
**Not in this PR:**
- Dedicated copy for `collation_reindex_required`. That needs
regenerated `api-types` and an upgrade guide section, which doesn't
exist yet.
- Open tabs on old bundles keep crashing until they reload, since this
fix only reaches new bundles.
## To test
- Open Project Settings > General on a project whose
`/upgrade/eligibility` response includes `collation_reindex_required`.
The page should load and show "Review the upgrade notes before
upgrading".
- Check that "Read upgrade notes" goes to the specific upgrade notes
section of the upgrading guide.
- Check that a known warning type, such as `ltree_reindex_required`,
still shows its own copy and link.
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
|
||
|
|
2b55f7db9a |
Joshenlim/fe 4719 cmd k support searching for policies (#52678)
## Context Continue to build off from [here](https://github.com/supabase/supabase/pull/52205) to make Cmd+K resource-aware so finding and inspecting anything in a project doesn't depend on knowing where it lives in the dashboard. Specifically looking into database entities for now - end state would be that you could search for a table name for example, and Cmd K will pull up everything related to that table for you to skim (e.g Policies, Functions, Triggers, etc). Changes in this PR sets up searching for RLS policies. <img width="609" height="525" alt="image" src="https://github.com/user-attachments/assets/212a430a-314d-48c4-a27c-2f9bb06e8457" /> Policies are matched on, in priority, its name and the target table. ## Performance checking Just ran a check with Claude just to make sure that the added SQL doesn't cause any performance degradation on the database. Plan guard passes at 12,000 tables, under its 500ms budget. Also benchmarked locally with a 3-character query matching every policy, results look good so should be alright: | Catalog | Worst-case search | No-match baseline | |---|---|---| | 36k policies | ~52–64ms | ~16ms | | 120k policies | ~118–134ms | ~63ms | ## To test - [x] Search a table name: Tables first, then its policies, under Policies - [x] Search a policy name: it appears under Policies and opens the editor panel in database/policies - [x] Policy outside `public`: schema filter switches and the policy opens |
||
|
|
0b9e8bdea4 |
Joshenlim/fe 4882 make the new integrations UI the default (#52683)
## Context Makes the one-click integrations feature preview the new default + cleans up all the old integrations code that's no longer used with this change ## To test - [ ] Verify that the project integrations page is using the new UI |
||
|
|
607dc2bfde |
Chore/cleanup dead code in project branch selector (#52691)
## Context
Just some housekeeping here while going through the repo, realised that
there's dead code in `ProjectBranchSwitcher`
## Changes involved:
- `ProjectBranchSelector` is only rendered by `MobileNavigationBar`,
which `DefaultLayout` only mounts when `useBreakpoint('md')` is true.
The selector's own `isMobile` check used the same breakpoint, so its
desktop `Popover` branch could never run.
- The name `ProjectBranchSelector` is also misleading since the sheet
switches more than just the project's branch + it's mobile-only, so
opting to rename it to `MobileProjectSwitcher` instead
- Also fix org rows in the sheet being tighter than project rows.
`compactPadding` was inverted, so the embedded list got `p-0.5` on the
item and lost the default `px-2 py-1.5`
- Align buttons in `ProjectBranchSelector` across all tabs + use outline
variant for secondary action
| Previous | Updated |
|---|---|
| <img width="352" height="174" alt="image"
src="https://github.com/user-attachments/assets/24cb2985-b568-4bc1-8f53-ab3914ef0804"
/> | <img width="351" height="161" alt="image"
src="https://github.com/user-attachments/assets/e6e9b0e9-c075-4235-93ca-80c5d070c287"
/> |
| <img width="336" height="248" alt="image"
src="https://github.com/user-attachments/assets/4071b73f-f741-4598-ba01-8dc7bb6ba57a"
/> | <img width="335" height="313" alt="image"
src="https://github.com/user-attachments/assets/2bea398d-ebe9-4641-9bfe-c4a7b6b10c51"
/> |
If you meant a different table, tell me what the two columns should be.
For example, file and change, or before and after behaviour.
|
||
|
|
5a1e59eb2e |
docs: add Claude as ID-JAG issuer for MCP Enterprise-Managed Auth (#52021)
## Problem Anthropic now lets Claude issue the ID-JAG for enterprise-managed MCP auth when a customer's identity provider can't. No Supabase code change is needed: the platform already validates ID-JAGs against whichever issuer URL the organization configures. The page called the feature "enterprise-managed authentication." It implements the MCP spec's Enterprise-Managed Authorization extension and is built on an RFC 7523 authorization grant. Authentication stays with the IdP. The Studio field description had the same wrong word. ## Solution **New section, "Using Claude as the ID-JAG issuer."** Covers the Claude-side steps (Organization settings > Connectors > Supabase > Managed authorization > Set up, copy the Issuer URL, leave Tenant ID empty), the Supabase-side step (same ID-JAG Issuer field), and the connection test. Two constraints were verified against our platform code: one issuer per SSO provider so the Claude URL replaces the IdP URL and members need an SSO identity in Supabase. The third, that a Claude-issued ID-JAG attests Claude-org membership rather than an IdP session, comes from Anthropic's partner guide. **Rename to "enterprise-managed authorization."** Page title, headings, body, SSO guide section, nav label (title case, matching sibling entries), and the Studio description. The slug moves to `enterprise-mcp-authorization` with a permanent redirect from the old path in `apps/www/lib/redirects.js`. The Studio "Learn more" link and the two published blog posts that linked the page point at the new slug directly. ## 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: Ana <30495040+ana1337x@users.noreply.github.com> Co-authored-by: Ana <ana1337x@users.noreply.github.com> |
||
|
|
07dbe3ce1d |
fix(studio): use raw object count as storage pagination offset (#52706)
## Problem Studio Storage hides `.emptyFolderPlaceholder` objects after listing a folder, but `fetchMoreFolderContents` calculated the next page offset from the number of visible items. When a page includes the placeholder, the API returns 200 objects but Studio keeps 199, so the next request uses offset 199 instead of 200 and the last file of the previous page appears twice. The duplicates compound with every further page. Fixes FE-4843. Closes #52607. Before: <img width="521" height="458" alt="Screenshot 2026-11-03 at 14 51 09" src="https://github.com/user-attachments/assets/1ed20ded-08c6-4c56-92d7-5c97ef82cd00" /> After: <img width="532" height="460" alt="Screenshot 2026-11-03 at 14 53 58" src="https://github.com/user-attachments/assets/64891f27-7fa0-44cb-8076-39b405df0ee4" /> ## Solution Each storage column now records `hiddenItemsCount`, the number of API objects hidden from the visible list (the placeholder). `fetchMoreFolderContents` offsets the next page by `items.length + hiddenItemsCount`. Because the offset is still derived from `items.length`, local edits to a column (creating a folder, uploads, deletes, renames) keep it in step with the server, as they did before. Added tests to `state/storage-explorer.test.ts`: a folder with a placeholder plus 300 files lists each file exactly once and requests offsets 0 and 200, and a folder without a placeholder still pages at 0, 200, 400. Reverting the offset line makes the placeholder test fail. ## Review instructions 1. In a bucket, create a `docs` folder and, using the Storage API, upload a zero-byte `docs/.emptyFolderPlaceholder` plus files `file-000.txt` through `file-299.txt`. 2. Open `docs` in Studio and sort by Name ascending. 3. Scroll to load further pages and check the list requests in the network tab: offsets should be 0 and 200, and no file should appear twice. 4. Run `pnpm --filter studio exec vitest run state/storage-explorer.test.ts`. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill (not applicable) |
||
|
|
df742bdb3b |
refactor(studio): rename ResponseError to StudioError (#52707)
## What
Moves the `ResponseError` class (`types/base.ts`) and the classified
error classes (`types/api-errors.ts`) into
`lib/errors/studio-errors.ts`, and renames `ResponseError` to
`StudioError`.
## Why
Studio's error classification is being expanded to cover errors that
don't come from API responses (thrown network failures, aborted
requests, unexpected client errors). The API-specific name and location
no longer fit. Landing the rename on its own keeps the follow-up PR,
which introduces the classified error model, small and reviewable.
## Notes for reviewers
- Mechanical change, no behavior change. Most of the diff is a one-line
import change per file plus import re-sorting by Prettier.
- Files that only use the type now use `import type { StudioError }`.
- `ResponseError` is no longer re-exported from `@/types`; there are no
compatibility shims at the old paths.
- Unrelated identifiers like `QueryResponseError` and
`parseResponseErrors` are unchanged.
|
||
|
|
53e2c4f1d1 |
[FE-4809] fix(studio): group HA topology by shardRef (#52545)
Update HA topology grouping for the Multigres JSON field rename from `shardKey` to `shardRef`, so separate shards retain their own primaries and replicas. **Changed:** - Normalize pooler responses to `shardRef`, falling back to legacy `shardKey` and preferring `shardRef` when both exist. - Use `shardRef` in the topology selector and shard grouping. **Added:** - Regression coverage from response parsing through diagram node/edge generation for new, legacy, mixed, and conflicting key formats, plus omitted shard identity fields. Addresses https://linear.app/supabase/issue/FE-4809/update-studio-ha-topology-grouping-to-use-shardref ## To test - Open Settings → Infrastructure on a multi-shard HA project returning `shardRef`. Confirm one group per shard, each primary shown as Primary Database, and replicas connected only to their own shard's primary. - Check the same topology on Database → Pipelines. - Confirm legacy `shardKey` responses still render correctly and single-shard projects remain unchanged. ## Validation - Passed: 33 targeted utility tests, ESLint on all changed files, Studio TypeScript check, and diff whitespace checks. - Local browser: login and non-HA infrastructure passed. HA grouping remains unverified because local poolers/gateways endpoints returned 404; browser response mocking was blocked by cross-origin/CORS limitations. - Upstream multigres/multigres#1608 merged October 29; deployment of the renamed field remains unconfirmed. Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> |
||
|
|
9b7cbd1803 |
feat(studio): migrate branches to FGA grants with production/development variants (#52331)
## Problem Branch actions in Studio were guarded by hand-written permission checks (`useAsyncCheckPermissionsV2(FGA_PERMISSIONS.PROJECT.BRANCHING_*)`, plus one legacy `useAsyncCheckPermissions` in `Branch.Commands.tsx`) that weren't tied to the endpoints they protect. Every branches request in `data/branches` was marked `unguarded.migrating`. This is the pilot migration for endpoint-bound FGA grants. Resolves [FE-4693](https://linear.app/supabase/issue/FE-4693/pilot-migrate-branches-to-grants-8-endpoints-createbranchmodal). ## Solution ### Data layer * `data/branches` has no `unguarded.migrating` left (was 10). * The list, detail, and diff queries are now `branchesQueryOptions`, `branchQueryOptions`, and `branchDiffQueryOptions`. They take a grant, use `skipToken` without one, and keep the grant out of the query key. * Mutations take the grant in their variables. The merge mutation also takes `diffGrant`, because it reads the diff before merging. ### Production and development variants The backend doesn't treat development and production branching permissions as interchangeable: * Actions on a single branch (`/v1/branches/{branch_id_or_ref}` and its diff, merge, push, reset, and restore) need the production permission for the default branch and the development permission for preview branches. * Creating a default branch or a branch with data needs production create. To model this, `lib/fga-refinements.ts` gets its first entries: * The 8 single-branch endpoints have `production` and `development` variants. A new `variantRequired` flag makes the fetch wrapper reject a grant without a variant, at compile time and in `assertGrant`. * `POST /v1/projects/{ref}/branches` has a `production` variant. `assertGrant` requires it when the body sets `is_default` or `with_data`. * `useBranchGrant(endpoint, { projectRef, isDefault })` picks the variant from the branch's `is_default`. It stays `loading` until the branch is known. * `GrantForVariants<M, P>` types a grant for any of an endpoint's variants. ### UI * The old checks are replaced with grants in `CreateBranchButton`, `CreateBranchModal`, `Overview`, `DeleteBranchPanel`, `DeleteBranchModal`, the branches and merge-requests pages, and `Branch.Commands.tsx`. * Grants are evaluated against the parent project, where branch permissions live. The scope is passed explicitly, because `/v1/branches/*` paths don't include the project. * Pages that are mainly about branches show `NoPermission` when the grant is denied and `AlertError` when the permission check fails. Action buttons are disabled with a tooltip. Places that use the branch list incidentally (nav, project home, usage) treat a denied grant as "no branches" instead of loading forever. * "Include data" in `CreateBranchModal` is disabled without production create. It previously failed after submitting. * `OutOfDateNotice`'s "Update branch" is disabled without the push grant. It previously did nothing. * The GitHub integration form blocks saving without the production-branch grant. Previously the connection was saved while the branch request failed, and a repo change deleted the old connection first. ### Where the old checks differed from the backend * **Too strict:** the branches and merge-requests pages required development read, and the create button required development create. The backend accepts development or production for both. * **Wrong for the default branch:** single-branch actions always checked development permissions, or production write for the main branch menu, regardless of which branch was targeted. * **Missing:** reset and "Switch to persistent" in `Overview` had no check. * **Legacy check:** `Branch.Commands.tsx` used the legacy `CREATE preview_branches` check. `BranchingPITRNotice` is unchanged: its check guards a subscription update, not a branches request. ### Other changes * The two new query options use an `eslint-disable` for `@tanstack/query/exhaustive-deps`, because grants stay out of query keys. A separate PR upgrades the plugin and allowlists `grant`, after which these can be removed. * `upsertMigration` in the merge mutation still uses `unguarded.migrating`. It belongs to the database-migrations domain. ## Testing * New component tests for `CreateBranchButton`, `DeleteBranchPanel`, the branches page, and `GitHubIntegrationConnectionForm` cover granted, denied, and error states. * New `useBranchGrant` tests: default vs. preview branch, and loading until the branch is known. * `guarded-fetch.test.ts` covers required variants (types and runtime) and the production variant for default and data branches. * Shared fixtures are in `tests/lib/branch-test-utils.ts`. * Studio typecheck passes, affected suites pass, the ESLint ratchet is stable, and knip is clean. |
||
|
|
5912394ffc |
chore(studio): improve object versioning feature preview (#52689)
Improve copywriting and add image for the Storage Object Versioning feature preview. |Before | After | |--|--| | <img width="1096" height="717" alt="Screenshot 2026-11-03 at 11 05 30" src="https://github.com/user-attachments/assets/88a7f13e-4762-48cd-89db-57e2c51f7613" /> | <img width="1075" height="693" alt="Screenshot 2026-11-03 at 11 06 28" src="https://github.com/user-attachments/assets/bab3a2ef-f8bf-4188-865a-701e482347f1" /> | ## How to review 1. Open `Storage object versioning` feature preview 2. See feature preview 3. Acknowledge feature preview 4. Approve --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> |
||
|
|
929af55026 |
fix(studio): stop csp-blocked images from failing feedback screenshots (#52590)
## Problem - "Capture screenshot" in the studio feedback widget fails in production, and studio shows the "Failed to capture screenshot" toast - `html-to-image` downloads each image with `fetch()`, and the csp `connect-src` does not allow the github and google avatar hosts - the blocked avatar gets an empty `src`, so its `onerror` rejects the whole capture ## Solution - changes the capture to use a transparent pixel for each image that it cannot download, so a blocked avatar shows blank and the screenshot still completes | state | preview | | -------|------| | before | <img width="600" height="280" alt="image" src="https://github.com/user-attachments/assets/53c5916e-cd37-4fb5-8989-070537aa9f76" /> | <!-- ## 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 [/dashboard](https://studio-git-antlio-fix-studio-feedback-screenshot-supabase.vercel.app/dashboard) and sign in with an account that has a github or google avatar 2. click "Feedback" in the top bar, click the image button, and click "Capture screenshot" 3. capturing works and "Failed to capture screenshot" toast does not show 4. click the thumbnail, and make sure that the page shows in the screenshot with a blank area where the avatar is ## 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: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
7c52a9b539 |
Joshenlim/fe 3931 re phone mfa enrollment repeatedly force disabled despite (#52629)
## Context In Authentication -> Multi Factor, if you've set SMS MFA to any status apart from "Disabled" and refresh the page, the UI seemingly doesn't render the right value in the dropdown as such: <img width="1114" height="160" alt="image" src="https://github.com/user-attachments/assets/d3353628-0b9a-4347-b81f-3a968a87b5c2" /> Was happening as the form mounted with placeholder values (for SMS MFA, default status was "Disabled"), and the real value was only applied afterwards by a `useEffect` which called `reset`. This changed the `Select`'s value after mount, in Radix then fires an event on that change through `onValueChange` which set `value` as an empty string `''`. It happens as well for TOTP, if you set any value other than "Enabled" which is the default status. ## Changes involved - Am also opting to breakdown `MfaAuthSettingsForm.tsx` into smaller components as it's a single file handling 3 different forms at the moment - (Main fix) Derive the form values via `defaultValue` instead of via `useEffect` which prevents the unintended firing of `onValueChange` for the `Select` |
||
|
|
7bb6e13aa8 |
Include existing postgres config params in PUT payload (#52675)
## Context The PUT `database/postgres` endpoint does a full resource override for the project's Postgres config. The only surface in the dashboard that does requests to PUT `database/postgres` is under Database -> Settings -> Log connections, but the dashboard only sends `log_connections` and `log_disconnections` when updating the settings here, resulting in existing config values being over written. Fix here is to merge the existing Postgres config values in the PUT payload |
||
|
|
ab60ab2684 |
Fix ProjectLayout side nav width changes after opening and closing inline SQL Editor (#52623)
## Context Happens in the ProjectLayout when the side navigation menu's width can be resized (Table Editor / SQL Editor) On those pages, if you were to toggle the inline SQL Editor with Cmd+E, the side navigation menu's width will change to fit the max width once the inline SQL Editor is closed, and its happening due to the library's default behaviour for handling nested resizable groups. The fix was to bump `react-resizable-panel` to `4.7.x` which introduced a new property `groupResizeBehaviour` and allows us to set that prop's value as `preseve-pixel-size` for the `ProjectLayout` since we use pixel values in this context for the panel widths. Same fix also applied for `FilterSideBar` which is used in Unified Logs |
||
|
|
90c3e57e05 | feat(studio): realtime health advisors (#52535) | ||
|
|
7439ae34d1 |
Fix update role panel not scrollable (#52621)
## Context Under organization -> team member settings, when managing a member's access (specifically if the access is project-scoped), the list of projects is not scrollable at the moment if there's a lot of projects, so this PR addresses that, as well as cleans up a couple of small UI issues that I found while investigating. Screenshot here just shows which UI i'm referring to but you'll need to have a lot of projects to reproduce this <img width="1099" height="492" alt="image" src="https://github.com/user-attachments/assets/73c6db27-9ae8-479b-b2cc-2b6b0d322ff6" /> |
||
|
|
8be85ad4ad |
feat(studio): guard branch update and push with FGA grants (#52377)
Part 6 of 7 in a stack that splits #52331 into reviewable pieces. Resolves part of [FE-4693](https://linear.app/supabase/issue/FE-4693/pilot-migrate-branches-to-grants-8-endpoints-createbranchmodal). There are no functional changes beyond #52331, and the top of the stack is identical to it. See #52331 for the full rationale. ## Stack 1. #52372 Grant infra for branch variants 2. #52373 Branches list query 3. #52374 Page gates on the list grant 4. #52375 Branch creation 5. #52376 Branch read, delete, reset, and restore 6. 👉 #52377 Branch update and push 7. #52378 Branch diff and merge ## Changes The update and push mutations take grants. `Overview` (including "Switch to persistent", which previously had no check), `EditBranchModal`, `SwitchToPreviewModal`, `MergeRequestButton`, the merge-requests page, and the merge page use `useBranchGrant`. The "Update branch" button in `OutOfDateNotice` is disabled without push; previously it did nothing. The GitHub integration form blocks saving without the production-branch grant. Previously the connection was saved even when the branch request failed. ## Testing New `GitHubIntegrationConnectionForm` test. |
||
|
|
86848fc036 |
docs: move the production security checklist to its own page (#52466)
Closes DOCS-1494 ## Problem The Security section of the Production checklist is split out as a part of the Information Architecture plan laid out in Option 1 of the [Docs navigation architecture proposal](https://app.notion.com/p/supabase/Q4-2027-Proposal-Docs-navigation-architecture-3f25004b775f81f49dbad710a732ef61). ## Solution - **Structure:** move `## Security` to `guides/security/production-checklist`. The production checklist keeps the heading, and its `#security` anchor, with a one-sentence pointer. The page is in the Security sidebar under Guides, after Production Checklist. - **Option 1 navigation:** the "Production security checklist" entry in Run and manage, Security and compliance, points to the new page. The Option 1 test no longer expects the anchor. - **Page shape:** a value-statement opener with the situations that call for the checklist, then the items grouped under Database, Account and organization, Auth, and Threat review. Each group opens with a lead-in that says what its checks protect. - **Inbound links:** two Studio linter entries for OTP settings, the Studio Auth providers form, and `auth/auth-email-passwordless` now point to `production-checklist#auth`. The password length lint points to the password security guide instead, since the checklist has no password item. They used to land on `going-into-prod#security`, which is a pointer now. - **Claim fixes:** - The replication item told readers to enable replication on sensitive tables. It now says to enable RLS on replicated tables that hold sensitive data. - The Auth items named **Authentication > Providers**. The Dashboard label is **Sign In / Providers**. - **Terminal path:** the Auth group links the Management API endpoint for its settings. The Database items link to guides that carry CLI or SQL paths. - **Review fixes:** a note that RLS doesn't filter Postgres Changes `DELETE` events, a SQL path for publications, and the other email links the OTP expiry controls. - **Agent prompt:** after the opener, a copyable `AiPrompt` that has an agent audit the project read-only and report each item as pass, fail, or can't check. It reads Security Advisor and the tables through the Supabase MCP server, and SSL, network restrictions, Auth settings, and org members through Management API GET endpoints. `includeInMarkdown` is on, so the `.md` carries the prompt as a fenced text block. - **Cross-links:** Testing auth flows points to the checklist's Auth group, and the Security overview and Product configuration pages link the checklist. The custom SMTP item links the SMTP guide. ### Not verified - **Deferred samples:** none. The page has no code samples. - **Agent prompt:** its endpoints and fields match `api_v1_openapi.json`, and `Owner` matches Studio's role name. No agent has run it against a hosted project. - **Studio:** the link changes are strings only. Studio tests and build run on this PR because it touches `apps/studio`. ## Manual testing 1. Open [Production security checklist](https://docs-git-docs-production-security-checklist-supabase.vercel.app/docs/guides/security/production-checklist). See the agent prompt below the opener and four groups of checks. Click **Copy** and see the prompt text. 2. Open [Production checklist](https://docs-git-docs-production-security-checklist-supabase.vercel.app/docs/guides/deployment/going-into-prod#security). See the Security heading with a one-sentence pointer to the new page. 3. In the Security sidebar under Guides, click **Production security checklist**. See the new page open. |
||
|
|
38ae9fea1c |
feat(studio): add admonition for api keys settings view (#52250)
## Problem API Keys Settings view needs updating. ## Solution Added admonition with update and link to docs. |
||
|
|
5ff6930c2a |
feat(studio): send role passwords as precomputed SCRAM-SHA-256 verifiers (#52544)
## What kind of change does this PR introduce? Feature. ## What is the current behavior? Role passwords are sent as plaintext in the SQL (`create role ... password '...'` and `alter role ... password '...'`), so they can end up in Postgres logs. ## What is the new behavior? ASCII role passwords are hashed in the browser with Web Crypto and sent as a precomputed `SCRAM-SHA-256$...` verifier. Postgres stores a verifier as given, so the plaintext no longer appears in the SQL or the server logs. This applies to every flow that sets a role password, because they all go through the role create and update mutations. Non-ASCII passwords are still sent as plaintext. Postgres normalizes passwords with SASLprep before hashing, and the browser code doesn't apply it, so a verifier built from the raw text could stop the role from logging in. For ASCII, SASLprep changes nothing, so the verifier always matches. The `saslprep` package can't be used here because it reads its table with `fs.readFileSync` at import time. Covering non-ASCII passwords is a follow-up, most likely a server-side API. Studio also falls back to plaintext when `crypto.subtle` isn't available, which browsers only expose in secure contexts. This keeps setting a password working on self-hosted Studio served over plain HTTP. ## Known limitations - The verifier is built with 4096 iterations, the Postgres default. If a project sets `scram_iterations` higher, these roles keep 4096, because Postgres stores a supplied verifier as given. Reading the setting first needs an extra query and a grant for it, so it's left for the follow-up below. - Non-ASCII passwords, and Studio over plain HTTP, still send plaintext. - The follow-up is a server-side path that sets the password without it going through the SQL, which would honor the server's own settings and cover these cases. A verifier isn't secret (it can be attacked offline), but it is a clear improvement over plaintext. ## Testing - Unit tests compare the helper with an independent `node:crypto` implementation, and check that ASCII passwords become verifiers and non-ASCII passwords pass through unchanged. - I also checked against a real Postgres: roles given these verifiers log in with the plaintext password and reject a wrong one. - The `CreateRolePanel` test now expects a verifier and no plaintext in the SQL. Resolves FE-4822. |
||
|
|
b98eca75c7 |
fix(studio): give disk space warning plan-specific guidance (#52633)
The disk space warning banner showed every user the text "You can opt to increase your disk size up to 200GB on the Database Settings page". That text was wrong on three counts: 200 GB is the cap on a single automatic expansion step, the disk settings now live on the Infrastructure page, and it never mentioned that paid-plan disks already expand automatically. Users who had just received the automatic resize email couldn't tell what to do next. **Changed:** I split the banner description by plan. - **Paid plans**: the description says the disk expands automatically and points to the Infrastructure page for its current size and any limits on resizing it. - **Free Plan**: the description says the disk doesn't expand automatically and suggests freeing up space or upgrading. - **Organization still loading**: the banner falls back to a plan-neutral sentence, so a Free Plan project never flashes the paid text. **Note:** I left a manual-resize instruction out of the paid copy because the Infrastructure page blocks manual resizing above 8 GB while the spend cap is on, and blocks any resize during the cooldown after the previous one. That page explains which case applies. Spend cap is not a separate case because automatic expansion runs the same way with or without it. ## To test Setup: on a project's home page (the banner is hidden on Usage and Infrastructure), override the `GET /platform/projects-resource-warnings` response so the entry with `project: <ref>` has `"disk_space_exhaustion": "warning"`. To check both plans with one org, also override `GET /platform/organizations` to set the org's `plan.id`. I tested on the PR preview: - [x] Open a project in a paid organization, expect the banner description "Your disk expands automatically as it fills up. The Infrastructure page shows its current size and any limits on resizing it." I observed this with the org forced to `pro`; the "Check" button links to `/project/<ref>/settings/infrastructure`. - [x] Open a project in a Free Plan organization, expect "Free Plan disks don't expand automatically. Free up space, or upgrade to the Pro Plan for a disk that expands as it fills up." I observed this with the org forced to `free`. - [x] In both, expect no mention of "200GB" or "Database Settings page". - [x] With the overrides removed, expect no disk banner on a healthy project. ## Linear - part of GROWTH-1408 |
||
|
|
298fda50dc |
feat(logs): filter by any log attribute DEBUG-223 (#52513)
Support filtering log attributes through the picker and log details, preserving filters across URLs and query surfaces. Fixes DEBUG-223. |
||
|
|
da454314b1 |
fix(studio): select the full folder name when renaming in Storage (#52594)
## Problem Renaming a Storage folder such as `photos.backup` selects only `photos`, leaving `.backup` behind when the user types a replacement name. Fixes https://github.com/supabase/supabase/issues/52593 ## Solution Apply extension-aware text selection only to files. Select the entire name for folders. Add regression tests for dotted folder names, ordinary folder names, and files with extensions. All three tests pass with the fix; the dotted-folder case fails before it. ## Review instructions 1. Create a folder named `photos.backup` in a test Storage bucket. 2. Select Rename and confirm the entire name is selected. 3. Type `archive` and confirm no `.backup` suffix remains. 4. Rename a file named `photo.png` and confirm only `photo` is selected. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) |
||
|
|
1e94d386a4 |
feat(studio): add a reset password action for custom roles (#52506)
## What kind of change does this PR introduce? Feature. ## What is the current behavior? The Dashboard only offers a reset password action for the `postgres` role (Database Settings). To change the password of a custom role, users have to run `alter role ... password` in the SQL editor. ## What is the new behavior? Each role row in Database > Roles has a "Reset password" item in its actions menu. It opens a dialog with a warning that anything using the old password will be disconnected, and the shared password field (generate and copy). The password is required in this dialog. - The item is disabled for system roles, and for roles that can't log in, with a tooltip explaining why. - It uses the existing role update mutation, so no platform endpoint is involved. - `RolePasswordField` gains `isOptional` and `layout` props so the dialog can reuse it. <img width="271" height="174" alt="Screenshot 2026-11-02 at 11 11 33" src="https://github.com/user-attachments/assets/36f05fa0-e95c-440c-b6bb-4fadb466c2f6" /> <img width="543" height="414" alt="Screenshot 2026-11-02 at 11 11 17" src="https://github.com/user-attachments/assets/87ba4f50-1315-4e07-b390-9c5b6beba129" /> ## Testing New `RoleRow` component tests cover the item being available for a custom role that can log in, disabled for system roles and roles that can't log in, the required-password validation, and a successful reset. Resolves FE-4813. |
||
|
|
4810bbcfdf |
feat(studio): guard branch read, delete, reset, and restore with FGA grants (#52376)
Part 5 of 7 in a stack that splits #52331 into reviewable pieces. Resolves part of [FE-4693](https://linear.app/supabase/issue/FE-4693/pilot-migrate-branches-to-grants-8-endpoints-createbranchmodal). There are no functional changes beyond #52331, and the top of the stack is identical to it. See #52331 for the full rationale. ## Stack 1. #52372 Grant infra for branch variants 2. #52373 Branches list query 3. #52374 Page gates on the list grant 4. #52375 Branch creation 5. 👉 #52376 Branch read, delete, reset, and restore 6. #52377 Branch update and push 7. #52378 Branch diff and merge ## Changes `useBranchQuery` becomes `branchQueryOptions`. The delete, reset, and restore mutations take grants. `DeleteBranchModal`, `DeleteBranchPanel`, and the relevant `Overview` actions use `useBranchGrant`, which picks production for the default branch and development for preview branches. Reset previously had no check. ## Testing New `DeleteBranchPanel` test. |
||
|
|
be28b2517f |
fix(logs): correlate request and trace IDs DEBUG-260 (#52514)
Correlate related log timelines using request and trace IDs, and improve the Timeline empty state. Fixes DEBUG-260. |
||
|
|
7d0c1c60bd |
fix(studio): show branches page for paused branches and leave it on branch switch (#52572)
From a paused branch, "Manage branches" showed the paused screen instead of the Branches page, so the click seemed to do nothing. The next branch pick then kept the hidden `/branches` route. The Branches page now renders for paused branches, and picking a branch from the Branches pages opens that branch's home page. Fixes FE-4831 ## Testing instructions **Setup:** a project with branching enabled and at least three branches: - the default `main` branch (running) - one other running branch (`live`) - one paused branch (`paused`) Open the branch switcher with the chevron next to the branch name in the top header. **1. Manage branches from a paused branch** 1. Open `/project/<paused-ref>`. The paused state shows. 2. Open the branch switcher and click **Manage branches**. 3. Expected: the URL is `/project/<paused-ref>/branches` and the Branches page renders with the full branch list. The "project is paused" screen does not show. **2. Switching to a live branch from the Branches page** 1. Continue from step 1 (on `/project/<paused-ref>/branches`). 2. Open the branch switcher and click `live`. 3. Expected: on the first click, the URL is `/project/<live-ref>` and the live branch's project home page renders. It does not land on `/project/<live-ref>/branches`. **3. Switching straight from a paused branch (no Manage branches click first)** 1. Open `/project/<paused-ref>`. 2. Open the branch switcher and click `live`. 3. Expected: the URL is `/project/<live-ref>` on the first click. **4. Merge requests page** 1. Open `/project/<paused-ref>/branches/merge-requests`. 2. Expected: the Merge requests page renders, not the paused screen. 3. Open the branch switcher and click `live`. Expected: the URL is `/project/<live-ref>`. **5. Regression: switching branches keeps the current page elsewhere** 1. Open `/project/<live-ref>/editor` (Table Editor). 2. Open the branch switcher and click `main`. 3. Expected: the URL is `/project/<main-ref>/editor`, so the current page is kept. 4. Repeat from `/project/<live-ref>/settings/general`. Expected: `/project/<main-ref>/settings/general`. **6. Regression: paused screen still shows on other pages** 1. Open `/project/<paused-ref>/editor`. 2. Expected: the "project is paused" screen still shows. **7. Console** - During cases 1–4, there should be no unhandled errors in the console caused by the navigation itself. |
||
|
|
31c9854c2a |
chore: update api types (#52618)
Fixes API-types as per latest develop - pending prod deployment today to clear out the failing action that checks against prod types |
||
|
|
cd0b65c03e | feat(logs): Add Pipelines to unified logs and rename ETL to Pipelines (#52555) | ||
|
|
419ab63a14 |
fix(studio): report regionSelectionType 'auto' only for the Auto region option (#52283)
<!-- claude-slack-attribution --> _Requested by **Pam Chia** · [Slack thread](https://supabase.slack.com/archives/C076KTY11DF/p1792977863856759?thread_ts=1792977863.856759&cid=C076KTY11DF)_ ## Problem **Before:** `getRegionSelectionType` had an untouched-field branch that also returned `auto`, but it was unreachable: `ProjectCreationForm` passed `dirtyFields.dbRegion` (`undefined` when untouched) into an `isDbRegionDirty = true` default parameter, so the branch never fired. With the new Auto (best available) region option also reporting `auto`, the value was ambiguous between "left untouched" and "picked the Auto option". **After:** `auto` means the user submitted the Auto (best available) region. An untouched field reports whatever default it holds (`general` or `auto`). Production values for untouched submissions don't change, since the removed branch never fired. Fixes [GROWTH-1358](https://linear.app/supabase/issue/GROWTH-1358/studio-regionselectiontype-never-reports-auto-for-untouched-default) ## Solution - `ProjectCreation.utils.ts`: `getRegionSelectionType` classifies only by the submitted region. Removed the `isDbRegionDirty` argument and the untouched-field branch. - `ProjectCreationForm.tsx`: stopped passing `isDbRegionDirty`. The default-region sync effect still uses it, unchanged. - `ProjectCreation.utils.test.ts`: removed the untouched-field cases. The Auto option cases (available and unavailable) stay. - `packages/common/telemetry-constants.ts`: updated the `regionSelectionType` doc to the new meaning. ## Review instructions 1. `pnpm --filter studio exec vitest run components/interfaces/ProjectCreation` passes. 2. On the preview, create a project with the Auto region option and confirm `project_creation_simple_version_submitted` fires with `regionSelectionType: 'auto'`. 3. Create another project leaving a smart group default (e.g. Americas) untouched, or picking an exact region, and confirm it reports `general` or `specific`. ## 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) --- _Generated by [Claude Code](https://claude.ai/code/session_01U4bWS81PTj81V8YkZeFP2Q)_ --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
5bb549efae |
feat(studio): allow setting a password when enabling login on an existing role (#52505)
## What kind of change does this PR introduce? Feature. ## What is the current behavior? Turning on "User can login" for an existing role that couldn't log in gives no way to set a password. Users have to run `alter role ... password` in the SQL editor. ## What is the new behavior? In Database > Roles, turning on "User can login" for a role that couldn't log in now shows the same optional password field as the create panel, including the generate and copy actions. - The field only shows for roles that don't currently have login. Roles that can already log in don't get one. - The password is sent only when login is gained in that save and the field isn't empty. An empty field turns on login without a password, as in create mode. - The password is kept out of the "changed fields" diff, so unrelated edits never send `password ''`. - The password field is extracted from the create panel into a shared `RolePasswordField`, which also owns the "Password generated" announcement state. Follow-up to #52463. Changing the password of a role that can already log in is tracked separately and is the next PR in this stack. <img width="840" height="655" alt="Screenshot 2026-10-29 at 15 47 33" src="https://github.com/user-attachments/assets/8bb52e86-7b1e-4911-b625-2532fb7dfa25" /> ## Testing - New `RoleRow` component tests cover the field's visibility, sending the password, and omitting it when empty or for roles that already have login. - Existing `CreateRolePanel` tests still pass. Part of FE-4763. |