Commit Graph
6351 Commits
Author SHA1 Message Date
Saxon Fletcher c33d255eba chore(studio): refine assistant empty states (#50191)
<img width="1062" height="712" alt="image"
src="https://github.com/user-attachments/assets/44c82e00-94b4-405a-b2ef-cbc08401c4db"
/>

<img width="1583" height="962" alt="image"
src="https://github.com/user-attachments/assets/b19b9fd8-24b1-48d6-8b31-11fba9911b9a"
/>


## What kind of change does this PR introduce?
UI refinement.

## What is the current behavior?
The assistant sidebar and Explorer chat use different empty states.

## What is the new behavior?
Share a centered empty state with chat-focused prompts, use-case icons,
and a “Use your own agent” footer. Simplify prompt cards and align
Explorer Home styling.

## Additional context
Studio typecheck, targeted ESLint, and Prettier pass. E2E selectors
updated; browser verification pending. Local build stopped after showing
no progress during compilation.

I have read CONTRIBUTING.md.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Redesigned Explorer and AI Assistant onboarding with project-focused
chat prompts.
* Added personalized chat template icons and updated suggested actions.
* Added an option to connect and use an external agent through Claude,
OpenAI, or Cursor.
  * Improved chat composer placement and empty-chat guidance.
* **Style**
* Action cards now support layouts without descriptions and adjust
alignment automatically.
* **Tests**
  * Updated end-to-end coverage for the revised assistant interface.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-10 13:39:21 +08:00
Danny White 1131e3e2ce fix(ui): default Button variant to default instead of primary (#50160)
## What kind of change does this PR introduce?

Bug fix / design-system alignment for the legacy `Button` from `ui`.

## What is the current behavior?

Omitting `variant` on the legacy `Button` falls back to brand-green
`primary`. That makes accidental greens easy, and it is hard to spot the
real main action on busy pages.

## What is the new behavior?

- Legacy `Button` now defaults to neutral `default`
- Intentional primary CTAs (create, save, submit, marketing CTAs, and
matching `ButtonTooltip` usages) now set `variant="primary"` so their
appearance is unchanged
- Neutral actions that previously relied on the old fallback (cancel,
close, back, dashboard nav, and similar) become grey/white
- Design-system docs updated; regression tests cover the new default

`Button_Shadcn_` is unchanged. It already uses its own CVA default.

This is PR 1 of 2 in a stack. PR 2 drops now-redundant
`variant="default"` props.

## To test

Studio (http://localhost:8082):

- `/sign-in`: Sign in stays green
- Open a project → Database → Tables: New table stays green
- Auth → Users → Invite: Invite user stays green; Cancel / dismiss
controls stay neutral
- Project Settings → General: edit a field so Cancel and Save appear.
Cancel is neutral, Save is green

Design system (http://localhost:3003):

- Components → Button: default demo is neutral; primary demo is green;
featured preview is the default variant

Marketing (optional):

- www header: Start your project stays green; logged-in Dashboard is
neutral

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Style**
- Buttons now default to a neutral style, while primary actions across
Studio, documentation, marketing pages, forms, dialogs, and error states
use prominent primary styling.
- Updated button examples and previews clarify the distinction between
default and primary variants.
  - Event registration now includes a directional arrow icon.

- **Tests**
- Added coverage confirming default button styling and explicit primary
styling behave as expected.
- Updated related test fixtures to use primary styling where
appropriate.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-10 11:23:17 +10:00
Danny WhiteandClaude Opus 5 30ab816ff4 feat(studio): make the Connect framework and client selectors searchable (#50072)
## What kind of change does this PR introduce?

Feature.

## What is the current behavior?

The Framework and Client selectors in the Connect sheet are plain
selects. Neither is scannable at its current length, and Client is the
worse of the two at 19 options.

## What is the new behavior?

Both are searchable comboboxes. Each keeps its selection, filters as you
type, matches on the underlying key as well as the label so `nextjs`
finds `Next.js`, and announces its empty state to screen readers.

| Before | After |
| --- | --- |
| <img width="1182" height="1250" alt="CleanShot 2026-09-07 at 14 47
12@2x"
src="https://github.com/user-attachments/assets/6243c549-03cc-41bf-8b3c-a186ca0e93b5"
/> | <img width="1178" height="1162" alt="CleanShot 2026-09-07 at 14 46
42@2x"
src="https://github.com/user-attachments/assets/d7ca5e72-3f8b-48e5-b20f-84382e4e4fd7"
/> |

Placeholder, search and empty-state copy now sit on the field definition
in the schema, next to the label, so one combobox component serves both
fields without guessing at plurals.

Client keeps its icons hidden, matching what the select did. The comment
about MCP images being unoptimized still stands, so this is not the PR
to turn them on.

Radix Select brings its own scroll lock, so replacing it with a popover
would have regressed touch scrolling in the sheet. #50103 moved that
guard into `CommandList` and has merged, so this branch now carries the
feature only.

## To test

- Open the Connect sheet on the deploy preview.
- Open the Framework selector, search for `native`, confirm only React
Native remains, select it, and confirm the generated connection
instructions update.
- Search `nextjs` and confirm Next.js matches on its key.
- Switch to the MCP tab and open Client. Search `cur` and confirm Cursor
matches.
- Confirm both lists cap their height and scroll, and that the sheet
behind stays put.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Framework selection now uses a searchable combobox for easier
navigation of long lists.
  * Search results clear automatically when the combobox closes.
  * Long framework lists appear in a contained, scrollable area.

* **Accessibility**
  * Screen readers announce when no frameworks match the search.
* Improved combobox and listbox relationships support assistive
technologies.
* The dropdown opens as a modal layer to keep focus within the selection
experience.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 00:35:05 +00:00
Miranda Limonczenko 23a5bd4707 fix: update inbound links to the pooling guide (#50187)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Bug fix. Link string changes only, no content changes.

## What is the current behavior?

Nine inbound links in `apps/www` and `apps/studio` point at anchors on
the connecting to Postgres guide that don't exist. All nine are already
broken on production today: `#connection-pooler`, `#connection-pool`,
`#how-connection-pooling-works`, `#serverside-poolers`, and
`#connecting-with-drizzle` are all missing from the live page.

#49869 moves the pooling content to a child page, so these links need
current destinations either way.

## What is the new behavior?

Point each link at the page that holds the content now.

- **Studio, 3 links.** The Connect sheet's Drizzle link goes to the
Drizzle guide. The connection pooling and pooling modes links go to
`pooling-and-limits#how-connection-pooling-works`.
- **www, 6 links.** Three blog posts, the Heroku comparison page, and
the Dedicated poolers feature entry go to `pooling-and-limits`. The
feature entry uses `#shared-pooler`.

## Additional context

Split out of #49869. These paths belong to `@supabase/marketing` and
`@supabase/Dashboard` in CODEOWNERS, and pulling both teams into a
docs-only restructure for nine link strings isn't a good trade.

Merge after #49928. The destinations don't exist on production until the
docs pages land.

## Manual testing

1. Open [Supavisor: Scaling Postgres to 1 Million
Connections](https://zone-www-dot-com-git-fix-pooler-docs-links-supabase.vercel.app/blog/supavisor-1-million).
The "connection pooling" link in the opening paragraph resolves to
`connecting-to-postgres/pooling-and-limits#how-connection-pooling-works`.
2. Open [Dedicated
poolers](https://zone-www-dot-com-git-fix-pooler-docs-links-supabase.vercel.app/features/dedicated-poolers).
The docs link resolves to `pooling-and-limits#shared-pooler`.
3. Open [Supabase vs Heroku
Postgres](https://zone-www-dot-com-git-fix-pooler-docs-links-supabase.vercel.app/alternatives/supabase-vs-heroku-postgres).
Both connection pooling links resolve to
`pooling-and-limits#how-connection-pooling-works`.
4. Open [Connection pooling and
limits](https://docs-git-docs-connecting-to-postgres-technical-supabase.vercel.app/docs/guides/database/connecting-to-postgres/pooling-and-limits)
on the #49928 docs preview. The `how-connection-pooling-works` and
`shared-pooler` headings both render with those IDs.
5. Open the Connect dialog on any project. Under Drizzle, the docs link
opens the Drizzle guide.
6. Open Database settings, then Connection pooling. The pooler link
opens Connection pooling and limits.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Updated connection pooling links across Studio, product pages, blogs,
and comparison content to point to the relevant pooling guidance.
* Refined links for Drizzle ORM, dedicated poolers, direct connections,
and shared poolers.
* Improved navigation to specific documentation sections explaining
connection pooling modes and behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-09 17:10:55 -07:00
Guilherme Souza a96a587f65 fix(studio): update Swift package URL to official supabase org (#50184)
## Summary
- The Studio Connect sheet's Swift install command pointed at
`supabase-community/supabase-swift`, which is no longer where the
package lives — it's now official under `supabase/supabase-swift`.
- Updated the URL in `INSTALL_COMMANDS.supabaseswift`.

## Test plan
- [x] Verified no other references to the old URL remain in Studio code
(translated top-level READMEs under `i18n/` also reference the old URL
but are out of scope for this fix)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Updated the Swift installation command to reference the official
Supabase Swift repository.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-09 10:55:54 -04:00
Joshen Lim 246bd9acbf Adjust vertical space for explorer notebook query cells (#50169)
## Context

As per PR title - just adjusts the vertical height for a couple of empty
states in QueryCells for Notebooks

### Query not run yet

| Before | After |
| -------- | -------- |
| <img width="1072" height="350" alt="image"
src="https://github.com/user-attachments/assets/cbf14619-ac01-4082-9732-41737a028c40"
/> | <img width="1083" height="313" alt="image"
src="https://github.com/user-attachments/assets/1144eebf-7293-4be4-adaf-af2dc21bc40f"
/> |
| <img width="1083" height="292" alt="image"
src="https://github.com/user-attachments/assets/511754f8-5128-41b7-a4c8-542fb93b77e5"
/> | <img width="1100" height="163" alt="image"
src="https://github.com/user-attachments/assets/53de5b4a-8284-406a-a8ae-4602f61f3ca3"
/> |

### Chart empty state

| Before | After |
| -------- | -------- |
| <img width="1079" height="291" alt="image"
src="https://github.com/user-attachments/assets/068fe573-1f65-4efc-831c-db2ddda2be1a"
/> | <img width="1078" height="225" alt="image"
src="https://github.com/user-attachments/assets/b9d58d8f-162d-463d-90e2-fbf3470c6db8"
/> |



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Style**
- Improved query editor layout by reducing unnecessary spacing and
ensuring result areas fit more consistently within available space.
- Refined chart empty states with cleaner borders, compact spacing, and
improved vertical sizing.
  - Updated query error presentation with more compact padding.
- Simplified result panel sizing for a more consistent viewing
experience.

- **User Experience**
- Added a play icon alongside the “Run the query to see results” prompt
when no results are available.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-09 18:45:12 +08:00
Joshen Lim e267b05ee9 Add horizontal padding for notebook home tab (#50168)
## Context

Theres no padding on smaller viewports - so the main content looks
squished

### Before
<img width="1674" height="1882" alt="image"
src="https://github.com/user-attachments/assets/e0b1fb05-d853-40db-8e06-51dec9a9376a"
/>


### After
<img width="947" height="981" alt="image"
src="https://github.com/user-attachments/assets/28c6dab4-0c12-4851-aa40-c65d60797463"
/>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Style**
* Improved horizontal spacing on the Explorer home screen for a more
balanced layout.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-09 18:33:50 +08:00
Joshen Lim 86f7d245f8 Use green for notebook status indicator if new (#50167)
### Context

As per PR title - just a tiny adjustment to use green for the status
indicator if the notebook is new and yet to persist in the DB to make it
visually different for notebooks that are already in the DB but have
unsaved changes

<img width="372" height="80" alt="image"
src="https://github.com/user-attachments/assets/5ef863b1-0e7a-4b00-baab-dc76b3cf9b47"
/>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Updated the notebook status indicator to use the brand color for new
notebooks.
- Improved visual distinction between new notebook states and
warning-related statuses.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-09 18:30:24 +08:00
Joshen Lim 3ac5a6b4f7 Api authorization to add returnTo param when linking to /new for no org empty state (#50166)
### Context

Resolves FE-4355

- Users who reach `/authorize` with zero organizations see a "Create an
organization" CTA that links to a bare `/new`
- After creating the org, they land on `/new/<slug>?projectName=...`
instead of back at `/authorize?auth_id=...`
- `returnTo` handling used to exist here
([#30211](https://github.com/supabase/supabase/pull/30211), refactored
in [#44522](https://github.com/supabase/supabase/pull/44522)) but was
dropped as a side effect of the interstitial redesign in
[#46359](https://github.com/supabase/supabase/pull/46359)
- [#47760](https://github.com/supabase/supabase/pull/47760) later
patched the missing CTA back in but not the returnTo round-trip
2026-09-09 18:13:34 +08:00
Joshen Lim a1686025b6 Joshenlim/fe 4291 keep unsaved notebooks accessible after page refresh (#49673)
## Context

Changes here adds a "Draft" state for notebooks with a new
`notebook-drafts` store - similar to how we handle query tabs in the
explorer.
This implies that if a user refreshes the tab while there's unsaved
changes to notebooks, the changes can be persisted locally and the user
will be able to continue from where they left off.

This also implies that If you create a new notebook (OR open an existing
notebook and make some changes) and refresh the browser, we no longer
show the native browser confirmation dialog about discarding changes.

We also reuse the existing confirmation dialog when saving a notebook if
its draft has diverged from the server side content - just updated the
language to be more generic rather than saying that the Assistant made
changes
<img width="429" height="238" alt="image"
src="https://github.com/user-attachments/assets/5c392aed-1633-4428-8060-28f495a01f04"
/>

Also fixes an unrelated issue - renaming a notebook should mark the
notebook as having unsaved changes (with the orange indicator)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

* **New Features**
* Unsaved notebook edits are saved locally and restored when reopening
Studio.
* Drafts are scoped by project and protected from server changes through
conflict detection.
* Notebook tabs indicate unsaved changes, including drafts from unsaved
notebooks.
* **Bug Fixes**
* Closing a tab with local edits prompts for confirmation and removes
its saved draft.
  * Notebook save state reflects the server-confirmed update time.
  * Conflict messages clearly describe changes made on the server.
* **Style**
  * Improved keyboard focus behavior for tab controls.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-09 17:17:25 +08:00
Joshen Lim c37e756983 Trigger update snippet when toggling favorite (#50121)
## Context

Currently in the SQL Editor, toggling "favourite" for a snippet doesn't
persist unless you manually save the snippet (which expects a change in
the snippet's content before allowing so) - which is a bit of an odd UX

This used to work before we introduced manual saving which is currently
the default behaviour for the SQL Editor - `addFavorite` and
`removeFavorite` would add to the `needsSaving` queue which the editor's
save scheduler will subscribe and trigger the save. However the save
scheduler doesn't subscribe to the queue for manual saving mode
([ref](https://github.com/supabase/supabase/blob/master/apps/studio/state/sql-editor/sql-editor-save-scheduler.ts#L90))
- hence toggling favourite on a snippet never triggers a PATCH request.

Am opting to immediately trigger a PATCH request when toggling
favourites which is a bit more of an expected UX imo

One thing to note is that favoriting a snippet essentially does a save
on the snippet - which means the contents will be persisted as well,
although i think this is alright

## To test
- [ ] Verify that toggling favourite for a SQL snippet persists
immediately
- Can verify by checking the context menu CTA to see if it's changed
from "Add to favourites" to "Remove from favourites" or vice versa

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Improvements**
  - Favoriting or unfavoriting SQL snippets now saves immediately.
- Favorite changes are handled consistently across the SQL Editor,
including the utility panel and snippet navigation.
- Pending content saves are coordinated to prevent favorite changes from
being overwritten.
- If saving a favorite fails, the previous favorite state is restored
and an error notification is shown.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-09 15:50:27 +08:00
Joshen Lim 08224b40d3 ColumnDefaultValue null value suggestion to apply if column is nullable (#50117)
## Context

In the Table Editor when editing a column's default value, only text
type columns have the NULL value suggestion which is incorrect as that
suggestion should be available irregardless of data type as long as the
column is nullable.

This PR adjusts that to add the NULL value suggestion if the column is
nullable. (e.g timestamptz here)
<img width="478" height="444" alt="image"
src="https://github.com/user-attachments/assets/4f6856bf-26d5-4633-ba69-a1b6a23c8534"
/>

Am also opting to use `ColumnDefaultValue` within the TableEditor's
`Column` component for consolidation. So in this case, if the column
type selected is an enum, users can select from a list, similar to how
it'd be in the ColumnEditor


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Improved column default-value editing with context-aware suggestions.
* Added support for nullable columns to select `NULL` as a default
value.
* Added enum-aware default-value options and improved control layout
customization.

* **Bug Fixes**
  * Prevented editing default values for identity integer columns.
  * Improved accessibility and testability for default-value controls.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-09 15:50:13 +08:00
Danny WhiteandJoshen Lim fce9d475ee chore(studio): migrate combobox triggers (#50157)
## What kind of change does this PR introduce?

Studio UI consistency refactor.

## What is the current behaviour?

Several Studio comboboxes still build their triggers from `Button` and
supply their own double-chevron icon. This duplicates trigger styling
and allows these controls to drift from selects and other comboboxes.

## What is the new behaviour?

- Migrates the PITR timezone, AWS region, and account timezone controls
to `ComboboxTrigger`
- Migrates the shared `SchemaSelector` and `FunctionSelector`, updating
their Studio callsites together
- Preserves the globe icon in both timezone controls
- Exposes the correct combobox role and open state through the shared
trigger
- Tightens the tiny schema selector end padding so its chevron aligns
with adjacent controls
- Leaves organisation and project context switchers unchanged

| Before | After |
| --- | --- |
| <img width="504" height="490" alt="CleanShot 2026-09-09 at 13 56
56@2x"
src="https://github.com/user-attachments/assets/117a9169-88bf-4f9e-8302-9df9b911a307"
/> | <img width="496" height="512" alt="CleanShot 2026-09-09 at 11 31
26@2x"
src="https://github.com/user-attachments/assets/bc98cded-2723-4d20-9d8c-49630ea018af"
/> |
| <img width="1250" height="394" alt="CleanShot 2026-09-09 at 13 58
34@2x"
src="https://github.com/user-attachments/assets/9106f924-88fd-40d4-88e3-8d0ddbb61d12"
/> | <img width="1246" height="376" alt="CleanShot 2026-09-09 at 13 58
09@2x"
src="https://github.com/user-attachments/assets/7894a254-f6f9-40bb-a312-9f1a5079f096"
/> |

## To test

On the [Studio
preview](https://studio-staging-git-dnywh-choremigrate-combobox-680102-supabase.vercel.app):

1. Open **Database > Tables** and use the schema selector above the
table. It should use a single down chevron, open normally, and update
the selected schema.
2. Open **Authentication > Hooks > Add hook**, then select **Postgres**
as the hook type. The **Postgres schema** and **Postgres function**
selectors should use a single down chevron and continue to open and
select normally.

The PITR, AWS region, and account timezone callsites require the
relevant plan, integration, or feature flag. When available, their
triggers should use the same single down chevron, and both timezone
controls should retain the globe icon.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **UI Improvements**
* Standardized timezone, AWS region, database backup, function, and
schema selectors with a consistent combobox interface.
  * Added clear visual feedback for open and closed selector states.
* Preserved contextual icons and labels, including globe icons for
timezone selections.
* Improved accessibility with appropriate combobox semantics, accessible
names, and state information.
* Timezone settings are now available without an optional feature flag.
* **Tests**
  * Updated end-to-end coverage for the standardized combobox controls.
* Added coverage confirming schema selectors expose the selected schema
as an accessible name.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-09-09 15:36:35 +08:00
dc16371a47 feat(studio): configure BigQuery table layout (#49535)
## What kind of change does this PR introduce?

Feature. The last remaining piece of this PR's original scope, rebased
onto current `master`.

## What is the current behavior?

A BigQuery pipeline replicates every published table into a flat
destination table. There is no way to say how those tables should be
laid out in BigQuery, so partitioning and clustering have to be applied
by hand after the fact, and are lost whenever a destination table is
reset.

The rest of this PR's original scope has since merged separately:
#49841, #49842, #49843, #49844 and #49845. The branch now carries only
the table layout work, and adds nothing to `packages/api-types`. It
consumes the `table_options` contract that #49844 already brought in.

## What is the new behavior?

The BigQuery destination form gains a "Table layout" section under
Advanced settings. Every table in the selected publication appears as a
row, and expanding one reveals optional partitioning and clustering:

- Time-column partitioning, by hour, day, month or year
- Integer-range partitioning, with start, end and interval
- Ingestion-time partitioning
- Clustering, up to four columns

Rows are always present, so nothing implies a table can be excluded
here. A collapsed row summarises what is applied: `Not configured`,
`Daily by created_at`, `Integer range by id`, plus clustering counts.
`Not configured` is dimmed a step further so configured rows are what
the eye lands on in a long publication.

Notes on behavior:

- Partition columns are resolved from the published table's real
columns, filtered to the types BigQuery accepts for each partition mode.
- A row you expand but leave empty is dropped from the payload rather
than saved half-configured. Choosing a partition mode without a column
is a validation error, not a silent drop.
- Clear returns a row to `Not configured` and keeps it in the list.
Remove is reserved for stale configuration whose table has left the
publication.
- Updates send `null` to clear previously stored table options, since
omitting the property leaves the stored value unchanged.
- Layout applies when a destination table is first created or reset,
matching the backend.

Roughly 40% of the diff is tests. The bulk of the rest is four new files
under `DestinationForm/BigQuery`, which are all one feature. The three
commits are readable in order: types and payload builders, then the
columns query, then the UI.

## To test

Open a project's Database > Replication, then create or edit a BigQuery
pipeline.

1. Expand Advanced settings. "Table layout" lists every table in the
selected publication.
2. Expand a row, set Partition by to Time column and pick a column.
Collapse. The row reads `Daily by <column>`. Hit Clear. The row returns
to `Not configured` and stays in the list.
3. Set Partition by to Time column, leave Partition column empty,
collapse, and Save. The row explains "Select a partition column" in red
rather than saving and silently dropping it.
4. Expand a row and add clustering columns. The fifth is refused.
5. Switch publications and watch the loading state. The row list should
not jump size when it resolves.
6. Narrow the sheet. The integer range Start, End and Interval fields
should reflow rather than stay in three columns.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* BigQuery replication destinations now support per-table layout
settings.
* Configure partitioning by time column, integer range, or ingestion
time.
  * Configure up to four clustering columns per table.
* View available columns and validation feedback while editing table
layouts.
* Table settings are preserved when editing destinations and cleaned up
when publications change.

* **Bug Fixes**
* Improved handling of invalid, unavailable, or removed table and column
configurations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-09-09 16:56:12 +10:00
Joshen Lim 957f84b17c Joshenlim/fe 4348 find an alternative to the jsr stdpath dependency (#50111)
## Context

Drops the `@std/path` dependency which is used in `EdgeFunctions.utils`
as `npm.jsr.io` was putting up a Cloudflare bot challenge on some
connections which blocks `pnpm install`. Instead, opting to directly
port the exact required methods as self-contained functions. Also added
some unit tests to check that UI behaviour remains status quo.

## To test: 
Important to test that everything in the edge functions UI remains
status quo
- [ ] Open an existing edge function with a single root-level file -
should load as expected
<img width="310" height="176" alt="image"
src="https://github.com/user-attachments/assets/4d724ab0-33bb-4093-a574-52984b2743fd"
/>
- [ ] Open (or create) an edge function with nested folders - confirm
file paths in the editor are shown correctly
  - Can create nested folders by using `../` as such
<img width="319" height="228" alt="image"
src="https://github.com/user-attachments/assets/dd345b1f-7c45-47e9-975c-f2f2e53a0106"
/>
- [ ] Similarly, download the edge function as ZIP to verify that the
nested folders are all correctly located
- [ ] Open a function with `import_map.json` - confirm still detected as
import map through the network tab GET request for the edge function
code (Examples here with and without import map)
<img width="333" height="245" alt="image"
src="https://github.com/user-attachments/assets/90fc90e3-4a62-493b-9246-ed7e3b662e96"
/>
<img width="290" height="237" alt="image"
src="https://github.com/user-attachments/assets/2f692362-c9d4-4394-bc5a-4f84ab5fb6f1"
/>
- [ ] Deploy a new function via the editor
- [ ] Update an existing function via the editor (Test adding new files
etc)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Improved Edge Functions file path handling across supported
application environments.
- Nested entrypoints, URL-based entrypoints, root-level files, and
unmatched paths are now handled consistently.
- Generated files retain their content and receive sequential
identifiers reliably.
- Improved compatibility when processing and displaying files in
different application environments.

- **Tests**
- Added coverage for entrypoint path formatting, relative paths,
fallback behavior, unchanged paths, and identifier assignment.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-09 14:37:32 +08:00
Danny White 6a4cbefbcf feat(ui): align combobox trigger with select styling (#49665)
## What kind of change does this PR introduce?

Bug fix and shared UI primitive.

## What is the current behaviour?

In **Database > Replication > Add destination**, the searchable
**Publication** field uses a double chevron and button styling. It looks
inconsistent beside the **Initial sync** select, which uses a single
chevron and the standard select surface.

The shared multi-select trigger uses the same inconsistent double
chevron. These differences are easy to repeat because searchable
comboboxes do not have a dedicated trigger that shares the select
styling.

## What is the new behaviour?

- Adds `ComboboxTrigger` with the same shared styling as `SelectTrigger`
- Uses a fixed single down chevron so combobox and select triggers
cannot drift
- Migrates the Studio **Database > Replication > Add destination >
Publication** field to `ComboboxTrigger`
- Updates `MultiSelectorTrigger` to replace `ChevronsUpDown` with the
same fixed `ChevronDown`, including **Connect > MCP > Feature groups**
in Studio
- Updates the canonical design-system combobox examples
- Leaves `Button` unchanged, so adopting combobox styling is explicit

| Before | After |
| --- | --- |
| <img width="1256" height="448" alt="CleanShot 2026-09-09 at 10 21
32@2x"
src="https://github.com/user-attachments/assets/bb7a6056-0b4e-4cb4-8dce-e92fa4f5afe7"
/> | <img width="1256" height="448" alt="CleanShot 2026-09-09 at 10 21
11@2x"
src="https://github.com/user-attachments/assets/860a06b9-617d-4d94-ac98-944316e9fdc3"
/> |
| <img width="1210" height="520" alt="CleanShot 2026-09-09 at 10 58
28@2x"
src="https://github.com/user-attachments/assets/e916d3a2-6a75-40eb-965a-56e0694ba447"
/> | <img width="1210" height="520" alt="CleanShot 2026-09-09 at 10 57
57@2x"
src="https://github.com/user-attachments/assets/c5f1b8ff-8083-47b8-8242-59116d085c00"
/> |

## Left for incremental migration

These existing Studio comboboxes still use bespoke button triggers and
will move to `ComboboxTrigger` in focused follow-up changes:

- **Database > Backups > Point in time > Timezone**
- **Authentication > Third-party auth > AWS region**
- **Account > Preferences > Timezone**
- Shared schema and function selectors

See https://github.com/supabase/supabase/pull/50157.

The organisation and project switchers in the top navigation are
intentionally out of scope. They are context switchers rather than
form-field comboboxes.

## To test

### Studio callsites

On the [Studio
preview](https://studio-staging-git-dnywh-featcombobox-trigger-supabase.vercel.app):

1. Open **Database > Replication > Add destination**.
2. Compare **Publication** with **Initial sync**. Both should use a
single down chevron and the same closed-field surface, border, sizing,
and hover treatment.
3. Open **Publication**, search for an option, and select it. The
popover should close and the selected publication should be shown.
4. Open **Connect** from the project header, select **MCP**, and check
**Feature groups**. Its multi-select trigger should use a single down
chevron.

### Design system

1. Check the [combobox
examples](https://design-system-git-dnywh-featcombobox-trigger-supabase.vercel.app/design-system/docs/components/combobox).
2. Check the [multi-select
examples](https://design-system-git-dnywh-featcombobox-trigger-supabase.vercel.app/design-system/docs/fragments/multi-select).
3. Both trigger types should use a single down chevron.
2026-09-09 13:44:11 +10:00
K-Dog (Kevin) 605c6ef065 feat: include log ingestion in free plan usage summary (#49576)
<img width="368" height="288" alt="Screenshot 2026-08-26 at 12 24 52 PM"
src="https://github.com/user-attachments/assets/ec39a35d-a7fb-4957-8fee-b657125d1c95"
/>

Gated behind feature flags as rollout is still pending

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added conditional visibility for the Log Ingestion usage metric based
on feature availability.
* Updated usage displays and loading states to reflect the available
metrics.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-09 11:12:58 +08:00
Julian Domke 21077a4071 fix(billing): allow for invoice_pdf to be null (#50138)
The OpenAPI schema guarantees the existence of `invoice.invoice_pdf`,
but it can be null in certain cases. This has been uncovered by the
recent schema validation initiative :)

<img width="435" height="168" alt="Screenshot 2026-09-08 at 16 37 58"
src="https://github.com/user-attachments/assets/e9c9a9a2-759f-4ec0-904f-64425b9a65e7"
/>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
  - Invoice downloads now clearly indicate when a PDF is unavailable.
- Downloading an invoice without a PDF displays an error notification
instead of failing silently.
  - Invoice download controls are disabled when no PDF exists.
- **Accessibility**
  - Added an accessible label to the receipt download button.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-09 11:12:14 +08:00
kemal.earthandClaude Opus 5 41e6d489f8 feat(studio): mcp elicitation url mode ui (#49954)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Initial build of the URL mode interstitial. Has complete mock data to be
able to view different states (this will be stripped out in the end). A
starting point for us to use as an intercept.

This is linked with @barryroodt ticket in the MCP project.
https://github.com/supabase/mcp/pull/412


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added an authenticated MCP Secrets page for securely storing API
secrets requested by AI tools.
- Added provider-aware guidance for OpenAI, Anthropic, Resend, and
Stripe keys, including validation warnings and dashboard links.
- Added clear success, cancellation, expiration, error, and
wrong-account states with account switching.
- Added loading placeholders, secret visibility controls, overwrite
warnings, and accessibility announcements.
- **Bug Fixes**
- Improved interstitial animations to respect reduced-motion
preferences.
- Preserved return destinations and related parameters during sign-in
flows.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-08 16:40:36 +01:00
Coenen Benjamin 67e48f51b6 fix(warehouse): don't display ducklake metadata schema in replicated tables/schemas (#50123)
Don't show to users replicated schema or tables from the ducklake
metadata schema to avoid infinite loop. (This is already forbidden at
API level)


Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
2026-09-08 15:16:56 +02:00
f5d0bf5d98 fix(ui): let command dropdowns scroll on touch inside overlays (#50103)
## What kind of change does this PR introduce?

Bug fix.

## What is the current behavior?

A command dropdown cannot be scrolled by touch when it sits inside a
dialog or sheet.

Radix wraps a modal dialog's overlay in a scroll lock that cancels wheel
and touch events whose target is not inside the sheet. A dropdown
portals to the body, so it falls outside that boundary and its scroll
events get cancelled.

Callers have been rediscovering this one at a time and fixing only half
of it. `MultiSelectorList` stops wheel events reaching the document, and
`SchemaSelector` and `FunctionSelector` expose a `stopScrollPropagation`
prop that does the same. None of them handle touch, so the desktop
symptom is fixed everywhere and the mobile one is fixed nowhere.

## What is the new behavior?

`CommandList` keeps wheel and touch events off the document itself. That
covers every command dropdown in the monorepo, in an overlay or not,
with no call-site changes. A caller's own `onWheel` or `onTouchMove`
still runs.

The workarounds this replaces are removed: the handler in
`MultiSelectorList`, and the `stopScrollPropagation` prop on
`SchemaSelector` and `FunctionSelector` along with its four call sites.

One behavior change worth naming: overscrolling past the end of a
dropdown no longer scrolls the page behind it. That is what a dropdown
should do, and it is what the four `stopScrollPropagation` call sites
were already opting into.

#50072 depends on this. It swaps two selects for comboboxes, and Radix
Select brings its own scroll lock, so without this the swap would
regress touch scrolling.

## To test

- On the deploy preview, [open a project's Connect
sheet](https://studio-staging-git-dnywh-fix-multi-select-scrol-63608b-supabase.vercel.app/dashboard/project/_)
and pick the MCP tab.
- Narrow the window to phone width and switch on touch emulation in
devtools.
- Open the features dropdown and drag the list. It should scroll, and
the sheet behind it should stay put.
- Repeat with a mouse wheel to confirm desktop scrolling still works.
- [Open Authentication >
Hooks](https://studio-staging-git-dnywh-fix-multi-select-scrol-63608b-supabase.vercel.app/dashboard/project/_/auth/hooks)
> Create hook, open the schema picker, and confirm it still scrolls by
wheel now that `stopScrollPropagation` is gone.
- [Open the SQL
editor](https://studio-staging-git-dnywh-fix-multi-select-scrol-63608b-supabase.vercel.app/dashboard/project/_/sql/new)'s
schema picker on a page with no overlay and confirm the list scrolls
normally.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Improved wheel and touch scrolling behavior in command lists,
selectors, and multi-select menus.
- Reduced unwanted scroll-lock interference when using selectors inside
overlays such as dialogs and sheets.
  - Preserved support for supplied scroll event callbacks.

- **Accessibility**
- Added clearer accessible labels to the Connect and mobile navigation
menu buttons.
- Updated the Connect button text behavior for icon-only and standard
presentations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-09-08 19:21:19 +08:00
Tarun Khandelwal d7ae1c7eae chore: allow triggering of restarts for v3 projects (#49586)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Allowing v3 projects to be restarted.

## What is the current behavior?

The current behaviour greys out the `Restart Project`

## What is the new behavior?

It allows the restart the project:
<img width="675" height="158" alt="Screenshot 2026-08-26 at 12 49 35 PM"
src="https://github.com/user-attachments/assets/a80f64d3-9e4d-4b8e-bca2-ec0a6717496c"
/>



## Additional context
Tested with: https://github.com/supabase/platform/pull/37561

Part of: KUBE-1285

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
  * Enabled server restarts for AWS (Revamped) projects.
* Updated the restart control so it is no longer disabled or restricted
for these projects.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-08 16:08:00 +05:30
Danny WhiteandJoshen Lim 4a5db160be feat(studio): extract shared zod number input helpers (#50102)
## What kind of change does this PR introduce?

Refactor. Extracts zod number input preprocessing into a shared Studio
helper and migrates existing call sites.

## What is the current behavior?

Number input clearing logic for controlled `type="number"` fields is
duplicated across Studio forms. The pipeline destination form had local
helpers, while Auth and settings forms inline the same `z.preprocess`
pattern.

## What is the new behavior?

Adds `apps/studio/lib/forms/zod-number-input.ts` with:

- `requiredNumberInputSchema` for required `z.number()` fields (`''` →
`NaN`)
- `optionalNumberInputSchema` for optional number fields (`''`/`null` →
`undefined`)
- `preprocessEmptyNumberInput` for `z.coerce.number()` schemas

Migrates:

- Pipeline destination form
- Connection pooling settings
- Auth provider validation (email and SMS OTP fields)
- SMTP settings
- MFA settings
- Protection settings

## To test

1. Open **Authentication > Providers > Email**, clear **Email OTP
expiration** or **Minimum password length**, and confirm the field stays
empty and shows validation on save.
2. Open **Authentication > Providers > Phone**, select a provider, clear
**SMS OTP Expiry**, and confirm validation still works.
3. Open **Authentication > Emails > SMTP settings**, clear **Port** or
**Rate limit**, and confirm validation on save.
4. Open **Authentication > Multi-factor authentication**, clear **Max
enrolled factors** or **Phone OTP length**, and confirm validation on
save.
5. Open **Database > Replication**, start a new pipeline, select
**BigQuery**, expand **Advanced settings**, clear a required numeric
field, and confirm it stays empty until filled.
6. (Optional, hosted non-HA projects only) Open **Database > Settings**,
scroll to **Connection pooling**, clear **Connection pool size**, and
confirm the value does not snap back before save.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Improved handling of empty numeric fields across authentication, SMTP,
database replication, and connection pooling settings.
* Optional numeric settings can now be cleared without triggering
unnecessary validation errors.
* Required numeric fields continue to display appropriate validation
errors when left incomplete.
* Standardized validation behavior for OTP settings, password
requirements, SMTP limits, replication configuration, and pool sizing.
* Refined protection settings to focus on CAPTCHA and leaked-password
options.
* **Tests**
  * Added coverage for empty and optional numeric input behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-09-08 18:26:41 +08:00
Joshen Lim db0e6b761b Joshenlim/fe 4304 bring database connections out of feature preview (#50107)
## Context

As per PR title - we're bringing Database Connections out of feature
preview and it'll live on the dashboard by default 🙂
Also deprecating the existing Ongoing queries panel which Database
Connections now supercedes.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Database Connections is now available without feature-preview
activation.
* The SQL editor’s “View running queries” option now links directly to
Database Connections.

* **Bug Fixes**
* Query cancellation and session termination now refresh database
activity data.

* **Removed**
* Removed the in-editor ongoing queries panel and its termination
controls.
* Removed the Database Connections promotional banner, preview
messaging, settings, and related telemetry.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-08 17:26:24 +08:00
Pedro RodriguesandClaude Sonnet 5 e5f2b29625 refactor(studio): remove USE_REMOTE_MCP gate, always use remote MCP server (#50089)
## Summary
- Removes the `USE_REMOTE_MCP` env-var gate from the dashboard
assistant: `getMcpTools` now always connects to the remote MCP server
(the rollout from #47479 has been stable ~2 months and is enabled in
prod).
- Drops the var from `apps/studio/turbo.jsonc` and deletes the
now-obsolete transport-selection tests.
- The legacy in-process client (`createInProcessSupabaseMCPClient`)
stays, re-scoped to the hermetic eval harness (`mock-tools.ts`,
`evals/preflight.ts`); removing it is tracked by AI-897.

## Verification
- `pnpm exec tsc --noEmit` in apps/studio: no errors in any changed file
(one pre-existing unrelated error in
`packages/ui-patterns/.../InstructionBlocks.tsx`).
- `mcp-tools.test.ts` (7), `mock-tools.test.ts` (15),
`tools/index.test.ts` (6), `supabase-mcp.test.ts` (11) all pass.

## Risk
Low. Remote failure already degrades to non-MCP tools in `getTools`;
rollback = revert this PR (or re-add the gate).

## Follow-up
After this lands in prod, `USE_REMOTE_MCP` can be removed from the
Vercel env vars — nothing in the repo reads it anymore.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Improvements**
* AI tools now consistently use the remote service when retrieving
available tools.
* If the remote service is unavailable, times out, or cannot
authenticate, the assistant continues operating with the tools that
remain available.
* Evaluation and development behavior now more closely reflects the
remote service experience.

* **Maintenance**
* Updated supporting documentation and automated coverage to reflect the
streamlined tool connection behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-08 09:37:13 +01:00
CharisandJoshen Lim 2ac052752a fix(pg-meta): fix invalid SQL when setting column default to NULL (#50097)
## Summary

- Fixes invalid SQL generation when setting a column's default value to
NULL through Studio's Table Editor
- The bug occurred because raw `null` values bypassed literal
serialization in the SQL builder
- Added special case handling in both `create()` and `update()`
functions to use `literal(null)` regardless of format

## Details

Setting a column's default to NULL via the "Set as NULL" suggestion in
Studio generated invalid SQL: `ALTER TABLE ... ALTER COLUMN ... SET
DEFAULT ;` (missing the NULL keyword). This was caused by
`default_value` being JS `null` and bypassing the literal()
serialization function when `default_value_format === 'expression'`.

The fix ensures that when `default_value === null`, we always use
`literal(null)` to produce the correct `SET DEFAULT NULL` clause.

## Test plan

- New regression test in `packages/pg-meta/test/columns.test.ts`
("update column default value to NULL via expression format") verifies
the fix by:
  - Creating a text column with a literal default
- Updating it using `default_value_format: 'expression', default_value:
null` (exact payload from Studio)
  - Asserting the column's default value is null
- All 58 tests in `packages/pg-meta/test/columns.test.ts` pass
- TypeScript check (`tsc --noEmit`) passes

Fixes FE-4343

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Fixed column creation and updates so explicitly setting a default
value to `NULL` correctly preserves the `DEFAULT NULL` clause.
- Ensured setting a column default to `NULL` through expression-based
editing is reflected accurately when column details are retrieved.

- **Style**
- Improved the column editor’s suggestion menu layout and spacing for
clearer readability.

- **Tests**
  - Added coverage for updating a column default to `NULL`.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-09-08 16:08:24 +08:00
Gildas Garcia bfb0737d14 Fix to ensure labels, descriptions and validation errors are correctly linked to their inputs (#50080)
## Problem

`FormItemLayout` does not correctly binds inputs descriptions and
validation messages to their inputs. This is because the input ids are
generated and not correctly propagated to the `FormMessage` and
`FormDescription` components. Besides, we still pass `name` or `id`
directly to the inputs or `FormItemLayout` in some places.

## Solution

- Fix `FormItemLayout` to correctly binds inputs descriptions and
validation messages to their inputs
- Fix incorrect usages
- Fix Design System documentation

## How to test

The issue is visible in production:
- Open https://supabase.com/design-system/docs/ui-patterns/forms
- Open the devtool and check the labels `for`, the description `id` and
the input `id` or `aria-describedby` attributes. You'll see they often
don't match

Do the same on staging:
- Open
https://design-system-git-fix-a11y-form-input-descriptions-supabase.vercel.app/design-system/docs/ui-patterns/forms
- Open the devtool and check the labels `for`, the description `id` and
the input `id` or `aria-describedby` attributes. They now match

Dashboard fixes:
-
https://studio-staging-git-fix-a11y-form-input-descriptions-supabase.vercel.app/dashboard/account/tokens:
_Expires in_ select button is now correctly linked to its label
-
https://studio-staging-git-fix-a11y-form-input-descriptions-supabase.vercel.app/dashboard/account/me:
the switches are now correctly linked to their label
- In Database/Indexes: the select buttons when creating an index are now
correctly linked to their label
- All other changes are the same things
2026-09-08 09:47:32 +02:00
Danny White 66a748cdd1 fix(ui): restore accordion trigger layout (#50114)
## What kind of change does this PR introduce?

Bug fix. Follow-up to #49660.

## What is the current behavior?

`AccordionTrigger` adds horizontal padding at the shared primitive
level. This shifts content at call sites that already own their spacing.
In the Studio Advanced settings sections, padding around the whole
accordion also constrains the trigger and its hit area instead of
letting it fill the row.

## What is the new behavior?

The shared trigger no longer adds horizontal padding and its header
explicitly fills its container. Both Studio Advanced settings sections
now apply their padding inside the full-width trigger and content,
keeping the text aligned while extending the focus outline and hit area
across the row.

The inset focus treatment from #49660 is unchanged.

| Before | After |
| --- | --- |
| <img width="1334" height="286" alt="CleanShot 2026-09-08 at 16 18
57@2x"
src="https://github.com/user-attachments/assets/3a057b45-1eb4-4928-ae69-2d636b0c4678"
/> | <img width="1302" height="278" alt="CleanShot 2026-09-08 at 16 18
12@2x"
src="https://github.com/user-attachments/assets/0454493e-4fbc-4ad2-a9fd-1b9dc1d486dc"
/> |

## To test

### Studio replication destination

1. Open the [Studio staging
preview](https://studio-staging-git-dnywh-fixaccordion-trigger-width-supabase.vercel.app)
and select a project with Pipelines enabled.
2. Go to **Database > Replication**. Under **Destinations**, click **Add
destination**.
3. Tab to **Advanced settings** and press Enter to expand it.
4. Confirm the text aligns with the form content, the focus outline
spans the full row between the sheet edges, and clicking near the far
right of the row toggles it.

### Studio access-token permissions

1. In the [Studio staging
preview](https://studio-staging-git-dnywh-fixaccordion-trigger-width-supabase.vercel.app),
go to **Account > Access Tokens**.
2. Click **Generate new token** and scroll to **Permissions**.
3. Tab to any permission category, then click near the far right of its
row.
4. Confirm the focus outline fills the category row, the label keeps its
existing inset, and the full row toggles the category.

### Pricing FAQs

1. Open the [Pricing
preview](https://zone-www-dot-com-git-dnywh-fixaccordion-trigger-width-supabase.vercel.app/pricing)
and scroll to **Frequently asked questions**.
2. Tab to any question, then click near the far right of its row.
3. Confirm the question has not gained extra horizontal inset and the
full row remains interactive.

### Design-system Accordion

1. Open the [design-system Accordion
preview](https://design-system-git-dnywh-fixaccordion-trigger-width-supabase.vercel.app/docs/components/accordion).
2. Tab through the three accordion triggers and toggle each one.
3. Confirm each focus outline fills its row, with no extra horizontal
padding around the label.
2026-09-08 16:24:49 +10:00
Danny White 3418975b70 feat(studio): configure publication partition handling (#49845)
## What kind of change does this PR introduce?

Small Pipelines feature. Stacked on #49844.

## What is the current behavior?

New publications always publish changes from partitioned tables through
their parent table. The creation sheet does not expose the v2 API option
that controls this behavior.

## What is the new behavior?

Adds a default-on Publish partitions as the parent table checkbox to the
publication sheet. Turning it off submits publish_via_partition_root as
false so each partition can appear as a separate destination table.

## To test

1. Open the pipeline creation sheet and choose to create a publication.
2. Confirm Publish partitions as the parent table is selected by
default.
3. Create a publication and confirm publish_via_partition_root is true.
4. Repeat with the option cleared and confirm publish_via_partition_root
is false.
5. Confirm the selected tables and publication name are unchanged by the
option.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Added a “Publish partitions as the parent table” option when creating
publications.
- The option is enabled by default and can be turned off before
submitting the publication.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-08 14:03:18 +10:00
Danny WhiteandClaude Opus 5 d0dd81ba62 fix(studio): point the Warehouse table picker at the v2 publication API (#50105)
## What kind of change does this PR introduce?

Bug fix. Master is currently red, so this needs to land before anything
else can go green.

## What is the current behavior?

`WarehouseSchemaTablePicker` still imports
`@/data/replication/publications-query`, which #49844 removed. Studio
does not typecheck on master, which takes typecheck, knip, unit tests,
E2E, the Studio Docker build and both Studio Vercel deployments down
with it.

```
WarehouseSchemaTablePicker.tsx(20,49): error TS2307: Cannot find module '@/data/replication/publications-query'
WarehouseSchemaTablePicker.tsx(87,8): error TS7006: Parameter 'publication' implicitly has an 'any' type
```

## What is the new behavior?

The picker reads the `supabase_warehouse` publication through
`useReplicationPublicationQuery`, matching how `TableCopySelection` and
`DestinationForm` were migrated. It only ever needed that one
publication, and it needs the publication's tables, which the v2 list
endpoint no longer returns.

Behavior is unchanged. A missing publication still resolves to an empty
selection during first-time setup, and a failed lookup still only blocks
when editing an already-enabled Warehouse.

## To test

- Confirm CI goes green here.
- On the Studio deploy preview, open a project's Connect sheet and pick
the Warehouse mode.
- With Warehouse not yet enabled, the schema and table list renders with
nothing checked.
- With Warehouse already enabled, reopen the picker and confirm the
previously replicated tables come back checked.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Improved warehouse schema table selection by loading the Warehouse
publication directly.
- Table selections now initialize correctly from the returned
publication.
  - Preserved loading and error handling for publication retrieval.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-08 02:13:29 +00:00
Danny WhiteandJoshen Lim 8dd97d75aa refactor(studio): use v2 replication publication APIs (#49844)
## What kind of change does this PR introduce?

Studio data-layer migration.

## What is the current behavior?

Studio loads complete publication details through the original bulk
endpoint and creates publications by executing SQL against the source
database. Publication and source-table data use names where stable table
IDs are available.

## What is the new behavior?

Uses the v2 publication-name, publication-detail, publication mutation,
and source-table endpoints. The existing creation sheet continues to
behave the same, including publishing partition changes through the
parent table by default. Initial-sync selection and Analytics Bucket
associations now consume the selected publication detail. Generated
platform API types and their required nullability updates are included.

The generated Platform contract accounts for roughly 10,000 changed
lines in this PR.

## Dependency

Depends on the v2 source table, table column, and publication endpoints
from
[supabase/platform#37505](https://github.com/supabase/platform/pull/37505),
which are deployed to production.

## To test

1. Open the pipeline creation sheet and select an existing publication.
2. Create a publication with mixed-case schema and table names, then
confirm the table names are shown while stable IDs are submitted.
3. Exercise all four initial-sync policies, including selecting
individual tables.
4. Reopen the publication and table selectors and confirm they refresh
without replacing populated options.
5. Edit and delete a publication.
6. Open an Analytics Bucket associated with a pipeline and confirm its
publication tables resolve correctly.
7. Confirm unlimited WAL retention renders as Unlimited on pipeline
status.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Improved replication publication setup with on-demand table loading,
refresh controls, clearer table labels, and streamlined publication
selection.
- Publication creation and updates now use the latest replication API
and table-based configurations.
- Added clearer handling for tables removed from publications, including
stale-selection warnings.

- **Bug Fixes**
- Prevented table selections from carrying over when switching
publications.
- Improved replication status displays when lag or WAL metrics are
unavailable.
- Updated replication deletion and table management for the latest API
behavior.

- **Tests**
- Expanded coverage for publication creation, table selection, stale
tables, loading states, and replication metrics.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-09-08 11:37:59 +10:00
Danny WhiteandJoshen Lim 282a2a22cf fix(studio): allow pipeline number inputs to be cleared (#50078)
## What kind of change does this PR introduce?

Bug fix for the pipeline destination form.

## What is the current behavior?

Clearing a numeric field under Advanced settings restores its previous
value immediately, so users cannot replace the value normally.

## What is the new behavior?

Numeric fields use an empty string as their controlled blank value while
editing, so users can clear an existing value before entering its
replacement. Existing field-specific validation messages are preserved
for invalid or empty required values. Maximum staleness remains optional
and can be left blank.
Adds component and schema coverage for all five numeric Advanced
settings fields, including the BigQuery-only fields.

## To test

1. Open Database > Replication and start a new pipeline.
2. Select BigQuery and expand Advanced settings.
3. Clear each numeric field and confirm it can be edited without
reverting to its previous value. Required fields may show their existing
validation message while empty.
4. Enter a replacement value such as `5` and confirm the field accepts
it.
5. Leave a required numeric field blank and confirm the existing
field-specific validation message appears.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Improved validation for replication destination settings, with clearer
errors when required numeric fields are left empty.
- Validation now updates immediately when numeric values are cleared or
corrected.
  - BigQuery connection pool size must be greater than zero.
  - Empty maximum staleness values are accepted and handled correctly.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-09-08 11:32:46 +10:00
Marouane SoudaandCharis Lam 0e35cbf4a4 Security definer materialized view (#40800)
Fixes #40799 

Now, the correct error will be shown for materialized views accessible
to `anon` and `authenticated` roles via Data API, instead of the
unrelated "Security Definer view" error.

For convenience, users can immediately fix the issue by running the
correct SQL query to revoke select from `anon` and `authenticated`, just
by clicking on "confirm" on the confirmation modal I just created.



https://github.com/user-attachments/assets/f3ce9353-4ad0-4063-bf33-0b403f5fa87a

Before

<img width="958" height="440" alt="materialized"
src="https://github.com/user-attachments/assets/89047c91-da35-4b9f-b7e3-82e877bcf2c6"
/>

Edit:

Thanks to the review by @saltcod, I now realise that revoking access
from `anon` and `authenticated` users might not be the optimal solution
since it would break many projects relying on the access to materialized
views.

After pondering on the possible solutions, I figured there isn't an easy
one, so I did away with the autofix button, and instead created a dialog
explaining three possible options for the user, with a sample query
under each one for convenience.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added clearer warnings when materialized views are accessible through
the API.
* Added a dialog explaining how to review and revoke API access for
materialized views.
* Added guidance and code examples for restricting access to API roles.
  * Added a link to the Security Advisor for additional information.

* **Improvements**
* Updated materialized view tooltips to accurately describe API
accessibility.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2026-09-07 17:56:57 -04:00
Jordi Enric be030229bf feat(studio): add workers to unified logs FE-4281 (#49682)
## Problem

Unified Logs does not expose Workers logs, so users cannot search
Workers ingress, runtime, or build events alongside other services.

## Fix

Add a Workers log type that classifies all three Workers OTEL streams.
Gate the option and any persisted Workers filters with the existing
Workers feature flag.

## How to test

- Enable the Workers feature flag and open Unified Logs.
- Select Workers from the Log Type filter.
- Expected result: Unified Logs shows ingress, runtime, and build events
with the Workers icon.
- Disable the Workers feature flag and load a URL containing
`log_type:eq:workers`.
- Expected result: the Workers option and filter are removed, and
Workers logs are not queried.
- Run `./node_modules/.bin/vitest --run
components/interfaces/UnifiedLogs/UnifiedLogs.queries.test.ts
components/interfaces/UnifiedLogs/UnifiedLogs.utils.test.ts
data/workers/worker-logs-query.test.ts` from `apps/studio`.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
  * Added Workers as a selectable log type in Unified Logs.
* Unified Logs now combines worker ingress, guest, and API streams under
the Workers category.
  * Added a dedicated Workers icon and worker log filtering.

* **Improvements**
  * Worker filters and URL parameters respect feature availability.
* Worker details show relevant metadata while omitting unavailable HTTP
fields.
  * Improved handling of worker log levels, statuses, and raw data.
  * Added stronger validation for unified log data.

* **Tests**
* Added coverage for worker routing, filtering, feature visibility,
parsing, and metadata redaction.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-07 15:53:36 +02:00
Alaister YoungandAlaister Young ec1029dff0 chore: migrate from clsx + tailwind-merge to shadcn-ui/cn (#49938)
Migrates the repo off `clsx` + `tailwind-merge` to
[shadcn-ui/cn](https://github.com/shadcn-ui/cn). Every app and package
already gets `cn` from `packages/ui`, so the swap happens in that one
helper and flows through to Studio, docs, www, and the rest.

**Changed:**
- `packages/ui` `cn` helper now uses `createCn` from `cn/config`,
keeping the custom `card`/`content` spacing scale so `p-card` still
overrides `p-4`. It has an explicit signature and re-exports
`ClassValue`.
- The four www Launch Week files that imported the `ClassValue` type
from `clsx` now import it from `ui`.
- `blocks/vue` local `lib/utils.ts` re-exports `cn` from the package.
- Comments/README that referenced tailwind-merge.

**Removed:**
- Direct `clsx` and `tailwind-merge` deps from `ui`, `ui-patterns`,
`www`, and `blocks/vue`. `ui-patterns` and `www` declared them without
importing.

**Added:**
- `packages/ui/src/lib/utils/cn.test.ts` covering clsx-style joining,
conflict resolution, the custom spacing scale, and variant handling.

Not migrated: the standalone apps under `examples/`. They're outside the
workspace and mostly on Tailwind v3, which `cn` doesn't support.

Lockfile note: after merging master, the lockfile diff is only the
intended swap (`clsx` and `tailwind-merge` out, `cn@0.2.5` in).
`tailwind-merge` stays in the lockfile as a transitive dep of a
third-party package.

Release-age note: this sat in draft with a temporary
`minimumReleaseAgeExclude` entry for `cn` while `cn` was inside the
workspace's 3-day `minimumReleaseAge` window. That window has closed, so
the exclusion is gone and nothing bypasses the release-age gate.

## To test

- `pnpm install --frozen-lockfile` succeeds with no
`minimumReleaseAgeExclude` entry for `cn`.
- `pnpm --filter ui test` – new `cn.test.ts` passes, including
`cn('p-4', 'p-card')` → `p-card`.
- Typecheck passes for studio, ui, ui-patterns, vue-blocks. www
typecheck panics under tsgo on master already (pre-existing, unrelated);
it passes with the JS `tsc` binary.
- Spot-check Studio locally: class overrides still win in the usual
places (e.g. `CodeEditor` height, `Button` variants with a custom
`className`).

https://claude.ai/code/session_01MkAt16tsPRDTm9oB5Jr8Ub


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Improvements**
* Standardized Tailwind class merging across shared UI utilities while
preserving conditional classes, custom spacing classes, and variant
behavior.
* Updated related components and examples to use the standardized
class-merging utility.

* **Tests**
* Added coverage for conditional class handling, conflicting utility
resolution, custom spacing classes, and variant separation.

* **Documentation**
* Updated usage guidance to reflect the standardized Tailwind
class-merging approach.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-09-07 21:35:06 +08:00
Francesco SansalvadoreandClaude Sonnet 5 b0601f9ab7 feat(storage): add object versioning feature flag and feature preview (#49202)
| # | Branch | Base |
| - | ------ | ---- |
| 1 | `feat/storage-versioning-private-alpha` ◀ | `master` |
| 2 | `feat/storage-versioning/002-bucket-form-fields` | 1 |
| 3 | `feat/storage-versioning/003-bucket-modals` | 2 |
| 4 | `feat/storage-versioning/004-object-versions-data` | 3 |
| 5 | `feat/storage-versioning/005-file-preview-versions` | 4 |
| 6 | `feat/storage-versioning/006-billing-storage-retention` | 5 |

### PR 01

Adding feature flag for versioning.

- `UI_PREVIEW_STORAGE_VERSIONING` local storage key, allowlisted
- Feature preview entry gated on
`useFlag('storageVersioningPrivateAlpha')`
- `useIsStorageVersioningEnabled()`, following the existing
`useIsSqlEditorManualSaveEnabled` shape

<img width="910" height="604" alt="Screenshot 2026-08-19 at 11 33 45"
src="https://github.com/user-attachments/assets/5c51c3fa-6100-48e5-914d-63a9948a5024"
/>

Note: will improve the feature preview with an image once we approach
release.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
  - Added a Storage Versioning feature preview in the dashboard.
- Preview access is controlled by feature flags and is disabled by
default.
- Added descriptive information about Storage Versioning and its Private
Alpha availability.
- Added support for remembering the Storage Versioning preview setting.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-07 12:53:01 +02:00
Coenen BenjaminandCharis Lam 11289328e5 add support for warehouse connection string (#49914)
Add support for connection string for warehouse. 
This PR gives the ability to enable warehouse on a project and also get
the connection string to connect to.

> This project is only available in staging for now and gated behind a
feature flag

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
  - Added a Warehouse connection option to the Connect dialog.
- Select schemas and tables to replicate, with setup progress, error
recovery, and retry support.
- View copyable Warehouse connection details, credentials guidance,
command-line instructions, and DuckLake setup scripts.
  - Warehouse availability is controlled by feature configuration.

- **Tests**
- Added coverage for Warehouse table selection, setup script generation,
URL parsing, and connection configuration utilities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2026-09-07 11:24:42 +02:00
c086fe0d3f fix(studio): stop duplicating access_token_creation_sheet_dismissed on Done (#50077)
<!-- ccr-slack-attribution -->
_Requested by **Pam Chia** · [Slack
thread](https://supabase.slack.com/archives/C076KTY11DF/p1788743741768969?thread_ts=1788743741.768969&cid=C076KTY11DF)_

## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Bug fix (telemetry).

## What is the current behavior?

`access_token_creation_sheet_dismissed` (added in #49965) fires on every
close of the "Generate token" sheet in `/account/tokens`, including a
successful completion. The "Token created" step closes the sheet through
a "safe" path (clicking **Done**), but `handleOpenChange` tracked the
dismissed event on that path too: a 1:1 duplicate of the already-tracked
`access_token_done_button_clicked` event, with `step: 'success'`.

The event's `tokenType` property was also never meaningful: it is
derived from a variable that is only set after a token is actually
created and never reset, so on a first-attempt abandonment it is always
`'none'` by construction, and on a later abandonment in the same session
it carries the *previous* token's type.

The sheet also force-closes when the permissions map fails to load. That
close was indistinguishable from a user abandonment.

Linear:
[GROWTH-1196](https://linear.app/supabase/issue/GROWTH-1196/fix-access-token-creation-sheet-dismissed-duplicate-on-done)

## What is the new behavior?

- The event no longer fires on **Done**. The token-created step already
blocks Escape, outside click, and Cancel, so the event now only reflects
the sheet closing before a token exists.
- Dropped `tokenType` (never described the abandoned attempt, see above)
and `step` (a constant `'form'` once Done stops firing it; it was also
typed Numeric project-wide in PostHog, so its string values read as NULL
in HogQL).
- New properties, read from the live form at close time through a small
`useImperativeHandle` ref on `NewScopedTokenForm` (`useForm` ownership
stays inside the form component):
- `resourceAccess` (`project` | `organization` | `account`): the
in-flight scope selection. `account` is the classic-token path, so this
carries what `tokenType` was meant to. It is the default `project` when
the form is untouched, so filter on `isFormTouched` before reading it as
intent.
- `formStep` (`form` | `review`): which screen the user was on. The
sheet-level `step` never captured this.
  - `isFormTouched`: whether any field was changed from its default.
- `trigger` (`user` | `permissions_load_error`): the forced close on a
failed permissions load now fires with its own trigger, so an endpoint
regression shows up in the funnel instead of silently lowering
`access_token_created`.
- Fixed a double-fire on the load-error path: the form's error effect
depended on the `onCancel` callback identity and re-ran on the sheet's
close re-render (double toast, and a double event). It now reads the
callback through a ref and depends only on `isError`, matching the
existing `isReducedMotionPreferredRef` pattern in the same file.

## Additional context

`NewScopedTokenSheet.test.tsx` asserts: Done does not emit the dismissed
event; Cancel and Escape emit it with `trigger: 'user'` and the
in-progress `resourceAccess` and `isFormTouched`; dismissing from the
review screen reports `formStep: 'review'`; a 500 from the permissions
endpoint emits exactly one event with `trigger:
'permissions_load_error'` and closes the sheet.

`step` being typed Numeric in PostHog affects every event that sends a
string `step`. That is a PostHog data-management fix handled separately,
not in this PR.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01XW73umv73LrrKxFwwymSaH

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Pamela Chia <pamelachiamayyee@gmail.com>
2026-09-07 16:53:56 +08:00
Danny WhiteandJoshen Lim a351a36e9b refactor(studio): centralise replication payload builders (#49842)
## What kind of change does this PR introduce?

Studio data-layer refactor.

## What is the current behavior?

Pipeline creation, editing, and validation build similar destination and
pipeline payloads separately. The duplicated mappings rely on type
assertions and can drift between actions.

## What is the new behavior?

Uses shared typed builders for create, update, and validation payloads
across the existing destinations. Update payloads continue to omit blank
secrets, while create payloads preserve their current values. This PR
does not add table partitioning configuration.

## To test

This is a data-layer refactor. No visible behaviour should change.

1. Open **Database > Replication** and click **Start a new pipeline**.
2. Select **BigQuery**, or any other enabled destination.
3. Edit a few non-secret fields and expand **Advanced settings**.
4. Confirm the form remains usable and no runtime errors appear.

Create, update, validation, and secret-handling behaviour is covered by
the focused tests and CI. Deploy previews and fresh local projects do
not have the existing destinations or credentials needed to exercise
those paths manually.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Improved replication destination configuration handling during
creation, updates, and validation.
* Applied consistent configuration mapping across supported destination
types.
* Ensured blank secret values are omitted during updates while retained
when creating destinations.
* Standardized table synchronization defaults when no specific setting
is provided.
* **Tests**
* Added coverage for BigQuery configuration mapping and secret handling.
  * Updated DuckLake tests for destination updates.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-09-07 15:02:09 +08:00
Saxon FletcherandCursor c365549ab8 feat(studio): resizable query/results split in the Explorer query editor (#49984)
## What's changed

Stack 1/2 (next: https://github.com/supabase/supabase/pull/49985).

- `QueryEditor` (`viewport` variant, e.g. Explorer query tabs and
assistant query cells) now renders the SQL editor and results in a
vertical `ResizablePanelGroup` instead of a fixed `h-[45%]` editor. The
split is persisted under `LOCAL_STORAGE_KEYS.EXPLORER_QUERY_SPLIT_SIZE`.
The `embedded` variant (notebooks) is unchanged.
- Editor and results JSX are extracted into `querySql` / `queryResults`
so the two layouts share one definition.
- `isRunDisabled` now hides the toolbar run button instead of rendering
it disabled (editor shortcuts are still disabled). `AssistantQueryCell`
only sets it while an approval is pending, so the run button comes back
once the tool call has resolved.
- `QueryRunButton`: "Run selected" → "Run selected SQL", plain
`DropdownMenuItem` instead of `DropdownMenuItemTooltip`.
- `QueryResultError` no longer paints its own table-header background.

## How to test

1. Explorer → open a query tab. Drag the handle between the editor and
results; reload — the split size is restored.
2. Toggle "Hide query" / "Show query" — results fill the tab when the
editor is hidden.
3. Open a notebook — cells still render with the fixed-height editor (no
resizable handle).
4. In the AI Assistant, ask for a query that needs approval. While the
approval footer is shown there is no run button in the cell toolbar;
after "Run query" / "Skip", the run button appears and works.
5. `pnpm --filter studio exec vitest --run
components/interfaces/Explorer` passes.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **User Interface**
- Query results now appear in a resizable vertical split view, allowing
users to adjust the space allocated to the editor and results.
- Updated query result styling provides a cleaner background
presentation.
  - Query result panels are better centered when appropriate.

- **Query Execution**
  - The menu option is now labeled **“Run selected SQL.”**
  - The run button is hidden when query execution is unavailable.

- **AI Assistant**
- Query execution is disabled only during the relevant confirmation
states.
  - Assistant query panels now use a wider, full-width layout.
  - Debugging a query now updates the assistant’s initial input.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-07 15:42:07 +10:00
Barry Roodt 5a673668cb chore(studio): update self-hosted MCP server to 0.12.0 (#50007)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Dependency update.

## What is the current behavior?

`apps/studio` depends on `@supabase/mcp-server-supabase` `^0.11.0`,
which pulls in `@supabase/mcp-utils` `0.7.0` transitively.

## What is the new behavior?

- Bump `@supabase/mcp-server-supabase` to `^0.12.0`. The lockfile moves
it to `0.12.0` and its `@supabase/mcp-utils` dep to `0.8.0` (still
indirect). Nothing else in the lockfile changes.
- Peer deps are unchanged (`@modelcontextprotocol/server ^2.0.0`, `zod
^3.25.0 || ^4.0.0`).

No studio code change needed. 0.12.0 adds an optional `costConfirmation`
server option for `create_project` / `create_branch`; the self-hosted
route doesn't set it, and self-hosted never registers those tools in the
first place. The exported tool set is the same 33 schemas, so the
tool-name guard in `lib/ai/tools/mcp-tools.ts` still passes.
`get_advisors` now groups lints inside its result, which studio forwards
to the model without parsing. Release notes: [mcp-server-supabase
v0.12.0](https://github.com/supabase/mcp/releases/tag/mcp-server-supabase-v0.12.0)
and [mcp-utils
v0.8.0](https://github.com/supabase/mcp/releases/tag/mcp-utils-v0.8.0).

## Additional context


[AI-1178](https://linear.app/supabase/issue/AI-1178/2b-update-self-hosted-remote-mcp-server)

Testing:
- `pnpm install --frozen-lockfile` passes.
- Studio `pnpm typecheck` is clean.
- MCP-related vitest files: 13 files, 108 tests passed.
- In-memory smoke of `createSupabaseMcpServer` with the self-hosted
route's options reports `serverInfo.version` `0.12.0` and 11 tools.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
  * Updated the Supabase MCP integration dependency to version 0.12.0.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-04 17:36:25 +02:00
Sean Oliver 8c281e53d9 fix(studio): drop resource-warnings staleTime to 5 minutes (#49975)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Bug fix.

## What is the current behavior?

The disk space exhaustion banner can stick around for roughly two hours
after the user has actually fixed the problem, which is long enough that
people act on stale information and change the wrong thing.

Two caches stack:

- Studio caches resource warnings for an hour: `staleTime: 1000 * 60 *
60` in `useResourceWarningsQuery`
- The resource warnings endpoint independently only reports warnings
raised in the last 60 minutes, and has no resolved signal, so a warning
stops being reported by aging out rather than by being cleared

Worst case is that backend hour plus however much of the client hour the
user happened to be sitting on.

Details in GROWTH-1190, split out of GROWTH-966.

## What is the new behavior?

Client `staleTime` drops to 5 minutes, which removes the client-side
hour. Worst case goes from about two hours to about one.

No change to `refetchOnWindowFocus`, which already defaults to true in
`apps/studio/data/query-client.ts`.

## Additional context

This deliberately only fixes the client half. The backend resolved
signal, and the question of which banner should show for which disk,
both stay on GROWTH-966.

Testing: unverified in the browser. It is a numeric literal on an
existing field, so there is nothing new to typecheck, but I have not
reproduced the stale banner locally.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Resource warning information now refreshes more frequently, helping
ensure displayed warnings are more up to date.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-04 08:27:41 -07:00
Gildas Garcia 50a6ebbe6d Scoped PAT: improve error handling when showing a token details (#49997)
We already have proper error handling on:

- the token list query
- token creation/deletion with toasts

We had custom error handling on the token permissions sheet. Replaced it
with an `AlertError`:

<img width="798" height="371" alt="image"
src="https://github.com/user-attachments/assets/24145308-b1cd-491f-8f54-0c628dd185ce"
/>

Question: should we do something about the sheet header when the token
couldn't be loaded?

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Improved the access token loading error state with a clearer,
consistent error display and “Please try again” guidance.
* Added a fallback label of “Unknown” when an access token name is
unavailable.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-04 17:18:40 +02:00
Ivan Vasilov c6cdf4bd53 Migrate off contentlayer2 to Velite (design-system, ui-library, learn) (#48546)
## Summary
- `contentlayer2@0.4.6` is unmaintained and drags in a heavy, stale
dependency graph (esbuild pinned to 0.17–0.20, mdx-bundler, old
`@opentelemetry/core`) that was the recurring source of vuln bumps.
- Migrates all three apps that used it — `design-system`, `ui-library`,
`learn` — to [Velite](https://velite.js.org), preserving the generated
typed `allDocs`/`Doc` collection and the `body.code` + `useMDXComponent`
runtime via a small shared local hook.
- Same MDX pipeline (remark-gfm, remark-code-import, rehype-slug,
rehype-pretty-code w/ Shiki compat + local theme,
rehype-autolink-headings, custom
`__rawString__`/`__src__`/`__event__`/`__style__` visitors) ported 1:1
into each app's `velite.config.js`.
- `learn`'s extra frontmatter fields (`chapterNumber`, `explore`,
`courseHero`) are now backed by real Velite/Zod schema types, so the
`(doc as any)` casts in `get-next-page.ts` / `get-current-chapter.ts` /
the doc page could be dropped.
- `next.config.mjs` no longer wraps with `withContentlayer`; since
Velite has no Next.js webpack-plugin equivalent, each app's `dev` script
now runs `velite dev` and `next dev` in parallel via `npm-run-all`.

Ref:
[FE-3861](https://linear.app/supabase/issue/FE-3861/migrate-off-contentlayer2-learn-ui-library-design-system-to-shed)

## Test plan
- [x] `pnpm build:content` (Velite build) succeeds for all three apps
- [x] `pnpm typecheck` passes for all three apps
- [ ] Manual smoke test of `pnpm dev` for each app in a browser (docs
pages render, TOC, copy-button, code highlighting)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Improvements**
* Improved content generation across documentation, learning materials,
and the UI library for more consistent pages.
* Preserved MDX rendering, navigation, table of contents, course
metadata, source previews, and component examples.
* Improved consistency when displaying documentation and interactive
examples.
* Improved application loading by optimizing how interface components
are delivered.
* **Chores**
* Streamlined content compilation and development workflows across the
design system, learning area, and UI library.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-04 15:49:44 +02:00
Charis 1308a1d0d0 fix(studio): close popover menu when dragging block (FE-4301) (#49912)
## Summary

* Closes the block options popover (grip dropdown menu) when a drag
operation starts on that block
* Fixes the issue where the menu would remain visible during the drag if
it was already open

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Section action menus now remain closed when dragging begins,
preventing delayed reopening and keeping the editing interface clear and
focused.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-04 09:39:42 -04:00
CharisandJoshen Lim 2ee0108928 studio: increase gp3 max size to new aws limit (#45611)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Increased GP3 disk limits to support up to 64 TB of storage, 80,000
IOPS, and 2,000 MB/s throughput.

* **Documentation**
* Updated the disk comparison table to reflect the expanded GP3 limits.

* **Bug Fixes**
* Improved disk-size validation and recommendation messaging for clearer
wording.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-09-04 09:39:27 -04:00
Charis a4d925c230 fix(studio): write debug prompt into current chat when assistant is already open (#49911)
## Summary

* Query blocks embedded inside an active assistant conversation
(`AssistantQueryCell`) reused the same "Debug with Assistant" handler as
standalone query blocks (Explorer Query tab, notebook cells), which
always opens a brand-new chat and navigates away.
* Clicking Debug on a block that's already part of the open conversation
silently abandoned it for an unrelated new chat, which read as the
button doing nothing.
* Added an optional `onDebug` override threaded through `QueryEditor` →
`QueryResultRenderer` → `QueryResultError`; `AssistantQueryCell` now
uses it to write the debug prompt into the currently active chat's
composer (`ai-assistant-state`'s new `setInitialInput`) instead of
creating a new chat. Standalone query blocks keep the existing "open a
new chat" behavior since no `onDebug` override is passed there.
* `ExplorerChatTab` now wires `composerContext` into `AssistantChat` (it
wasn't before), so the pre-filled prompt actually reaches the visible
textarea on the Explorer chat route.

Fixes
[FE-4319](https://linear.app/supabase/issue/FE-4319/debug-with-ai-assistant-does-seemingly-nothing-if-query-is-already).

## Test plan

- [X] `pnpm vitest run` on `QueryResultError.test.tsx` /
`QueryResultError.selfhosted.test.tsx` / `ExplorerChatTab.test.tsx` /
`AssistantQueryCell.utils.test.ts` — all pass, including new test
asserting `onDebug` is called instead of `createChat`.
- [X] `pnpm exec eslint` on touched files — clean (only pre-existing
unrelated warnings).
- [X] Manual check: run a query inside an assistant chat that errors,
click "Debug with Assistant" on that block, confirm the debug prompt
appears in the current chat's composer rather than opening a new chat.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added a “Debug with Assistant” workflow that sends SQL error details
to the AI Assistant as its initial input.
* Preserved the existing behavior of opening a new debug chat when the
Assistant panel is unavailable.

* **Tests**
* Added coverage confirming that debugging invokes the Assistant
callback without creating an additional chat.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-04 09:26:18 -04:00
kemal.earthandGildas Garcia 8654991847 feat(studio): additional events for scoped pat telemetry (#49965)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Adds PostHog tracking to the final step of the scoped PAT creation flow,
after `access_token_created` fires. The token value is only ever shown
once, so this measures whether users actually leave with a usable token.

Three new events on the "Token created" step:

| Event | Properties |
| --- | --- |
| `access_token_copied` | `tokenType` |
| `access_token_stored_checkbox_clicked` | `tokenType`, `isChecked` |
| `access_token_done_button_clicked` | `tokenType`, `hasCopiedToken` |

- `isChecked` is the resulting state, so unticking the acknowledgement
is captured too.
- `hasCopiedToken` records whether the Copy button was used before
finishing. Done is gated on the checkbox, not on copying, so this
separates "copied it" from "ticked the box and left."
- `tokenType` is threaded through from the sheet, which creates a
classic token when resource access is `account` and a scoped one
otherwise. It matches the existing `access_token_created` /
`access_token_removed` property.

## Changes

- `packages/common/telemetry-constants.ts` — three event interfaces,
added to the
`TelemetryEvent` union
- `NewScopedTokenSuccess.tsx` — `useTrack()` plus a new `tokenType`
prop;
copy/acknowledge/done routed
- `NewScopedTokenSheet.tsx` — `createdToken` state now holds `{ token,
tokenType }` so
the success step knows which
- `NewScopedTokenSheet.test.tsx` — extended the two tests that already
walk the full
success flow with assertions  and classic paths)

## Testing

`pnpm test:studio` on `NewSco16 passing. Typecheck clean.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Analytics**
* Added tracking for key access-token creation interactions, including
copying tokens, selecting storage options, and completing the flow.
* Tracking distinguishes between classic and scoped access tokens and
records whether a token was copied before completion.
* Added tracking when the access-token creation sheet is dismissed,
including the current step.

* **Behavior**
* Existing copy, storage-selection, notification, and completion actions
continue to work as expected.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com>
2026-09-04 11:15:18 +02:00
Alaister YoungandAlaister Young 0ddf2006d3 [FE-4337] feat(studio): block pause, restore, and add-ons on High Availability projects (#49990)
Studio-side guard for Multigres (`high_availability`) projects,
mirroring the platform API guard from supabase/platform#37527. Pause,
restore/PITR, and add-on affordances now show a clear "unavailable on
High Availability projects" state instead of failing with a 400 after
the click.

<img width="1195" height="632" alt="Screenshot 2026-09-04 at 2 03 11 PM"
src="https://github.com/user-attachments/assets/718c09f2-d92b-49dc-90ed-5d9ff810b03d"
/>

**Added:**
- Pause project button is disabled on HA projects with a tooltip
- Scheduled backups tab short-circuits to an HA empty state (matches the
existing PITR tab). Per-row Restore buttons are also disabled with a
tooltip as defense in depth, since BackupItem is reusable
- Restore to new project shows an HA admonition ahead of the permission
/ PG15 / physical-backup checks
- Add-ons page shows a page-level HA notice, all three rows are locked
with a tooltip, and the side panels are not mounted on HA so
`?panel=pitr|ipv4|customDomain` deep links are inert
- Component tests for `PauseProjectButton` and `BackupItem`, plus unit
tests for the new `isHighAvailability` branch in `Addons.utils.ts`

**Changed:**
- Add-ons rows are now consistent: the IPv4 row uses the same padlock
tooltip as PITR and custom domain instead of a tooltip on the badge.
Same disabled-reason strings as before, just surfaced via the padlock on
non-HA projects too
- `BackupItem` tooltip text extracted into a `getTooltipText()` function
(mirrors `PauseProjectButton`)
- `HighAvailabilityDisabledSectionNotice` accepts a `className`

Detection reuses the existing `useIsHighAvailability()` hook, which the
rest of Studio already treats as the Multigres signal.

## To test

Use an HA project (`project.high_availability === true`) and a normal
project.

HA project:
- Settings > General: "Pause project" is disabled, tooltip reads
"Pausing is unavailable on High Availability projects"
- Database > Backups > Scheduled backups: HA empty state, no "No backups
yet" / daily backup copy
- Database > Backups > Restore to new project: HA admonition, no restore
controls
- Settings > Add-ons: notice at the top, padlock on all three rows with
per-row tooltip, clicking rows does nothing, and `?panel=pitr` /
`?panel=ipv4` / `?panel=customDomain` open nothing

Normal project (regression):
- No "High Availability" strings on any of the above pages
- Pause button enabled (or disabled only for its usual reasons, e.g.
paid plan)
- Add-on rows open their side panels on click and via `?panel=pitr`
- Scheduled backups tab shows its normal list / empty state


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Features**
- High Availability projects now clearly indicate when scheduled
backups, backup restoration, project pausing, IPv4, PITR, and custom
domains are unavailable.
- Added explanatory notices, disabled controls, and tooltips throughout
affected settings and backup screens.
- Restore-to-new-project workflows now provide guidance to contact
support when unavailable.

- **Bug Fixes**
- Improved consistency of availability messaging across High
Availability project settings and database backup actions.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-09-04 17:08:01 +08:00
Danny White 887279ec2a fix(studio): align remaining platform auth labels (#49879)
## What kind of change does this PR introduce?

Copy fix in Studio platform UI.

## What is the current behavior?

Studio still uses mixed auth wording outside nav dropdowns: in-app API
docs use "Log in", account email change uses "Log out of",
forgot-password uses title-case "Sign In", and org invites use "Create
an account".

## What is the new behavior?

Aligns remaining Studio surfaces with **Sign in / Sign out / Sign up**.
Related to [#49874](https://github.com/supabase/supabase/pull/49874) and
[#49877](https://github.com/supabase/supabase/pull/49877).

CLI copy in `GeneratingTypes.tsx` is unchanged (`supabase login`).

## To test

- Account → change email (GitHub identity): instructions say **Sign out
of**
- `/forgot-password`: footer link says **Sign in**
- Org invite (signed out): secondary button says **Sign up**
- Project → API docs → User Management: section titles use **Sign in** /
**Sign out**

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Updated authentication terminology across user management guidance and
GitHub email-change instructions for consistency.

* **Improvements**
  * Changed the organization invitation link label to “Sign up.”
* Standardized the forgot-password page link capitalization to “Sign
in.”

* **Tests**
* Updated invitation view coverage to reflect the revised “Sign up”
label.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-04 16:52:28 +10:00