Commit Graph
2 Commits
Author SHA1 Message Date
Danny White 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.
2026-10-20 11:04:05 +11:00
Danny White 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.
2026-10-19 10:43:42 +11:00