mirror of
https://github.com/supabase/supabase.git
synced 2026-12-06 08:29:01 +00:00
bot/decrease-eslint-ratchet-baselines
7336
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
d897e1462a |
test: add component tests for PlatformWebhooksPage (#52002)
## What Adds component tests for `PlatformWebhooksPage` (follow-up to FE-3749), covering: rendering the endpoint list, the empty state, create (and request body shape), update, delete, regenerate-secret, send-test-event, retry, and the rate-limit error path. ## Why FE-3749's own scope explicitly calls out tests as a stacked follow-up rather than blocking the original ship (already Done). ## Testing All 9 tests pass locally, typecheck and lint clean. ## Note Replaces #51614, which got accidentally closed (its branch was deleted and recreated to fix fixture drift from #51800, which GitHub treats as unrecoverable for reopening). Same branch name, now rebased onto current master and updated for the delivery attribute shape changes from #51800 (error_code/error_message/event required, response_headers no longer nullable). |
||
|
|
e2cf5b7adc |
[bot] Decrease ESLint ratchet baselines (#51870)
Automated weekly decrease of ESLint ratchet baselines. Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> |
||
|
|
4b5b2a3d71 |
feat(studio): multiselect for team member projects selector (#51948)
## Problem
In organization Team settings, admins could only assign one project at a
time to a team member with project-scoped access, both when sending an
invite and when managing an existing member's access. The platform API
(role_scoped_projects) already accepts an array of project refs, so this
was purely a UI constraint. Teams customers with larger orgs hit this
repeatedly, since granting access to several projects meant repeating
the picker one project at a time.
## Solution
Added a new shared component, elect, and used it in bothces that
previously used thonProjectSelector:
- Invite members: the project field changed from a scalar projectRef to
projectRefs: string[]; the invite payload now sends every selected
project. anage access: the one-at-a-is replaced by theulti-select, wired
into the list (add/remove updates thatlist; the per-row role dropdowns
and remove buttons are unchanged).
The multi-select reuses the existing debounced-search + infinite-scroll
project daer (same as the old single-ve the same), combined with the
generic ui-patterns/multi-select primitives for the checkable list and
removable trigger badges. It supports:
- Type-to-search against the paginated project list eselecting a project
eitherits badge on the trigger
- Projects the current user isn't permitted to remove (a role-removal
permission check) show as selected-but-locked, with an explanatory
tooltip
existing "All projects" toflows — the multi-select onlyrenders when that
toggle is off, and toggling it on/off behaves exactly as before.
Also fixed an unrelated pre-existing cosmetic bug noticed while testing:
the Managess sheet used bg-surface-2) instead of the sheetprimitive's
default opaque background, making it visibly see-through compared to
every other sheet in the app.
## Review instructions
1. Open Invite members, turn os if needed, toggle "Grant this role on
all projects" off, and confirm you can search and select several
projects, with each shown as a removable badge.
2. Send the invite and confirm applied to the new member'saccess.
3. Open Manage access on an existing member with project-scoped access —
confirm tcurrent projects are pre-se more projects via themulti-select,
remove one via its badge and another via the row's "X", and save.Confirm
the saved access ma
4. Toggle "Apply roles to all projects" on and off in Manage access and
confirm thexisting toggle behavior is
5. Confirm the Manage access sheet background is now fully opaque,
matching other sheets in the app.
6. pnpm --filter studio typecher studio test for the touchedfiles all
pass.
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
|
||
|
|
0670509381 | feat(pipelines): Improve lag UI for Pipelines (#51863) | ||
|
|
76f0585e80 |
fix(studio): limit project exit surveys (#51946)
I limited project deletion exit surveys to Pro and Team organizations. Other plans use the compact deletion dialog, with the permanent-deletion message consolidated into its warning and typed project-name confirmation retained. ## To test Tested on the updated Studio PR preview: - [x] Open project deletion for a Free org, expect the permanent-deletion text and documentation link together inside the warning, no separate deletion paragraph, and no survey fields. - [x] Open project deletion for a Pro org, expect the existing warning, reason selector, and feedback field. - [x] In Free and Pro dialogs, enter an incorrect project name and press Enter, expect “Value entered does not match”. Enter the exact name, expect the error to clear, then close without submitting. Not exercised: - [ ] Open project deletion for a Team org, expect the survey fields. - [ ] Open project deletion for Enterprise and Platform orgs, expect compact confirmation without survey fields. These plans are unavailable in the staging account. ## Linear - fixes FE-4634 |
||
|
|
7eff6c3642 |
fix(studio): layout extra height overscroll in usage page (#51915)
## Problem on `/org/[slug]/usage` the page scrolls past the end of the content and shows a blank area caused by an absolute element without ancestor | state | preview | | -------|------| | before | <img width="1718" height="927" alt="image" src="https://github.com/user-attachments/assets/d852486a-76a3-423e-96cb-cbf3ac637306" /> | ## Solution - adds `relative` to the scroll container `<main>` in `OrganizationLayout` <!-- ## 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. visit `/org/[slug]/usage` 2. [prod] scroll to the bottom then keep scrolling 3. [preview link] scroll to the bottom then keep scrolling, it should not be possible ## 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) |
||
|
|
1ddb9ac787 |
Refactor organization audit logs to use filter bar (#51921)
## Context Related to this PR [here](https://github.com/supabase/supabase/pull/51790), gonna refactor the Organization audit logs UI to also use the FilterBar component to match a consistent UX across log surfaces, instead of the individual filter popovers. <img width="1450" height="684" alt="image" src="https://github.com/user-attachments/assets/c1a4aab3-59d0-46a5-b7c7-1e7a5ad86b0d" /> ### For design Adding a small update to the `FilterBar` component here with a `topLevelOnly` parameter if the component is being used with `supportsOperators` (nested groups) - In the case of AuditLogs as least, figured that the date range filter option only makes sense as a top level filter - Hence this prevents the date range filter from being selectable while managing filters within a group <img width="366" height="186" alt="image" src="https://github.com/user-attachments/assets/e34ea0c8-5f03-4115-9fb1-554612f148dd" /> |
||
|
|
0ca1774997 |
Fix not showing phone based users in auth page for legacy search (#51942)
## Context Resolves https://github.com/supabase/supabase/issues/51761 For projects that aren't using the improved search in the Auth → Users page, the UI shows "No users in your project" when no user has an email (phone-only, anonymous, etc.), even though users exist. With the default "Email address" filter and an empty search box, the legacy query runs `where lower(email) >= ''`. That evaluates to NULL for users without an email, so they're excluded and the page looks empty. ## Changes involved - Only apply the column-based search when there are keywords. With an empty search box, the legacy path falls back to the plain listing query (no email/phone condition). So users will be correctly displayed - Same gating for improved search. Its SQL already ignored the column without keywords, but `column` is part of the query key, so changing the filter dropdown with an empty search box refetched an identical query. ## To test - Project with only phone/anonymous users (e.g. create one via `POST /auth/v1/admin/users` with `phone` + `phone_confirm`), improved search off (ref below's curl snippet) - Open Auth → Users with the default "Email address" filter → users are listed - Type a keyword → still prefix-searches the selected column - Improved search on: switching filter column with an empty search box makes no additional request ``` curl -X POST 'https://[ref].supabase.red/auth/v1/admin/users' \ -H 'apikey: <SECREY_KEY>' \ -H 'Authorization: Bearer <SECREY_KEY>' \ -H 'Content-Type: application/json' \ --data-raw '{"phone":"+15551234572","password":"asdasd","phone_confirm":true}' ``` |
||
|
|
279434fb70 |
feat(studio): add copied data deletion to Warehouse disable dialog (#51906)
## Problem Disabling Warehouse leaves copied data in storage. Users need an explicit option to remove it without deleting files manually. Closes [PIPE-1128](https://linear.app/supabase/issue/PIPE-1128), using the deletion support from [PIPE-1098](https://linear.app/supabase/issue/PIPE-1098). ## Solution Adds “Also delete copied Warehouse data” to the disable dialog. It stays unchecked by default. Source tables are preserved. | Before | After | | --- | --- | | <img width="826" height="504" alt="CleanShot 2026-10-19 at 16 17 12@2x" src="https://github.com/user-attachments/assets/defc99b9-4ec0-4188-bfa6-53f489ef2be5" /> | <img width="830" height="614" alt="CleanShot 2026-10-19 at 16 36 40@2x" src="https://github.com/user-attachments/assets/80299728-a790-4d80-a2d9-16750977a679" /> | Handles errors differently depending on what it relates to: | General Errors | Data Deletion Only | | --- | --- | | <img width="840" height="864" alt="CleanShot 2026-10-20 at 13 22 05@2x" src="https://github.com/user-attachments/assets/7b2b37c3-ace6-4fe0-a1b7-106a97eaab0a" /> | <img width="854" height="876" alt="CleanShot 2026-10-20 at 13 19 13@2x" src="https://github.com/user-attachments/assets/81459525-bb9f-4d2c-891d-b7f8f646098a" /> | | _Above the fold_ | _Below the fold, within the relevant section_ | ## Review instructions 1. Open **Integrations → Warehouse → Overview** in a project with Warehouse enabled, then click **Disable Warehouse**. 2. Check that **Also delete copied Warehouse data** is unchecked and has a permanent deletion warning. Select it, cancel, and reopen. It should be unchecked again. 3. On a disposable project, confirm with the option unchecked. Copied data should remain. With the option checked, the managed DuckLake catalogue and Storage bucket should be removed. Source tables should remain in both cases. 4. Confirm Studio shows cleanup progress, then returns to setup. Failed requests should keep the dialog open; failed background cleanup should offer **Retry**. |
||
|
|
3e8d7fa795 |
Deprecate formatFilterValue, consistently use formatPatternMatchFilterValue across all table-row-operations (#51918)
## Context Resolves https://github.com/supabase/supabase/issues/51827 Filtering a high-precision numeric column (e.g. `numeric(30,21)`) showed the matching row, but the footer count said 0. We're currently using `formatFilterValue` which coerced numeric filter values with `Number()`, and rounds past ~15 digits so the generated = no longer matched the stored value. This same coercion was used by the count query, export (`getAllTableRowsSql`) and delete-all but the main rows query (`table-row-query`) never coerced, which is why rows and count disagreed. ## Changes involved - Given that `formatFilterValue` was legacy logic, opting to remove the coercion and consistently use `formatPatternMatchFilterValue` instead for all row operations as per what `table-row-query` uses, so filter values reach Postgres as exact string literals. ## To test - Run the following SQL statements to set up the table - `CREATE TABLE public.precise_values (amount numeric(30, 21));` - `INSERT INTO public.precise_values VALUES (0.123456789012345678901);` - In the Table Editor, filter amount = 0.123456789012345678901. The footer should show 1 record and should match what's rendered in the table |
||
|
|
922937f6f7 |
Fix auto limit handling of limit all and limit null (#51917)
## Context Resolves https://github.com/supabase/supabase/issues/51836 Resolves FE-4666 The auto limit logic in the SQL Editor doesn't handle correctly when the query contains a `LIMIT ALL` or `LIMIT NULL` and will append another `LIMIT x` at the end of the query, so this PR fixes that Also added a fix to ensure that auto limit applies for select statements in CTEs ## To test - [ ] Verify that result does not have auto limit applied if running `select 1 limit all` or `select 1 limit null` in SQL Editor - [ ] Verify that there's auto limit for a CTE statement like `WITH numbers AS (SELECT generate_series(1, 2000) AS n) SELECT n FROM numbers;` |
||
|
|
827e79c5bc |
feat(studio): open the pipeline wizard from Add pipeline (#51903)
## Problem **Add pipeline** still opens the sheet when the wizard preview is enabled. This is slice 14 of #49243, stacked on #51901 (which follows #51900). ## Solution - Route both **Add pipeline** buttons and **Shift+N** to `/database/pipelines/new` when the preview is enabled. Wait for preview preferences and rollout flags before choosing the flow. - Keep enablement before creation, preview-off creation in the sheet, and editing in the sheet. - Return direct wizard visits to Pipelines when enablement is missing or its lookup fails, so existing enablement and Retry remain available. ## Review instructions 1. Open the [Pipelines preview](https://studio-staging-git-dnywh-featpipeline-wizard-entry-supabase.vercel.app/dashboard/project/_/database/pipelines) and select a test project. Enable **Pipeline creation wizard** in Feature Previews. 2. Click **Add pipeline** or press **Shift+N**. Check the full-page wizard opens. Complete Connection and Data, then start a test pipeline from Review. 3. On a project without Pipelines enabled, click **Add pipeline**. Enablement must complete before the wizard opens. Opening `/database/pipelines/new` directly on that project should return to Pipelines. 4. Turn the preview off: **Add pipeline** should open the existing sheet. Editing an existing pipeline should still use the sheet with either preview setting. |
||
|
|
306cd88a2b |
feat(studio): edit pipeline setup sections from review (#51901)
## Problem Review only offers Back, so users must traverse earlier steps to change a specific section. This follows #51900 in the pipeline wizard slices from #49243. ## Solution - Add **Edit** beside Destination, Connection and Data on Review. - Reuse step navigation and preserve entered values. Existing validation still controls access to later steps. - Keep the sheet unchanged. | After | | --- | | <img width="1462" height="968" alt="CleanShot 2026-10-19 at 11 51 16@2x" src="https://github.com/user-attachments/assets/ac76788c-d64c-49ef-9365-ee7bcb81887a" /> | | _Edit button is new in this PR_ | ## Review instructions 1. Open the [Pipelines preview](https://studio-staging-git-dnywh-featpipeline-review-ed-a84254-supabase.vercel.app/dashboard/project/_/database/pipelines), select a test project and enable **Pipeline creation wizard**. Open the [wizard preview](https://studio-staging-git-dnywh-featpipeline-review-ed-a84254-supabase.vercel.app/dashboard/project/_/database/pipelines/new) for that project, complete Connection and Data, then reach Review. 2. Click each section’s **Edit** action. Check it opens the matching step and preserves your values. 3. Change connection or data settings, then continue through validation to Review. Check the updated values appear. Edit Destination and confirm connection values remain when you return. |
||
|
|
e7b1f68956 |
feat(studio): create pipelines from wizard review (#51900)
## Problem The pipeline wizard can validate and review settings, but cannot create a pipeline. This is slice 13 of #49243, following #51823. ## Solution - Enable **Start pipeline** on Review using the sheet’s existing validation, creation and start requests. - Recheck publication settings, block critical failures and show warnings inline before **Start pipeline anyway**. - Preserve values after validation or create failures. Once creation succeeds, finish the start attempt and return to Pipelines, including when starting fails. | After | | --- | | <img width="1234" height="2470" alt="CleanShot 2026-10-19 at 11 22 44@2x" src="https://github.com/user-attachments/assets/23882092-26e2-4d23-b2a1-00d1d2dcba90" /> | **Add pipeline** still opens the sheet. Wizard entry remains behind **Pipeline creation wizard** at `/database/pipelines/new`; routing is the next slice. ## Review instructions 1. Open the [Pipelines preview](https://studio-staging-git-dnywh-featpipeline-review-creation-supabase.vercel.app/dashboard/project/_/database/pipelines), choose a test project and enable **Pipeline creation wizard** in Feature Previews. Open the [wizard preview](https://studio-staging-git-dnywh-featpipeline-review-creation-supabase.vercel.app/dashboard/project/_/database/pipelines/new) for that project. 2. Choose a destination, enter valid test credentials and select a publication. Continue to Review and check the settings, masked secrets and costs. Back and Continue should preserve your values. 3. Click **Start pipeline**. Controls should lock while submitting, then return to Pipelines with one new pipeline and no discard prompt. If warnings appear, review them before clicking **Start pipeline anyway**; critical failures must block creation. 4. Turn the preview off and open the wizard URL again: creation should use the existing sheet. Editing existing pipelines should also keep the sheet. Automated tests cover final validation, changed warnings, create retries, duplicate-click protection, removed publications and start failure recovery. |
||
|
|
23b93e9123 |
fix(studio): guard unsaved edits in TanStack (#51042)
Unsaved Edge Function, email template, and report edits block TanStack navigation until the user chooses whether to leave. Keep editing preserves the current route and draft, while Discard changes navigates on the first click. Depends on #51067 for the coordinated TanStack upgrade and published history fix. This layer contains only the navigation behavior and its regression coverage. **Changed:** - Select a native TanStack blocker through the Vite alias while retaining the original Next hook for the fallback runtime. - Preserve the latest navigation destination across repeated cancel/confirm attempts and browser history traversal. **Added:** - Regression coverage for dirty state, cancel/confirm, unload protection after traversal, encoded URLs, browser history, and the original Next hook. ## To test - In TanStack Studio, open a new Edge Function draft, edit its code, and navigate to another section. Keep editing should preserve the URL and code; retrying with Discard changes should navigate immediately. - Repeat with browser Back and Forward. Cancel should restore the editor URL; confirm should reach the intended history entry. - Repeat an unsaved edit in an existing function or email template, then discard it without saving. - Undo an edit back to its original value and confirm navigation does not prompt. - In Next Studio, confirm dirty-editor cancellation and `/dashboard` destinations still use the original guard. Validation on the upgraded dependency graph: 73 focused guard, navigation, URL and SSR tests passed, including 15 native TanStack cases and four original Next guard cases. Studio typecheck, lint ratchet, scoped ESLint, formatting and knip passed. The prerequisite's Next and UI Library production builds passed; this layer changes only TanStack's runtime alias and leaves the original Next guard source unchanged. The restacked TanStack Vercel/skew production build passed with uploads disabled. Local TanStack browser checks passed for repeated Keep editing, ordinary native Back/Forward cancellation, one Discard toward the latest breadcrumb destination, and Undo-to-clean navigation/reload. Disposable local drafts were fully discarded without deploying or editing existing functions. Native Next UI, multi-entry history jumps and unload prompts were not browser-tested; dedicated guard tests cover the latter two behaviors separately. ## Latest restack Head `d6e7e7f23800319ceba15570057f5227a904debe` is stacked on #51067 head `e11cce3ad28bec3e0656e98da7d00a80810da30d`. The guard patch is unchanged. The lower layer now skips unchanged table-filter URL sync to preserve Forward history; its conditional reproduction is separate from this guard change. Both PRs are mergeable after the trunk lockfile conflict was resolved. All 56 focused router/filter/Next/guard checks, Studio typecheck and scoped lint/format pass on the restack; all 20 required CI checks pass on both exact heads, including Next and TanStack E2E, full Studio tests, builds, Docker and typecheck/lint. The reviewer independently rechecked the earlier identical guard head and did not reproduce the reported unguarded Back behavior. Both history invocation methods showed the dialog, cancellation retained the draft and restored its URL, and Discard completed navigation. No additional guard change is justified by that retest; it does not establish the cause of the earlier failed snapshot. Final-head browser coverage remains distinct from this previous-head retest. Both final Studio staging deployments are ready and serve TanStack/Nitro assets. The upper sign-in page renders successfully; its unchanged guard behavior was not additionally browser-retested on this final head. Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
f2876c7787 |
chore(studio): upgrade the TanStack dependency set (#51067)
TanStack Start 1.169 is the stable release. This moves the shared catalog to Start 1.169.2 and Router 1.170.44, the newest matching pair that clears the 72-hour release-age gate, and updates Studio React Query and its devtools to 5.104.3. The ui-library TanStack auth blocks switch to `.validator()` because Start 1.169 removes `.inputValidator()`. **Changed:** - `pnpm-workspace.yaml` – `@tanstack/react-router` `^1.170.44` and `@tanstack/react-start` `^1.169.2`, so Router, Start, router-core, and the Start plugin install as one set - `pnpm-lock.yaml` – react-router 1.170.44, react-start 1.169.2, router-core 1.171.37, router-plugin 1.168.46, start-plugin-core 1.171.53, history 1.162.5, and Studio React Query 5.104.3 - `apps/studio/package.json` – `@tanstack/react-query` and `@tanstack/react-query-devtools` `~5.104.3`, `@tanstack/react-router-devtools` `^1.167.2` - `apps/ui-library/registry/default/blocks/password-based-auth-tanstack/routes/auth/confirm.ts` – `createServerFn` uses `.validator()` - `apps/ui-library/registry/default/blocks/social-auth-tanstack/routes/auth/oauth.ts` – `createServerFn` uses `.validator()` - `apps/ui-library/tests/sign-up-redirect.test.tsx` – the server-function mock follows the `validator` chain - `apps/ui-library/public/r/password-based-auth-tanstack.json` – registry JSON regenerated from the block - `apps/ui-library/public/r/social-auth-tanstack.json` – registry JSON regenerated from the block - `apps/ui-library/content/docs/tanstack/password-based-auth.mdx` – note that the block requires `@tanstack/react-start` 1.168.25 or later, since `.validator()` is missing from earlier Start versions - `apps/ui-library/content/docs/tanstack/social-auth.mdx` – note that the block requires `@tanstack/react-start` 1.168.25 or later, since `.validator()` is missing from earlier Start versions - `apps/studio/server.ts` – correct the header comment: `wrapFetchWithSentry` only adds a span, trace meta tags, and a flush, and request errors are captured by the Sentry middleware in `start.ts` **Removed:** - `minimumReleaseAgeExclude` pins for: - `@tanstack/react-router@1.170.41` - `@tanstack/react-start-client@1.168.39` - `@tanstack/react-start-rsc@0.1.59` - `@tanstack/react-start-server@1.167.46` - `@tanstack/react-start@1.168.60` - `@tanstack/react-store@0.11.2` - `@tanstack/router-core@1.171.34` - `@tanstack/router-generator@1.167.40` - `@tanstack/router-plugin@1.168.42` - `@tanstack/start-client-core@1.170.34` - `@tanstack/start-plugin-core@1.171.49` - `@tanstack/start-server-core@1.169.39` - `@tanstack/start-storage-context@1.167.36` - `@tanstack/store@0.11.2` ## To test - TanStack Studio, open a project home – the shell loads with no router error - TanStack Studio, open a table, switch schema, then Back and Forward – the table id follows history, and Forward returns to the later table - TanStack Studio, run a query in the SQL Editor – results render - TanStack Studio, open Project Settings – the general settings page renders - Next Studio, repeat home, Table Editor, SQL Editor, and Settings – the same pages render - ui-library TanStack password and social auth blocks, follow a sign-up confirm and OAuth confirm link – the server function accepts the search params through `.validator()` and redirects --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> |
||
|
|
b328ca6d5a |
fix(studio): sync table editor filters from the URL on back/forward (#51437)
Back/Forward between two history entries of the same table changed the URL but left the old filters in the filter bar and grid, because filters were only read from the URL on mount. Happens on both Next and TanStack; follow-up from #51391. **Changed:** - `useSyncFiltersToUrl` now also syncs URL → filter state for the current table (ignoring our own debounced push, and another table's URL while a TanStack navigation is pending). - State → URL skips pushes the URL already reflects, which also removes the no-op push on every grid mount. - `useTableEditorFiltersSort` returns `path` (same lines as #51391, so they merge cleanly). **Behavior choice:** if a filter is applied and Back/Forward happens before its 500ms debounce fires, the navigation wins and the unpushed filter is discarded, rather than pushing a stale filter over the entry the user navigated to. Back/Forward (`popstate`) cancels the pending push even when the `filter` param is unchanged; other URL changes such as a sort keep it. Documented on the hook. **Added:** - Real-TanStack-router navigation test and a router-agnostic unit test for the sync (master's hook fails 4 of 6). ## To test - Table A → add a filter → open table B → Back (A with filter) → Back (A, filter bar empty, all rows) → Forward (filter back) - Apply a filter and hit Back immediately – you land on the previous entry and the filter isn't re-pushed - Add/remove a sort, Back/Forward – sorts and filters stay in sync with the URL - Reload a filtered + sorted URL – both restored --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> |
||
|
|
4507b20370 |
fix(studio): stop table editor filters leaking across tables on Back (#51391)
On TanStack, the URL moves to the next table before the route params and rendered table do. Two places in the Table Editor read the table from one and its filters from the other, so one table's filters got applied to another during Back navigation. Reproduces on master (TanStack only); reported while testing #51067. **Changed:** - `useSyncTableEditorStateFromLocalStorageWithUrl` skips saving while the URL's table id doesn't match the rendered table, so a table no longer reopens (from tabs/sidebar) with another table's filter. - The sidebar's row count (`EntityListItem`) only uses URL filters when the URL belongs to that table (`useUrlTableFilters`), so it no longer runs `count(B) where <A's filter>` (which 400s when the column doesn't exist). **Added:** - Real-TanStack-router regression tests for both, with a delayed route load (each fails without its fix). ## To test - Add a filter on table A, switch to table B and back a few times via the sidebar, then hit browser Back repeatedly - Open B from its tab/sidebar – it shouldn't pick up A's filter - Watch network: no `table-rows-count` for B should include A's filter - A's own filter (and its filtered sidebar count) should still work when on A --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
2d79674ab3 |
refactor: migrate list_databases, list_notebooks, and get_notebook to tool contracts (#51937)
## Problem
The read-only notebook tools (`list_databases`, `list_notebooks`,
`get_notebook`) are still defined inline with `tool({...})`. The other
AI tools have moved to the tool contract pattern, so these three are
inconsistent with the rest.
## Solution
Migrate the three tools to the tool contract pattern: a contract file
plus a `.server.ts` implementation, registered in `TOOL_CONTRACTS`. They
are removed from `TOOL_CATEGORY_MAP` and kept in the allowlist.
Behavior is unchanged:
- `minOptInLevel: 'schema'`, same as before.
- `needsApproval: false`.
- `toModelOutput` returns the output unchanged, so the model sees the
same data at every opt-in level.
Stored-shape changes for replayed outputs:
- Replayed outputs are now validated against the output schema and
dropped if invalid. Previously they passed through unchecked.
- Zod strips unknown keys, so fields outside the schema no longer
replay.
- `status`, `region`, and `visibility` use plain `z.string()`, so new
enum values do not break replay.
## Review instructions
1. Run `pnpm exec vitest run lib/ai` in `apps/studio`. It should pass
(323 tests).
2. In `apps/studio/lib/ai/tools/registry.test.ts`, check the new
coverage: `toModelOutput` at all four opt-in levels, for both live and
replayed outputs, and invalid replayed outputs being dropped.
3. Confirm the three tools still appear for the schema opt-in level in
`tool-filter.test.ts` and `notebook-tools.test.ts`.
## 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)
|
||
|
|
af98094c8c |
feat(studio): show created at column in JWT signing keys table (#51845)
## What kind of change does this PR introduce? Feature ## What is the current behavior? The JWT signing keys table only shows when a key was last rotated. There's no way to see when a key was created, and the key ID can't be copied without selecting it by hand. Resolves FE-3061 <img width="1133" height="193" alt="Screenshot 2026-10-16 at 13 53 43" src="https://github.com/user-attachments/assets/e50e5a59-f0c4-4f8a-aa14-f200e5c469bd" /> ## What is the new behavior? - Adds a **Created at** column (hidden below `xl`) with the same relative label and timestamp tooltip as **Last rotated at**. - Combines the **Status** and **Key ID** columns into a single **Key** column, with the status on top and the key ID beneath in muted monospace. This follows the pattern used in the Access Tokens table. - Makes the key ID copyable: hovering it shows a copy icon and a "Copy key" tooltip, and clicking copies the ID to the clipboard. This follows the project ref copy pattern in the project list. <img width="1151" height="436" alt="Screenshot 2026-10-16 at 15 37 23" src="https://github.com/user-attachments/assets/46c86f85-bff6-4ee6-8d65-0c7a8c23a19e" /> ## Additional context No data or API changes (`created_at` was already returned). |
||
|
|
3f8bbd5a00 |
(fix): Storage preview file names from search results (#51914)
## Problem deeply nested files from bucket root search results dislay their path instead of their basename: <img width="816" height="432" alt="image" src="https://github.com/user-attachments/assets/3af89584-a96f-4dcb-b8fd-e02d26eb7640" /> ## Solution Use the file base name instead: <img width="820" height="434" alt="image" src="https://github.com/user-attachments/assets/590a39aa-d8d4-459b-9b56-8516b3f34571" /> |
||
|
|
0774de6982 |
(fix): DatePicker popover placement (#51911)
## Problem The DatePicker popover is not positioned correctly on some screens: _Observability > API Gateway_ <img width="1162" height="1002" alt="image" src="https://github.com/user-attachments/assets/eb3b4a03-f607-4a88-ad1e-df87d616a347" /> _Observability > Edge functions_ <img width="615" height="638" alt="image" src="https://github.com/user-attachments/assets/5c493628-90dc-4c28-951a-6327fdc93994" /> ## Solution Position it correctly: _Observability > API Gateway_ <img width="903" height="548" alt="image" src="https://github.com/user-attachments/assets/b6018804-416c-498f-9abc-74b57ad4826b" /> _Observability > Edge functions_ <img width="784" height="521" alt="image" src="https://github.com/user-attachments/assets/c1b0e297-f0ef-4a95-a47e-4e9f3d37394a" /> |
||
|
|
c752bf0125 |
fix(studio): use supabase.co for production Warehouse connections (#51934)
Use `<project_ref>.warehouse.supabase.co` in production Flight SQL connection details while preserving `.supabase.red` for staging and local development. |
||
|
|
cb5b57ce51 |
fix(studio): simplify memory chart defaults DEBUG-241 (#51930)
## Problem The database Memory usage chart includes free memory alongside usage and hides the total RAM limit by default, making usage harder to compare with capacity. ## Fix Remove the Free series and show the total RAM limit by default. Keep the existing limit toggle available. Fixes https://linear.app/supabase/issue/DEBUG-241 ## How to test - Open Observability > Database and inspect Memory usage. Used, Cache + Buffers, and Swap should remain; Free should be absent. - Confirm the total RAM limit is visible initially and can still be hidden and shown with the limit toggle. - Focused chart tests: 65 passed, repeated with shuffled seed 241 and retries disabled. Prettier and whitespace checks passed. - All applicable CI checks passed on |
||
|
|
ef759800a5 |
feat(reports): experiment with line charts FDBKIN-43258 (#51926)
## Problem Product reports often default to bars, making time-series trends harder to read. We want to evaluate line charts before deciding whether to remove chart-type controls permanently. ## Fix Use the boolean ConfigCat flag `defaultToLineCharts` to render lines across current and legacy product reports and hide line/bar toggles. Turning it off restores existing product-report behavior. Custom reports and their chart controls are unchanged. ## How to test - Enable `defaultToLineCharts` and open database, API, Auth, Realtime, Edge Functions, and Storage product reports. Expect lines and no line/bar toggle. - Disable the flag. Expect existing product-report styles and controls to return. - Verify custom reports retain their existing chart styles and toggles with either flag value. - No tests added for this presentation-only experiment. Formatting, whitespace checks, and independent code review passed. Updated-head CI is pending. Closes FDBKIN-43258 |
||
|
|
73081ea7b8 |
test(studio): stop PipelineCreationFlow tests timing out on slow runners (#51924)
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> `PipelineCreationFlow.test.tsx` started timing out on `master` ([run](https://github.com/supabase/supabase/actions/runs/39227187528), [run](https://github.com/supabase/supabase/actions/runs/39231750598)) – neither commit touched it. The heavier tests drive the full wizard through several steps and already took 2.5–3.7s on a fast runner, so a slow runner pushes them past vitest's 5s default. Most of the time went to unscoped `getByRole` lookups: a worker profile put about half the samples under role queries, and the self time was jsdom `getComputedStyle` (style and color resolution) on that large tree. Failing `waitFor` / `findBy` polls only start dumping the whole tree once a query misses, which is the path that tipped these tests over. `infrastructure.test.tsx`'s disk/autoscaling test timed out once for the same family of cost – per-keystroke `userEvent` typing on the full page. Retries don't help here – a timed-out attempt keeps running while the retry starts, which is where the "Continue not found" / empty `<body>` errors in those logs come from. **Changed:** - `PipelineCreationFlow.test.tsx` – step waits go through a `waitForStep` helper and other waits poll with `queryBy*`, so failing polls no longer build role/DOM dumps - `PipelineCreationFlow.test.tsx` – `fillConnection` uses label queries and step-specific queries are scoped with `within` - `PipelineCreationFlow.test.tsx` – split `preserves connection and data values…` into `preserves connection values across destination changes` and `preserves data values across steps and reaches Review`, with the same assertions - `infrastructure.test.tsx` – `submits disk and autoscaling changes…` types with `userEvent.setup({ delay: null })` so keystrokes are not separated by a macrotask No assertions were removed and no test timeouts were raised. | test | before (median / 1-core worst) | after (median / 1-core worst) | | --- | --- | --- | | requires connection fields and reveals invalid advanced settings | 1092 / 1554 | 1121 / 1522 | | recovers from request and critical failures and reviews warnings before continuing | 1812 / 2056 | 1263 / 1497 | | invalidates connection verification after edits and ignores stale responses | 1045 / 1109 | 509 / 563 | | uses browser Back and Forward to revisit steps without losing values | 1199 / 1368 | 582 / 703 | | starts a fresh session at Destination (×4) | 55–87 / 54–113 | 51–84 / 77–108 | | preserves connection and data values across steps and destination changes | 2270 / 2391 | split | | preserves connection values across destination changes | – | 929 / 1081 | | preserves data values across steps and reaches Review | – | 1058 / 1141 | | blocks incomplete data, retries metadata failures, and reveals invalid advanced settings | 1934 / 2097 | 1514 / 1621 | | blocks browser Forward to Review after data changes | 1151 / 1268 | 799 / 874 | | confirms destination-only changes and treats a reverted selection as pristine | 385 / 410 | 381 / 386 | | confirms dirty dismissal and allows keeping the form | 843 / 908 | 707 / 736 | | closes a pristine form and blocks progression without destinations | 46 / 46 | 43 / 48 | | submits disk and autoscaling changes to both infrastructure APIs | 1355 / 1805 | 1219 / 1684 | Median of 5 unconstrained runs, worst of 3 runs pinned to one core (`taskset -c 0`). Vitest 5.0.0. This touches the same file as #51900 – the helper changes carry over to its new tests once it merges. ## To test - [x] `pnpm --filter studio exec vitest run components/interfaces/Database/Replication/CreatePipeline` – all pass - [x] `pnpm --filter studio exec vitest run "tests/pages/project/[ref]/settings/infrastructure.test.tsx"` – all pass - [x] Same files pinned to one CPU core (`taskset -c 0`) – no test near the 5s timeout - [x] `test (1)` on this PR – green <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-b1f88499-15f7-5aff-b190-841d7371ba48?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-b1f88499-15f7-5aff-b190-841d7371ba48&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> |
||
|
|
090e5bceff |
feat(studio): filter organization usage by branch FE-4153 (#49257)
## Summary Customers could see a branch-driven egress overage in their organization total but could not select the branch on the Usage page. This adds a branch filter next to the parent project selector and uses the selected branch's project ref for usage requests. - Validate bookmarked branch refs before displaying usage. Show loading and API errors explicitly, and disclose when an unavailable branch falls back to its parent. - Keep the filter, notice, and usage requests on the same project ref. Allow returning to the parent even when the branches response omits its main row. - Find the selected branch's disk usage beyond the first page of organization projects and explain that deleted branches still contribute to organization totals. - Correct the branching and egress documentation to explain separate branch usage. ## Scope This is the branch-selector improvement proposed in FE-4153's discussion. It does not provide the original ticket's reconciled per-project egress table or historical rows for deleted branches. The current daily-usage API contract supports a single project filter, but does not return project-grouped usage. Keep the full reconciliation work open. ## Validation All 47 focused Vitest tests pass across six files, including nine MSW page tests covering usage request refs, direct branch links, pending/failed lookups, deleted-branch fallback, invalid-project recovery, and denied subscription permissions. Disk tests cover selection beyond the first 96 projects and pagination failures. Deterministic shuffled runs with seeds `4153` and `49257` pass with retries disabled (`--retry=0`). Four focused production mutants were killed by behavioral assertions; original source bytes were restored and verified after every probe. Studio TypeScript, Prettier on all PR paths, and focused lint checks pass; inherited `any` warnings remain. Browser QA on the matching `be17d77` Vercel preview passed parent usage (0.213 GB), searching for `dev-test`, branch selection, return to main, invalid-project recovery, stale-branch fallback, and returning to organization totals. The selected branch showed 0 GB, so nonzero branch overage was not verified. Browser network traffic was not captured; request-ref coverage comes from MSW. Three existing auth/router/platform module-mock scaffolds remain as a test-harness limitation; strict no-module-mock compliance is not claimed. All Studio unit-test and E2E shards passed on be17d77801; CI report jobs are finishing. Related: FE-4153 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Filter organization usage by project branch with searchable branch selection. Usage details reflect the selected branch where available, including branches found on later project-list pages. * See whether usage is scoped to a branch, the main branch, or a project, and switch to organization-wide totals. Billing and quota totals include all branches, including deleted branches that are no longer selectable. * **Documentation** * Clarified how non-compute usage is recorded per branch, included in organization totals, and viewed; it isn’t itemized by branch on invoices. * Clarified that Preview branch Egress counts toward organization totals, not the parent project’s usage, and how to view it. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
f4b2401831 |
docs(ai): update guide (#51847)
Added this guide recently so it'd be nice to keep it up to date https://github.com/supabase/supabase/pull/51785. --------- Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com> |
||
|
|
7a9565530c |
Fix handle truncation for multi dim array for table-row-query (#51834)
## Context If you create a table with a `jsonb` **array** column, then try to insert a new row with `[["` as the `jsonb` column value, the dashboard currently incorrectly flags it as a large value and blocks the user from editing it <img width="583" height="133" alt="image" src="https://github.com/user-attachments/assets/28b89648-12b6-4b49-a862-b4ec0db03e24" /> It's happening due to a small issue in `table-row-query` regarding its truncation logic, a stop gap to prevent fetching large column values which will cause browser performance issues. Multi dimension arrays are being handled differently in which there's no `...` appended at the end. And hence the naive check in `isValueTruncated` caused this issue to happen. Opting to adjust the SQL in `table-row-query` to align the truncation behaviour for multi dim array, such that it will end with `...` if the value being fetched is too large. ## To test We mainly need to ensure that the original problem no longer happens + truncation of large values is still working as expected. The following SQL here sets up some sample rows to test the truncation logic in the UI. ``` create table trunc_test ( id int primary key, label text, big_text text, big_json jsonb, big_text_1d text[], big_grid text[][], big_docs jsonb[][], small_grid text[][], small_docs jsonb[] ); insert into trunc_test values -- row 1: everything large (1, 'large', repeat('a', 20000), jsonb_build_object('k', repeat('b', 20000)), (select array_agg(repeat('c', 300)) from generate_series(1, 120)), (select array_agg(array[repeat('d', 300), 'x']) from generate_series(1, 120)), (select array_agg(array['{"k":1}'::jsonb, to_jsonb(repeat('e', 300))]) from generate_series(1, 120)), array[array['a','b'], array['c','d']], array['["x"]'::jsonb]), -- row 2: everything small (2, 'small', 'hi', '{"k":1}', array['a'], array[array['a','b'], array['c','d']], array[array['{"k":1}'::jsonb]], array[array['a','b'], array['c','d']], array['["x"]'::jsonb]); ``` |
||
|
|
b859ca0659 |
fix(studio): send exit survey before deleting a project (#51844)
## Problem Deleting a paid project could show a "Failed to submit exit survey" toast with a permissions error. The survey was sent after the delete succeeded. Deleting a project removes its permissions, so the survey endpoint's project-level access check rejected the request with a 403. <img width="510" height="196" alt="Screenshot 2026-10-16 at 15 27 40" src="https://github.com/user-attachments/assets/f01cb89f-597e-492d-bfc4-37f7260c25d3" /> ## Solution - Send the exit survey before the delete, while the project still has its permissions. - Never block the delete on the survey: a failed survey is ignored. - Pass a no-op `onError` so the survey failure toast no longer shows. The old `catch` swallowed the exception but not the hook's default toast. ## Known trade-off If the survey succeeds and the delete then fails, a survey is recorded for a project that still exists. A separate backend change to authorize deletes against the organization would let the survey move back after the delete. ## How to test - Delete a project on a paid plan with a survey reason selected: no error toast, the survey is recorded, and the project is deleted. - `pnpm --filter studio exec vitest run components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectModal.test.tsx` |
||
|
|
69f46a4ab5 |
fix(studio): guard unsaved pipeline creation navigation (#51823)
## Problem Browser Back and router navigation can leave the pipeline wizard without confirming unsaved changes. This is a slice of #49243, builds on merged #51821. ## Solution - Protect unsaved changes in both runtimes: Close and header links use the discard dialog; document exits and refresh use the browser warning. - Add TanStack confirmation for client-side navigation, preserving Back/Forward history. Step changes do not prompt. Next.js client-side router exits remain outside this slice. **Start pipeline** stays disabled. ## Review instructions 1. Open the [Pipelines preview](https://studio-staging-git-dnywh-featpipeline-navigation-guard-supabase.vercel.app/dashboard/project/_/database/pipelines), choose a test project and enable **Pipeline creation wizard**. Open the [wizard preview](https://studio-staging-git-dnywh-featpipeline-navigation-guard-supabase.vercel.app/dashboard/project/_/database/pipelines/new). 2. Continue to Connection and enter a pipeline name. Try a header link and **Close**: **Keep editing** preserves values, while **Discard changes** leaves without a second prompt. 3. Use browser Back to return to Destination without a prompt, then Back again to leave. Cancel the prompt and check the URL and values remain; Forward should still reach Connection. Document exits show the native browser warning in both runtimes; TanStack client-side exits show **Keep editing / Discard changes**. 4. With changes, refresh and cancel the browser warning. Check values remain. A fresh wizard with no changes should close without confirmation. |
||
|
|
25ede7243e |
feat(studio): validate pipeline wizard data settings (#51821)
## Problem The pipeline wizard lets users reach Review without a valid publication or initial-sync selection. This is a slice of #49243, following the merged #51818. ## Solution - Refresh publication metadata on **Continue** and reject unavailable publications or removed initial-sync tables. - Validate initial-sync and advanced data settings, reveal invalid fields and preserve values for retry. - Block browser-history shortcuts to Review after data settings change. | Normal State | Error State (Expanded) | | --- | --- | | <img width="1486" height="1010" alt="CleanShot 2026-10-16 at 13 18 25@2x" src="https://github.com/user-attachments/assets/74ec0785-3bd4-407a-aa3c-7fe69c338488" /> | <img width="1506" height="2516" alt="CleanShot 2026-10-16 at 13 21 27@2x" src="https://github.com/user-attachments/assets/6193d8c4-ab9d-47ca-9d9d-1a31198145d1" /> | Pipeline creation and navigation-out guards remain for later slices. **Start pipeline** stays disabled. ## Review instructions 1. Open the [Pipelines preview](https://studio-staging-git-dnywh-featpipeline-data-validation-supabase.vercel.app/dashboard/project/_/database/pipelines), select a test project and enable **Pipeline creation wizard**. Open the [wizard preview](https://studio-staging-git-dnywh-featpipeline-data-validation-supabase.vercel.app/dashboard/project/_/database/pipelines/new), choose a destination, then enter credentials and test the connection to reach Data. 2. Click **Continue** without a publication. Check the field error. Select a publication, choose a selective initial-sync mode and leave its table selection empty. Check Continue requires at least one table. Select a table and confirm you can reach Review. 3. Return to Data. Enter a negative **Batch wait time** under **Advanced settings**, collapse it and click Continue. Check it reopens with the error. Correct it and continue, then use browser Back, change a data setting and try browser Forward. Check you stay on Data until you click Continue again. 4. For a stale-selection check, select an initial-sync table, remove it from the publication in another tab, then click Continue. Check the selection is rejected and your other values remain. A failed metadata request should also keep values and allow retry with Continue. |
||
|
|
8047d93e3c |
feat(studio): validate pipeline wizard connections (#51818)
## Problem The pipeline wizard from #51776 allows users to continue without valid destination credentials. This is the next slice of #49243. ## Solution - Validate connection fields for all four destinations using the existing schemas and helpers. - Validate the destination on **Continue** and advance to Data on success. Show field errors and connection failures inline; pause for warnings before continuing. - Require a new check after connection settings change and block browser-history shortcuts past an unverified connection. | Errored Test | Success Test | | --- | --- | | <img width="1532" height="2062" alt="CleanShot 2026-10-16 at 12 19 51@2x" src="https://github.com/user-attachments/assets/a40a6c01-ee89-4601-b5d7-6ffc85071dc7" /> | <img width="1500" height="1950" alt="CleanShot 2026-10-16 at 12 18 33@2x" src="https://github.com/user-attachments/assets/c50c1ad4-256b-44b5-bd06-ec0685aae759" /> | The screenshots show earlier test states; successful checks now advance directly to Data. Data validation and pipeline creation remain for later slices. **Start pipeline** stays disabled. ## Review instructions 1. Open the [Pipelines preview](https://studio-staging-git-dnywh-featpipeline-connectio-eb9566-supabase.vercel.app/dashboard/project/_/database/pipelines), select a test project and enable **Pipeline creation wizard**. Open the [wizard preview](https://studio-staging-git-dnywh-featpipeline-connectio-eb9566-supabase.vercel.app/dashboard/project/_/database/pipelines/new) for that project. 2. Choose a destination and click **Continue** with empty or invalid fields. Check the errors, then enter valid credentials and retry. A failed check keeps your values. A failed result stays visible while editing, until retry or destination change. Changed settings still require a fresh check. A successful check opens Data automatically; warnings remain for review before continuing. 3. Continue to Data, return to Connection and change a credential or advanced connection setting. Check that browser **Forward** cannot skip the new check, then click **Continue** to validate again. |
||
|
|
27e6259a39 |
chore(studio): remove legacy status banner and incidentIoStatusPage flag (#51852)
## Summary The incident.io status page is now the only status banner for everyone, so the legacy status banner path is removed: - Removed the `incidentIoStatusPage` ConfigCat flag. The incident.io path is unconditional. - Deleted the legacy status banner code (`StatusPageBanner` and its utils/visibility hook) and its tests. - Deleted the legacy API endpoints `/api/incident-banner`, `/api/incident-status`, and `/api/status-override` (pages, app, and routes variants), along with their data hooks, query keys, and lib helpers. - Removed `STATUSPAGE_*` env vars from the Turbo config and the `INCIDENT_BANNER_DISMISSED_IDS` local storage key from `packages/common`. - Updated the AI tools and SQL generation endpoint that read the flag. `NEXT_PUBLIC_ONGOING_INCIDENT` / the `ongoingIncident` override is kept. The `incident_status_cache` table and its migration are intentionally untouched. Studio no longer reads it, and dropping it is a separate cleanup. ## Testing - Studio typecheck passes. - Related vitest suites pass (414 tests). |
||
|
|
a499db95f9 |
refactor(studio): migrate execute_sql, deploy_edge_function, rename_chat, and load_knowledge to tool contracts (#51803)
## Summary
Migrates four more assistant tools to the contract + `.server.ts`
pattern used by the notebook tools. Each tool now declares its schemas,
opt-in level, approval and model-visible output once.
## Changes
* Add contracts and server factories for `execute_sql`,
`deploy_edge_function`, `rename_chat`, `load_knowledge`;
`getStudioTools` now composes them.
* Add `execute-sql-output.ts` (output schema, `toModelRows`,
`NO_DATA_PERMISSIONS`) and `knowledge-topics.ts` (topic names + UI
labels, replacing the copy in `Message.Parts.utils.ts`).
* Delete `executeSqlSanitizer` and `ALL_TOOL_SANITIZERS`; history replay
goes through `sanitizeContractPart` only.
* Drop the four tools from `TOOL_CATEGORY_MAP`; the UI and evals import
schemas from the contracts; `rename_chat` input casts now use the
contract type.
## Deviations worth reviewing
* `execute_sql` replay: a bare-array legacy output is stamped `schema`
via a union transform (still hidden from the model, still shown in the
UI). A malformed non-array output is now dropped, where before it passed
through at the data level.
* The "no data permission" message now reaches the model as a JSON
string value instead of a text part. The text the model sees is
unchanged.
* `deploy_edge_function` output is now strictly `{ success: boolean }`
in the UI parse (was optional/passthrough).
|
||
|
|
4e1c6b5907 |
fix(logs): preserve pagination cursor precision DEBUG-229 (#51597)
## Problem Rhe dashboard used only the last log's time to decide where to continue, and shortened that time to milliseconds. This could skip logs with the same recorded time, or times less than a millisecond apart, between one page and the next. This could happen even with Live turned off. ## Fix Use both the last log's full recorded time and its unique ID to decide where the next page starts. This lets the dashboard continue from the right log, even when several logs have the same time. The fix works with both supported log services. This PR fixes missing logs when loading older results. It does not change how Live fetches new logs; that improvement is handled separately in [#51599](https://github.com/supabase/supabase/pull/51599). Part 1/9 of the replacement stack for #51090, tracked by [DEBUG-229](https://linear.app/supabase/issue/DEBUG-229/make-live-mode-incremental). Targets master; review and merge the stack in order. This diff contains 389 changed lines, including tests. Stack: [#51597](https://github.com/supabase/supabase/pull/51597) → [#51598](https://github.com/supabase/supabase/pull/51598) → [#51599](https://github.com/supabase/supabase/pull/51599) → [#51600](https://github.com/supabase/supabase/pull/51600) → [#51601](https://github.com/supabase/supabase/pull/51601) → [#51602](https://github.com/supabase/supabase/pull/51602) → [#51603](https://github.com/supabase/supabase/pull/51603) → [#51604](https://github.com/supabase/supabase/pull/51604) → [#51605](https://github.com/supabase/supabase/pull/51605). ## How to test - `pnpm --filter studio exec vitest run data/logs/unified-logs-pagination.test.ts data/logs/unified-logs.utils.test.ts` - Check both log services: logs with the same recorded time, or times less than a millisecond apart, should appear once when loading older results. - Validation: focused tests, full Studio typecheck, changed-file lint, and formatting pass. |
||
|
|
5b8f504ce3 |
fix(studio): preserve restore times across date edits FE-4129 (#51613)
## Problem Changing the restore date resets the entered time, and the repeated hour at the end of daylight saving time can resolve to the wrong occurrence. Both can change the submitted recovery timestamp. ## Fix Store the recovery point as a Unix timestamp and preserve its occurrence when editing an ambiguous local time. Calendar edits carry the entered hours, minutes, and seconds onto the selected day, applying that day's timezone offset and retaining the existing backup-range clamping. This focuses on date edits and repeated-hour handling from #48903. It changes only the PITR form, its utilities, and regression tests. Related to [FE-4129](https://linear.app/supabase/issue/FE-4129/r2np-datetime-widget). ## How to test - In PITR or restore-to-new-project, enter a time and select another available calendar day. Expected result: the entered hours, minutes, and seconds remain selected, and the submitted timestamp matches the new date. - Run the PITRForm and PITR.utils Vitest suites. Their fixtures cover both occurrences of the repeated Madrid/New York hour, edits across DST, spring-forward normalization, fractional offsets, and backup boundaries. - Twelve focused regression cases passed under a Madrid browser timezone. Those cases plus the existing selector component test passed under Hong Kong, thirteen tests total. All CI checks passed, including Studio tests, all four Next.js/TanStack E2E shards, typecheck, lint ratchet, formatting, spelling, unused-code checks, and Docker build. |
||
|
|
cb17091d2d |
feat(studio): default staging project creation to v3 (50%) (#51808)
## Problem New projects created on staging default to v2 (`cloud_provider: 'AWS'`). We want staging to start exercising v3 (`AWS_K8S`). Resolves FE-4640. ## Solution In `ProjectCreationForm`, the initial cloud provider is now rolled once per mount: on staging (`NEXT_PUBLIC_ENVIRONMENT === 'staging'`) it is `AWS_K8S` with 50% probability, otherwise the existing default. v3 is only rolled if the `infra:cloud_providers` custom content allows `AWS_K8S`. Prod and local are unchanged, and the internal-only "Cloud provider" selector still lets admins override the default. ## Review instructions 1. Run Studio with `NEXT_PUBLIC_ENVIRONMENT=staging` and the `newProjectInternalOnlyConfiguration` flag on. 2. Reload the new-project page several times and check that the "Cloud provider" select defaults to AWS and AWS (Revamped) about equally often. 3. Change the select manually and confirm the choice is kept and the project is created with it. 4. With `NEXT_PUBLIC_ENVIRONMENT=prod` or `local`, confirm the default is always AWS. ## 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 with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
a37e434aa4 |
chore(studio): track docs link clicks in the region selector footer (#51841)
Adds `free_tier_general_region_docs_link_clicked` event, fired when the regions docs link in the selector footer is clicked |
||
|
|
f5288eb1e2 |
feat(studio): remember project home chart interval per project (#51833)
## Problem The time-range dropdown above the request charts on the project home page resets on every visit, so users who prefer a different range have to re-select it each time. Resolves FE-2828. <img width="819" height="353" alt="Screenshot 2026-10-16 at 10 42 05" src="https://github.com/user-attachments/assets/cb8d467b-e709-43b0-9ae4-b02ebccf5faf" /> ## Solution Persist the selection in localStorage, keyed per project (`home-chart-interval-${ref}`), in both usage section variants (`ProjectUsageSection` and `ProjectUsageSectionDeltas`, chosen by the `newHomepageUsageDeltas` flag). - New `resolveChartInterval` helper validates the stored value against the known keys and the plan's log retention, falling back to the plan default for corrupt values or after a plan downgrade. Unit tested. - Removed the `useEffect` in `ProjectUsageSection` that reset the interval on retention change, since it would overwrite the saved value. - Moved `getDaysRequired` into `logs.utils.ts` so the dropdown and the helper share the retention check. Manually verified with the flag on and off: reload keeps the selection, and each project keeps its own. |
||
|
|
8963a05479 |
chore(studio): drop anon key wording from connect snippet placeholders (#51793)
## Problem Several snippets in the dashboard Connect sheet still mention anon keys in placeholder text, even though publishable keys are now the recommended client key: - Swift, Kotlin, Expo, Ionic React and Ionic Angular show `<prefer publishable key instead of anon key ...>` when the project has no publishable key. - Astro, Nuxt, Refine, TanStack, Flask and the three .NET snippets fall back to `your-anon-key` when the project has neither key. - Ionic React stores the key in a variable called `supabaseAnonKey`. ## Solution - Both placeholders become `your-publishable-key`. - The Ionic React variable becomes `supabaseKey`, matching the other snippets. Snippets that switch to `*_ANON_KEY` environment variables for projects with only legacy keys (Next.js, Vite, SvelteKit and others) are unchanged. There, `your-anon-key` still matches the variable name. The Flutter snippet is handled separately in #51792. ## Review instructions 1. Open the Connect sheet for a project without a publishable key. 2. Go through the frameworks listed above and check that the placeholders say `your-publishable-key`. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) |
||
|
|
09a4374b14 |
Fix: ensure the scoped oauth apps new UI doesn't show if mocks are enabled (#51829)
## Problem The feature flag enabling the new scoped oauth apps UI was enabled by mistake in production but this UI currently only work with mocks. We added an environment check in some places but not all so users did see the new UI ## Solution Add the environment check wherever needed |
||
|
|
17f21bf6a8 |
Joshenlim/fe 4510 auditlogs filterbar for account logs (#51790)
## Context Replaces the individual filters on the Account audit logs page with the filter bar to match a consistent UX across log surfaces <img width="1206" height="360" alt="image" src="https://github.com/user-attachments/assets/c5bdfd7e-3277-4695-b9fc-1791df8720c7" /> Also uses the `supportOperators` param for the `FilterBar` to support "OR" based operations when filtering for projects <img width="1219" height="97" alt="image" src="https://github.com/user-attachments/assets/d4748e6c-d1f3-4f23-b767-e0f4bb1c0a1c" /> The main changes for the `FilterBar` component made in this PR (which would be more relevant for the design team) are: - Added a divider between the options and "New group" - Originally didn't have a divider - So there's a clearer distinction that the "New group" isn't a option to set as the value for - Add a new `defaultGroupOperator` prop - Originally defaults to `AND` - However, in the context of Audit Logs when filtering for projects, you'd expect `OR` to be the default to filter across several projects (`AND` wouldn't make sense here) |
||
|
|
b74d799c3d |
fix(studio): sort edge function files by name and select the entrypoint by default (#51796)
## Problem The file list in an Edge Function's code view is shown in the order the Management API returns it (roughly `created_at` order), not sorted by name. Users expect name order, as in VS Code. Resolves FE-2799 ## Solution - `formatFunctionBodyToFiles` now sorts files by their displayed name before assigning ids, using a case-insensitive numeric comparison (`file2` before `file10`). The list is flat, so there is no folder grouping. - Sorting would have changed which file opens first, so the code page now selects the function's entrypoint file by default. `getDefaultSelectedFileId` matches the entrypoint's basename, then falls back to `index.ts`, then to the first file. The entrypoint isn't always `index.ts`: the docs allow any `.ts`, `.js`, `.tsx`, `.jsx` or `.mjs` file. - The shared `FileExplorerAndEditor` and the new-function page are unchanged. The code page passes the selection through the explorer's existing `selectedFileId` / `setSelectedFileId` props. - Files added or renamed in the editor keep their position until the next load. Before: <img width="259" height="370" alt="Screenshot 2026-10-15 at 16 44 50" src="https://github.com/user-attachments/assets/611fe2b9-5676-496a-85a9-e50032708c7a" /> After: <img width="259" height="371" alt="Screenshot 2026-10-15 at 16 35 19" src="https://github.com/user-attachments/assets/7f433661-ef34-4e3f-9143-afc67be1b30a" /> ## Review instructions 1. Open an Edge Function's Code tab for a function with several files, for example `utils.ts`, `index.ts`, `deno.json`. 2. Confirm the files are listed alphabetically and that `index.ts` is selected on load. 3. For a function with a custom entrypoint (for example `main.ts`), confirm that file is selected on load. 4. Run `pnpm test:studio -- components/interfaces/EdgeFunctions`. |
||
|
|
4593b3ffc0 |
feat(studio): compose pipeline creation step navigation (#51776)
## Problem The pipeline wizard in #49243 needs its merged components composed into a full-page flow, with values preserved when moving backwards and forwards. ## Solution - Compose four full-page SteppedFlow steps behind **Pipeline creation wizard**. - Preserve values through step navigation and browser Back/Forward. Refresh starts at Destination. - Reuse Studio’s header controls and confirm before discarding changes. - Defer step validation and creation; **Start pipeline** is disabled. **Add pipeline** and preview-off visits keep the sheet. | After | | --- | | <img width="1024" height="759" alt="New Pipeline Supabase" src="https://github.com/user-attachments/assets/7c3c4511-9a00-4e64-a86a-d6d9489f7d75" /> | | _Only available by navigating to `database/pipelines/new` with the feature preview on._ | ## Review instructions 1. Open the [Pipelines preview](https://studio-staging-git-dnywh-featpipeline-stepped-n-ce5307-supabase.vercel.app/dashboard/project/_/database/pipelines), select a test project and enable **Pipeline creation wizard**. Open the [wizard preview](https://studio-staging-git-dnywh-featpipeline-stepped-n-ce5307-supabase.vercel.app/dashboard/project/_/database/pipelines/new) for that project. Check the full-page layout and header at desktop and phone widths. 2. Enter connection details, select a publication and change initial-sync and advanced settings. Use **Back/Continue**, browser **Back/Forward**, and switch destinations to confirm values remain. 3. Check Review shows your settings, masks secrets and disables **Start pipeline**. Refresh and confirm it restarts at Destination. Incomplete steps are allowed in this navigation-only slice. 4. With changes, try header navigation or **Close**. Check **Keep editing** preserves values and **Discard changes** leaves the flow. Turn the preview off and confirm the wizard URL opens the sheet. |
||
|
|
3960e6ac41 |
chore(deps): bump lucide-react to v1 (#51770)
## Problem Lucide React v1 improves screen reader behaviour (icons are hidden from assistive tech by default). It also removes brand icons such as GitHub. We were still on Lucide 0.x across the monorepo. ## Solution - Move every workspace onto one shared Lucide React v1 version via the pnpm catalog. - But Lucide React v1 [deprecated brand icons](https://github.com/lucide-icons/lucide/blob/main/BRAND_LOGOS_STATEMENT.md) - Meaning we need to handle any _old_ brand icons we used from Lucide 0.x. - Luckily, that was just `GitHubIcon`. So... - Add a `GithubIcon` in `packages/ui` that matches Lucide’s previous GitHub icon, and use it wherever we imported GitHub from Lucide. - No other Lucide brand icons were in use. - Studio “Continue with GitHub” sign-in still uses the existing SVG asset (`github-icon.svg`), not this component. - Keep the `Icon` suffix import style [recently introduced](https://github.com/supabase/supabase/pull/51659) - Monorepo apps now use `catalog` Lucide React v1. ## Review instructions 1. Open [Studio preview](https://studio-staging-git-dnywh-bump-lucide-react-v1-supabase.vercel.app/dashboard/org) on a project that is connected to GitHub: - Project home → Activity stats “GitHub” row - Org project list → GitHub badge on a connected project card/row - Branches → GitHub link on a branch row, or “Sync with a GitHub branch” - Project Settings → Integrations → GitHub integration panel 2. Open [/kb/guides/sample-guide](https://supabase.com/kb/guides/sample-guide) → confirm “Go to the GitHub discussion” shows the icon. 3. Open [/docs/reference/javascript](https://supabase.com/docs/reference/javascript) → confirm the header GitHub control still shows the icon. Or [/docs/guides/troubleshooting/rls-simplified-BJTcS8](https://supabase.com/docs/guides/troubleshooting/rls-simplified-BJTcS8) → “View discussion on GitHub”. |
||
|
|
991653aa36 |
chore(studio): allow project creation region flags to resolve independently (#51787)
## Problem Updating our region experiment flags to be able to handle latest experiment. ## Solution Make flags resolve independently. cc @charislam ## Review instructions tbc --------- Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com> |
||
|
|
d0cf8dbc50 |
fix: align webhook FE with updated API changes (#51800)
## What Aligns the webhooks FE with backend changes confirmed by Pawel (FE-4621): 1. `custom_headers` is optional but never null, matches the updated contract. 2. Removed the client-only `name` field (never persisted by the API). Display name is now the endpoint's URL plus its subscribed event types. 3. The deliveries list endpoint now returns the full `event` object, so `eventType`/`eventPayload` are always populated. Added an Event column to the deliveries table. Also regenerates `packages/api-types` from production to pick up these changes. While testing, found and fixed two more related issues: 4. A delivery can briefly exist before the backend finishes attaching its event data, regardless of what triggered it (test, retry, or real traffic). The deliveries list now polls every 5s while open, so new or still-settling deliveries fill in automatically instead of requiring a manual refresh. 5. "Send test event" always defaulted to an unrelated sample event type. The test endpoint actually accepts a specific `event_type`, so this now sends the endpoint's own subscribed type automatically, or shows a picker when there's more than one to choose from. ## Testing All webhooks component/unit tests pass (30/30), typecheck and lint clean. Manually verified on localhost against a live backend. ## Note This may clash with #51614 (`custom_headers: null` in a test fixture, no longer a valid value once this merges). Will follow up there after this lands. |
||
|
|
9ae8432dc7 |
refactor(studio): migrate create, delete, and run notebook tools to tool contracts (#51754)
## Summary Migrates the create, delete, and run notebook assistant tools to the tool contract + server pattern used by `update_notebook`. Each tool now defines its schema once in a shared contract, with server-only execution split into a `.server.ts` module. This removes duplicated client-side schemas and gives the three tools one shared notebook mutation output schema. ## Changes - Add `create-notebook`, `delete-notebook`, and `run-notebook` tool contracts, each with a `.server.ts` implementation. - Remove the duplicated client-side schemas for these tools from `notebook-tools.ts` and the registry. - Add `notebook-mutation-output.ts` as the single output schema shared by the notebook mutation tools. - Add `lib/ai/opt-in-level.ts` with the opt-in level helpers, extracted from the existing module to break an import cycle. - Add optional `ToolContract.outputOnInvalid` so `run_notebook` history replay can reuse a stored output when input fails validation. - Update the AI assistant panel renderers (proposal, run, opt-in modal and request) and the tool filter, sanitizer, and cache invalidation to use the new contracts. ## Deviations worth reviewing - **`outputOnInvalid` on `ToolContract`.** This is a new optional hook. It exists so `run_notebook` history replay can return a valid output when stored input no longer passes validation. Reviewers should confirm this is the right level for the hook rather than handling it inside the tool. - **`opt-in-level.ts` extraction.** The helpers were moved into their own module to break a circular import between the tool modules and the opt-in components. This adds one file, but no behavior change is intended. - **`create-notebook` contract imports the data-layer `notebook-schema`.** This matches `update-notebook`. It should be moved behind the contract before the planned ESLint rule step, which restricts contract modules from importing data-layer code. ## Testing - `vitest` for `lib/ai`, `components/ui/AIAssistantPanel`, and `state`: 920 tests pass across 71 files. - `tsc`: one error remains in `packages/ui-patterns` (`InstructionBlocks.tsx`), which is unrelated to this change. I have not verified whether it also fails on the base branch. - ESLint reports no errors on the changed files (9 `no-explicit-any` warnings in `tool-filter.ts` and its test); Prettier is clean. - Not run: knip and the lint ratchet. |
||
|
|
dfd1f58838 |
fix(studio): use publishableKey in the Flutter connect snippet (#51792)
## Problem The Flutter snippet in the dashboard Connect sheet calls `Supabase.initialize` with `anonKey`. The current stable `supabase_flutter` (2.18.3) deprecates `anonKey` in favor of `publishableKey`, so the copied code shows a deprecation warning right away. ## Solution Pass the key as `publishableKey` and change the fallback placeholder to `your-publishable-key`. The old placeholder told users to prefer the publishable key over the anon key, which no longer makes sense once the parameter itself is named `publishableKey`. ## Review instructions 1. Open a project in the dashboard and click Connect. 2. Choose Framework, then Flutter. 3. Check that `lib/main.dart` calls `Supabase.initialize(url: ..., publishableKey: ...)`. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) |