mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
release
266
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
e0635f2f38 |
[FE-5108] (part 3) refactor(studio): migrate database, editors & storage off next/link (#54306)
Part 3 of a 6-PR stack migrating all `next/link` imports in `apps/studio` onto TanStack Router's `Link` (or plain `<a>` for known external URLs) and removing `compat/next/link.tsx`. | Part | PR | Scope | | --- | --- | --- | | 1 | #54304 | `data/prefetchers/PrefetchableLink.tsx` and `components/ui/**` | | 2 | #54305 | `components/layouts/**` and top-level shell components | | **3** | **#54306 ← this PR** | **Database, TableGridEditor, Storage, SQLEditor, BranchManagement, Branching, Functions, Realtime** | | 4 | #54307 | Integrations, Settings, Observability, LogDrains, Issues, Linter, Reports, QueryPerformance, QuerySources, ConfigDrift, DiskManagement, Compute | | 5 | #54308 | Remaining `components/interfaces/**` (Org, Billing, Auth, Support, Home, SignIn, ConnectSheet, etc.) | | 6 | #54309 | Remove `compat/next/link.tsx` shim, Vite alias, and update basePath tests/docs | Migrates `components/interfaces/{Database,TableGridEditor,Storage,SQLEditor,BranchManagement,Branching,Functions,Realtime}/` off `next/link`. **Changed:** - Replaced `next/link` across all 60 importing files in Database, TableGridEditor, Storage, SQLEditor, BranchManagement, Branching, Functions, and Realtime interfaces - Updated legacy permanent-redirect hrefs (`/reports` → `/observability`, `/database/schema` → `/database/schemas`) to their canonical TanStack routes - Dropped legacy `passHref` in `GridHeaderActions.tsx`, removed duplicate `RouterLink` alias in `ChooseFunctionForm.tsx`, and removed `vi.mock('next/link', ...)` in `ReplicationPipelineLayout.test.tsx` Addresses [FE-5108](https://linear.app/supabase/issue/FE-5108/replace-the-nextlink-shim-with-tanstack-link) ## To test - [ ] Check Table Editor, SQL Editor, Database (tables, policies, functions, triggers, replication, backups), Storage (files/analytics/vector buckets), Edge Functions, Branching, and Realtime links - [ ] Verify SQL Editor and Table Editor links with query parameters (`schema`, `content`, `search`) do not double-encode values --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
477e2c136f |
[FE-5109] (part 6) chore(studio): remove next/router shims, aliases, and test mocks (#54058)
Part 6 (final) of a 6-PR stack migrating all `next/router` and `next/compat/router` imports in `apps/studio` onto TanStack Router hooks and removing the router shims. | Part | PR | Scope | | --- | --- | --- | | 1 | #54053 | Core navigation helpers, `hooks/**`, `lib/**`, `data/prefetchers/**` | | 2 | #54054 | `components/ui/**` | | 3 | #54055 | `components/layouts/**` and `state/tabs.tsx` | | 4 | #54056 | Database, Branching, Compute, Edge Functions, Explorer, SQL Editor, Storage, Table Editor | | 5 | #54057 | Remaining `components/interfaces/**` and `QueryInsightsTable` router events | | **6** | **#54058 ← this PR** | **Remove `next/router` & `next/compat/router` shims, `_router-events.ts`, Vite aliases, and test mocks** | Now that no files in `apps/studio` (or `packages/**`) import `next/router` or `next/compat/router`, deletes the router shims, `_router-events.ts`, their Vite aliases, and the obsolete router test mocks. `RouteValidationWrapper` is intentionally left for FE-3107. **Removed:** - `apps/studio/compat/next/router.ts`, `apps/studio/compat/next/compat/router.ts`, and `apps/studio/compat/next/_router-events.ts` - `'next/router'` and `'next/compat/router'` entries from `nextShims` in `apps/studio/vite.config.ts` - Global `vi.mock('next/router', ...)` and `vi.mock('next/compat/router', ...)` in `apps/studio/tests/vitestSetup.ts`, `mockNextRouter` in `apps/studio/tests/lib/route-aware-hooks.ts`, and the unused `vi.mock('next/router')` in `tests/features/logs/LogTable.test.tsx` - Obsolete shim tests and test helpers: `compat/next/router.test.ts`, `compat/next/router-navigation.test.tsx`, `tests/config/router.tsx`, and `tests/config/router.test.tsx` **Changed:** - Simplified `createNavigationHandler` in `apps/studio/lib/navigation.ts` (and `navigation.test.ts`) to accept TanStack's `UseNavigateResult<string>` only, dropping the `NextRouter` union branch - Updated `compat/next/link-basepath-navigation.test.tsx` (renamed from `router-basepath-navigation.test.tsx`), `lib/router-url-shape.test.tsx`, and `tests/lib/route-render.test.tsx` to exercise TanStack Router hooks directly instead of the removed router shim - Cleaned up stale `next/router` comments in `compat/next/link.tsx`, `lib/internal-url.ts`, `router.tsx`, and `tests/lib/route-mock.ts` **Simplified:** - Removed `routerMock` setup from about 19 tests that no longer read it. `next-router-mock` stays for now, because the test `FrameworkProvider` still feeds `useParams` from it. - `AGENTS.md` and the `vite.config.ts` error text now say only `next/link` and `next/script` are shimmed - Renamed `compat/next/router-basepath-navigation.test.tsx` to `link-basepath-navigation.test.tsx`, and removed stale router-shim references from comments Addresses [FE-5109](https://linear.app/supabase/issue/FE-5109/replace-the-nextrouter-shims-with-tanstack-router-hooks) ## To test - [ ] Confirm `git grep -E "next/(compat/)?router|_router-events" apps/studio` returns no code or config imports (only the prose guideline in `apps/studio/AGENTS.md`) - [ ] Confirm `pnpm --filter studio run typecheck`, `pnpm --filter studio run lint`, `pnpm --filter studio run build`, Knip, and the full Studio Vitest suite pass - [ ] Spot-check basePath navigation (`next/link` + `navigateToUrl`) and multi-line query param URLs in Studio --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
d8568215ad |
[FE-5109] (part 4) refactor(studio): migrate database, editor, storage, and functions interfaces off next/router (#54056)
Part 4 of a 6-PR stack migrating all `next/router` and `next/compat/router` imports in `apps/studio` onto TanStack Router hooks and removing the router shims. | Part | PR | Scope | | --- | --- | --- | | 1 | #54053 | Core navigation helpers, `hooks/**`, `lib/**`, `data/prefetchers/**` | | 2 | #54054 | `components/ui/**` | | 3 | #54055 | `components/layouts/**` and `state/tabs.tsx` | | **4** | **#54056 ← this PR** | **Database, Branching, Compute, Edge Functions, Explorer, SQL Editor, Storage, Table Editor** | | 5 | #54057 | Remaining `components/interfaces/**` and `QueryInsightsTable` router events | | 6 | #54058 | Remove `next/router` & `next/compat/router` shims, `_router-events.ts`, Vite aliases, and test mocks | Migrates the database, branching, compute, functions, explorer, SQL editor, storage, and table editor interfaces off `next/router` and `next/compat/router`. **Changed:** - Migrated the sole `next/compat/router` consumer (`components/interfaces/Database/Replication/Destinations.tsx`) to `useNavigate` - Replaced `useRouter` across `BranchManagement`, `Branching`, `Compute`, `Database` (`Backups`, `Functions`, `Replication`, `Schemas`, `Tables`, `Triggers`), `EdgeFunctions`, `Explorer`, `Functions`, `SQLEditor`, `Storage` (`AnalyticsBuckets`, `FilesBuckets`, `VectorBuckets`, `StorageMenuV2`, `Storage.utils`), and `TableGridEditor` with TanStack Router hooks (`useNavigate`, `useLocation`, `useRoutePattern`) and `useParams` from `common` - Updated unit and component tests across `Database/Replication`, `Explorer`, `Functions`, and `Storage/FilesBuckets/DeleteBucketModal.test.tsx` to use TanStack Router **Simplified:** - `useSnippetEditor` and `useRedirectLegacyReadReplicaDestination` read search values from `useParams` instead of casting `location.search` - `resolveSourceSwitch` returns `replace: boolean` instead of a `push`/`replace` method name - `ExplorerQueryTab` and `EdgeFunctionDetails` guard on a defined ref instead of navigating with `ref ?? ''` - `useFunctionsDetailShortcuts` and `StorageMenuV2` use a local `goTo` helper for their navigation shortcuts - Tests use the shared `createTestRouter` and `customRender` router, use `toMatchObject` for search assertions, and drop duplicate assertions Addresses [FE-5109](https://linear.app/supabase/issue/FE-5109/replace-the-nextrouter-shims-with-tanstack-router-hooks) ## To test - [ ] SQL Editor: creating, renaming, moving, opening templates/examples, and keyboard shortcuts navigate between snippets cleanly - [ ] Table Editor & Database: opening tables, schema table nodes, triggers, functions, backups/PITR, and replication destination flows navigate as expected - [ ] Storage: switching between Files, Analytics, and Vector buckets and deleting a bucket navigates cleanly - [ ] Edge Functions & Explorer: opening function details/logs, explorer chat/query tabs, and branch management actions navigate properly --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
fcbdda8107 |
chore: migrate formatter from Prettier to oxfmt (#53835)
Migrate code formatting across the monorepo from Prettier to `oxfmt`
(`0.79.0`, pinned) for much faster formatting checks locally and in CI
while keeping code churn minimal (78 files total, 0.7% of the repo).
Studio's `@ianvs/prettier-plugin-sort-imports` ordering
(`<BUILTIN_MODULES>`, `<THIRD_PARTY_MODULES>`, blank line, then `@/` and
relative imports) is preserved via `oxfmt`'s native `sortImports`
override for `apps/studio/**/*.{js,jsx,ts,tsx}`.
### Performance (before vs after, uncached)
| Benchmark | Prettier (`3.8.x`) | oxfmt (`0.79.0`) | Speedup |
| --- | ---: | ---: | ---: |
| CI formatting step (`blacksmith-4vcpu-ubuntu-2404`, full repo) | `73s`
| **`7s`** | **~10×** |
| Local `apps/studio` JS/TS (`5,157` files) | `17.74s` | **`0.36s`** |
**~49×** |
| Local full monorepo (`11,131` files) | — | **`2.39s`** | — |
**Added:**
- `.oxfmtrc.jsonc` at repo root with Prettier-matching options,
`sortPackageJson: false`, the Studio `sortImports` override, and ignore
patterns migrated from `.prettierignore`
- `oxfmt` (`0.79.0` exact pin) in `pnpm-workspace.yaml` catalog and
workspace `devDependencies` / `dependencies`
- Shared `.agents/scripts/format_and_lint.sh` hook script and
`.agents/hooks.json` (used by both Claude Code and Antigravity)
**Changed:**
- Replaced `test:prettier` with `format:check` and switched `format` in
root `package.json` to `oxfmt`
- Updated `packages/api-types` (`codegen`,
`verify-production-types.mjs`), `apps/design-system` (`build:registry`),
`apps/docs` (`CodeSample.ts`, `generate-sitemap.ts`, `next.config.mjs`,
`spec/Makefile`), `apps/www` (`generate-sitemap.mjs`), and
`packages/build-icons` (`generateIconFiles.mjs`) from Prettier to
`oxfmt`
- Updated `.github/workflows/prettier.yml` (keeping the `format` job ID
intact), `.github/workflows/autofix_linters.yml`,
`.claude/settings.json`, `AGENTS.md`, `CONTRIBUTING.md`, and
`.github/copilot-instructions.md`
- Applied one-time `oxfmt` formatting pass in a separate commit (78
files: 30 `i18n/README.*.md` trailing spaces, 19 Studio files, 17 other
TS/TSX/generated types, 8 MD/MDX, 3 `package.json`, 2 example CSS files)
**Removed:**
- `prettier`, `@ianvs/prettier-plugin-sort-imports`, and
`prettier-plugin-sql-cst` from `devDependencies` (note: `.sql` files
were not part of the CI formatting glob; `eslint-config-prettier` is
kept for ESLint)
- `prettier.config.mjs`, `.prettierignore`, and
`.claude/scripts/format_and_lint.sh`
## To test
- Run `pnpm run format:check` and confirm it passes cleanly across all
matched files
- Run `pnpm --filter api-types test`, `pnpm --filter docs exec vitest
run features/directives/CodeSample.test.ts`, and `pnpm --filter www exec
vitest run generate-sitemap.test.ts`
- Edit an `apps/studio` file with out-of-order imports and run `pnpm run
format` to confirm builtin/third-party vs `@/`/relative grouping matches
prior behavior
- Check that the `Check Code Formatting` CI workflow passes on this PR
---------
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
|
||
|
|
1c85e3efb7 |
fix(studio): clarify OAuth permission labels (#53699)
## Problem OAuth mixes abbreviated access levels with permission names whose meaning is hard to infer. ## Solution Use **Read and write** and **Read only** consistently, and add keyboard-accessible definitions for Database management and Environment. Reuse the dotted underline from Pipelines and document above-label placement. | Before | After | | --- | --- | | <img width="926" height="1936" alt="CleanShot 2026-11-20 at 12 20 42@2x" src="https://github.com/user-attachments/assets/053b4afa-f428-4c0d-8f3b-dbc3f3dd5cf8" /> | <img width="886" height="1902" alt="CleanShot 2026-11-20 at 12 21 20@2x" src="https://github.com/user-attachments/assets/8277064b-1e73-43ff-b7b5-4d4af7d6c68f" /> | | _No tooltips, old “READ-WRITE”._ | _Tooltips for ambiguous permissions, “READ AND WRITE” for clarity and to match setup terminology._ | ## Review instructions 1. **Before:** Open the [Scoped OAuth tester](https://api.supabase.green/v1/oauth/authorize?response_type=code&client_id=a3999bfe-cfc7-4584-9c5a-ab6828d35aa3&redirect_uri=http%3A%2F%2Flocalhost%3A8765%2Foauth%2Fcallback) and leave consent open. 2. **After:** Open the [deploy preview consent screen](https://studio-staging-git-dnywh-oauth-permission-labels-supabase.vercel.app/dashboard/authorize?auth_id=606dbb8e-60ea-4155-bb36-70a7d31378dd). **What to check** 1. Open consent for a test app that requests database read/write, environment read, and projects read access. 2. Check the small **Read and write** and **Read only** headings. Hover or Tab to Database management and Environment. Each definition should appear above its dotted-underlined label. 3. Optionally open an existing Pipeline and hover over an annotated status label to check the shared underline. |
||
|
|
9437334289 | feat(pipelines): Update docs and UI (#53665) | ||
|
|
7418124337 |
[FE-3106] (part 6) – refactor(studio): move project home and database page bodies (#53215)
Moves the project home, `/merge`, `/api` and all `/database/*` page bodies into their route files and deletes the pages (FE-3106). Part 6 of the stack. **Depends on:** #53214 **Changed:** - `routes/project/$ref/{index,merge,api/index}.tsx`, `routes/project/$ref/database/**` – 26 page bodies inlined; redirects use `<Navigate>`/`useNavigate` with typed params and `search`; `next/link` → `Link` - `database/pipelines/new` – same-origin header links navigate client-side via `splitInternalUrl`, external ones via `href`, matching the old shim - `PipelineCreationPage.test.tsx` – renders the route with `renderRoute` **Removed:** - 26 page files, and `DatabaseTriggersLayout`/`PipelinesLayout`, which only the deleted pages' `getLayout` used (the route shells already inline them) Addresses [FE-3106](https://linear.app/supabase/issue/FE-3106/move-page-bodies-into-route-files-and-delete-pages). ## To test - Click through Database (Tables, Functions, Triggers, Indexes, Roles, Policies, Backups, Pipelines, Publications) – same layout, titles and sidebar - `/project/<ref>/database/triggers` – redirects to `triggers/data` - `/project/<ref>/api` – redirects to the Data API docs, keeping the query - Create a pipeline and leave the wizard – unsaved-changes guard and navigation behave as before --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
2a9b02a99a | feat(docs): Improve Pipelines docs and UI (#53450) | ||
|
|
b046f12571 |
chore(api-types): update generated API types from production (#53364)
Regenerates the API types with `pnpm api:codegen:prod` and fixes the
Studio type errors the new types caused.
## Changes from the API
- **Branch merge now requires production write permission.** `POST
/v1/branches/{branch_id_or_ref}/merge` changed from accepting either
`branching_development_write` or `branching_production_write` to
requiring `branching_production_write`. Studio's FGA refinement for
merge no longer matched and failed typecheck.
- Removed the merge entry from `lib/fga-refinements.ts`.
- `merge.tsx` checks merge permission with `useGrant` instead of
`useBranchGrant`.
- `BranchMergeGrant` uses `GrantFor` instead of `GrantForVariants`.
- Removed merge from the "requires a variant" test in
`guarded-fetch.test.ts`.
- Users with only development branching permissions can no longer merge
in Studio. This matches what the API now enforces.
- **Replication pipelines have a required `cluster_id`.** Added it to
the pipeline fixtures in six test files.
- **`MemberWithFreeProjectLimit` has a required
`free_plan_organizations`.** Added it to the mock in
`tests/pages/new/[slug].test.tsx`. No app code reads it yet.
## Testing
- `pnpm typecheck` passes.
- Vitest passes for the affected Studio tests.
|
||
|
|
79e7836a5a | feat(pipelines): Add support for unknown destination (#53272) | ||
|
|
0ed90ae460 |
fix(ui): split button divider (#53258)
## Problem - in dark mode split button shows a middle divider that is lighter and heavier than the outer edge, and the design system `button-split-dropdown` example has the same bug - button edge is a translucent inset shadow over a translucent fill, so the `-ml-px` overlap stacks two edges and two fills in one column - light mode has the same defect on hover and with the menu open, because the hover fill is translucent too ## Solution - adds a `SplitButtonGroup` component to `ui`, so a split button has a `role="group"` wrapper and one shared divider - fixes the divider color in both themes, because only one button paints the shared border column - changes the shared column to follow the hovered button, so the divider takes its edge color in a fixed place - removes the press scale from buttons in the group, so no gap opens between the two buttons - changes the design system split button docs to `SplitButtonGroup` | before | after | | -------|------| | <img width="428" height="219" alt="image" src="https://github.com/user-attachments/assets/4cbc5dc9-3575-4eef-83b9-a6141796ccc8" /> | <img width="428" height="219" alt="image" src="https://github.com/user-attachments/assets/9c5b283d-e6bd-428a-bee1-7f59249aeb83" /> | | <img width="428" height="219" alt="image" src="https://github.com/user-attachments/assets/046338f9-6dfd-4c32-8e33-30c1b0f84715" /> | <img width="428" height="219" alt="image" src="https://github.com/user-attachments/assets/c79e1c7a-e1ac-4682-a898-1a36c6b028fc" /> | <!-- ## Preview links If relevant, include links to changed pages for easy review access. Copy the preview base URL from the Vercel bot comment on this PR. Use the following table as an example template. | Site | Live | Preview | Search for | | -------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------- | | WWW | [/blog/your-post](https://supabase.com/blog/your-post) | [/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post) | unique phrase from the change | | Docs | [/docs/guides/your-page](https://supabase.com/docs/guides/your-page) | [/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page) | unique phrase from the change | | Studio | [/dashboard](https://supabase.com/dashboard) | [/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard) | unique phrase from the change | | Design system | [/design-system](https://supabase.com/design-system) | [/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system) | unique phrase from the change | | UI library | [/library](https://supabase.com/library) | [/library](https://ui-library-git-branch-name-supabase.vercel.app/library) | unique phrase from the change | | Knowledge base | [/kb/guides/your-page](https://supabase.com/kb/guides/your-page) | [/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page) | unique phrase from the change | --> <!-- ## Additional context Optionally add any other context or screenshots. --> ## Review instructions 1. open the [/design-system/docs/components/button](https://design-system-git-antlio-fix-split-button-divider-supabase.vercel.app/design-system/docs/components/button#split-with-dropdown) preview in dark mode, and zoom in on the split example 2. make sure that the divider has the same color and weight as the outer edge 3. hover the primary action, and make sure that the divider takes its edge color and stays in the same place 4. hover the chevron and open the menu, and make sure that the divider takes the chevron edge color 5. switch to light mode, and repeat steps 2 to 4 6. press and hold the primary action, and make sure that it does not shrink 7. tab to the chevron, and make sure that the focus ring shows on all four sides and that Enter opens the menu 8. open the [/design-system/docs/fragments/admonition](https://design-system-git-antlio-fix-split-button-divider-supabase.vercel.app/design-system/docs/fragments/admonition#split-button-with-dropdown) preview at a narrow width, and make sure that the split fills the row with one divider 9. open the [/dashboard/project/\_/settings/log-drains](https://studio-git-antlio-fix-split-button-divider-supabase.vercel.app/dashboard/project/_/settings/log-drains) preview, and make sure that the `primary` split looks the same as on master ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) |
||
|
|
00adb5a81b |
chore(studio): remove the Iceberg pipeline destination (#52229)
## Problem Retire the deprecated Iceberg (Analytics Bucket) destination from Pipelines. ## Solution - Remove the destination UI, configuration mappings, feature-flag usage, and generated API variants. - Remove the legacy Pipelines integration from Storage while preserving standalone Analytics Buckets. - Remove unused components and sheet-layout support, and add regression coverage for retained Storage operations. - Remove the stale Pipelines claim from the Storage docs overview. ## Validation - Pipelines, Storage, and replication data tests - After the final cleanup: Studio typecheck and all 3 Analytics Bucket regression tests passed. - Formatting, scoped ESLint, Knip, and whitespace checks passed; lint warnings are pre-existing. - Storage overview: Prettier, ESLint with zero warnings, content-listing schema validation, and Markdown rendering passed. Production API-type verification remains pending the coordinated API deployment. Legacy Iceberg pipelines, destinations, and slots must be cleaned up before rollout. ## Review instructions 1. Verify that Pipelines offers BigQuery, DuckLake, Snowflake, and ClickHouse, with no Analytics Bucket option. 2. Verify that Storage Analytics Bucket creation, namespace/table operations, and wrapper/key cleanup remain available without Pipelines controls. ## Checklist - [x] Read CONTRIBUTING.md. - [x] Updated the Storage overview copy and checked the docs authoring guidance. --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
597d1ce56e |
fix(studio): pass caller options to grant-gated query factories (#53088)
## Context Grant-gated query factories returned `queryFn: skipToken` when the caller had no grant. TanStack Query keeps one options object per cache entry, overwritten by whichever observer rendered last. When that was a grant-less observer, invalidation refetched with `skipToken` and failed with `Missing queryFn`, breaking the query for every other observer on the key. #53075 patched two call sites; this fixes the factories. ## Changes - New `grantedQueryOptions` helper (`data/granted-query-options.ts`). Without a grant, the factory sets `queryFn: undefined` instead of `skipToken`, so TanStack borrows the query function from a subscribed observer that has one. The caller's `enabled` applies only when the factory has a query function. - `apiKeysQueryOptions`, `revealedApiKeysQueryOptions`, `branchesQueryOptions`, `branchQueryOptions` and `branchDiffQueryOptions` take caller options as a second argument. Call sites change from `useQuery({ ...f(vars), enabled })` to `useQuery(f(vars, { enabled }))`, so callers can't override the grant gate. - New type-aware `fga/no-spread-granted-query-options` lint rule (error). `grantedQueryOptions` returns a type-only brand, and the rule flags any spread or `Object.assign` of a branded value, however it was built or named. - Restores typed linting as a separate pass (`eslint.type-checks.config.cjs`, run by `pnpm lint` via `lint:type-checks`), as #44678 did. Enabling type info in the main config changes what other plugins report, so it stays separate. - `studio-queries` skill documents the pattern. Callers still pass their own grant, so the UI gates on the same grant the request carries. ## Testing - `data/api-keys/api-keys-query.test.tsx`: a granted and a grant-less component share the key, with the grant-less one rendering last; invalidation via the delete mutation refetches successfully. Fails on master with `Missing queryFn`. - `data/granted-query-options.test.ts`: `enabled` gating, factory fields win over caller fields, `select` type inference. - Lint rule cases in `scripts/__tests__/fga-eslint-rules.test.ts`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
6d08d66b7d |
Add eslint rule for google translate dynamic spans + address all issues (#52949)
## Context We've been seeing many `NotFoundError: Failed to execute 'removeChild' on 'Node'` and `NotFoundError: Failed to execute 'insertBefore' on 'Node'` events on Sentry which are historically known to be caused by Google Translate in the browser. There's technically no _right way_ to address this unfortunately, but one of the solutions which should address most of these issues is to wrap any dynamic text within a span - we've considered that quite a while back tbh but never took the time to do this until today with the help of Claude. Although just a heads up that it might not necessarily completely eradicate those issues. Also added an eslint rule which should prevent future occurences of this <img width="1264" height="192" alt="image" src="https://github.com/user-attachments/assets/b2c32ea0-45a2-4ccd-82fe-1a859905fc29" /> |
||
|
|
82671cbb65 |
feat(studio): gate database and functions reveal consumers on grants (#52727)
Part 3 of 4 in a stack for [FE-4694](https://linear.app/supabase/issue/FE-4694/pilot-split-api-keys-queries-and-add-first-refinement-reveal-variant). Based on #52724. ## Stack 1. #52723 Reveal refinement and split api-keys queries 2. #52724 API keys settings UI and command menu 3. 👉 Database and edge functions consumers that reveal secret keys 4. #52728 Storage, cron, and Realtime consumers; remove the transitional reveal path ## Changes Moves the database and edge functions consumers that need secret keys off the V2 permission checks and onto `useGrant('GET /v1/projects/{ref}/api-keys', scope, { variant: 'reveal' })` with `revealedApiKeysQueryOptions`: - Database webhooks (`Database/Hooks/HTTPHeaders`, `FormContents`) - Replication destination form (Analytics Bucket catalog token prefill) - Edge function tester sheet Adds `components/ui/ApiKeysAccessNote`, a small inline note shown when the reveal grant is denied, and an `AlertError` when the permission check fails. It doesn't block the rest of the form: users without secret-key access can still fill in headers or the catalog token manually, where before the keys were silently missing. ## Testing - Adds `HTTPHeaders.platform.test.tsx` covering granted (requests keys with `reveal=true`, no note), denied (note shown, form still usable, no request), and permission-check error. - Removes the partial V2 permissions mock from the DestinationForm test, which no longer needs it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
d727bb0081 |
feat(studio): add reveal refinement for api-keys and split queries (#52723)
Part 1 of 4 in a stack for [FE-4694](https://linear.app/supabase/issue/FE-4694/pilot-split-api-keys-queries-and-add-first-refinement-reveal-variant). Later PRs migrate the api-keys consumers onto grants. ## Stack 1. 👉 Reveal refinement and split api-keys queries 2. #52724 API keys settings UI and command menu 3. #52727 Database and edge functions consumers that reveal secret keys 4. #52728 Storage, cron, and Realtime consumers; remove the transitional reveal path ## Changes - Adds a `reveal` variant for `GET /v1/projects/{ref}/api-keys` in `lib/fga-refinements.ts`. It requires `api_gateway_keys_secret_read` on top of the base annotation, and owns the `reveal` query param: the fetch wrapper sets it to `'true'` for a reveal grant and `'false'` otherwise (including `unguarded`), so passing `reveal` by hand is a type error. - Splits the query into `apiKeysQueryOptions` (plain grant) and `revealedApiKeysQueryOptions` (reveal grant). Both use `skipToken` without a grant, and the grant stays out of the query key. - `useAPIKeysQuery` and `useAPIKeys` stay as deprecated transitional hooks that mint the matching grant with `useGrant`. They can't use `unguarded.migrating`: with `reveal` owned by the wrapper, that would silently return unrevealed keys to consumers that need secrets. - Marks the variant type parameter `const` in `getGrant`, `useGrant`, `ensureGrant`, and `testGrant`. Adding a second refinement with variants widened inference of the branch variants to a union. - Adds `tests/lib/project-grant-mocks.ts` for component tests that need `useGrant` to resolve, and updates tests that partially mocked the V2 permissions hook. ## Testing Adds the type and runtime tests deferred from FE-4689 to `data/guarded-fetch.test.ts`: type equality with the raw client for plain and reveal grants, `reveal` rejected as a caller-supplied param, a reveal grant rejected on an endpoint without that variant, brand invariance, `guardMethod` setting `reveal` from the grant, and `assertGrant` throwing on an unknown variant. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
df742bdb3b |
refactor(studio): rename ResponseError to StudioError (#52707)
## What
Moves the `ResponseError` class (`types/base.ts`) and the classified
error classes (`types/api-errors.ts`) into
`lib/errors/studio-errors.ts`, and renames `ResponseError` to
`StudioError`.
## Why
Studio's error classification is being expanded to cover errors that
don't come from API responses (thrown network failures, aborted
requests, unexpected client errors). The API-specific name and location
no longer fit. Landing the rename on its own keeps the follow-up PR,
which introduces the classified error model, small and reviewable.
## Notes for reviewers
- Mechanical change, no behavior change. Most of the diff is a one-line
import change per file plus import re-sorting by Prettier.
- Files that only use the type now use `import type { StudioError }`.
- `ResponseError` is no longer re-exported from `@/types`; there are no
compatibility shims at the old paths.
- Unrelated identifiers like `QueryResponseError` and
`parseResponseErrors` are unchanged.
|
||
|
|
31c9854c2a |
chore: update api types (#52618)
Fixes API-types as per latest develop - pending prod deployment today to clear out the failing action that checks against prod types |
||
|
|
cd0b65c03e | feat(logs): Add Pipelines to unified logs and rename ETL to Pipelines (#52555) | ||
|
|
6aed258d87 | feat(migration): Move pipeline_id to string (#52489) | ||
|
|
253d874e38 | fix(warehouse): disallow warehouse installation on orioledb (#51913) | ||
|
|
c127901b64 | test(studio): speed up flaky replication tests (#52326) | ||
|
|
8ea3ce7747 |
Fix: stabilize some long flaky units tests (#52297)
## Problem Some of our units fail randomly because they can take a bit more than 5 seconds to complete ## Solution Set their timeout to 10 seconds. |
||
|
|
60b51d74d5 |
Audit existing unit tests + Remove redundant ones (#52215)
## Context
_TLDR: Changes here speeds up unit tests on CI from ~14 minutes to ~3
minutes_ 😂
_TLDR 2: The file changes are solely only test files +
`studio-unit-tests.yml`_
We've currently got a lot of unit tests in the repository which while
great for coverage, hasn't been ideally written. There's a lot of
redundancy + overly specific tests that break easily, and our current
unit test takes about 15 minutes to run in the GHA per PR. Hence am
doing a audit clean up of all existing unit tests in the studio repo.
## Changes involved
- `.test.ts` files now run in `node`, `.test.tsx` in `jsdom`
- jsdom costs about 1s of setup per file. A `.ts` test that needs the
DOM opts in with `// @vitest-environment jsdom` (46 files do).
- Removed redundant and over-specific tests
- Duplicates are merged into `test.each`. Tests that only covered
libraries, existed for coverage, or asserted class names and snapshots
are deleted. 19 files are merged into a sibling or deleted.
- Fixed about 15 tests that couldn't fail
- Examples: unawaited assertions, fixtures equal to the default, and a
`semverGte` test calling `semverLte`.
- Sped up the slowest files
- Real sleeps are replaced with fake timers, `user.type` with paste, and
Radix option queries are scoped to the open listbox. For example,
`RestoringState` went from 18s to 0.3s and
`useTableEditorFiltersSort.navigation` from 20s to 3s.
- These ^ already shave down the unit tests time from 14 mins to 9 mins,
but am also sharding unit tests across 4 jobs to increase speed up
further which then shaves down time to 3 mins now
|
||
|
|
b410764409 |
test(studio): wait for pipeline step url before continuing (#52135)
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
The "edits each section from Review" test clicks Continue as soon as the
step text shows. That text updates before the URL does. The step query
uses nuqs with `{ history: 'push', shallow: true }`, and
`NuqsTestingAdapter` resets its queue on every render. The previous push
then re-renders the adapter and drops the click that is still queued, so
the wizard snaps back and `Step 2 of 4` (or step 3) never stays. I
logged one run moving to Data, then the "Cannot update
PipelineCreationFlow while rendering NuqsTestingAdapter" warning, then a
render back on Connection.
This is flaky, not a broken wizard. The Next and TanStack adapters do
not reset that queue on render, and the browser Back/Forward tests in
this file still pass. The racy clicks have been in the test since
`306cd88a2b`. Master CI first failed it on `b7638a7244` (step subtitles
and Docs landed in the same test), passed once on `655a6624cf`, and
failed again on `bbf0e730f2`.
**Changed:**
- `PipelineCreationFlow.test.tsx` — wait for each step's URL write
before the next Continue or edit, including the empty query when
Destination is cleared by `clearOnDefault`
## To test
- `pnpm --filter studio exec vitest --run
components/interfaces/Database/Replication/CreatePipeline/PipelineCreationFlow.test.tsx`
— I ran this file 12 times (36 tests each, all passed)
- `pnpm --filter studio test` — 802 files, 9447 passed, 1 expected fail
- `pnpm --filter studio typecheck`, Prettier on the test file, and `pnpm
--filter studio run lint:ratchet`
<!-- CURSOR_AGENT_PR_BODY_END -->
<div><a
href="https://cursor.com/agents/bc-df2f864a-51a2-57e3-9a2a-c69a8a135b2c?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a
href="https://cursor.com/background-agent?bcId=bc-df2f864a-51a2-57e3-9a2a-c69a8a135b2c&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
|
||
|
|
655a6624cf |
test(studio): restore data value check across destination changes (#51931)
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> Follow-up from #51924. Splitting the old flow test dropped the check that Data step values survive a destination switch, and this adds that check back to the connection test. Open #51900 already conflicts with master on this file. This branch is based on master and only edits the connection test. **Changed:** - `apps/studio/components/interfaces/Database/Replication/CreatePipeline/PipelineCreationFlow.test.tsx` – set Batch wait time to 750 before leaving Data and assert it is still 750 after switching BigQuery → Snowflake → BigQuery, so a destination change that resets Data values fails the test ## To test - [x] `pnpm --filter studio exec vitest run components/interfaces/Database/Replication/CreatePipeline` – all pass (13 files, 89 tests) - [x] Resetting `maxFillMs` to `10000` on a destination change fails the new assertion (`toHaveValue(750)`, received `10000`) - [x] `pnpm --filter studio run lint:ratchet` – pass - [x] `pnpm --filter studio typecheck` – pass - [x] Prettier check on the changed file – pass - [x] `pnpm knip --workspace apps/studio` – pass - [x] `test (1)` on this PR – green <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-59590606-1fef-5afa-afbf-cd3a89249c56?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-59590606-1fef-5afa-afbf-cd3a89249c56&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
9be9e570c3 |
feat(studio): adopt shared inline code defaults (#51981)
## Problem Studio relies on repeated classes to style inline code. Bare `<code>` elements can miss those styles. ## Solution Import the shared styles from #51980 and remove the repeated classes. Keep Markdown renderer behaviour and existing size overrides. Use `data-code-style="plain"` for webhook headers, CLI and upgrade commands, configuration comparisons and connected-resource labels that have their own layout. ## Review instructions Dashboard review: this PR changes Studio only. 1. Open [Database > Extensions](https://studio-staging-git-dnywh-depr-707-code-studio-supabase.vercel.app/dashboard/project/_/database/extensions). Search for `pg_trgm` or another disabled extension and turn on its toggle to open the Enable dialog. Check the Extension and Schema values and the help text under “Install in a different schema”. The SQL block should keep its highlighting and copy control. Close without installing. 2. Open [Edge Functions > Secrets](https://studio-staging-git-dnywh-depr-707-code-studio-supabase.vercel.app/dashboard/project/_/functions/secrets). Scroll to “Default secrets” and check `SUPABASE_URL` and `SUPABASE_DB_URL`: both should use the bordered inline-code style. Hover a name to see “Click to copy”, then click it and confirm the name is copied. No custom secret or deployed function is needed. 3. Compare light and dark themes at narrow and desktop widths. | Before | After | | --- | --- | | <img width="812" height="1066" alt="CleanShot 2026-10-19 at 15 35 10@2x" src="https://github.com/user-attachments/assets/e4a21310-1fac-4143-9ee6-d2452ab4f314" /> | <img width="812" height="1068" alt="CleanShot 2026-10-20 at 15 39 20@2x" src="https://github.com/user-attachments/assets/d2c91ef6-7836-4c71-8f15-d0c0df8e969d" /> | |
||
|
|
b7638a7244 |
fix(studio): preserve pipeline wizard loading context and guidance (#52053)
## Problem Opening the pipeline creation wizard hides the top bar and shows an unrelated loading skeleton. Steps also lack their subtitles and contextual documentation links from #49243. ## Solution Keep the wizard header visible during access checks and redirects, with a skeleton matching the initial destination selection. Restore all four step subtitles and destination-specific Docs links on Connection. Link Data to the current table-selection guidance. | Before | After | | --- | --- | | <img width="1024" height="759" alt="31447" src="https://github.com/user-attachments/assets/e628831a-f916-43c4-81a5-8e3219f6310b" /> | <img width="1024" height="759" alt="New Pipeline Supabase" src="https://github.com/user-attachments/assets/1cc5548a-c4a8-4d3f-ac4f-c6cde54920d1" /> | | <img width="1024" height="759" alt="New Pipeline Supabase" src="https://github.com/user-attachments/assets/1ed91bf3-6b74-4e0b-a575-b3faeeffb1d5" /> | <img width="1024" height="759" alt="30316" src="https://github.com/user-attachments/assets/fbf2a703-d175-438c-be8c-0a11a921d2bc" /> | ## Review instructions 1. Enable **Pipeline creation wizard** in Feature Previews. Open `/project/<ref>/database/pipelines` and click **Add pipeline**, with network throttling enabled. Confirm the top bar stays visible while the destination skeleton loads. 2. Continue to Connection for each available destination. Confirm the subtitle names that destination and **Docs** opens its setup guide. 3. Continue to Data. Confirm its subtitle and **Docs** link cover publication and initial-sync selection. Review should also show its subtitle. 4. While the initial screen loads, confirm **Close** returns to Pipelines and the form footer is disabled. |
||
|
|
d458429081 |
fix(studio): clarify pipeline validation feedback (#52055)
## Problem Pipeline review shows validation failures below the cost estimate, far from the settings that need changes. Publication-loading failures also appear in several places with conflicting retry instructions. ## Solution Attach full-width errors and warnings to their Connection or Data sections. Keep the current scroll position and show description-only guidance above the footer. Consolidate publication-loading failures into one Data-step error with Continue to retry, preserving the existing sheet behaviour. _The main fix, spreading out the error and warnings to their respective sections:_ | Before | After | | --- | --- | | <img width="1280" height="1522" alt="New Pipeline Supabase" src="https://github.com/user-attachments/assets/36df1814-e73f-4440-b338-79b672431c60" /> | <img width="1280" height="1522" alt="15619" src="https://github.com/user-attachments/assets/08e39cdd-0e69-4318-b992-dfa81ad8a6c2" /> | | _All at bottom_ | _Attached to each section_ | _Misc fixes for API blocks:_ | Before | After | | --- | --- | | <img width="1516" height="1350" alt="CleanShot 2026-10-21 at 15 19 24@2x" src="https://github.com/user-attachments/assets/56ac9cf7-9c30-4129-8fbc-2708f35a51b9" /> | <img width="1520" height="1232" alt="CleanShot 2026-10-21 at 15 22 56@2x" src="https://github.com/user-attachments/assets/c4f4b039-38de-4af0-9bb9-b487ff6ddb63" /> | ## To test 1. Enable **Pipeline creation wizard** in Feature Previews and open `/project/<ref>/database/pipelines/new`. Complete Connection and Data to reach Review. 2. In Chrome DevTools → Network, right-click a captured POST ending `/replication/<ref>/destinations/validate` (Connection) or `/replication/<ref>/pipelines/validate` (Data), then select **Override content**. Reach Review before enabling the destination override. Keep HTTP status **200** and save: ```json {"validation_failures":[{"name":"Test validation issue","reason":"Test failure for the review screen.","failure_type":"critical"}]} ``` 3. Click **Start pipeline**. Expect a flush Admonition at the bottom of the matching section and danger guidance above the footer, without automatic scrolling. Change `critical` to `warning` to check warning guidance and **Start pipeline anyway**. Edit and retry to confirm values persist. 4. On Data, block the GET ending `/replication/v2/<ref>/sources/<id>/publications/<name>`. Expect one flush publication-loading failure above the footer, including with Advanced settings open. **Continue** retries; remove the block and retry to recover. 5. Check desktop and phone widths. Stop before confirming creation, then remove overrides and request blocks. |
||
|
|
d1e251181f |
fix(studio): improve pipeline cost estimate loading and recovery (#52056)
## Problem Pipeline review permits starting before the initial cost estimate finishes. Estimate failures and background refresh errors also need to preserve a usable review state. ## Solution Share cost-query state between the wizard and cost display. Disable **Start pipeline** only until the first estimate attempt finishes. After its first failure, show a flush, description-only note and permit starting while retries continue. Retain cached estimates if a background refresh fails, and announce unavailable estimates through a persistent status region. _All “After” states for Review step:_ | Loading | Loaded | Failed | | --- | --- | --- | | <img width="1024" height="686" alt="31887" src="https://github.com/user-attachments/assets/80b8623e-65ab-4bbb-8fcf-1e5e29a0dcd5" /> | <img width="1024" height="686" alt="New Pipeline Supabase" src="https://github.com/user-attachments/assets/ce49550c-d8cf-42b3-98f3-4520ae6b1229" /> | <img width="1024" height="686" alt="62823" src="https://github.com/user-attachments/assets/958b2bb3-e7ee-4214-b900-2e634adca05f" /> | ## To test 1. Enable **Pipeline creation wizard** in Feature Previews and open `/project/<ref>/database/pipelines/new`. Complete Connection and Data to reach Review. With network throttling, **Start pipeline** stays disabled during the initial estimate request; **Back** remains available. 2. Filter Network for `cost-estimate`. Block the GET ending `/replication/<ref>/sources/<id>/publications/<name>/cost-estimate`, then reload and complete the wizard again to clear the in-memory estimate cache. After the first failed request, expect “A cost estimate is unavailable. You can still start the pipeline.” in a full-width note, and an enabled **Start pipeline**. 3. Remove the block and obtain an estimate. Block the request again, go Back and return to Review. A failed background refresh should retain the cached numbers and allow starting. 4. Check desktop and phone widths. Stop before creating the pipeline and remove the request block. --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
fffb1e23ca |
feat: implement profile permissions v2 api (#50966)
## Problem Migrating Studio's permission checks from the old RLS json logic to openfga backed permissions. ### New hooks and helpers - `usePermissionsQueryV2` fetches the new profile openfga permisisons - `useAsyncCheckPermissionsV2` the replacement for the old check hook; takes an FGA permission string (or a list) - `FGA_PERMISSIONS` permission constants derived from `@supabase/shared-types`. At the moment, the hook also accepts plain strings for permissions not yet published in the package - `useAsyncCheckUserContentPermissions` new hook for permission checks on user content (SQL snippets, reports, log snippets). This wraps ``useAsyncCheckPermissionsV2` and adds existing content level rules on top of the fga permission check ### Notes - ~~Need api to support new permissions: project_operations_write, billing_read/write, audit_logs_read~~ [DONE] - ~~Still need to support: organization_config_read/write, auth hooks and users permissions~~ [DONE] --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com> |
||
|
|
0670509381 | feat(pipelines): Improve lag UI for Pipelines (#51863) | ||
|
|
827e79c5bc |
feat(studio): open the pipeline wizard from Add pipeline (#51903)
## Problem **Add pipeline** still opens the sheet when the wizard preview is enabled. This is slice 14 of #49243, stacked on #51901 (which follows #51900). ## Solution - Route both **Add pipeline** buttons and **Shift+N** to `/database/pipelines/new` when the preview is enabled. Wait for preview preferences and rollout flags before choosing the flow. - Keep enablement before creation, preview-off creation in the sheet, and editing in the sheet. - Return direct wizard visits to Pipelines when enablement is missing or its lookup fails, so existing enablement and Retry remain available. ## Review instructions 1. Open the [Pipelines preview](https://studio-staging-git-dnywh-featpipeline-wizard-entry-supabase.vercel.app/dashboard/project/_/database/pipelines) and select a test project. Enable **Pipeline creation wizard** in Feature Previews. 2. Click **Add pipeline** or press **Shift+N**. Check the full-page wizard opens. Complete Connection and Data, then start a test pipeline from Review. 3. On a project without Pipelines enabled, click **Add pipeline**. Enablement must complete before the wizard opens. Opening `/database/pipelines/new` directly on that project should return to Pipelines. 4. Turn the preview off: **Add pipeline** should open the existing sheet. Editing an existing pipeline should still use the sheet with either preview setting. |
||
|
|
306cd88a2b |
feat(studio): edit pipeline setup sections from review (#51901)
## Problem Review only offers Back, so users must traverse earlier steps to change a specific section. This follows #51900 in the pipeline wizard slices from #49243. ## Solution - Add **Edit** beside Destination, Connection and Data on Review. - Reuse step navigation and preserve entered values. Existing validation still controls access to later steps. - Keep the sheet unchanged. | After | | --- | | <img width="1462" height="968" alt="CleanShot 2026-10-19 at 11 51 16@2x" src="https://github.com/user-attachments/assets/ac76788c-d64c-49ef-9365-ee7bcb81887a" /> | | _Edit button is new in this PR_ | ## Review instructions 1. Open the [Pipelines preview](https://studio-staging-git-dnywh-featpipeline-review-ed-a84254-supabase.vercel.app/dashboard/project/_/database/pipelines), select a test project and enable **Pipeline creation wizard**. Open the [wizard preview](https://studio-staging-git-dnywh-featpipeline-review-ed-a84254-supabase.vercel.app/dashboard/project/_/database/pipelines/new) for that project, complete Connection and Data, then reach Review. 2. Click each section’s **Edit** action. Check it opens the matching step and preserves your values. 3. Change connection or data settings, then continue through validation to Review. Check the updated values appear. Edit Destination and confirm connection values remain when you return. |
||
|
|
e7b1f68956 |
feat(studio): create pipelines from wizard review (#51900)
## Problem The pipeline wizard can validate and review settings, but cannot create a pipeline. This is slice 13 of #49243, following #51823. ## Solution - Enable **Start pipeline** on Review using the sheet’s existing validation, creation and start requests. - Recheck publication settings, block critical failures and show warnings inline before **Start pipeline anyway**. - Preserve values after validation or create failures. Once creation succeeds, finish the start attempt and return to Pipelines, including when starting fails. | After | | --- | | <img width="1234" height="2470" alt="CleanShot 2026-10-19 at 11 22 44@2x" src="https://github.com/user-attachments/assets/23882092-26e2-4d23-b2a1-00d1d2dcba90" /> | **Add pipeline** still opens the sheet. Wizard entry remains behind **Pipeline creation wizard** at `/database/pipelines/new`; routing is the next slice. ## Review instructions 1. Open the [Pipelines preview](https://studio-staging-git-dnywh-featpipeline-review-creation-supabase.vercel.app/dashboard/project/_/database/pipelines), choose a test project and enable **Pipeline creation wizard** in Feature Previews. Open the [wizard preview](https://studio-staging-git-dnywh-featpipeline-review-creation-supabase.vercel.app/dashboard/project/_/database/pipelines/new) for that project. 2. Choose a destination, enter valid test credentials and select a publication. Continue to Review and check the settings, masked secrets and costs. Back and Continue should preserve your values. 3. Click **Start pipeline**. Controls should lock while submitting, then return to Pipelines with one new pipeline and no discard prompt. If warnings appear, review them before clicking **Start pipeline anyway**; critical failures must block creation. 4. Turn the preview off and open the wizard URL again: creation should use the existing sheet. Editing existing pipelines should also keep the sheet. Automated tests cover final validation, changed warnings, create retries, duplicate-click protection, removed publications and start failure recovery. |
||
|
|
73081ea7b8 |
test(studio): stop PipelineCreationFlow tests timing out on slow runners (#51924)
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> `PipelineCreationFlow.test.tsx` started timing out on `master` ([run](https://github.com/supabase/supabase/actions/runs/39227187528), [run](https://github.com/supabase/supabase/actions/runs/39231750598)) – neither commit touched it. The heavier tests drive the full wizard through several steps and already took 2.5–3.7s on a fast runner, so a slow runner pushes them past vitest's 5s default. Most of the time went to unscoped `getByRole` lookups: a worker profile put about half the samples under role queries, and the self time was jsdom `getComputedStyle` (style and color resolution) on that large tree. Failing `waitFor` / `findBy` polls only start dumping the whole tree once a query misses, which is the path that tipped these tests over. `infrastructure.test.tsx`'s disk/autoscaling test timed out once for the same family of cost – per-keystroke `userEvent` typing on the full page. Retries don't help here – a timed-out attempt keeps running while the retry starts, which is where the "Continue not found" / empty `<body>` errors in those logs come from. **Changed:** - `PipelineCreationFlow.test.tsx` – step waits go through a `waitForStep` helper and other waits poll with `queryBy*`, so failing polls no longer build role/DOM dumps - `PipelineCreationFlow.test.tsx` – `fillConnection` uses label queries and step-specific queries are scoped with `within` - `PipelineCreationFlow.test.tsx` – split `preserves connection and data values…` into `preserves connection values across destination changes` and `preserves data values across steps and reaches Review`, with the same assertions - `infrastructure.test.tsx` – `submits disk and autoscaling changes…` types with `userEvent.setup({ delay: null })` so keystrokes are not separated by a macrotask No assertions were removed and no test timeouts were raised. | test | before (median / 1-core worst) | after (median / 1-core worst) | | --- | --- | --- | | requires connection fields and reveals invalid advanced settings | 1092 / 1554 | 1121 / 1522 | | recovers from request and critical failures and reviews warnings before continuing | 1812 / 2056 | 1263 / 1497 | | invalidates connection verification after edits and ignores stale responses | 1045 / 1109 | 509 / 563 | | uses browser Back and Forward to revisit steps without losing values | 1199 / 1368 | 582 / 703 | | starts a fresh session at Destination (×4) | 55–87 / 54–113 | 51–84 / 77–108 | | preserves connection and data values across steps and destination changes | 2270 / 2391 | split | | preserves connection values across destination changes | – | 929 / 1081 | | preserves data values across steps and reaches Review | – | 1058 / 1141 | | blocks incomplete data, retries metadata failures, and reveals invalid advanced settings | 1934 / 2097 | 1514 / 1621 | | blocks browser Forward to Review after data changes | 1151 / 1268 | 799 / 874 | | confirms destination-only changes and treats a reverted selection as pristine | 385 / 410 | 381 / 386 | | confirms dirty dismissal and allows keeping the form | 843 / 908 | 707 / 736 | | closes a pristine form and blocks progression without destinations | 46 / 46 | 43 / 48 | | submits disk and autoscaling changes to both infrastructure APIs | 1355 / 1805 | 1219 / 1684 | Median of 5 unconstrained runs, worst of 3 runs pinned to one core (`taskset -c 0`). Vitest 5.0.0. This touches the same file as #51900 – the helper changes carry over to its new tests once it merges. ## To test - [x] `pnpm --filter studio exec vitest run components/interfaces/Database/Replication/CreatePipeline` – all pass - [x] `pnpm --filter studio exec vitest run "tests/pages/project/[ref]/settings/infrastructure.test.tsx"` – all pass - [x] Same files pinned to one CPU core (`taskset -c 0`) – no test near the 5s timeout - [x] `test (1)` on this PR – green <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-b1f88499-15f7-5aff-b190-841d7371ba48?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-b1f88499-15f7-5aff-b190-841d7371ba48&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> |
||
|
|
69f46a4ab5 |
fix(studio): guard unsaved pipeline creation navigation (#51823)
## Problem Browser Back and router navigation can leave the pipeline wizard without confirming unsaved changes. This is a slice of #49243, builds on merged #51821. ## Solution - Protect unsaved changes in both runtimes: Close and header links use the discard dialog; document exits and refresh use the browser warning. - Add TanStack confirmation for client-side navigation, preserving Back/Forward history. Step changes do not prompt. Next.js client-side router exits remain outside this slice. **Start pipeline** stays disabled. ## Review instructions 1. Open the [Pipelines preview](https://studio-staging-git-dnywh-featpipeline-navigation-guard-supabase.vercel.app/dashboard/project/_/database/pipelines), choose a test project and enable **Pipeline creation wizard**. Open the [wizard preview](https://studio-staging-git-dnywh-featpipeline-navigation-guard-supabase.vercel.app/dashboard/project/_/database/pipelines/new). 2. Continue to Connection and enter a pipeline name. Try a header link and **Close**: **Keep editing** preserves values, while **Discard changes** leaves without a second prompt. 3. Use browser Back to return to Destination without a prompt, then Back again to leave. Cancel the prompt and check the URL and values remain; Forward should still reach Connection. Document exits show the native browser warning in both runtimes; TanStack client-side exits show **Keep editing / Discard changes**. 4. With changes, refresh and cancel the browser warning. Check values remain. A fresh wizard with no changes should close without confirmation. |
||
|
|
25ede7243e |
feat(studio): validate pipeline wizard data settings (#51821)
## Problem The pipeline wizard lets users reach Review without a valid publication or initial-sync selection. This is a slice of #49243, following the merged #51818. ## Solution - Refresh publication metadata on **Continue** and reject unavailable publications or removed initial-sync tables. - Validate initial-sync and advanced data settings, reveal invalid fields and preserve values for retry. - Block browser-history shortcuts to Review after data settings change. | Normal State | Error State (Expanded) | | --- | --- | | <img width="1486" height="1010" alt="CleanShot 2026-10-16 at 13 18 25@2x" src="https://github.com/user-attachments/assets/74ec0785-3bd4-407a-aa3c-7fe69c338488" /> | <img width="1506" height="2516" alt="CleanShot 2026-10-16 at 13 21 27@2x" src="https://github.com/user-attachments/assets/6193d8c4-ab9d-47ca-9d9d-1a31198145d1" /> | Pipeline creation and navigation-out guards remain for later slices. **Start pipeline** stays disabled. ## Review instructions 1. Open the [Pipelines preview](https://studio-staging-git-dnywh-featpipeline-data-validation-supabase.vercel.app/dashboard/project/_/database/pipelines), select a test project and enable **Pipeline creation wizard**. Open the [wizard preview](https://studio-staging-git-dnywh-featpipeline-data-validation-supabase.vercel.app/dashboard/project/_/database/pipelines/new), choose a destination, then enter credentials and test the connection to reach Data. 2. Click **Continue** without a publication. Check the field error. Select a publication, choose a selective initial-sync mode and leave its table selection empty. Check Continue requires at least one table. Select a table and confirm you can reach Review. 3. Return to Data. Enter a negative **Batch wait time** under **Advanced settings**, collapse it and click Continue. Check it reopens with the error. Correct it and continue, then use browser Back, change a data setting and try browser Forward. Check you stay on Data until you click Continue again. 4. For a stale-selection check, select an initial-sync table, remove it from the publication in another tab, then click Continue. Check the selection is rejected and your other values remain. A failed metadata request should also keep values and allow retry with Continue. |
||
|
|
8047d93e3c |
feat(studio): validate pipeline wizard connections (#51818)
## Problem The pipeline wizard from #51776 allows users to continue without valid destination credentials. This is the next slice of #49243. ## Solution - Validate connection fields for all four destinations using the existing schemas and helpers. - Validate the destination on **Continue** and advance to Data on success. Show field errors and connection failures inline; pause for warnings before continuing. - Require a new check after connection settings change and block browser-history shortcuts past an unverified connection. | Errored Test | Success Test | | --- | --- | | <img width="1532" height="2062" alt="CleanShot 2026-10-16 at 12 19 51@2x" src="https://github.com/user-attachments/assets/a40a6c01-ee89-4601-b5d7-6ffc85071dc7" /> | <img width="1500" height="1950" alt="CleanShot 2026-10-16 at 12 18 33@2x" src="https://github.com/user-attachments/assets/c50c1ad4-256b-44b5-bd06-ec0685aae759" /> | The screenshots show earlier test states; successful checks now advance directly to Data. Data validation and pipeline creation remain for later slices. **Start pipeline** stays disabled. ## Review instructions 1. Open the [Pipelines preview](https://studio-staging-git-dnywh-featpipeline-connectio-eb9566-supabase.vercel.app/dashboard/project/_/database/pipelines), select a test project and enable **Pipeline creation wizard**. Open the [wizard preview](https://studio-staging-git-dnywh-featpipeline-connectio-eb9566-supabase.vercel.app/dashboard/project/_/database/pipelines/new) for that project. 2. Choose a destination and click **Continue** with empty or invalid fields. Check the errors, then enter valid credentials and retry. A failed check keeps your values. A failed result stays visible while editing, until retry or destination change. Changed settings still require a fresh check. A successful check opens Data automatically; warnings remain for review before continuing. 3. Continue to Data, return to Connection and change a credential or advanced connection setting. Check that browser **Forward** cannot skip the new check, then click **Continue** to validate again. |
||
|
|
4593b3ffc0 |
feat(studio): compose pipeline creation step navigation (#51776)
## Problem The pipeline wizard in #49243 needs its merged components composed into a full-page flow, with values preserved when moving backwards and forwards. ## Solution - Compose four full-page SteppedFlow steps behind **Pipeline creation wizard**. - Preserve values through step navigation and browser Back/Forward. Refresh starts at Destination. - Reuse Studio’s header controls and confirm before discarding changes. - Defer step validation and creation; **Start pipeline** is disabled. **Add pipeline** and preview-off visits keep the sheet. | After | | --- | | <img width="1024" height="759" alt="New Pipeline Supabase" src="https://github.com/user-attachments/assets/7c3c4511-9a00-4e64-a86a-d6d9489f7d75" /> | | _Only available by navigating to `database/pipelines/new` with the feature preview on._ | ## Review instructions 1. Open the [Pipelines preview](https://studio-staging-git-dnywh-featpipeline-stepped-n-ce5307-supabase.vercel.app/dashboard/project/_/database/pipelines), select a test project and enable **Pipeline creation wizard**. Open the [wizard preview](https://studio-staging-git-dnywh-featpipeline-stepped-n-ce5307-supabase.vercel.app/dashboard/project/_/database/pipelines/new) for that project. Check the full-page layout and header at desktop and phone widths. 2. Enter connection details, select a publication and change initial-sync and advanced settings. Use **Back/Continue**, browser **Back/Forward**, and switch destinations to confirm values remain. 3. Check Review shows your settings, masks secrets and disables **Start pipeline**. Refresh and confirm it restarts at Destination. Incomplete steps are allowed in this navigation-only slice. 4. With changes, try header navigation or **Close**. Check **Keep editing** preserves values and **Discard changes** leaves the flow. Turn the preview off and confirm the wizard URL opens the sheet. |
||
|
|
4215b6ca32 |
feat(studio): add cost estimates and validation feedback to pipeline review (#51641)
## Problem The pipeline wizard in #49243 needs estimated costs and validation feedback in review before creation. ## Solution Add the megabranch’s inline cost estimate and validation feedback to preview-enabled creation. Initial-sync costs follow the selected tables; ongoing pipeline and streaming rates remain visible. Missing estimates do not block creation. Validation feedback distinguishes critical issues from warnings. Preview off and editing keep the existing layout. The Start action, warning confirmation and final cost dialog stay unchanged; no wizard routing is added. Stacked on #51635. ## Review instructions 1. Open the [Pipelines preview](https://studio-staging-git-dnywh-featpipeline-review-costs-supabase.vercel.app/dashboard/project/_/database/pipelines), select a test project with Pipelines enabled, enable **Pipeline creation wizard** in Feature Previews and click **Add pipeline**. Select a publication and confirm **Estimated costs** follows Data review. 2. Compare **All tables**, **No tables** and selected-table initial sync. Confirm initial-sync totals follow the selection, while hourly pipeline and streaming rates stay visible. With **No tables**, initial sync should cost zero. Check desktop and phone widths. 3. Enter valid-format but incorrect destination credentials and click **Start pipeline**. Confirm critical validation issues appear inline and creation stops. Correct the credentials and retry. If warnings are returned, confirm the review explains they may affect replication and the existing **Start pipeline anyway** confirmation still applies. Cancel before final creation. 4. Turn the preview off and reopen **Add pipeline**. Confirm there is no inline cost review. With the preview on, edit an existing pipeline and confirm its original layout remains. |
||
|
|
f20277377b |
feat(studio): add pipeline data and custom settings review (#51635)
## Problem The pipeline wizard in #49243 needs publication, initial sync and custom settings reviewed before creation. ## Solution Extend the preview-enabled review from #51633 with Data, custom connection settings and configured BigQuery table layouts. Values update as fields change. Unchanged advanced defaults and unconfigured table layouts are omitted; an explicit maximum staleness of zero is shown. Preview off and editing keep their existing layout. Validation and creation behaviour stay the same; no wizard routing is added. Stacked on #51633. | This PR: Simple Case | This PR: Extreme Case | Reference: Final Wizard | | --- | --- | --- | | <img width="1244" height="1994" alt="CleanShot 2026-10-14 at 11 22 16@2x" src="https://github.com/user-attachments/assets/5c2c9ea4-7b2b-4f0b-8ebe-0cfc2ac27059" /> | <img width="1226" height="3568" alt="CleanShot 2026-10-14 at 12 02 16@2x" src="https://github.com/user-attachments/assets/dc556d4a-5130-4b6c-80b5-8644603d9a55" /> | <img width="1486" height="2364" alt="CleanShot 2026-10-14 at 10 50 30@2x" src="https://github.com/user-attachments/assets/982b7d23-9449-4841-b002-9e30fbbabfe9" /> | ## Review instructions 1. Open the [Pipelines preview](https://studio-staging-git-dnywh-featpipeline-data-review-supabase.vercel.app/dashboard/project/_/database/pipelines), select a test project with Pipelines enabled, enable **Pipeline creation wizard** in Feature Previews and click **Add pipeline**. Confirm **Data** review follows the destination review. 2. Select a publication. Confirm its name, table count and initial-sync choice appear as read-only fields. Choose selected tables to include or exclude and confirm their schema-qualified names appear. Change publication and confirm old tables are not shown. 3. Under Data’s **Advanced settings**, change batch wait time, table sync workers or initial sync connections. Confirm only custom values appear in review. Restore defaults and confirm those rows disappear. For BigQuery, configure partitioning or clustering and confirm the table name and wrapping layout summary appear in the main column under **Table layout**; unconfigured layouts should be omitted. 4. Change BigQuery connection pool size or maximum staleness and confirm they appear within **Connection**. If available, check DuckLake pool size and Snowflake role too. Check desktop and phone widths, then cancel and discard changes; no credentials or creation are needed. 5. Turn the preview off and reopen **Add pipeline**: confirm no review. With the preview on, edit an existing pipeline and confirm no review there either. |
||
|
|
17a7d2a00f |
feat(studio): add destination review for preview pipeline creation (#51633)
## Problem The pipeline wizard in #49243 needs a review of destination details before creation. ## Solution Add `PipelineDestinationReview` after Data in preview-enabled creation. It uses the megabranch’s Destination and Connection sections, destination logo, read-only fields and field descriptions. Values update as fields change. Credentials are omitted. Custom DuckLake catalog URLs and ClickHouse endpoints are masked as whole fields, with an eye toggle; changing a URL masks it again. Preview off and editing keep the existing layout. Validation and creation behaviour stay the same; no wizard routing is added. Publication, advanced settings and cost review will follow in later slices. | This PR | Reference: Final Wizard | | --- | --- | | <img width="1254" height="1308" alt="CleanShot 2026-10-14 at 11 01 05@2x" src="https://github.com/user-attachments/assets/e792ed7f-d4f4-4557-b338-8a120c8663b5" /> | <img width="1486" height="2364" alt="CleanShot 2026-10-14 at 10 50 30@2x" src="https://github.com/user-attachments/assets/982b7d23-9449-4841-b002-9e30fbbabfe9" /> | ## Review instructions 1. Open the [Pipelines preview](https://studio-staging-git-dnywh-featpipeline-destinati-25606b-supabase.vercel.app/dashboard/project/_/database/pipelines), select a test project with Pipelines enabled and go to **Database → Pipelines**. Enable **Pipeline creation wizard** in Feature Previews, then click **Add pipeline**. Confirm the review follows **Data**, with **Destination** and **Connection** sections. 2. With BigQuery selected, enter a pipeline name, project ID and dataset ID. Confirm the review updates with those values in read-only fields, includes field descriptions and the destination logo/region, and omits the service-account key. Check desktop and phone widths. 3. If available, select DuckLake with a custom catalog. Enter a catalog URL and data path. Confirm the whole URL is hidden in review, use the eye toggle to reveal/hide it, then change the URL and confirm it is hidden again. For Supabase DuckLake, confirm the bucket is shown instead. Snowflake shows account/database/schema without its private key; ClickHouse shows database/engine and a masked endpoint without its password. 4. Cancel and discard changes; no pipeline creation is needed. Turn the preview off and reopen **Add pipeline**: confirm there is no review section. With the preview on, edit an existing pipeline and confirm there is no review section there either. |
||
|
|
09a1f431bc |
Mass update for all lucide icon imports to use the component with Icon suffix (#51659)
## Context This is largely just a mechanical change here: Opting to use lucide icons with the `Icon` suffix across all icon imports within `studio` - so that it’s clearer which components are icons + reduces the possibility of name collision with our own components - e.g <User /> vs <UserIcon /> Also added a eslint rule for this: <img width="1069" height="167" alt="image" src="https://github.com/user-attachments/assets/7f36f443-5ca2-4bf6-8d22-86e774513bfc" /> And updated `AGENTS.md` as such: ``` Icons come from `lucide-react`, always imported with the `Icon` suffix (`import { CheckIcon, Trash2Icon } from 'lucide-react'`) — never the bare names (`Check`) or `Check as CheckIcon` aliases (lint-enforced). ``` |
||
|
|
f1082e28c7 |
chore: migrate Framer Motion imports to Motion (#51520)
## Problem Closes #31221. The applications and shared UI packages still import the former `framer-motion` package instead of Motion's React entry point. ## Solution Replace runtime imports, type imports, and three test mocks with `motion/react` across the consuming workspaces. Replace the seven direct dependency declarations with `motion: ^11.18.2`. Preserve the existing animation engine version and all other dependency resolutions, including the asynchronous `domMax` feature loader. Historical blog examples remain as published; `framer-motion` remains a transitive implementation dependency of Motion. ## Review instructions 1. Run `pnpm install --frozen-lockfile` and check the seven dependency replacements in the lockfile. 2. Open the WWW Auth page and Docs homepage at desktop and mobile widths, with normal and reduced motion preferences. 3. Open the mobile navigation, expand Product on WWW, and close the menu using Escape and the close button. 4. Check the existing animation components, shared form validation, and Studio tests for unchanged behavior. Validation: - Studio: 731 test files, 8,334 passing tests and one expected failure, with `--maxWorkers=4`. - Shared UI, UI patterns, WWW, and UI library: 615 passing tests. - `pnpm run typecheck --concurrency=1`: all 16 repository tasks pass. - All six application source lint scripts and lint ratchets pass; generated Docs example copies are excluded from local lint. - Repository Prettier source check, lockfile formatting, and case hazard check pass. - WWW: 10 existing end-to-end checks across nine pages. - Docs: 5 existing guide link and accessibility checks across Database and Auth. - WWW and Docs mobile navigation pass at desktop/mobile sizes with normal/reduced motion; SQL-to-REST translation tabs exercise the asynchronous feature loader without browser errors. - Frozen-lockfile installation passes; all existing package and snapshot resolutions are unchanged. - Learn and UI library command palettes open, filter results, and close with Escape without browser errors. - Independent code review finds no actionable defects. - `npm run build -- --filter=www --filter=docs --filter=studio --filter=learn --filter=library --concurrency=1 --continue=always`: all five affected applications build successfully (9 tasks including prerequisites); asset uploads disabled for local validation. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [x] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) (no docs topics changed) --------- Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com> |
||
|
|
7fa436050a |
refactor(studio): compose the pipeline data section for wizard reuse (#51572)
## Problem The pipeline wizard in #49243 needs publication, initial sync and replication settings together on its data step. ## Solution Compose `PipelineDataSection` from the existing controls and use it in preview-enabled creation. It includes the publication selector, initial-sync controls and data advanced settings, including BigQuery table layout. This preserves the grouping from #51570. Preview off and editing keep the existing layout. Validation and creation behaviour stay the same; no wizard routing is added. Stacked on #51570. ## Review instructions 1. Open the [Pipelines preview](https://studio-staging-git-dnywh-featpipeline-data-section-supabase.vercel.app/dashboard/project/_/database/pipelines), select a test project with Pipelines enabled and go to **Database → Pipelines**. Enable **Pipeline creation wizard** in Feature Previews, then click **Add pipeline**. Confirm **Data** follows **Destination connection**, with publication and initial sync above its **Advanced settings**. 2. Select a publication and change the initial-sync option. For selected-table options, confirm the publication tables are available. Click **New publication** in the publication selector and confirm the existing creation panel opens, then cancel it. 3. Expand **Advanced settings** under **Data**. Confirm replication settings appear, plus table layout for BigQuery, without connection pool size, staleness or role. Change **Batch wait time**, collapse and reopen the accordion, and confirm the value remains. Check desktop and phone widths. Cancel and discard changes; no credentials or pipeline creation are needed. 4. Turn the preview off and reopen **Add pipeline**. Confirm the original layout remains. With the preview on, edit an existing pipeline and confirm its original layout also remains. |
||
|
|
37fb536e6c |
feat(studio): group connection settings in the pipeline creation preview (#51570)
## Problem The pipeline wizard in #49243 needs connection settings before table selection. ## Solution With **Pipeline creation wizard** enabled, rearrange the creation sheet into destination selection, **Destination connection**, then **Data**. Group name, region, credentials and connection advanced settings together. Keep publication, initial sync, replication settings and BigQuery table layout in the data section. Preview off and editing keep the existing layout. Validation and creation behaviour stay the same. This still uses the sheet; no wizard routing is added. Stacked on #51568. | Feature Preview Off | Feature Preview On | | --- | --- | | <img width="1272" height="2536" alt="CleanShot 2026-10-13 at 13 16 36@2x" src="https://github.com/user-attachments/assets/ebad1082-b9ae-4f5e-91ad-08638ea2b032" /> | <img width="1244" height="2538" alt="CleanShot 2026-10-13 at 13 17 20@2x" src="https://github.com/user-attachments/assets/b5400b31-d60e-44e7-a4d6-cca1732b7974" /> | | _One “Advanced settings” at the bottom of the sheet that combines everything. Destination details handles Publication and Initial sync._ | _An “Advanced settings” accordion under BigQuery settings. Another “Advanced settings” under Data (clipped above). Data contains fields for Publication and Initial sync._ | ## Review instructions 1. Open the [Pipelines preview](https://studio-staging-git-dnywh-featpipeline-connectio-6d0876-supabase.vercel.app/dashboard/project/_/database/pipelines), select a test project with Pipelines enabled and click **Add pipeline**. Enable **Pipeline creation wizard** in Feature Previews, then reopen the sheet. Confirm the order is destination cards → connection → data. 2. With BigQuery selected, expand **Advanced settings** under **Destination connection**. Confirm it contains pool size and staleness. Expand **Advanced settings** under **Data** below publication and initial sync. Confirm it contains replication settings and table layout, without duplicate connection fields. Change a value and collapse/reopen the accordion; confirm it remains. 3. If available, select DuckLake or Snowflake. Confirm their connection accordion contains **Pool size** or **Role**, respectively. ClickHouse and Analytics Bucket have no connection accordion. Check desktop and phone widths. Cancel and discard changes; no credentials or pipeline creation are needed. 4. Turn the preview off and reopen **Add pipeline**. Confirm the original layout returns. With the preview on, edit an existing pipeline and confirm it also keeps the original layout. |
||
|
|
d457ab59c7 |
feat(studio): add pipeline wizard destination selection (#51568)
## Problem The pipeline creation wizard in #49243 needs a destination selection step that can be reviewed before wizard routing lands. ## Solution Add `PipelineDestinationSelection` with BigQuery, DuckLake, Snowflake, ClickHouse and deprecated Analytics Bucket radio options, using Studio’s existing destination logos. Show it in the creation sheet only when **Pipeline creation wizard** is enabled in Feature Previews and allowed by ConfigCat. Preview off and editing retain the existing dropdown. This is an incremental preview: creation still uses the sheet. No wizard routing or design-system changes are included. | Feature Preview Off | Feature Preview On | | --- | --- | | <img width="1274" height="1316" alt="CleanShot 2026-10-13 at 10 39 24@2x" src="https://github.com/user-attachments/assets/433e4fb1-5fa2-4dc3-982e-0aee6b266015" /> | <img width="1250" height="1890" alt="CleanShot 2026-10-13 at 10 53 09@2x" src="https://github.com/user-attachments/assets/033d7e43-1a57-4d61-90e8-9048e3560909" /> | ## Review instructions 1. Open the [preview to Database → Pipelines](https://studio-staging-git-dnywh-featpipeline-destinati-54dc7d-supabase.vercel.app/dashboard/project/_/database/pipelines), select a test project with Pipelines enabled and click **Add pipeline**. With **Pipeline creation wizard** off, confirm the existing destination dropdown appears. 2. Close the sheet, enable **Pipeline creation wizard** in Feature Previews and reopen **Add pipeline**. Confirm radio cards replace the dropdown, with BigQuery selected initially and only destinations available to your project shown. 3. If Analytics Bucket is available, confirm its card has a **DEPRECATED** badge. Select it and confirm the bucket fields appear and the description below says **Destination type cannot be changed after creation. Analytics Bucket is deprecated.** Click another destination. Confirm only one card is selected and the connection fields below switch to that destination. Use arrow keys to move focus and Space to select a destination. Check at desktop and phone widths. Cancel and discard changes; no credentials or pipeline creation are needed. 4. With the preview still on, open an existing pipeline for editing. Confirm its destination dropdown remains locked. Turn the preview off and reopen **Add pipeline** to confirm the original dropdown returns. |
||
|
|
f2d8eba736 |
refactor(studio): share pipeline region and selection copy for wizard review (#51540)
## Problem The pipeline creation wizard in #49243 needs to reuse the pipeline region display and publication and initial-sync wording in review. These currently live inside the sheet’s fields. ## Solution Extract `PipelineRegionReadonly` and shared selection copy, with the existing sheet as their first consumer. Region styling, labels, descriptions and selection behaviour stay the same. ## Review instructions 1. Open the [preview to Database → Pipelines](https://studio-staging-git-dnywh-refactorpipeline-revie-080d09-supabase.vercel.app/dashboard/project/_/database/pipelines), select a test project with Pipelines enabled and click **Add pipeline**. 2. Confirm **Pipeline region** still shows the flag, region name and code as read-only information, with the same description and spacing. 3. Select a publication and open **Initial sync**. Confirm the four options keep their existing labels and descriptions. Choose **Selected tables only**, select a table, then choose **All except selected tables**. Confirm the selection description switches from running to skipping initial sync and still says ongoing replication includes every publication table. Cancel and discard changes; no credentials or pipeline creation are needed. |
||
|
|
188f5a743b |
refactor(studio): extract replication fields for wizard reuse (#51538)
## Problem The pipeline creation wizard in #49243 needs replication settings on its data step, separately from destination connection settings. These fields currently live inside the sheet’s Advanced settings accordion. ## Solution Extract **Batch wait time**, **Table sync workers**, **Initial sync connections per table** and **Invalidated slot behavior** into `ReplicationFields`. Keep the existing accordion as its first consumer. Labels, defaults, units, field order and empty-value handling stay the same. ## Review instructions 1. Open the [preview to Database → Pipelines](https://studio-staging-git-dnywh-refactorpipeline-repli-2d71d1-supabase.vercel.app/dashboard/project/_/database/pipelines), select a test project with Pipelines enabled and click **Add pipeline**. Expand **Advanced settings**. 2. Confirm the four replication settings appear in their existing order, before BigQuery’s connection settings and table layout. For DuckLake, **Pool size** stays above them; for Snowflake, **Role** stays below them. 3. Enter `0` for **Batch wait time**, `8` for **Table sync workers** and `3` for **Initial sync connections per table**. Clear and re-enter each value. Confirm no `NaN` appears. Select **Recreate slot**, then collapse and reopen the accordion. Confirm all values remain. Cancel and discard changes; no credentials or pipeline creation are needed. |