mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 15:39:13 +00:00
create-pull-request/patch
6
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
206430d9b0 |
feat(studio): restore connect sheet snippet copy tracking (#54398)
The Connect sheet only reports a copy for the Postgres connection string and one MCP setup step. The Connect dialog it replaced also reported framework, mobile framework and ORM snippet copies and every MCP client's copy (#40611); that tracking was not carried over (#44327) and the dialog was later removed (#47122). I restored it with the existing `connection_string_copied` event, and added the sheet's command copies and Copy prompt so the whole sheet is covered. **Changed:** - **Framework, mobile framework and ORM snippets**: copying any file tab in the configure step sends `connection_string_copied` with `connectionTab` (`App Frameworks`, `Mobile Frameworks` or `ORMs`), `selectedItem` (the framework or ORM label) and `source: studio`. A framework added to the sheet later is covered without touching its content file. - **Install commands**: the framework, ORM, shadcn and skills install commands send the same event with `connectionType: Install command`, so they can be told apart from snippet copies. - **Claude Code and Codex MCP**: the add-server, authenticate and verify commands send the event with `connectionTab: MCP`, the client label and `connectionType: Command Line`. - **Copy prompt**: sends the existing `ai_prompt_copied` event with a new `source` value, `connect_sheet`. **Note:** `lang` carries the client library key (for example `supabasejs`), as the old dialog sent it, so the restored series lines up with the data from before March. Filter on `connectionType` to count snippet copies only: `Framework snippet` for frameworks, absent for ORM snippets. In Direct mode the install and skills install commands send the event with `connectionTab: Connection String` and `lang: bash`; the Direct file examples and Server mode are unchanged. In MCP mode the skills install command sends nothing, so the `MCP` series only counts MCP setup copies. ## To test Tested on the PR preview, with the network tab filtered to the telemetry event request: - [x] Open a project, open Connect, keep Framework on Next.js and click Copy on a file tab in the configure step; expect one `connection_string_copied` with `connectionTab: App Frameworks`, `selectedItem: Next.js`, `connectionType: Framework snippet`, `source: studio` - [x] Still on Next.js, switch to the `.env.local` tab and copy it; expect the same event again (one per click) - [x] Switch the framework to Flutter and copy a file tab; expect `connectionTab: Mobile Frameworks`, `selectedItem: Flutter` - [x] Switch to ORM, pick Prisma and copy a file tab; expect `connectionTab: ORMs`, `selectedItem: Prisma` and no `connectionType` - [x] Switch to MCP, pick Claude Code and copy the add-server command; expect `connectionTab: MCP`, `selectedItem: Claude Code`, `connectionType: Command Line` - [x] Still on Claude Code, copy the authenticate command; expect the same properties. Pick Codex and copy add-server, authenticate and verify; expect `selectedItem: Codex` on each - [x] In Framework mode copy the install command and the skills install command; expect `connection_string_copied` with `connectionType: Install command` and `connectionTab: App Frameworks` for each. In ORM mode copy an install command; expect `connectionTab: ORMs`, `connectionType: Install command` - [ ] In Direct mode copy the skills install command; expect `connection_string_copied` with `connectionTab: Connection String`, `connectionType: Install command`, `lang: bash` - [ ] In MCP mode copy the skills install command; expect no `connection_string_copied` request - [x] Click Copy prompt; expect one `ai_prompt_copied` with `source: connect_sheet` and no `connection_string_copied` - [x] Switch to Server and copy the env block; expect no `connection_string_copied` request - [x] Switch to Direct and copy the connection string; expect exactly one `connection_string_copied` with `connectionTab: Connection String` (unchanged behavior, no duplicate) ## Linear - fixes GROWTH-1532 |
||
|
|
6cff728742 |
feat(studio): polish Connect sheet mode selector and steps (#48266)
## What kind of change does this PR introduce? UI polish for the Connect sheet: clearer mode selection, wider sheet layout, and step/content chrome across Direct, Server, MCP, and shadcn flows. ## What is the current behavior? - Connect modes use a weak selected state and an awkward grid layout. - The sheet can jump width below the `lg` breakpoint when switching modes. - Direct connection chrome is noisy (reset in a footer, Title Case / mono pooler labels, mismatched copy-button sizes). - Several steps use admonitions or extra tips that repeat footer guidance. - Case-sensitive import of `InlineLink` breaks Linux/Vercel builds. ## What is the new behavior? ### Mode selector and sheet - Stronger selected/hover treatment; comfortable single row that wraps via `@container`. - Empty odd slots use a sunk placeholder cell. - Sheet uses `size="lg"` with `max-w-4xl` and `w-full min-w-0` so width stays stable when switching modes. ### Steps chrome - “Follow these steps” header with a copy-prompt action for coding agents. - Optional steps labelled `(optional)`. - Shared `CodeBlock` for install snippets; MCP feature groups preselect all except Storage. - Server / shadcn tips folded into footers; IPv4 add-on admonition is responsive with an inline Learn more link and a single Enable action. ### Direct connection - Connection string and connection parameters stay one step (same credentials, two formats). - Reset database password lives in the string card title row beside Shared/Dedicated pooler. - Card titles use sans + sentence case (`Shared pooler`, `Connection parameters`); `.env` stays mono. - Icon-only copy buttons match CodeBlock square sizing; row actions sit slightly closer to the right edge (`pr-2`). - Shared pooler toggle copy clarified. | Before | After | | --- | --- | | <img width="390" height="763" alt="API Keys Settings Chisel Toolshed Supabase" src="https://github.com/user-attachments/assets/adca3cc5-94f8-47e5-a4a2-2831790f430a" /> | <img width="390" height="763" alt="API Keys Settings Chisel Toolshed Supabase" src="https://github.com/user-attachments/assets/f03afe58-e654-435e-a821-835f6243ca95" /> | | <img width="1718" height="1323" alt="API Keys Settings Chisel Toolshed Supabase" src="https://github.com/user-attachments/assets/79f08620-7e1e-4246-a70f-801606c0f499" /> | <img width="1718" height="1323" alt="API Keys Settings Chisel Toolshed Supabase" src="https://github.com/user-attachments/assets/fb45e851-955e-46c2-90f1-afecb93d6ac4" /> | | <img width="1718" height="1323" alt="API Keys Settings Chisel Toolshed Supabase" src="https://github.com/user-attachments/assets/eda36d21-bba7-46ab-ad48-134acf93b471" /> | <img width="1718" height="1323" alt="API Keys Settings Chisel Toolshed Supabase" src="https://github.com/user-attachments/assets/b7b728c6-fc92-46a7-8e3f-2f182c56ece7" /> | ### Test plan - [ ] Open **Connect** and confirm mode cells select/hover clearly; narrow the sheet and confirm wrap + stable width. - [ ] Direct: switch Direct / Transaction / Session; confirm pooler title, reset in title row, parameters table, and percent-encode note. - [ ] Toggle IPv4 shared pooler on Transaction; confirm string updates and admonition/Learn more behaviour when on IPv4-only paths. - [ ] Server: `.env` Copy all / row copy sizing; install command copy. - [ ] MCP / shadcn / Framework: steps still resolve and copy prompt still builds a useful agent prompt. - [ ] Spot-check light/dark and a Linux/Vercel build (InlineLink import casing). |
||
|
|
96d43099bb |
chore: refactor Button API so that it can be used a standard button (#46880)
## Problem Our `<Button>` component breaks the default `button` contract by redefining the `type` prop to set its variant (`primary`, `default`, etc) instead of the button type (`submit`, `button`, etc). This is confusing and forces to write more code when using it with shadcn components that expect/inject the standard button props. ## Solution - rename the `type` prop to `variant` - rename the `htmlType` prop to `type` - propagate the changes where necessary - format code ## How to test As this is just prop renaming, if it builds it's ok --------- Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com> |
||
|
|
ed09fbc6ad |
fix(studio): add @supabase/ssr to Connect Sheet install step (#44694)
The Connect Sheet install step only listed `@supabase/supabase-js`, but the generated code for Next.js (app router) and Remix imports from `@supabase/ssr` – so users following the steps immediately hit import errors. **Added:** - `EXTRA_PACKAGES` map in `connect.schema.ts` – frameworks declare additional packages on top of the base library install, keyed by `framework/variant` for granularity (e.g. `nextjs/app` gets `@supabase/ssr`, `nextjs/pages` does not) - Install content component appends extras automatically - Step title pluralises to "Install packages" when extras are present - Tests for extra packages, variant-specific install commands, and step titles **Changed:** - Next.js steps now branch on `frameworkVariant` so app router and pages router can have different install steps - Remix gets an explicit entry in the step tree (previously fell through to DEFAULT) ## To test - Open Connect Sheet → Framework → Next.js → App Router - Install step should say "Install packages" and show `npm install @supabase/supabase-js @supabase/ssr` - Switch to Pages Router - Install step should say "Install package" and show `npm install @supabase/supabase-js` - Switch to Remix - Install step should say "Install packages" and show `npm install @supabase/supabase-js @supabase/ssr` - Other frameworks (Vue, SvelteKit, etc.) should be unchanged <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * Enhanced package installation guidance to include framework-specific additional packages (e.g., @supabase/ssr for Next.js App Router and Remix). * Installation step labels now accurately reflect the number of packages being installed. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
0d761b0434 |
Connect sheet final content (#42374)
<img width="2892" height="2342" alt="image" src="https://github.com/user-attachments/assets/7e08929d-abc3-4397-b89d-99cc52d8190e" /> This is the third and final PR to complete the new connect sheet. First: https://github.com/supabase/supabase/pull/42367 Second: https://github.com/supabase/supabase/pull/42373 This re-adds the Direct, ORM, MCP tabs and their content, including via connect.schema. To test: - Flag will be enabled on all staging projects - Click connect and notice new Sheet - Click all tabs and ensure content is correct <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Multi-mode connection flow with mode selector and icons (framework, direct DB, ORM, MCP) * New framework/variant/library selector, richer connection guides and install steps (Prisma, Drizzle, direct) * MCP onboarding flows (Cursor, Codex, Claude Code) with server/auth commands and configuration UIs * **Refactor** * Connect schema and state rebuilt to be mode-driven with improved step resolution and cascading state updates * **Tests** * Expanded unit tests covering framework resolution, connect flows, and mode behaviors * **Chores** * ESLint ignores updated for content files <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
b9a09d8612 |
Connect sheet content structure (#42373)
This is part two of a [PR breakdown](https://github.com/supabase/supabase/pull/42276) that introduces our connect schema and how content is retrieved. This focuses on the Framework tab to start. Fields are generated and content is rendered using a connect.schema file. This schema file defines modes, fields and steps. Each mode has a set of fields. Each field can be dependent on another field. The steps generated are then based off the values of the modes and fields. Each step can also render varying content dynamically using a template {{framework}}/{{frameworkVariant}}/{{library}} which just replaces those values with what's in state (fields selected). [Part one needs to be merged first.](https://github.com/supabase/supabase/pull/42367) The next stage will add back all other tabs and content. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * New Connect Sheet UI to guide app-to-project connections with dynamic configuration and copyable connection parameters. * Multi-framework & mobile support with ready-to-use code examples, install commands, and step-by-step setup for 20+ frameworks. * Multiple PostgreSQL connection methods (direct, transaction, session) with safe/masked connection previews. * Copy-prompt that aggregates step content and code for easy sharing. * **UI** * Multi-file code viewer with tabbed code blocks and added syntax support (Swift, TOML, HTML). * **Tests** * Comprehensive unit tests for resolver and state logic. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |